@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f7f2e8;
  --card: #fffbf3;
  --ink: #1d1a16;
  --muted: #625b50;
  --line: #ddd3c1;
  --accent: #c0331d;
  --accent-ink: #fffbf3;
  --mark: #ffd76a;
  --band: #221e19;
  --band-ink: #f7f2e8;
  --band-muted: #c9bfae;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --w: 1120px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15130f;
    --card: #1e1b16;
    --ink: #efe8db;
    --muted: #a89f90;
    --line: #3b352b;
    --accent: #ff7a5c;
    --accent-ink: #15130f;
    --mark: #6b5310;
    --band: #2a241c;
    --band-ink: #efe8db;
    --band-muted: #b8ad9b;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
}
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 650; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 0.6em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 20px; }
.prose { max-width: 68ch; }
.small { font-size: 0.9rem; color: var(--muted); }
.quote { font-style: italic; }

/* nagłówek */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; text-decoration: none; letter-spacing: -0.02em; }
.brand b { color: var(--accent); font-weight: 700; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.95rem; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--accent); }

/* pasek wersji */
.variant-bar { background: var(--card); border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.variant-bar .wrap { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.variant-bar p { margin: 0; margin-right: auto; }
.btn {
  display: inline-block;
  font: 600 0.92rem/1.2 var(--sans);
  padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.btn-primary:hover { filter: brightness(1.08); color: var(--accent-ink); }
.btn[aria-pressed="true"] { background: var(--mark); border-color: var(--mark); color: var(--ink); }

/* zaznaczanie zmienionych liter */
html.show-changes .chg { background: var(--mark); border-radius: 3px; box-shadow: 0 0 0 1px var(--mark); }
.output .chg { background: var(--mark); border-radius: 3px; box-shadow: 0 0 0 1px var(--mark); }

/* hero */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }
.hero .eyebrow { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.7rem, 8vw, 5.6rem); max-width: 14ch; margin-bottom: 0.4em; }
.hero .lead { font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 58ch; }
.pairs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 36px 0 32px; max-width: 760px; }
.pair { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 18px 14px; }
.pair .glyphs { font-family: var(--serif); font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 650; line-height: 1; display: flex; align-items: baseline; gap: 0.25em; white-space: nowrap; }
.old { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 0.07em; }
.new { color: var(--accent); }
.arrow { font-size: 0.55em; color: var(--muted); }
.pair .example { margin-top: 10px; font-size: 0.95rem; color: var(--muted); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* sekcje */
section { padding: clamp(48px, 7vw, 88px) 0; border-top: 1px solid var(--line); }
.section-lead { font-size: 1.15rem; max-width: 62ch; }

.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 32px 0 40px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.card h3 { font-size: 2.1rem; margin-bottom: 0.35em; }
.rules .card ul { list-style: none; padding: 0; margin: 12px 0 0; }
.rules .card li { padding: 5px 0; border-top: 1px dashed var(--line); display: flex; gap: 8px; flex-wrap: wrap; }
.rules .card li .old { text-decoration-thickness: 0.09em; }
.card .note { font-size: 0.93rem; color: var(--muted); margin-top: 12px; }
.unchanged { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; padding: 0; list-style: none; max-width: 900px; }
.unchanged li { padding-left: 26px; position: relative; }
.unchanged li::before { content: "="; position: absolute; left: 0; top: -1px; font-family: var(--serif); font-weight: 700; color: var(--accent); }

/* statystyki */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.stat { border-top: 3px solid var(--accent); padding-top: 12px; }
.stat b { display: block; font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.05; font-weight: 650; }
.stat span { color: var(--muted); font-size: 0.95rem; }

/* tłumacz */
.translator { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; }
.field label, .field .field-label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.field textarea, .output {
  width: 100%; min-height: 220px; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--card); color: var(--ink);
  font: 400 1.05rem/1.6 var(--sans);
}
.field textarea { resize: vertical; }
.field textarea:focus { border-color: var(--accent); outline: none; }
.output { white-space: pre-wrap; overflow-wrap: anywhere; }
.counter { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 0.95rem; }
.translator .actions { grid-column: 1 / -1; margin: 0; }

/* argumenty */
.reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.reasons .card h3 { font-size: 1.45rem; }

/* pasmo: język należy do nas */
.band { background: var(--band); color: var(--band-ink); border-top: 0; }
.band h2 { font-size: clamp(2rem, 5vw, 3.4rem); max-width: 18ch; }
.band p { max-width: 64ch; font-size: 1.12rem; }
.band .small { color: var(--band-muted); }
.band .punchline { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.25; font-weight: 600; margin-top: 1.2em; }
.band a { color: var(--band-ink); }

/* historia */
.timeline { list-style: none; padding: 0; margin: 28px 0 0; max-width: 820px; }
.timeline li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); }
.timeline .year { font-family: var(--serif); font-weight: 650; font-size: 1.35rem; color: var(--accent); line-height: 1.3; }
.timeline p { margin: 0; }
.timeline li.ours .year { color: var(--ink); }

