/* epubwise. Set like a book: Literata for headings and reading text, the system's own sans-serif for
   everything you click. Paper, ink and one oxblood accent. Literata is served from this site
   (SIL Open Font License, see /static/fonts/OFL.txt), so no font request leaves it. */
@font-face { font-family: "Literata"; src: url("/static/fonts/literata.woff2") format("woff2");
             font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/static/fonts/literata-italic.woff2") format("woff2");
             font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --paper: #f6f1e7; --paper-2: #efe7d8; --surface: #fffcf6; --ink: #1d1b17; --fg: #2d2b26; --muted: #5f5b52;
  --line: #e3d9c6; --line-2: #c9bca4;
  --accent: #8e2b1d; --accent-2: #6f1f14; --accent-soft: #f4e3dc; --accent-ink: #fffaf5;
  --ok: #2f6a3b; --ok-soft: #e3efe1; --err: #a8261b; --err-soft: #f8e1dc; --mark: #f3d98b;
  --serif: "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 10px; --w: 1120px; --measure: 40rem;
  --shadow: 0 1px 1px rgba(29, 27, 23, .04), 0 10px 30px -14px rgba(29, 27, 23, .22);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15130f; --paper-2: #1b1813; --surface: #1f1c17; --ink: #f2ece1; --fg: #e2dbcd; --muted: #aba293;
    --line: rgba(255, 245, 230, .11); --line-2: rgba(255, 245, 230, .24);
    --accent: #e5866c; --accent-2: #f0a58f; --accent-soft: #3a2119; --accent-ink: #1d0d08;
    --ok: #86c08f; --ok-soft: #1c2f20; --err: #f28b7d; --err-soft: #3b1a16; --mark: #6a5418;
    --shadow: 0 1px 1px rgba(0, 0, 0, .4), 0 14px 36px -16px rgba(0, 0, 0, .8);
  }
  .mark rect { fill: #36302a; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--fg); font: 17px/1.65 var(--sans); }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-2); text-decoration-thickness: 2px; }
img, svg { max-width: 100%; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 28px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 10; background: var(--surface); color: var(--ink);
        padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); }
.skip:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.ic { width: 22px; height: 22px; flex: none; }

/* ---------- header: a thin rule, like the top of a page */
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; min-height: 66px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
        font: 600 22px/1 var(--serif); letter-spacing: -.01em; }
.logo:hover { color: var(--ink); }
.mark { width: 28px; height: 28px; }
.wm-i { position: relative; display: inline-block; }
.wm-i svg { position: absolute; left: 50%; top: .1em; width: .17em; height: .24em; transform: translateX(-50%); }
.nav { display: flex; gap: 2px; flex-wrap: wrap; margin-right: -10px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 10px; border-radius: 6px; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }

/* ---------- type */
h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 600; }
h1 { font-size: clamp(38px, 5.4vw, 62px); line-height: 1.06; letter-spacing: -.022em; margin: 0 0 22px; max-width: 16ch;
     text-wrap: balance; }
.page h1 { font-size: clamp(34px, 4.6vw, 50px); max-width: 20ch; }
h2 { font-size: clamp(27px, 3.2vw, 36px); line-height: 1.14; letter-spacing: -.016em; margin: 0 0 14px; text-wrap: balance; }
h3 { font-size: 20px; line-height: 1.3; margin: 0 0 6px; letter-spacing: -.005em; }
p { margin: 0 0 16px; }
cite, em { font-family: var(--serif); font-style: italic; }
/* the small line above a title reads like a book's running head */
.kicker { display: flex; align-items: center; gap: 12px; font: italic 400 17px/1.3 var(--serif); color: var(--muted);
          margin: 0 0 16px; }
.kicker::before { content: ""; width: 30px; height: 1px; background: var(--accent); flex: none; }
.answer { font-size: 19px; line-height: 1.6; color: var(--fg); max-width: var(--measure); margin: 0 0 28px; }
.answer strong { font-weight: 500; }
.lead { font-size: 19px; color: var(--muted); max-width: var(--measure); }
.sub { color: var(--muted); max-width: var(--measure); margin-bottom: 30px; }
.prose p, .prose li { max-width: var(--measure); }
.note { border-left: 2px solid var(--accent); padding: 4px 0 4px 18px; max-width: var(--measure); color: var(--muted); }
.updated { color: var(--muted); font: italic 15px/1.4 var(--serif); }
.fine { color: var(--muted); font-size: 14px; line-height: 1.55; }
.caption { color: var(--muted); font: italic 15px/1.55 var(--serif); margin-top: 14px; max-width: 46rem; }
.caption a { color: inherit; }

