/* Cardine — sito pubblico. Stessi token dell'app (frontend/src/styles.css):
   carta avorio, grigi caldi, un solo accento argilla. Serif per titoli e lettura, sans per l'interfaccia. */

@font-face { font-family: "Instrument Sans Variable"; font-style: normal; font-display: swap; font-weight: 400 700; font-stretch: 75% 100%; src: url(fonts/instrument-sans-latin-wdth-normal.woff2) format("woff2-variations"), url(fonts/instrument-sans-latin-wdth-normal.woff2) format("woff2"); 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; }
@font-face { font-family: "Instrument Sans Variable"; font-style: normal; font-display: swap; font-weight: 400 700; font-stretch: 75% 100%; src: url(fonts/instrument-sans-latin-ext-wdth-normal.woff2) format("woff2-variations"), url(fonts/instrument-sans-latin-ext-wdth-normal.woff2) format("woff2"); 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: "Newsreader Variable"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(fonts/newsreader-latin-opsz-normal.woff2) format("woff2-variations"), url(fonts/newsreader-latin-opsz-normal.woff2) format("woff2"); 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; }
@font-face { font-family: "Newsreader Variable"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(fonts/newsreader-latin-ext-opsz-normal.woff2) format("woff2-variations"), url(fonts/newsreader-latin-ext-opsz-normal.woff2) format("woff2"); 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: "Newsreader Variable"; font-style: italic; font-display: swap; font-weight: 200 800; src: url(fonts/newsreader-latin-opsz-italic.woff2) format("woff2-variations"), url(fonts/newsreader-latin-opsz-italic.woff2) format("woff2"); 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 {
  --bg: #faf9f5;
  --surface: #fffefb;
  --surface-2: #f0eee6;
  --border: #e8e5dc;
  --border-strong: #d6d1c4;
  --text: #1f1e1c;
  --muted: #6b655b;
  --accent: #bc5a36;
  --accent-hover: #a84f2e;
  --accent-text: #a84f2e;
  --accent-soft: #f5e7df;
  --on-accent: #ffffff;
  --ok: #4f7a4a;
  --ok-soft: #e7eedf;
  --warn: #8f6417;
  --warn-soft: #f6ecd8;
  --info-soft: #f3f0e8;
  --shadow-sm: 0 1px 2px rgb(60 50 35 / 0.05);
  --shadow-md: 0 1px 2px rgb(60 50 35 / 0.04), 0 6px 18px -8px rgb(60 50 35 / 0.12);
  --shadow-lg: 0 24px 60px -16px rgb(60 50 35 / 0.25);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 72px; --s7: 112px;
  --font: "Instrument Sans Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Newsreader Variable", "Iowan Old Style", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1f1e1c; --surface: #262624; --surface-2: #30302d; --border: #393834; --border-strong: #4d4b46;
    --text: #ece9e1; --muted: #a8a398; --accent: #d97757; --accent-hover: #e38b6d; --accent-text: #e38b6d; --accent-soft: #3a2a22; --on-accent: #1f1e1c;
    --ok: #93b58c; --ok-soft: #27301f; --warn: #d9a75e; --warn-soft: #362c1b; --info-soft: #2c2a26;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.25); --shadow-md: 0 1px 2px rgb(0 0 0 / 0.2), 0 6px 18px -8px rgb(0 0 0 / 0.45); --shadow-lg: 0 24px 60px -16px rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1f1e1c; --surface: #262624; --surface-2: #30302d; --border: #393834; --border-strong: #4d4b46;
  --text: #ece9e1; --muted: #a8a398; --accent: #d97757; --accent-hover: #e38b6d; --accent-text: #e38b6d; --accent-soft: #3a2a22; --on-accent: #1f1e1c;
  --ok: #93b58c; --ok-soft: #27301f; --warn: #d9a75e; --warn-soft: #362c1b; --info-soft: #2c2a26;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.25); --shadow-md: 0 1px 2px rgb(0 0 0 / 0.2), 0 6px 18px -8px rgb(0 0 0 / 0.45); --shadow-lg: 0 24px 60px -16px rgb(0 0 0 / 0.6);
  color-scheme: dark;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { line-height: 1.12; margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--serif); font-optical-sizing: auto; font-weight: 440; letter-spacing: -0.02em; }
h3 { font-size: 1.08rem; font-weight: 620; letter-spacing: -0.005em; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent-text); text-underline-offset: 3px; }
ul, ol { margin: 0; padding: 0; }
code { font-family: var(--mono); font-size: 0.86em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--s2); top: -60px; z-index: 50; background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: var(--r-sm); box-shadow: var(--shadow-md); }
.skip:focus { top: var(--s2); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s2); }
@media (min-width: 720px) { .wrap { padding: 0 var(--s4); } }
.eyebrow { color: var(--accent-text); font-size: 0.8rem; font-weight: 640; letter-spacing: 0.14em; text-transform: uppercase; }
.muted { color: var(--muted); }

