/* markdownwise: "paper and ink" — cool paper, Literata headlines, one deep green accent. */
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/static/fonts/literata.woff2") format("woff2"); }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url("/static/fonts/literata-italic.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("/static/fonts/jetbrainsmono.woff2") format("woff2"); }

:root {
  --paper: #f3f5f3; --tint: #eef2ef; --surface: #ffffff; --surface-2: #f8faf8;
  --ink: #1b2420; --fg: #2b3631; --muted: #4a5752;
  --line: #dde3df; --line-2: #b9c6bf;
  --accent: #1f5f55; --accent-2: #15443d; --accent-soft: #e3eeea; --accent-ink: #ffffff; --mark-fold: #15443d;
  --ok: #2f6a3b; --ok-soft: #e3efe1; --err: #a8261b; --err-soft: #f8e1dc;
  --serif: "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, "DejaVu Sans Mono", monospace;
  --r: 14px; --w: 1120px; --measure: 40rem;
  --shadow: 0 1px 1px rgba(27, 36, 32, .04), 0 18px 40px -20px rgba(27, 36, 32, .28);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1412; --tint: #18201c; --surface: #151c19; --surface-2: #121815;
    --ink: #e9efeb; --fg: #d3dcd7; --muted: #9fb0a8;
    --line: rgba(220, 240, 230, .12); --line-2: rgba(220, 240, 230, .26);
    --accent: #6cc3b1; --accent-2: #93d6c8; --accent-soft: #17302a; --accent-ink: #08201b; --mark-fold: #3e8f80;
    --ok: #86c08f; --ok-soft: #1c2f20; --err: #f28b7d; --err-soft: #3b1a16;
    --shadow: 0 1px 1px rgba(0, 0, 0, .4), 0 18px 40px -18px rgba(0, 0, 0, .8);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--paper); color: var(--fg); font: 16px/1.6 var(--sans); }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { color: var(--accent-2); }
img, svg { max-width: 100%; }
h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; }
p { margin: 0; }
code, pre, kbd { font-family: var(--mono); }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 16px; border-radius: 8px;
  background: var(--ink); color: var(--paper); }
.skip:focus { top: 12px; }
.wrap { max-width: var(--w); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.ic { width: 20px; height: 20px; flex: none; }

/* ------------------------------------------------------------ header and footer */
.top-in { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between;
  padding-top: 20px; padding-bottom: 20px; }
.logo { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); text-decoration: none; }
.logo:hover { color: var(--ink); }
.mark { width: 34px; height: 34px; flex: none; }
/* The logo follows the theme: green page, darker fold, hash in the paper colour. */
.mk-pg { fill: var(--accent); } .mk-fold { fill: var(--mark-fold); } .mk-hash { stroke: var(--paper); }
.wm { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -.005em; }
.logo-sm .mark { width: 28px; height: 28px; }
.logo-sm .wm { font-size: 18px; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; padding: 10px 0; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.nav a[aria-current] { box-shadow: inset 0 -2px var(--accent); }

.foot { margin-top: 32px; border-top: 1px solid var(--line); background: var(--tint); font-size: 15px; }
.foot-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 28px;
  padding-top: 40px; padding-bottom: 28px; }