/* ---------- layout blocks */
.crumbs { padding-top: 22px; font-size: 14px; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-2); }
.crumbs a { color: var(--muted); }
.hero { padding: 60px 0 36px; }
.crumbs + .hero { padding-top: 30px; }
.hero-copy .answer, .hero-in > .tool { max-width: 760px; }
.block { padding-top: 72px; padding-bottom: 8px; }
.page { padding-top: 30px; padding-bottom: 24px; }
.page h2 { margin-top: 38px; font-size: clamp(24px, 2.8vw, 30px); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

@media (min-width: 1000px) {
  .hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 64px; align-items: center; }
  .hero h1 { font-size: clamp(38px, min(3.9vw, 7vh), 56px); }
  .hero-copy .answer { margin-bottom: 0; }
  /* the homepage: copy and converter on the left, the real book on the right */
  .hero-home .hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 500px); grid-template-rows: auto 1fr;
                        align-items: start; row-gap: 0; }
  .hero-home .hero-copy .answer { margin-bottom: 26px; }
  .hero-home .proof { display: block; grid-column: 2; grid-row: 1 / span 2; }
  .hero-home .hero-copy, .hero-home .tool { grid-column: 1; }
}
/* short laptop screens (1366x768, or 1920x1080 at 150% scaling): keep Choose PDF and the whole phone
   above the fold */
@media (min-width: 1000px) and (max-height: 860px) {
  .hero-home { padding-top: 30px; }
  .hero-home .kicker { margin-bottom: 10px; }
  .hero-home h1 { margin-bottom: 14px; }
  .hero-home .answer { font-size: 17.5px; line-height: 1.55; }
  .hero-home .hero-copy .answer { margin-bottom: 18px; }
  .hero-home .drop { padding: 18px 22px 16px; }
  .hero-home .drop-icon { width: 40px; height: 40px; }
  .hero-home .proof-page { width: 66%; }
  .hero-home .phone { top: 64px; }
  .hero-home .phone-screen { height: clamp(380px, 64vh, 470px); }
}

/* ---------- the proof beside the hero: a page of the 1876 scan and the EPUB on a phone */
.proof { display: none; position: relative; margin: 6px 0 0; padding: 0 0 8px; }
.proof-page { width: 76%; margin: 0; background: #f4ecda; padding: 10px; border: 1px solid #ddcfb2; border-radius: 3px;
              box-shadow: var(--shadow); transform: rotate(-2.2deg); transform-origin: 30% 20%; }
.proof-page img { display: block; width: 100%; height: auto; }
.phone { position: absolute; right: 0; top: 108px; width: 252px; padding: 9px; background: #191714; border-radius: 34px;
         box-shadow: 0 2px 2px rgba(0, 0, 0, .18), 0 30px 60px -22px rgba(29, 27, 23, .55); }
.phone-screen { position: relative; height: 470px; overflow: hidden; border-radius: 26px; background: #fbf7ee; color: #24221d;
                padding: 30px 20px 0; }
.phone-bar { display: flex; justify-content: space-between; font: 600 10.5px/1 var(--sans); color: #6c675d;
             letter-spacing: .02em; margin: 0 0 14px; }