/* Header */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.topbar-in { height: 64px; display: flex; align-items: center; gap: var(--s2); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 500; font-size: 1.02rem; color: var(--text); letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; }
.brand-mark { width: 24px; height: 24px; color: var(--accent-text); display: block; flex: none; }
.brand-hole { fill: var(--bg); stroke: currentColor; stroke-width: 1.6; }
.nav { display: none; gap: var(--s3); margin-inline-start: var(--s3); }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.94rem; font-weight: 520; }
.nav a:hover { color: var(--text); }
.top-actions { margin-inline-start: auto; display: flex; gap: var(--s1); align-items: center; }
@media (min-width: 880px) { .nav { display: flex; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  font: inherit; font-weight: 600; font-size: 0.95rem; letter-spacing: -0.005em; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow-sm); text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.12s var(--ease-out);
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 1.02rem; border-radius: var(--r-md); }
.btn-block { width: 100%; }
.topbar .btn { min-height: 40px; padding: 0 14px; font-size: 0.92rem; }
@media (max-width: 380px) { .topbar .btn { padding: 0 10px; } .brand { letter-spacing: 0.1em; } }

/* Hero */
.hero { padding: var(--s5) 0 var(--s6); }
.hero-grid { display: grid; gap: var(--s5); align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.1rem); line-height: 1.04; margin-top: var(--s2); }
.hero h1 em { font-style: italic; color: var(--accent-text); font-weight: 400; }
.lede { font-size: clamp(1.08rem, 1rem + 0.4vw, 1.24rem); color: var(--muted); margin-top: var(--s3); max-width: 38em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--s4); }
.fine { font-size: 0.86rem; color: var(--muted); margin-top: 14px; }
.hero-art { display: grid; justify-items: center; }
.illustration { width: min(100%, 440px); height: auto; }
@media (min-width: 900px) { .hero { padding: var(--s6) 0 var(--s7); } .hero-grid { grid-template-columns: 1.15fr 0.85fr; } }

.ill-wash { fill: var(--accent-soft); }
.ill-sage { fill: color-mix(in srgb, var(--ok) 28%, var(--bg)); }
.ill-paper { fill: var(--surface); }
.ill-clay { fill: color-mix(in srgb, var(--accent) 55%, var(--bg)); }
.ill-skin { fill: color-mix(in srgb, #e9c9a8 80%, var(--bg)); }
.ill-ink, .ill-ink-thin, .ill-line { fill: none; stroke: var(--text); stroke-linecap: round; stroke-linejoin: round; }
.ill-ink { stroke-width: 1.6; }
.ill-ink-thin { stroke-width: 1.3; }
.ill-line { stroke: var(--muted); stroke-width: 1.2; opacity: 0.55; }

/* Sections */
.section { padding: var(--s6) 0; border-top: 1px solid var(--border); }
.section-head { max-width: 40em; display: grid; gap: 12px; margin-bottom: var(--s5); }
.section-head h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); }
.section-head p { color: var(--muted); font-size: 1.08rem; }
@media (min-width: 900px) { .section { padding: var(--s7) 0; } }

/* Audience */
.audience { display: grid; gap: var(--s3); }
.audience li { list-style: none; display: grid; gap: 6px; padding-top: var(--s2); border-top: 2px solid var(--text); }
.audience p { color: var(--muted); }
@media (min-width: 760px) { .audience { grid-template-columns: repeat(3, 1fr); gap: var(--s4); } }

/* Flow */
.flow { list-style: none; display: grid; gap: 0; counter-reset: step; }
.step { counter-increment: step; display: grid; grid-template-columns: 48px 1fr; gap: 0 var(--s2); padding-bottom: var(--s4); position: relative; }
.step::before {
  content: counter(step); grid-row: span 3; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1.5px solid var(--accent); color: var(--accent-text); font-family: var(--serif); font-size: 1.15rem; font-weight: 520;
  position: relative; z-index: 1;
}
.step::after { content: ""; position: absolute; left: 20px; top: 44px; bottom: 4px; width: 1.5px; background: var(--border-strong); }
.step:last-child { padding-bottom: 0; }
.step:last-child::after { display: none; }
.step h3 { font-family: var(--serif); font-size: 1.45rem; font-weight: 480; letter-spacing: -0.01em; padding-top: 6px; }
.step p { color: var(--muted); margin-top: 6px; max-width: 34em; }
.step .tagline { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); margin-top: 10px; }
@media (min-width: 980px) {
  .flow { grid-template-columns: repeat(5, 1fr); gap: var(--s3); }
  .step { grid-template-columns: 1fr; padding-bottom: 0; }
  .step::before { grid-row: auto; margin-bottom: var(--s2); }
  .step::after { left: 48px; right: calc(-1 * var(--s3)); top: 20px; bottom: auto; width: auto; height: 1.5px; }
  .step h3 { padding-top: 0; font-size: 1.3rem; }
}