/* pytania */
.faq { max-width: 820px; margin-top: 24px; }
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; padding: 12px 32px 12px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 8px; font: 600 1.5rem/1 var(--serif); color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 14px; }

/* jak zacząć */
.steps { counter-reset: k; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.steps li { counter-increment: k; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.steps li::before { content: counter(k); display: block; font: 650 2.4rem/1 var(--serif); color: var(--accent); margin-bottom: 10px; }
.signature { margin-top: 28px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.signature code { font: 500 1rem var(--sans); background: var(--card); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; }

/* stopka */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: 0.92rem; color: var(--muted); }
.site-footer h2 { font-size: 1.3rem; color: var(--ink); }
.sources { padding-left: 1.3em; max-width: 90ch; }
.sources li { margin-bottom: 6px; overflow-wrap: anywhere; }

@media (max-width: 860px) {
  .rules, .reasons, .steps, .stats { grid-template-columns: 1fr; }
  .translator { grid-template-columns: 1fr; }
  .unchanged { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .pairs { grid-template-columns: 1fr; }
  .pair { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .pair .example { margin-top: 0; text-align: right; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .site-nav { gap: 12px; font-size: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* podstrony (artykuły, listy) */
.article { padding: clamp(40px, 6vw, 72px) 0; border-top: 0; }
.article h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.article h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 1.4em; }
.post-list { padding-left: 1.2em; }
.post-list li { margin-bottom: 10px; }
.sources-section { font-size: 0.92rem; color: var(--muted); }
.sources-section h2 { font-size: 1.5rem; color: var(--ink); }
.site-footer p { margin: 0 0 6px; }

/* duże litery: skreślenie ukośne, bo pozioma kreska robi z „c” literę „e” */
.pair .glyphs .old, .card h3 .old {
  text-decoration: none;
  background: linear-gradient(to top right, transparent calc(50% - 0.035em), var(--accent) calc(50% - 0.035em), var(--accent) calc(50% + 0.035em), transparent calc(50% + 0.035em));
  padding: 0 0.04em;
}
.stats { margin-bottom: 18px; }
.translator + p { margin-top: 18px; }
.timeline li { grid-template-columns: 9rem 1fr; }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; } }

/* znane teksty po nowopolsku */
.sample-poem { margin: 28px 0 8px; }
.sample-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sample-col { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 24px; }
.sample-new { border-color: var(--accent); }
.sample-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.sample-new .sample-label { color: var(--accent); }
.sample-text { font-family: var(--serif); font-size: 1.1rem; line-height: 1.6; margin: 0; }
.sample-new .chg, .quote-card blockquote .chg { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
figure { margin: 0; }
figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 10px; }
.quote-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.quote-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.quote-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--accent); margin: 0; }
.quote-card blockquote { margin: 0; font-family: var(--serif); font-size: 1.28rem; line-height: 1.35; font-weight: 560; }
.quote-card blockquote p { margin: 0; }
.quote-orig { font-size: 0.88rem; color: var(--muted); margin: 0; }
.quote-card figcaption { margin-top: auto; padding-top: 6px; border-top: 1px dashed var(--line); font-size: 0.84rem; }
@media (max-width: 860px) {
  .sample-cols, .quote-grid { grid-template-columns: 1fr; }
}

/* ściągawka */
.cheatsheet { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 14px; }
.cheatsheet li { display: flex; gap: 10px; align-items: baseline; padding: 7px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; font-size: 1.02rem; }
.cheatsheet .old { color: var(--muted); font-size: 0.9rem; text-decoration: line-through; text-decoration-color: var(--accent); }

/* przełącznik pisowni w nagłówku */
.site-header .wrap { gap: 10px 22px; }
.site-nav { margin-left: auto; }
.variant-switch { order: 3; display: inline-flex; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; font: 600 0.88rem/1 var(--sans); }
.variant-switch a { padding: 8px 13px; text-decoration: none; color: var(--ink); }
.variant-switch a[aria-current] { background: var(--ink); color: var(--paper); }
.variant-switch a:not([aria-current]):hover { color: var(--accent); }
section, [id] { scroll-margin-top: 84px; }
@media (min-width: 561px) {
  .site-header { position: sticky; top: 0; z-index: 20; background: var(--paper); }
}
@media (max-width: 560px) {
  .site-header .wrap { padding-top: 10px; padding-bottom: 8px; }
  .site-nav { order: 4; margin-left: 0; width: 100%; flex-wrap: wrap; gap: 4px 14px; padding-bottom: 2px; }
  .variant-switch { margin-left: auto; }
  section, [id] { scroll-margin-top: 12px; }
}
@media (max-width: 560px) {
  .site-header .wrap { gap: 8px 10px; }
  .variant-switch { font-size: 0.8rem; }
  .variant-switch a { padding: 7px 10px; }
}

/* znak w nagłówku */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { display: block; border-radius: 8px; }
@media (max-width: 560px) { .brand img { width: 28px; height: 28px; } }
@media (max-width: 560px) {
  .brand { font-size: 1.15rem; gap: 8px; }
  .brand img { width: 26px; height: 26px; border-radius: 7px; }
}
.brand img { border-radius: 10px; }
@media (max-width: 560px) { .brand img { width: 32px; height: 32px; border-radius: 8px; } }

/* słowniki do pobrania */
.downloads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 28px 0 18px; }
.downloads .card { display: flex; flex-direction: column; }
.downloads h3 { font-size: 1.6rem; margin-top: 4px; }
.downloads ol { padding-left: 1.2em; margin: 0 0 14px; font-size: 0.95rem; }
.downloads ol li { margin-bottom: 6px; }
.downloads .card > p:last-child { margin-top: auto; margin-bottom: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (max-width: 860px) { .downloads { grid-template-columns: 1fr; } }
.more { font-weight: 600; margin: 8px 0 28px; }
.faq + .more { margin-top: 32px; }
.article .section-lead { font-size: 1.15rem; }
.article h2 { scroll-margin-top: 84px; }
.prose p.nc { font-family: var(--serif); font-size: 1.05rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }

/* artykuły: przypisy i źródła */
.article sup a { text-decoration: none; color: var(--accent); font-weight: 600; padding: 0 1px; }
.footnotes, .sources { font-size: 0.88rem; color: var(--muted); padding-left: 1.4em; }
.footnotes li, .sources li { margin-bottom: 5px; overflow-wrap: anywhere; }
.footnotes li:target { background: var(--mark); color: var(--ink); }
.sources { list-style: none; padding-left: 0; }
.post-list li { margin-bottom: 14px; }
.post-list a { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }

/* biblioteka */
.crumbs { margin-bottom: 6px; }
.byline { color: var(--muted); margin-top: -0.4em; }
.shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.shelf h3 { font-size: 1.6rem; margin: 4px 0 8px; }
.shelf h3 a { text-decoration: none; }
.shelf-links { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 0; }
.shelf-toc { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 0; }
.shelf-toc a { border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; text-decoration: none; }
.shelf-head { margin: 1.6em 0 0.1em; }
.shelf-lead { margin: 0; }
.parts { columns: 2; column-gap: 32px; padding-left: 1.4em; margin: 18px 0 24px; }
.parts li { margin-bottom: 6px; break-inside: avoid; }
.book { font-family: var(--serif); font-size: 1.12rem; line-height: 1.65; max-width: 38em; margin: 28px 0; }
.book .stanza { margin: 0 0 0.9em; }
.book .stanza-spacer, .book .title-page, .book .page-title { display: none; }
.book .verse { margin: 0; }
.book .paragraph { margin: 0 0 0.9em; }
.book h2 { font-family: var(--serif); line-height: 1.2; }
.book h2.intitle { font-size: 1.7rem; margin: 1.6em 0 0.5em; }
.book h2.insubtitle { font-size: 1.15rem; font-style: italic; font-weight: 400; color: var(--muted); margin: -0.2em 0 1em; }
.book h2.h2 { font-size: 1.6rem; margin: 1.4em 0 0.6em; }
.book div.h3 { font: 600 0.82rem/1.3 var(--sans); letter-spacing: 0.08em; color: var(--muted); margin: 1.3em 0 0.4em; }
.book > :first-child { margin-top: 0; }
.book h2.h3 { font-size: 1.4rem; margin: 1.4em 0 0.6em; }
.book h2.h4 { font: 600 0.82rem/1.3 var(--sans); letter-spacing: 0.08em; color: var(--muted); margin: 1.3em 0 0.25em; }
.book .note p { font-style: italic; color: var(--muted); font-size: 0.95rem; }
.book .didaskalia { font-style: italic; color: var(--muted); font-size: 0.95rem; margin: 0.2em 0 0.4em; }
.book .kwestia { margin-bottom: 0.5em; }
.book .motto, .book .motto_podpis { font-style: italic; color: var(--muted); }
.book-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 32px 0 12px; }
.wl { display: flex; gap: 14px; align-items: center; font-size: 0.85rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 2.5em; padding-top: 1.2em; }
.wl p { margin: 0; }
.wl img { flex: none; background: #fff; border-radius: 6px; padding: 4px; }
@media (max-width: 860px) { .shelf { grid-template-columns: 1fr; } .parts { columns: 1; } }
.book ol, .book ul { list-style: none; padding-left: 0; }

/* litery omawiane w tekście: nowe w kolorze akcentu, stare przygaszone */
.lit { font-weight: 700; }
.lit-new { color: var(--accent); }
.lit-old { color: var(--muted); }
.band .lit-new { color: #ff8a6b; }