.phone-text { font: 15px/1.62 var(--serif); margin: 0; hyphens: auto; -webkit-hyphens: auto; text-indent: 1.3em; }
.phone-screen::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 130px;
                       background: linear-gradient(rgba(251, 247, 238, 0), #fbf7ee 62%); }
.phone-foot { position: absolute; left: 20px; right: 20px; bottom: 16px; z-index: 1; display: flex; justify-content: space-between;
              font: 10.5px/1 var(--sans); color: #6c675d; }
.proof figcaption { margin: 84px 0 0; color: var(--muted); font: italic 14.5px/1.5 var(--serif); }

/* the reflow: app.js steps the figure through a-hide, a-junk, a-mark and a-strike once, then hands over
   the reader controls. Without JS, or with reduced motion, the clean final frame is all there is. */
.pp-in { position: relative; }
.hl { position: absolute; left: 4.5%; top: 8.4%; width: 57%; height: 4.4%; border: 2px solid #b5432f; border-radius: 4px;
      background: rgba(181, 67, 47, .1); opacity: 0; transform: scale(1.08); transition: opacity .5s, transform .5s;
      pointer-events: none; }
.a-mark .hl { opacity: 1; transform: none; }
.phone-text { transition: opacity .35s, font-size .3s; }
.a-hide .phone-text { opacity: 0; }
.junk { font-size: 0; opacity: 0; transition: font-size 1s ease-in-out, opacity .8s; }
.a-junk .junk { font-size: 1em; opacity: 1; }
.a-now .junk { transition: none; }
.junk s { font: 600 .78em/1 var(--sans); letter-spacing: .04em; color: #8e2b1d; background: rgba(181, 67, 47, .13);
          border-radius: 3px; padding: .1em .25em; text-decoration-line: line-through; text-decoration-thickness: 2px;
          text-decoration-color: transparent; transition: text-decoration-color .6s; }
.a-strike .junk s { text-decoration-color: #b5432f; }
.fs-0 { font-size: 13px; } .fs-1 { font-size: 15px; } .fs-2 { font-size: 17.5px; } .fs-3 { font-size: 20px; }
.phone-bar { align-items: center; min-height: 22px; }
.rd-ctl { display: flex; gap: 4px; }
.rd-ctl[hidden] { display: none; }
.rd-btn { display: grid; place-items: center; min-width: 26px; height: 22px; padding: 0 5px; border: 1px solid #e0d8c6;
          border-radius: 6px; background: transparent; color: #57524a; font: 600 10.5px/1 var(--sans); cursor: pointer; }
.rd-big { font-size: 13px; }
.rd-btn svg { width: 11px; height: 11px; }
.rd-btn:hover { border-color: #b9ae97; }
.rd-btn:focus-visible { outline: 2px solid #b5432f; outline-offset: 1px; }
.rd-ctl.hint .rd-btn { animation: rd-hint 1.1s ease-out 2; }
@keyframes rd-hint { 0% { box-shadow: 0 0 0 0 rgba(181, 67, 47, .5); } 100% { box-shadow: 0 0 0 7px rgba(181, 67, 47, 0); } }
.phone-screen { transition: background-color .3s, color .3s; }
.phone-screen.night { background: #1d1b18; color: #ddd5c6; }
.phone-screen.night::after { background: linear-gradient(rgba(29, 27, 24, 0), #1d1b18 62%); }
.night .phone-bar, .night .phone-foot { color: #9a9385; }
.night .rd-btn { border-color: #3d3830; color: #cfc7b8; }
/* the caption sits at the foot of the phone screen, over the fade, so it is on screen whenever the
   animation is; it is absolutely placed, so the steps never move anything else */
.proof-ctl { position: absolute; left: 14px; right: 14px; bottom: 50px; z-index: 2; display: grid; justify-items: center;
             grid-template-columns: minmax(0, 1fr);
             gap: 6px; text-align: center; }
.proof-step { margin: 0; padding: 5px 9px; border-radius: 8px; background: #fbf7ee; box-shadow: 0 0 0 1px #ece3cf;
              font: 600 12px/1.35 var(--sans); color: #8e2b1d; opacity: 0; transition: opacity .3s; }
.proof-step:empty { display: none; }
.night .proof-step { color: #e5866c; background: #1d1b18; box-shadow: 0 0 0 1px #3d3830; }
.proof-step.on { opacity: 1; }
.replay { padding: 2px 9px; border: 1px solid #e0d8c6; border-radius: 99px; background: #fbf7ee;
          color: #57524a; font: 600 11px/1.4 var(--sans); cursor: pointer; }
.replay:hover { border-color: #b9ae97; }
.night .replay { background: #1d1b18; border-color: #3d3830; color: #cfc7b8; }
.replay[hidden] { display: none; }

/* small phones: a tighter hero, so Choose PDF shows without scrolling even on a 320x640 screen */
@media (max-width: 599.98px) {
  .hero-home { padding-top: 28px; }
  .hero-home .kicker { margin-bottom: 10px; font-size: 16px; }
  .hero-home h1 { margin-bottom: 14px; }
  .hero-home .answer { font-size: 17px; line-height: 1.55; margin-bottom: 20px; }
}

/* phones and tablets: no scan beside the converter, just the EPUB phone under it */
@media (max-width: 999.98px) {
  .hero-home .proof { display: block; max-width: 270px; margin: 30px auto 0; padding: 0; }
  .hero-home .proof-page, .hero-home .proof figcaption { display: none; }
  .hero-home .phone { position: relative; top: 0; }
  .hero-home .phone-screen { height: 360px; }
}

/* ---------- a converter's proof: the book behind, the text window in front. app.js plays the wipe from the
   "before" text to the "after" text; without it the after text is what shows. Sizes are fixed so nothing moves. */
.proof-wipe { min-height: 560px; }
.tw-book { width: 72%; min-height: 250px; padding: 22px 24px; font: 15px/1.6 var(--serif); color: #2b2822; }
.tw-book-t { margin: 0 0 12px; font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #6b6355;
             text-align: center; }
.tw-book-verse span, .tw-book-table span { display: block; overflow: hidden; }
.tw-book-verse span { padding-left: 1em; text-indent: -1em; }
.tw-book-table { font: 7.6px/1.5 var(--mono); white-space: pre; }
.tw-book-table span { white-space: pre; min-height: 1.5em; }
.tw-win { position: absolute; left: 0; right: 0; top: 150px; padding: 8px; background: #191714; border-radius: 16px;
          box-shadow: 0 2px 2px rgba(0, 0, 0, .18), 0 30px 60px -22px rgba(29, 27, 23, .55); }
.tw-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 8px 10px;
          font: 600 11.5px/1.3 var(--sans); color: #cfc7b8; }
.tw-file { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-state { flex: none; padding: 3px 9px; border-radius: 99px; background: #fbf7ee; color: #8e2b1d; }
.tw-before-on .tw-state { background: #3a342c; color: #e8dfcf; }
.tw-stage { position: relative; height: 262px; overflow: hidden; border-radius: 9px; background: #fbf7ee; }
.tw-stage .tw-sample { position: absolute; inset: 0; }
.tw-stage .tw-sample[hidden], .tw-book .tw-sample[hidden] { display: none; }
.tw-text { position: absolute; inset: 0; margin: 0; padding: 14px 16px; overflow: hidden; background: #fbf7ee; color: #24221d;
           font: 11.5px/1.6 var(--mono); white-space: pre; tab-size: 4; }
.tw-after { overflow-x: auto; clip-path: inset(0 0 100% 0); transition: clip-path 1.1s ease-in-out; }
.tw-after:focus-visible { outline: 2px solid #b5432f; outline-offset: -2px; }
.tw-done .tw-after { clip-path: inset(0 0 0 0); }
.tw-before { color: #6c675d; }
.tw-ln { display: block; min-height: 1.6em; white-space: pre; }
.tw-wrap, .tw-wrap .tw-ln { white-space: pre-wrap; word-break: break-word; }
.tw-page { padding: 0; background: #fff; }
.tw-page img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.tw-page-foot img { object-position: bottom; }
/* the red ring from the home page's proof, around text placed by the build script's where() */
.tw-mark { position: absolute; border: 2px solid #b5432f; border-radius: 4px; background: rgba(181, 67, 47, .08); opacity: 0;
           transform: scale(1.1); pointer-events: none; }
.tw-done .tw-mark { opacity: 1; transform: none; transition: opacity .35s .7s, transform .35s .7s; }
.tw-now .tw-mark { transition: none; }
.tw-mark-top { left: 36.5%; width: 27%; top: 9.5%; height: 9%; }
.tw-mark-foot { left: 46.5%; width: 7%; top: 82.5%; height: 8%; }
.tw-big { padding-top: 34px; font-size: 13.5px; line-height: 2; }
.tw-big .tw-ln { min-height: 2em; }
.tw-tiles { display: grid; place-items: center; padding: 10px; }
.tw-tile { display: block; width: auto; height: 236px; aspect-ratio: 3 / 4; border-radius: 3px; }
.tw-tile-empty { display: grid; place-items: center; padding: 14px; border: 1.5px dashed #c9bca4; color: #6c675d; text-align: center;
                 font: 600 12px/1.4 var(--sans); background: #f4ecda; }
img.tw-tile { box-shadow: 0 8px 18px -8px rgba(29, 27, 23, .5); }
.tw-tab { color: #c98c7c; }
.tw-line { position: absolute; left: 0; right: 0; bottom: 100%; height: 3px; background: #b5432f; opacity: 0;
           box-shadow: 0 0 14px 3px rgba(181, 67, 47, .4); pointer-events: none; }
.tw-wiping .tw-line { opacity: 1; bottom: 0; transition: bottom 1.1s ease-in-out; }
.tw-now .tw-after, .tw-now .tw-line { transition: none; }
.tw-ctl { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 4px 2px; }
.tw-ctl[hidden] { display: none; }
.tw-tab-btn { min-height: 30px; padding: 4px 11px; border: 1px solid #4a443a; border-radius: 99px; background: transparent;
              color: #e8dfcf; font: 600 12px/1.2 var(--sans); cursor: pointer; }
.tw-tab-btn:hover { border-color: #8d8373; }
.tw-tab-btn:focus-visible { outline: 2px solid #e5866c; outline-offset: 2px; }
.tw-tab-btn[aria-pressed="true"] { background: #fbf7ee; border-color: #fbf7ee; color: #24221d; }
.proof-wipe figcaption { position: absolute; left: 0; right: 0; top: 504px; margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .tw-after, .tw-line, .tw-done .tw-mark { transition: none; }
}
@media (min-width: 1000px) and (max-height: 860px) {
  .hero-home .proof-wipe .proof-page { width: 72%; }
}
@media (max-width: 999.98px) {
  .hero-home .proof.proof-wipe { max-width: 560px; min-height: 0; }
  .proof-wipe .tw-win { position: relative; top: 0; }
  .hero-home .proof-wipe figcaption { display: block; position: static; margin-top: 12px; }
  .proof-wipe .tw-stage { height: 246px; }
  .proof-wipe .tw-text { padding: 12px; font-size: clamp(9.5px, 2.6vw, 11.5px); }
  .proof-wipe .tw-big { padding-top: 26px; font-size: clamp(10.5px, 3vw, 13.5px); }
  .tw-tile { height: 222px; }
  .proof-wipe .tw-page { padding: 0; }
  .proof-wipe .tw-page img { object-fit: contain; }     /* the whole width, so no word is cut */
  .tw-mark-top { top: 6.8%; height: 6.5%; }
  .tw-mark-foot { top: 87.4%; height: 5.8%; }
}

/* ---------- the converter */
.tool { margin: 0 0 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r) + 4px); padding: 8px;
        box-shadow: var(--shadow); }
.drop { border: 1.5px dashed var(--line-2); border-radius: var(--r); padding: 30px 22px 24px; text-align: center;
        transition: border-color .2s, background-color .2s; }
.drop:has(.file-row:not([hidden])) { border-style: solid; border-color: var(--line); padding: 18px; }
.drop:hover, .drop:focus-within { border-color: var(--accent); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
#file:focus-visible + .drop-label .btn-pick { outline: 2px solid var(--accent); outline-offset: 3px; }
.drop-label { display: grid; justify-items: center; gap: 4px; cursor: pointer; padding: 4px; }
.drop-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
             border: 1px solid var(--line); color: var(--accent); margin-bottom: 8px; }
.drop-icon .ic { width: 24px; height: 24px; }
.drop-main { font: 600 21px/1.25 var(--serif); color: var(--ink); }
.btn-pick { margin-top: 12px; min-width: 210px; }
.drop-label:hover .btn-pick { background: var(--accent-2); }
@media (hover: none) { .drop-main { display: none; } .btn-pick { margin-top: 2px; } }
.drop-sub { color: var(--muted); font-size: 14px; margin-top: 8px; }
.file-row { display: flex; align-items: center; gap: 14px; text-align: left; background: var(--paper);
            border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.file-ic { flex: none; display: grid; place-items: center; width: 40px; height: 48px; border-radius: 4px;
           background: var(--accent-soft); color: var(--accent); font: 700 11px/1 var(--sans); letter-spacing: .05em; }
.file-meta { flex: 1; min-width: 0; display: grid; }
.file-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--muted); font-size: 14px; }
.cf-turnstile { margin: 14px auto 0; display: flex; justify-content: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; margin-top: 18px;
       padding: 13px 26px; border: 0; border-radius: 8px; font: 600 16.5px/1 var(--sans); text-decoration: none;
       cursor: pointer; transition: background-color .15s, box-shadow .15s; }
.btn .ic { width: 19px; height: 19px; }
.btn-cta { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 0 rgba(0, 0, 0, .12), 0 8px 18px -10px var(--accent); }
.btn-cta:hover { background: var(--accent-2); color: var(--accent-ink); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); text-decoration: none; }
.btn-sm { min-height: 42px; padding: 10px 18px; font-size: 15px; margin-top: 14px; }
.btn-go { width: 100%; }
.link { background: none; border: 0; padding: 4px 2px; color: var(--accent); font: inherit; text-decoration: underline;
        text-underline-offset: .2em; cursor: pointer; }

.panel { padding: 28px 20px; text-align: center; }
.panel-h { font: 600 22px/1.25 var(--serif); color: var(--ink); margin: 10px 0 4px; }
.panel-note { color: var(--muted); margin: 0; }
.panel-small { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.fb { margin: 18px auto 0; padding-top: 14px; border-top: 1px solid var(--line); max-width: 30rem; }
.fb-q { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.fb-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 8px; }
.fb-btn { padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: transparent;
          color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.fb-btn:hover:not(:disabled) { border-color: var(--accent); }
.fb-btn.on { border-color: var(--accent); background: var(--accent-soft); }
.fb-btn:disabled { cursor: default; opacity: .7; }
.fb-btn.on:disabled { opacity: 1; }
.fb-thanks { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.panel-err .panel-h { color: var(--err); font: 600 17px/1.45 var(--sans); }
.badge { display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; }
.badge .ic { width: 26px; height: 26px; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-err { background: var(--err-soft); color: var(--err); }
.stages { list-style: none; display: flex; justify-content: center; gap: 6px; margin: 0 0 22px; padding: 0;
          font-size: 14px; color: var(--muted); }
.stages li { display: flex; align-items: center; gap: 8px; }
.stages li + li::before { order: -2; content: ""; width: 28px; height: 1px; background: var(--line-2); margin-right: 2px; }
.stages li.past + li::before { background: var(--accent); }
.stages li::after { order: -1; content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.stages li.on { color: var(--ink); font-weight: 600; }
.stages li.on::after { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.stages li.past::after { border-color: var(--accent); background: var(--accent); }
.status-file { font-weight: 600; color: var(--ink); margin: 0 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 6px; background: var(--paper-2); border-radius: 99px; overflow: hidden; max-width: 420px; margin: 12px auto 14px; }
.bar span { display: block; height: 100%; width: 3%; background: var(--accent); border-radius: 99px; transition: width .6s ease; }
.bar.busy span { width: 35%; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
#status-text { color: var(--muted); margin: 0; font-size: 15px; }

.trust { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin: 16px 0 6px; padding: 0;
         color: var(--fg); font-size: 14.5px; }
.trust li { display: inline-flex; align-items: center; gap: 7px; }
.trust .ic { width: 17px; height: 17px; color: var(--accent); }
.tool .fine { text-align: center; max-width: 40rem; margin: 6px auto 0; }
@media (min-width: 1000px) { .hero-home .trust { justify-content: flex-start; } .hero-home .tool .fine { text-align: left; margin-left: 0; } }

/* ---------- before / after */
.demo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.demo > :first-child { grid-column: 1 / -1; }
.sample { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.sample figcaption { font: 600 12.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 14px 20px;
                     border-bottom: 1px solid var(--line); color: var(--muted); }
.sample-good figcaption { color: var(--accent); }
.scan { padding: 20px 24px; background: #f4ecda; }
.scan > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.scan img { display: block; width: 100%; height: auto; border-radius: 2px; }
.pb { display: flex; align-items: center; gap: 10px; margin: 10px 0; font: 600 11px/1 var(--sans); letter-spacing: .08em;
      text-transform: uppercase; color: #66583b; }
.pb::before, .pb::after { content: ""; flex: 1; border-top: 1px dashed #c9b994; }
.sample-text { padding: 20px; font: 17px/1.65 var(--serif); color: var(--fg); }
.sample-text .line { display: block; padding-left: 1.2em; text-indent: -1.2em; }
.sample-text .para { display: block; text-indent: 1.4em; }
.sample mark { background: var(--mark); color: inherit; padding: 0 3px; border-radius: 2px; font-family: var(--sans); font-size: 14px; }

/* ---------- what it fixes: each step with a small typeset specimen, not an icon */
.fixes { list-style: none; counter-reset: f; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: 1fr 1fr;
         column-gap: 56px; border-top: 1px solid var(--line); }
.fixes > li { counter-increment: f; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 8px;
              padding: 26px 0 22px; border-bottom: 1px solid var(--line); }
.fixes > li::before { content: counter(f, lower-roman) "."; font: italic 19px/1.35 var(--serif); color: var(--accent); }
.fixes h3 { margin-bottom: 8px; }
.fixes p { color: var(--muted); font-size: 16px; margin: 10px 0 0; }
.spec { font: 16px/1.55 var(--serif); color: var(--fg); background: var(--surface); border: 1px solid var(--line);
        border-radius: 6px; padding: 12px 14px; }
.spec del { color: var(--err); text-decoration-thickness: 1.5px; font-size: 13px; font-family: var(--sans); letter-spacing: .02em; }
.spec .to { display: block; color: var(--muted); font: 12px/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase;
            margin: 6px 0 2px; }
.spec .hy { color: var(--accent); }
.spec-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; font: 12px/1 var(--sans); color: var(--muted); }
.spec-cols span { display: block; height: 58px; padding-top: 18px; position: relative;
                  background: repeating-linear-gradient(var(--line-2) 0 2px, transparent 2px 9px) 0 22px / 100% 36px no-repeat; }
.spec-cols span::before { content: attr(data-n); position: absolute; top: 0; left: 0; font: italic 600 14px/1 var(--serif);
                          color: var(--accent); }
.spec-toc { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.spec-toc span:nth-child(odd) { overflow: hidden; white-space: nowrap; }
.spec-toc span:nth-child(odd)::after { content: " . . . . . . . . . . . . . . . . . . . . . . . ."; color: var(--line-2); }
.spec-tab { width: 100%; border-collapse: collapse; font: 13.5px/1.3 var(--sans); }
.spec-tab th, .spec-tab td { border-bottom: 1px solid var(--line); padding: 4px 6px; text-align: left; }
.spec-tab th { color: var(--muted); font-weight: 600; }
.spec-scan { display: grid; gap: 6px; }
.spec-scan img { display: block; width: 100%; height: auto; border-radius: 2px; }

/* ---------- how-to steps: three short lines between rules */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(3, 1fr);
         gap: 36px; }
.steps > li { counter-increment: s; border-top: 1px solid var(--ink); padding-top: 18px; }
.steps > li::before { content: counter(s); display: block; font: italic 600 26px/1 var(--serif); color: var(--accent);
                      margin-bottom: 12px; }
.steps p { color: var(--muted); }

.phases { list-style: none; counter-reset: s; padding: 0; margin: 32px 0; }
.phases > li { counter-increment: s; position: relative; padding: 0 0 8px 58px; }
.phases > li::before { content: counter(s, lower-roman) "."; position: absolute; left: 0; top: 4px; width: 42px;
                       font: italic 600 22px/1.2 var(--serif); color: var(--accent); }
.phases h2 { margin: 4px 0 8px; font-size: clamp(22px, 2.6vw, 26px); }

.ticks { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 12px; max-width: var(--measure); }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks li > .ic { color: var(--accent); margin-top: 3px; }

/* ---------- FAQ */
.faq details { border-top: 1px solid var(--line); max-width: 52rem; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 19px 40px 19px 0; position: relative; font: 600 19px/1.35 var(--serif);
               color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
                      font: 300 26px/1 var(--sans); color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq .ans p { color: var(--muted); max-width: var(--measure); margin: 0 0 20px; }

/* ---------- tables, plans */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.plain { border-collapse: collapse; width: 100%; min-width: 520px; }
table.plain th, table.plain td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.plain tbody tr:last-child > * { border-bottom: 0; }
table.plain thead th { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
table.plain tbody th { color: var(--ink); font-weight: 600; }
table.plain td:last-child { color: var(--ink); }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 8px 0 28px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px 26px; }
.plan-on { border-top: 3px solid var(--accent); }
.plan h2 { margin: 0 0 4px; font-size: 26px; }
.price { font: 600 46px/1.1 var(--serif); color: var(--ink); margin: 0 0 18px; }
.price-soon { font: italic 400 22px/1.3 var(--serif); color: var(--muted); }
.plan .btn { margin-top: 0; }
.terms li { margin-bottom: 10px; max-width: var(--measure); }
.terms li ul { margin: 8px 0 0; padding-left: 22px; }
.terms li ul li { margin-bottom: 4px; }

/* ---------- closing line */
.cta { text-align: center; padding-top: 80px; padding-bottom: 20px; }
.cta::before { content: "\2042"; display: block; font: 26px/1 var(--serif); color: var(--accent); margin-bottom: 22px; }
.cta h2 { max-width: 22ch; margin: 0 auto 20px; }

/* ---------- footer, ending in a colophon */
.foot { border-top: 1px solid var(--line); margin-top: 80px; padding: 44px 0 30px; font-size: 15px; color: var(--muted);
        background: var(--paper-2); }
.foot-in { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.foot nav { display: grid; gap: 2px; align-content: start; }
.foot nav a { color: var(--muted); text-decoration: none; padding: 5px 0; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; }
.foot-about p { margin: 12px 0 0; max-width: 22rem; }
.logo-sm { font-size: 20px; }
.foot-h { font: 600 15px/1.3 var(--serif); color: var(--ink); margin: 0 0 6px; }
.foot-small { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; }
.foot-small a { color: var(--muted); }
.colophon { font: italic 14px/1.55 var(--serif); margin: 0 0 6px; }

/* ---------- responsive */
@media (max-width: 900px) {
  .fixes { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .foot-about { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 16px; }
  .top-in { min-height: 0; padding-top: 12px; gap: 4px; }
  .nav { width: calc(100% + 16px); margin: 0 -8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 10px 8px; font-size: 14.5px; white-space: nowrap; }
  .hero { padding-top: 30px; }
  h1 { font-size: 36px; }
  .block { padding-top: 56px; }
  .answer { font-size: 17px; }
  .demo, .steps, .plans { grid-template-columns: 1fr; }
  .steps { gap: 22px; }
  .scan { padding: 12px; }
  .drop { padding: 24px 12px 20px; }
  .btn-cta { width: 100%; }
  .btn-pick { width: auto; }
  .plan .btn-cta { width: auto; }
  .phases > li { padding-left: 46px; }
  .fixes > li { grid-template-columns: 32px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .bar.busy span { animation: none; width: 100%; opacity: .45; }
}

/* ---------- converter comparison */
.cmp-why { color: var(--muted); max-width: var(--measure); margin: 0 0 12px; }
table.cmp { min-width: 760px; font-variant-numeric: tabular-nums; }
table.cmp th, table.cmp td { padding: 10px 14px; }
table.cmp tr.ours > * { background: var(--accent-soft); }
table.cmp td.cmp-note { color: var(--muted); font-style: italic; }
.cmp-sub { display: block; color: var(--muted); font-size: 13px; }
#res-h + h3, .block h3[id] { margin-top: 34px; }
.cmp-pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.cmp-pairs figure { margin: 0; }
.cmp-pairs figcaption { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
@media (max-width: 720px) { .cmp-pairs { grid-template-columns: 1fr; } }

/* ---------- conversion options in the upload box (page size for PDF results) */
.opt { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 14px 0 0; font-size: 15px; color: var(--muted); }
.opt select { font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px; }

/* ---------- the homepage's list of every converter; a long footer list in two columns */
.conv-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.conv-list div { display: grid; gap: 2px; align-content: start; }
.conv-h { font: 600 16px/1.3 var(--serif); color: var(--ink); margin: 0 0 6px; }
.conv-list a { color: var(--fg); padding: 5px 0; }
.foot-conv { grid-template-columns: 1fr 1fr; column-gap: 18px; }
.foot-conv .foot-h { grid-column: 1 / -1; }
@media (max-width: 720px) { .conv-list { grid-template-columns: 1fr 1fr; } }

/* ---------- passes: the pricing cards, the pass page, the offer in the converter */
.plans-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1060px) { .plans-4 { grid-template-columns: 1fr 1fr; } }
.plan-why { color: var(--muted); margin: -8px 0 18px; }
.plans-4 .price { font-size: 40px; }
.buy-msg, .pass-have { color: var(--muted); margin: -12px 0 24px; min-height: 1.2em; }
.offer { margin: 18px auto 0; padding: 14px 16px; max-width: 30rem; text-align: left; border: 1px solid var(--line-2);
         border-radius: var(--r); background: var(--paper-2); }
.offer-text { margin: 0; font-size: 15px; color: var(--fg); }
.offer .btn { margin-top: 12px; }
.pass-line { margin: 12px 0 0; text-align: center; font-size: 14px; color: var(--ok); }
.pass-state { font: 400 19px/1.55 var(--serif); color: var(--ink); }
.pass-msg { border-left: 2px solid var(--ok); padding: 4px 0 4px 16px; color: var(--fg); }
.key-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; max-width: var(--measure); }
.key-form .btn { margin-top: 0; }
.key-in { flex: 1 1 16rem; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px;
          background: var(--surface); color: var(--ink); font: 15px/1.3 var(--mono); }
@media (max-width: 680px) { .plans-4 { grid-template-columns: 1fr; } }
.key-box { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--paper-2); padding: 4px 18px; margin: 0 0 24px; max-width: var(--measure); }
.key-show { font: 600 17px/1.4 var(--mono); color: var(--ink); user-select: all; word-break: break-all; }

/* ---------- every device (Ger, 2026-11-10; tools/device_check.py must report 0)
   Tablets: a comparison table fits the page instead of scrolling sideways. */
@media (max-width: 999.98px) {
  table.cmp { min-width: 0; }
  table.cmp th, table.cmp td { padding: 9px 9px; font-size: 14.5px; }
  table.cmp thead th { font-size: 12px; letter-spacing: .04em; }
}
/* Phones: each row of a table is a card. The row's name is the card's title; every other cell sits on its own
   line beside its column's heading (data-label, written by app._label_tables). The headings row is hidden from
   sight only: the ARIA roles keep it a table for screen readers. */
@media (max-width: 599.98px) {
  .table-wrap { overflow-x: visible; border: 0; border-radius: 0; background: none; }
  table.plain, table.plain tbody { display: block; min-width: 0; width: 100%; }
  table.plain thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  table.plain tbody tr { display: block; margin: 0 0 10px; padding: 12px 14px 6px; border: 1px solid var(--line);
                         border-radius: var(--r); background: var(--surface); }
  table.plain tbody tr:last-child { margin-bottom: 0; }
  table.plain tbody th { display: block; padding: 0 0 8px; border: 0; font-size: 16px; text-align: left; }
  table.plain tbody td { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 7px 0;
                         border: 0; border-top: 1px solid var(--line); font-size: 15px; text-align: right; }
  table.plain td[data-label]::before { content: attr(data-label); flex: 0 1 46%; color: var(--muted); font-size: 13.5px;
                                       text-align: left; }
  table.plain tbody td { flex-wrap: wrap; row-gap: 2px; }
  table.plain td .cmp-sub { flex-basis: 100%; font-size: 12.5px; text-align: right; }
  table.cmp tbody tr.ours { background: var(--accent-soft); border-color: var(--accent); }
  table.cmp tr.ours > * { background: none; }
  table.cmp td.cmp-note { display: block; text-align: left; }
}
/* The narrowest phones (320px): the four menu links fit without a sideways scroll. */
@media (max-width: 349.98px) {
  .nav a { padding: 10px 6px; font-size: 13.5px; }
}
/* Nothing a visitor reads or taps is under 12px or 24px (the specimen pages inside the proofs are pictures of
   text and keep their own scale). */
.phone-bar, .phone-foot { font-size: 12px; }
.rd-btn { min-width: 28px; height: 26px; font-size: 12px; }
.rd-big { font-size: 13.5px; }
.replay { font-size: 12px; }
.tw-bar { font-size: 12px; }
.tw-book-t { font-size: 12px; letter-spacing: .08em; }
.pb { font-size: 12px; }