.foot-about { grid-column: span 2; display: flex; flex-direction: column; gap: 12px; max-width: 24rem; color: var(--muted); }
.foot nav { display: flex; flex-direction: column; gap: 6px; }
.foot nav a { color: var(--fg); text-decoration: none; }
.foot nav a:hover { color: var(--accent); text-decoration: underline; }
.social { display: flex; flex-wrap: wrap; gap: 8px; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--fg); background: var(--surface); }
.social a:hover, .social a:focus-visible { color: var(--accent); border-color: var(--accent); }
.foot-h { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.foot-small { padding-top: 16px; padding-bottom: 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.colophon { margin-bottom: 6px; }
@media (max-width: 560px) { .foot-about { grid-column: auto; } }

/* ------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 10px; font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; }
.btn-cta { background: var(--accent); color: var(--accent-ink); }
.btn-cta:hover { background: var(--accent-2); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--tint); color: var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.link { background: none; border: 0; padding: 8px 4px; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }

/* ------------------------------------------------------------ hero and tool */
.hero-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 40px 56px;
  align-items: center; padding-top: 40px; padding-bottom: 32px; }
.hero-copy { display: flex; flex-direction: column; gap: 20px; }
.kicker { font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.08; letter-spacing: -.01em; }
.lead { font-size: 18px; color: var(--muted); max-width: 34rem; }
.ticks-row { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 4px 0 0; padding: 0; list-style: none;
  font-size: 15px; color: var(--muted); }
.ticks-row li { display: inline-flex; align-items: center; gap: 8px; }
.ticks-row .ic { color: var(--accent); width: 18px; height: 18px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--tint); }
.tab { flex: 1; min-height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  font: 500 15px var(--sans); cursor: pointer; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.tool-form { display: flex; flex-direction: column; gap: 16px; }
.beta { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent); font: 600 12px/1.5 var(--sans); letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px; }
.beta-note { font-size: 13px; color: var(--muted); padding: 10px 12px; border-radius: 9px; background: var(--tint); }
.beta-note strong { color: var(--ink); }

.drop-label { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 20px;
  border: 2px dashed var(--line-2); border-radius: 12px; background: var(--surface-2); text-align: center; cursor: pointer; }
.drop-label:hover, .over .drop-label { border-color: var(--accent); background: var(--accent-soft); }
.drop-icon .ic { width: 40px; height: 40px; color: var(--accent); }
.drop-main { font-size: 17px; font-weight: 600; color: var(--ink); }
.drop-sub { font-size: 14px; color: var(--muted); }
.file-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface-2); }
.file-ic { flex: none; padding: 6px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent);
  font: 600 12px var(--mono); }
.file-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 13px; color: var(--muted); }
.tool-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  font-size: 14px; color: var(--muted); }
.chip { font-family: var(--mono); font-size: 13px; background: var(--tint); color: var(--ink); padding: 2px 6px; border-radius: 5px; }

.md-input { display: flex; flex-direction: column; gap: 6px; }
.md-input label, .opt label { font-size: 14px; font-weight: 600; color: var(--ink); }
.md-input textarea { width: 100%; min-height: 190px; resize: vertical; padding: 12px 14px; border: 1px solid var(--line-2);
  border-radius: 10px; background: var(--surface-2); color: var(--ink); font: 14px/1.6 var(--mono); }