/* Specimen: what a note looks like */
.specimen-grid { display: grid; gap: var(--s5); align-items: start; margin-top: var(--s6); }
@media (min-width: 900px) { .specimen-grid { grid-template-columns: 1fr 1fr; } }
.sheet { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: var(--s3); min-width: 0; }
@media (min-width: 720px) { .sheet { padding: var(--s4); } }
.sheet-label { font-size: 0.78rem; color: var(--muted); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: var(--s2); display: flex; justify-content: space-between; gap: var(--s1); }
.sheet .note { font-family: var(--serif); font-size: 1.06rem; line-height: 1.6; }
.sheet .note h4 { font-family: var(--serif); font-size: 1.3rem; font-weight: 520; margin: 0 0 10px; letter-spacing: -0.01em; }
.sheet table { width: 100%; border-collapse: collapse; font-family: var(--font); font-size: 0.86rem; margin: 12px 0; }
.sheet th, .sheet td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; vertical-align: top; }
.sheet th { background: var(--surface-2); font-weight: 640; }
.table-scroll { overflow-x: auto; }
.marker { font-family: var(--mono); font-size: 0.78rem; background: var(--warn-soft); color: var(--warn); padding: 1px 6px; border-radius: 5px; white-space: nowrap; }
.cite { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font); font-size: 0.76rem; font-weight: 600; background: var(--accent-soft); color: var(--accent-text); padding: 2px 8px; border-radius: 999px; vertical-align: 2px; white-space: nowrap; }
.chat { display: grid; gap: 12px; font-size: 0.96rem; }
.bubble { padding: 12px 14px; border-radius: 14px; max-width: 92%; }
.bubble-me { justify-self: end; background: var(--surface-2); border-bottom-right-radius: 4px; }
.bubble-tutor { background: var(--info-soft); border: 1px solid var(--border); border-bottom-left-radius: 4px; font-family: var(--serif); font-size: 1.04rem; line-height: 1.55; }
.flashcard { margin-top: var(--s3); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.flashcard > div { padding: 12px 14px; }
.flashcard > div + div { border-top: 1px dashed var(--border-strong); background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.flashcard small { display: block; color: var(--muted); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; }

/* Trust */
.trust { display: grid; gap: var(--s4); }
@media (min-width: 760px) { .trust { grid-template-columns: repeat(2, 1fr); gap: var(--s5) var(--s5); } }
.trust article { display: grid; gap: 10px; align-content: start; }
.trust h3 { font-family: var(--serif); font-size: 1.45rem; font-weight: 480; letter-spacing: -0.01em; }
.trust p { color: var(--muted); }
.trust-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.pullquote { margin: var(--s6) 0 0; padding: var(--s4) 0 0; border-top: 1px solid var(--border); font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem); line-height: 1.35; max-width: 32em; }

/* Data */
.facts { display: grid; gap: var(--s2); list-style: none; }
.facts li { display: flex; gap: 12px; align-items: flex-start; padding: var(--s2) 0; border-bottom: 1px solid var(--border); }
.facts li:first-child { border-top: 1px solid var(--border); }
.facts svg { flex: none; margin-top: 3px; color: var(--ok); }
@media (min-width: 760px) { .facts { grid-template-columns: 1fr 1fr; column-gap: var(--s5); row-gap: 0; } .facts li:nth-child(2) { border-top: 1px solid var(--border); } }

/* Pricing */
.plans { display: grid; gap: var(--s3); }
@media (min-width: 760px) { .plans { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s4) var(--s3); display: grid; gap: var(--s2); align-content: start; box-shadow: var(--shadow-sm); position: relative; }
.plan-featured { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow-md); }
.plan-badge { position: absolute; top: -12px; left: var(--s3); background: var(--accent); color: var(--on-accent); font-size: 0.74rem; font-weight: 680; padding: 3px 10px; border-radius: 999px; }
.plan-badge-quiet { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.plan-badge .placeholder { background: transparent; color: inherit; padding: 0; }
.plan h3 { font-size: 1rem; color: var(--muted); font-weight: 620; }
.price { font-family: var(--serif); font-size: 2.6rem; font-weight: 460; letter-spacing: -0.02em; line-height: 1; }
.price small { font-family: var(--font); font-size: 0.95rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan ul { list-style: none; display: grid; gap: 10px; margin: var(--s1) 0 var(--s2); }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.96rem; }
.plan li svg { flex: none; margin-top: 4px; color: var(--accent-text); }
.plan li.plan-no { color: var(--muted); }
.plan li.plan-no svg { color: var(--muted); }
.placeholder.placeholder-text { font-family: inherit; font-size: inherit; font-weight: inherit; padding: 1px 4px; }
.placeholder { background: var(--warn-soft); color: var(--warn); border-radius: 6px; padding: 0 6px; font-family: var(--mono); font-size: 0.82em; font-weight: 600; letter-spacing: 0; }
.price .placeholder { font-size: 0.5em; vertical-align: middle; }
.plans-note { margin-top: var(--s4); color: var(--muted); font-size: 0.94rem; max-width: 48em; display: grid; gap: 10px; }
.plans-note strong { color: var(--text); }

/* FAQ */
.faq { max-width: 760px; display: grid; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-child { border-top: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform 0.2s var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 18px; color: var(--muted); max-width: 40em; }

/* Closing CTA */
.closing { padding: var(--s6) 0; text-align: center; border-top: 1px solid var(--border); background: var(--surface-2); }
.closing h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); }
.closing p { color: var(--muted); margin: 12px auto 0; max-width: 34em; }
.closing .cta-row { justify-content: center; }

