/* Smisli: shared editorial stylesheet for the SEO site.
   Mirrors the app's "Swiss Editorial" system: paper ground, one ink in four
   values, one signal colour, zero radius, hairline rules, Inter only. */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/inter-regular.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/inter-medium.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/inter-semibold.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/inter-bold.woff2') format('woff2'); }

:root {
  --paper:    #F4F0EA;
  --ink:      #2C2A28;
  --ink-mid:  #706C67;
  --ink-faint:#AFAAA4;
  --hair:     #DBD5CF;
  --signal:   #D63B24;
  --margin:   24px;
  --measure:  680px;
}

* { box-sizing: border-box; margin: 0; padding: 0; border-radius: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  font-size: 17px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 var(--margin); }
a { color: inherit; }

/* ---- type registers ------------------------------------------------- */
.display { font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; text-wrap: balance; }
.caps { font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-mid); }
.lead { font-size: 20px; line-height: 1.45; color: var(--ink); font-weight: 400; }
p.body { color: var(--ink-mid); line-height: 1.55; }
p.body + p.body { margin-top: 0.85em; }

/* ---- rules ---------------------------------------------------------- */
.rule { border: 0; border-top: 1px solid var(--hair); }
.rule-signal { width: 56px; height: 3px; background: var(--signal); border: 0; }
.section-rule { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.section-rule .caps { white-space: nowrap; }
.section-rule .line { flex: 1; height: 1px; background: var(--hair); }

section { padding: 56px 0; }
section + section { border-top: 1px solid var(--hair); }

/* ---- top nav -------------------------------------------------------- */
header.bar { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--hair); }
header.bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 20px; }
.wordmark { font-weight: 700; font-size: 22px; letter-spacing: -0.03em; text-decoration: none; color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink-mid); }
.nav-links a:hover { color: var(--ink); }
.bar-link { font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink); border-bottom: 2px solid var(--signal); padding-bottom: 2px; }
@media (max-width: 640px) { .nav-links a:not(.bar-link) { display: none; } }

/* ---- breadcrumb ----------------------------------------------------- */
.breadcrumb { padding-top: 32px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; letter-spacing: 0.04em; color: var(--ink-faint); }
.breadcrumb a { text-decoration: none; color: var(--ink-mid); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--ink-faint); }

/* ---- page head (guides) --------------------------------------------- */
.page-head { padding: 32px 0 48px; }
.page-head h1 { font-size: clamp(34px, 7vw, 56px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.03; text-wrap: balance; margin-bottom: 24px; }
.page-head .rule-signal { margin-bottom: 24px; }
.page-head .lead { max-width: 32em; }
.page-head .meta-line { margin-top: 20px; color: var(--ink-faint); font-size: 13px; }

/* ---- hero (home) ---------------------------------------------------- */
.hero { padding-top: 64px; padding-bottom: 64px; }
.hero .eyebrow { margin-bottom: 24px; }
.hero h1 { font-size: clamp(40px, 9vw, 68px); margin-bottom: 28px; }
.hero .rule-signal { margin: 0 0 28px; }
.hero .lead { max-width: 30em; margin-bottom: 36px; }

/* ---- buttons -------------------------------------------------------- */
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.btn { display: inline-block; background: var(--signal); color: var(--paper); font-weight: 600; font-size: 16px; padding: 16px 32px; text-decoration: none; border: 0; cursor: pointer; letter-spacing: 0.01em; transition: opacity .15s ease-out; }
.btn:hover { opacity: 0.88; }
.cta-note { font-size: 13px; color: var(--ink-faint); max-width: 16em; line-height: 1.4; }

/* ---- prose (article body) ------------------------------------------- */
.prose { max-width: 34em; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; margin-top: 1.8em; margin-bottom: 0.1em; text-wrap: balance; }
.prose h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; margin-top: 1.5em; }
.prose p { color: var(--ink-mid); line-height: 1.6; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { font-style: italic; }
.prose a { color: var(--ink); text-decoration: none; border-bottom: 1.5px solid var(--signal); }
.prose a:hover { background: rgba(214,59,36,0.07); }
.prose ul, .prose ol { color: var(--ink-mid); line-height: 1.6; padding-left: 1.3em; }
.prose li + li { margin-top: 0.5em; }
.prose ul li::marker { color: var(--signal); }
.prose blockquote { border-left: 2px solid var(--signal); padding-left: 20px; color: var(--ink); font-size: 20px; line-height: 1.4; }
.prose blockquote cite { display: block; margin-top: 10px; font-size: 13px; font-style: normal; color: var(--ink-faint); letter-spacing: 0.02em; }

/* ---- table of contents ---------------------------------------------- */
.toc { border: 1px solid var(--hair); padding: 22px 24px; margin: 40px 0; }
.toc .caps { margin-bottom: 14px; }
.toc ol { list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; padding: 5px 0; display: grid; grid-template-columns: 3ch 1fr; gap: 12px; }
.toc li::before { content: counter(toc, decimal-leading-zero); color: var(--signal); font-weight: 700; font-size: 13px; }
.toc a { text-decoration: none; color: var(--ink); }
.toc a:hover { color: var(--signal); }

/* ---- callout / evidence box ----------------------------------------- */
.callout { border: 1px solid var(--hair); padding: 24px; margin: 32px 0; }
.callout .caps { color: var(--signal); margin-bottom: 10px; }
.callout p { color: var(--ink); line-height: 1.55; }
.callout cite { display: block; margin-top: 10px; font-size: 12px; font-style: normal; color: var(--ink-faint); letter-spacing: 0.06em; text-transform: uppercase; }

/* ---- comparison table ----------------------------------------------- */
.table-scroll { overflow-x: auto; margin: 32px 0; border: 1px solid var(--hair); }
table.cmp { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 460px; }
table.cmp th, table.cmp td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--hair); vertical-align: top; }
table.cmp thead th { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mid); font-weight: 600; }
table.cmp tbody th { font-weight: 600; color: var(--ink); }
table.cmp td { color: var(--ink-mid); }
table.cmp .smisli-col { color: var(--ink); font-weight: 500; }
table.cmp tr:last-child th, table.cmp tr:last-child td { border-bottom: 0; }