.md-input textarea:focus { border-color: var(--accent); }
.md-or { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.md-or .btn { min-height: 44px; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.opt { display: flex; flex-direction: column; gap: 6px; }
.opt select { min-height: 44px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 9px;
  background: var(--surface); color: var(--ink); font: 15px var(--sans); }

.panel { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 4px; text-align: center; }
.stages { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.stages li { padding: 4px 10px; border-radius: 999px; background: var(--tint); }
.stages li.on { background: var(--accent); color: var(--accent-ink); }
.stages li.past { background: var(--accent-soft); color: var(--accent); }
.status-file { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.bar { width: 100%; height: 8px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.bar span { display: block; height: 100%; width: 3%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.bar.busy span { width: 35%; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
@media (prefers-reduced-motion: reduce) { .bar.busy span { animation: none; width: 100%; opacity: .4; } }
.badge { display: inline-flex; width: 44px; height: 44px; border-radius: 50%; align-items: center; justify-content: center; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-err { background: var(--err-soft); color: var(--err); }
.panel-h { font-size: 18px; font-weight: 600; color: var(--ink); }
.panel-note, .panel-small { font-size: 14px; color: var(--muted); }
.dl-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.preview { width: 100%; text-align: left; }
.preview-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px;
  font-size: 13px; color: var(--muted); }
.preview pre { margin: 0; max-height: 240px; overflow: auto; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface-2); color: var(--ink); font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
.fb { display: flex; flex-direction: column; gap: 8px; align-items: center; padding-top: 6px; }
.fb-q { font-size: 14px; color: var(--muted); }
.fb-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.fb-btn { min-height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface);
  color: var(--ink); font: 14px var(--sans); cursor: pointer; }
.fb-btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.fb-thanks { font-size: 14px; color: var(--ok); }
.fine { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* ------------------------------------------------------------ viewer */
.viewer-top { padding-top: 32px; padding-bottom: 24px; }
.viewer-top h1 { font-size: clamp(36px, 5vw, 52px); }
.viewer-top .lead { max-width: 46rem; }
.viewer-card { gap: 16px; }
.v-start { display: flex; flex-direction: column; gap: 16px; }
.v-start .md-input textarea { min-height: 140px; }
.v-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.v-name { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.v-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.v-mode .tab { flex: none; padding: 0 16px; }
.v-mode .tab[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.v-meta { font-size: 14px; color: var(--muted); }
.v-body { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 24px; }
.v-toc { flex: 1 1 200px; max-width: 260px; font-size: 14px; }
.v-toc ol { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.v-toc a { color: var(--fg); text-decoration: none; }
.v-toc a:hover { color: var(--accent); text-decoration: underline; }
.v-toc .l2 { padding-left: 12px; } .v-toc .l3 { padding-left: 24px; }
.v-article { flex: 999 1 480px; min-width: 0; max-width: 46rem; color: var(--fg); }
.v-article h1, .v-article h2, .v-article h3, .v-article h4 { margin: 1.4em 0 .5em; }
.v-article h1:first-child, .v-article h2:first-child { margin-top: 0; }
.v-article h1 { font-size: 32px; } .v-article h2 { font-size: 25px; } .v-article h3 { font-size: 20px; }
.v-article pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
  overflow-x: auto; font-size: 14px; }
.v-article code { font-size: .9em; }
.v-article :not(pre) > code { background: var(--tint); padding: 1px 5px; border-radius: 4px; }
.v-article blockquote { margin: 0 0 16px; padding: 2px 16px; border-left: 3px solid var(--line-2); color: var(--muted); }
.v-article table { display: block; width: max-content; max-width: 100%; overflow-x: auto; margin-bottom: 16px; }
.v-article img { max-width: 100%; }
.v-article hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.v-article .task-list-item { list-style: none; } .v-article .task-list-item-checkbox { margin: 0 8px 0 -22px; vertical-align: -1px; }
.v-article dt { font-weight: 600; margin-top: 10px; } .v-article dd { margin: 0 0 8px 22px; }
.v-article .footnotes { font-size: 15px; color: var(--muted); } .v-article .footnotes-sep { width: 30%; margin: 32px 0 12px; }
.v-article .footnote-ref a, .v-article .footnote-backref { text-decoration: none; }
.v-article eqn { display: block; overflow-x: auto; overflow-y: hidden; padding: 6px 0; text-align: center; margin: 8px 0; }
.v-article math[display=block] { display: block math; }
/* highlight.js tokens, in the site's colours */
.v-article .hljs-keyword, .v-article .hljs-selector-tag, .v-article .hljs-built_in { color: #8a3b2e; font-weight: 600; }
.v-article .hljs-string, .v-article .hljs-attr, .v-article .hljs-template-variable { color: #1f6a3a; }
.v-article .hljs-comment, .v-article .hljs-quote { color: #6b7570; font-style: italic; }
.v-article .hljs-number, .v-article .hljs-literal, .v-article .hljs-type { color: #2b4c7e; }
.v-article .hljs-title, .v-article .hljs-section, .v-article .hljs-function .hljs-title { color: #15443d; font-weight: 600; }
@media (prefers-color-scheme: dark) {
  .v-article .hljs-keyword, .v-article .hljs-selector-tag, .v-article .hljs-built_in { color: #f2a28f; }
  .v-article .hljs-string, .v-article .hljs-attr, .v-article .hljs-template-variable { color: #93d6a8; }
  .v-article .hljs-comment, .v-article .hljs-quote { color: #9fb0a8; }
  .v-article .hljs-number, .v-article .hljs-literal, .v-article .hljs-type { color: #9cc0f5; }
  .v-article .hljs-title, .v-article .hljs-section, .v-article .hljs-function .hljs-title { color: #93d6c8; }
}
.v-img { display: inline-block; padding: 2px 8px; border: 1px dashed var(--line-2); border-radius: 6px; color: var(--muted); font-size: .9em; }
.v-src { flex: 1 1 100%; margin: 0; max-height: 70vh; overflow: auto; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface-2); color: var(--ink); font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ------------------------------------------------------------ homepage sections */
.block { padding-top: 48px; padding-bottom: 16px; }
.block > h2 { font-size: clamp(26px, 3.2vw, 34px); margin-bottom: 10px; }
.sub { color: var(--muted); max-width: var(--measure); margin-bottom: 24px; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; background: var(--surface); }
.pair > div { padding: 26px 28px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pair > div + div { border-left: 1px solid var(--line); background: var(--surface-2); }
@media (max-width: 680px) { .pair > div + div { border-left: 0; border-top: 1px solid var(--line); } }
.pair-h { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pair pre { margin: 0; font-size: 14px; line-height: 1.7; color: var(--fg); white-space: pre-wrap; overflow-wrap: anywhere; }
.page-demo { font-family: var(--serif); color: var(--ink); display: flex; flex-direction: column; gap: 12px; }
.page-demo h3 { font-size: 26px; }
.page-demo p { font-size: 16px; }
.page-demo table, .prose table { border-collapse: collapse; font: 14px var(--sans); border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink); max-width: 100%; }
.page-demo th, .page-demo td, .prose th, .prose td { text-align: left; padding: 7px 16px 7px 0; border-bottom: 1px solid var(--line); }
.page-demo th, .prose th { border-bottom-color: var(--ink); }
.page-demo tbody tr:nth-child(even) td { background: var(--tint); }
.page-demo tbody tr:last-child td { border-bottom: 0; }
.caption { margin-top: 12px; font-size: 14px; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 28px; margin: 0;
  padding: 0; list-style: none; }
.features li { display: flex; flex-direction: column; gap: 8px; }
.features .ic { width: 28px; height: 28px; color: var(--accent); }
.features h3 { font-size: 20px; }
.features p { font-size: 15px; color: var(--muted); }

.styles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 24px; margin: 0;
  padding: 0; list-style: none; }
.styles figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.styles img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff;
  box-shadow: var(--shadow); }
.styles figcaption { font-size: 15px; color: var(--muted); }
.styles strong { color: var(--ink); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; margin: 0;
  padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--surface); }
.steps li::before { content: counter(s); display: inline-flex; width: 34px; height: 34px; border-radius: 9px;
  align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.steps h3 { font-size: 19px; }
.steps p { font-size: 15px; color: var(--muted); }

.faq details { border-bottom: 1px solid var(--line); max-width: 52rem; }
.faq summary { padding: 16px 0; font-weight: 600; color: var(--ink); cursor: pointer; list-style-position: outside; }
.faq .ans { padding: 0 0 18px; color: var(--muted); max-width: var(--measure); }
.cta { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; padding-bottom: 48px; }

/* ------------------------------------------------------------ inner pages */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 8px 0 0; list-style: none; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line-2); }
.page { padding-top: 28px; padding-bottom: 32px; }
.page h1 { font-size: clamp(32px, 4.4vw, 44px); margin-bottom: 18px; max-width: 46rem; }
.answer { font-size: 18px; max-width: var(--measure); margin-bottom: 16px; }
.prose { max-width: calc(var(--measure) + 48px); }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose h2 { font-size: 24px; margin: 32px 0 10px; }
.prose h3 { font-size: 19px; margin: 24px 0 8px; }
.phases { padding-left: 1.2em; }
.phases li { margin-bottom: 18px; }
.phases h2, .phases h3 { font-size: 20px; margin: 0 0 6px; }
.note { margin-top: 24px; padding: 14px 18px; border-radius: 10px; background: var(--tint); color: var(--fg); max-width: var(--measure); }
.updated { font-size: 14px; color: var(--muted); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; margin: 24px 0; }
.plan { padding: 26px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.plan-on { border-color: var(--accent); box-shadow: var(--shadow); }
.plan h2 { font-size: 22px; }
.price { font-family: var(--serif); font-size: 36px; font-weight: 600; color: var(--ink); }
.price-soon { font-size: 20px; color: var(--muted); }
.ticks { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .ic { color: var(--accent); margin-top: 2px; }

/* Converter test tables */
.table-wrap { max-width: 100%; overflow-x: auto; margin: 8px 0 16px; }
.table-wrap.prose { max-width: 100%; }
.cmp td, .cmp th { vertical-align: top; }
.cmp { min-width: 640px; }
.cmp td:last-child { min-width: 200px; }
.cmp tr.ours th, .cmp tr.ours td { background: var(--accent-soft); font-weight: 600; }
/* number-only tables fit a phone: no minimum width, figures right-aligned and kept on one line */
.cmp.nums { min-width: 0; }
.cmp.nums td { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.cmp.nums td:last-child { min-width: 0; }
.cmp.nums thead th:not(:first-child) { text-align: right; }
.cmp th small { font-weight: 400; font-size: 12px; }
.cmp td.ours, .cmp th.ours { background: var(--accent-soft); font-weight: 600; }
@media (max-width: 480px) { .cmp.nums th, .cmp.nums td { padding-right: 8px; } }
@media (max-width: 400px) { .cmp.nums { font-size: 13px; } .cmp.nums th, .cmp.nums td { padding-right: 6px; } }
@media (max-width: 360px) { .cmp.nums thead th { font-size: 12px; } .cmp.nums th, .cmp.nums td { padding-right: 4px; } }
/* wordy comparison tables become one labelled card per row on a phone, so no column hides off-screen */
@media (max-width: 600px) {
  .cmp.stack { min-width: 0; }
  .cmp.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .cmp.stack, .cmp.stack tbody, .cmp.stack tr, .cmp.stack th, .cmp.stack td { display: block; }
  .cmp.stack tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .cmp.stack th, .cmp.stack td { border: 0; padding: 2px 0; min-width: 0; }
  .cmp.stack td:last-child { min-width: 0; }
  .cmp.stack td:empty { display: none; }
  .cmp.stack th[scope=row] { font-size: 15px; padding-bottom: 4px; }
  .cmp.stack td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; }
  .cmp.stack tr.ours { background: var(--accent-soft); padding-left: 10px; padding-right: 10px; }
  .cmp.stack tr.ours th, .cmp.stack tr.ours td { background: none; }
}

/* ---------- 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; } }
@media (max-width: 680px) { .plans-4 { grid-template-columns: 1fr; } }
.plan-why { color: var(--muted); margin: -8px 0 18px; }
.plans-4 .price { font-size: 34px; }
.plan .btn { margin-top: 18px; }
.buy-msg, .pass-have { color: var(--muted); margin: -8px 0 24px; min-height: 1.2em; max-width: var(--measure); }
.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(--tint); }
.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); }
.key-box { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--tint); 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; }

/* Guide pages (cheat sheet, table, README template, PDF to text): copyable examples */
.ex { margin: 12px 0 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.ex pre { margin: 0; padding: 14px 16px; font-size: 14px; line-height: 1.65; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.ex-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.syntax { width: 100%; border-collapse: collapse; }
.syntax th, .syntax td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.syntax td:first-child { width: 46%; }
.syntax code { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.syntax .shown table { border-collapse: collapse; } .syntax .shown td, .syntax .shown th { padding: 2px 8px; border: 1px solid var(--line); }
@media (max-width: 600px) {
  .syntax > thead { display: none; }
  .syntax > tbody > tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .syntax > tbody > tr > td { display: block; width: auto !important; border: 0; padding: 4px 0; }
  .syntax > tbody > tr > td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; letter-spacing: .05em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
}
.tg-ctl { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 8px 0 12px; }
.tg-ctl label { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.tg-wrap { overflow-x: auto; }
#tg-grid { border-collapse: collapse; }
#tg-grid td { padding: 4px; }
#tg-grid input, #tg-grid select, .tg-ctl select { font: inherit; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--surface); color: var(--ink); min-width: 0; width: 9rem; }
@media (max-width: 420px) { #tg-grid input, #tg-grid select { width: 6.5rem; } }

/* cheat-sheet "You get" column (no inline styles: the CSP blocks them) */
.syntax .sx-h1 { font-size: 1.3em; }
.syntax .sx-h2 { font-size: 1.15em; }
.syntax .sx-flat { margin: 0; }
.syntax .sx-quote { margin: 0; padding-left: 10px; border-left: 3px solid var(--line-2); }