/* Footer */
.footer { padding: var(--s5) 0 var(--s4); border-top: 1px solid var(--border); font-size: 0.9rem; color: var(--muted); }
.footer-grid { display: grid; gap: var(--s3); }
.footer nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px var(--s3); }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }
.disclaimer { max-width: 46em; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1fr auto; align-items: start; } }

/* Legal pages */
.legal { padding: var(--s5) 0 var(--s6); }
.legal-in { max-width: 760px; }
.legal h1 { font-size: clamp(2.1rem, 1.6rem + 2vw, 3rem); margin-top: 10px; }
.legal .updated { color: var(--muted); margin-top: 10px; font-size: 0.94rem; }
.draft { margin: var(--s4) 0; padding: 16px 18px; border-radius: var(--r-md); background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); color: var(--text); display: grid; gap: 6px; }
.draft strong { color: var(--warn); }
.toc { margin: var(--s4) 0; padding: var(--s3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.toc h2 { font-family: var(--font); font-size: 0.82rem; font-weight: 640; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { padding-inline-start: 1.3em; display: grid; gap: 4px; }
.prose { font-family: var(--serif); font-size: 1.1rem; line-height: 1.7; overflow-wrap: break-word; font-optical-sizing: auto; }
.prose h2 { font-size: 1.55rem; font-weight: 500; margin: 2em 0 0.6em; letter-spacing: -0.01em; }
.prose h3 { font-family: var(--font); font-size: 1rem; margin: 1.6em 0 0.4em; }
.prose p, .prose ul, .prose ol, .prose table, .prose .table-scroll { margin: 0 0 1em; }
.prose ul { list-style: disc; padding-inline-start: 1.3em; }
.prose ol { list-style: decimal; padding-inline-start: 1.4em; }
.prose li { margin: 0.3em 0; }
.prose li::marker { color: var(--accent-text); }
.prose strong { font-weight: 650; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--font); font-size: 0.9rem; line-height: 1.5; }
.prose .table-scroll table { margin: 0; min-width: 560px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 640; }
.review { display: block; font-family: var(--font); font-size: 0.88rem; line-height: 1.5; background: var(--info-soft); border-inline-start: 3px solid var(--warn); border-radius: 0 8px 8px 0; padding: 10px 14px; margin: 0 0 1em; color: var(--muted); }
.review::before { content: "Nota per la revisione · "; font-weight: 680; color: var(--warn); }
.back { display: inline-flex; gap: 6px; align-items: center; font-size: 0.92rem; text-decoration: none; }

/* 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: var(--s6) 0; }
.notfound h1 { font-size: clamp(2.2rem, 1.6rem + 2vw, 3rem); }
.notfound p { color: var(--muted); margin: 12px 0 var(--s3); }

/* Small helpers (no inline styles: the CSP forbids them) */
.sheet { margin: 0; }
.note-marker { margin-top: 10px; }
.caveat { margin-top: var(--s2); max-width: 40em; color: var(--muted); }
.more { margin-top: var(--s3); }
.footer-brand { display: grid; gap: 12px; justify-items: start; }