/* ---- word list ------------------------------------------------------ */
.wordlist { margin: 32px 0; }
.wordlist .entry { padding: 22px 0; border-top: 1px solid var(--hair); }
.wordlist .entry:last-child { border-bottom: 1px solid var(--hair); }
.wordlist .w { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.wordlist .pos { color: var(--ink-faint); }
.wordlist .m { color: var(--ink-mid); margin-top: 6px; line-height: 1.5; max-width: 40em; }
.wordlist .ex { margin-top: 10px; font-size: 17px; }
.wordlist .ex .target { color: var(--signal); font-weight: 600; }
.wordlist .ex .tr { display: block; margin-top: 4px; color: var(--ink-faint); }

/* ---- numbered index rows (how it works / features) ------------------ */
.index-row { display: grid; grid-template-columns: 3ch 1fr; gap: 20px; padding: 24px 0; border-top: 1px solid var(--hair); }
.index-row:last-child { border-bottom: 1px solid var(--hair); }
.index-row .num { font-weight: 700; font-size: 15px; color: var(--signal); padding-top: 4px; }
.index-row h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; }
.index-row p { color: var(--ink-mid); line-height: 1.5; max-width: 34em; }

/* ---- preview / word card -------------------------------------------- */
.card { border: 1px solid var(--hair); background: var(--paper); padding: 28px; margin-top: 48px; }
.card .meta { margin-bottom: 14px; }
.card .head { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 10px; }
.card .def { color: var(--ink-mid); margin-bottom: 20px; }
.card .example { margin-top: 20px; font-size: 20px; line-height: 1.4; }
.card .example .target { color: var(--signal); font-weight: 600; }
.card .translation { color: var(--ink-mid); margin-top: 8px; }
.card .card-foot { margin-top: 24px; color: var(--ink-faint); }

/* ---- science figures ------------------------------------------------ */
.claim { margin-bottom: 56px; }
.claim:last-child { margin-bottom: 0; }
.figure { font-size: clamp(64px, 16vw, 96px); font-weight: 700; letter-spacing: -0.04em; line-height: 0.9; }
.figure-unit { margin-top: 8px; margin-bottom: 20px; }
.claim h3 { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 14px; }
.claim p.body { max-width: 36em; }
.refs { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--hair); }
.refs li { list-style: none; display: grid; grid-template-columns: 3ch 1fr; gap: 12px; font-size: 13px; color: var(--ink-faint); line-height: 1.5; padding: 6px 0; }
.refs li .rnum { font-weight: 600; color: var(--ink-mid); }

/* ---- faq ------------------------------------------------------------ */
.faq-item { padding: 24px 0; border-top: 1px solid var(--hair); }
.faq-item:last-child { border-bottom: 1px solid var(--hair); }
.faq-item h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 10px; }
.faq-item p { color: var(--ink-mid); line-height: 1.55; max-width: 38em; }

/* ---- related pages -------------------------------------------------- */
.related { display: grid; grid-template-columns: 1fr; gap: 0; }
.related a { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 20px 0; border-top: 1px solid var(--hair); text-decoration: none; color: var(--ink); }
.related a:last-child { border-bottom: 1px solid var(--hair); }
.related a:hover .r-title { color: var(--signal); }
.related .r-title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.related .r-sub { font-size: 14px; color: var(--ink-mid); margin-top: 3px; }
.related .r-arrow { color: var(--signal); font-weight: 700; }

/* ---- final cta ------------------------------------------------------ */
.final { text-align: left; }
.final h2 { font-size: clamp(32px, 7vw, 48px); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 24px; line-height: 1.05; }

/* ---- footer --------------------------------------------------------- */
footer { padding: 56px 0 72px; border-top: 1px solid var(--hair); }
footer .wordmark { display: block; margin-bottom: 16px; }
footer p.body { max-width: 34em; margin-bottom: 24px; }
footer .links { display: flex; flex-wrap: wrap; gap: 14px 24px; }
footer .links a { font-size: 14px; color: var(--ink-mid); text-decoration: none; }
footer .links a:hover { color: var(--ink); }
footer .fine { margin-top: 28px; font-size: 12px; color: var(--ink-faint); }

@media (max-width: 480px) {
  body { font-size: 16px; }
  section { padding: 44px 0; }
  .card { padding: 22px; }
}
