:root {
  /* Page tones and purples follow scrite.io */
  --cream: #f4f4f4;
  --white: #ffffff;
  --ink: #000000;
  --dark: #5d208e;         /* scrite.io header/footer purple: the dark section */
  --muted: #686868;
  --rust: #b51fdf;         /* scrite.io accent: primary accent (name kept from earlier draft) */
  --rust-dark: #9619b8;    /* a darker shade of the accent: hover */
  --rust-light: #d794e9;   /* lighter scrite.io purple: accent on dark */
  --tint: #efd3f7;         /* pale tint of the light purple */
  --border: #d3d3d3;
  --radius: 14px;
  --sans: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: var(--sans);
  --mono: "Courier New", Courier, monospace;

  --surface: #ffffff;      /* cards, chat bubbles, diagram boxes */
  --surface-2: #f4f4f4;    /* mock chat pane */
  --bar: #ececec;          /* mock window title bar */
  --script-text: #444444;
  --on-accent: #ffffff;    /* text on accent-colored buttons */
  color-scheme: light;
}

/* Dark theme: explicit choice via the toggle... */
:root[data-theme="dark"] {
  --cream: #121212;
  --white: #1a1a1a;
  --ink: #ececec;
  --muted: #a3a3a3;
  --border: #333333;
  --rust: #d794e9;
  --rust-dark: #efd3f7;
  --on-accent: #2a0b3a;
  --surface: #242424;
  --surface-2: #1e1e1e;
  --bar: #2c2c2c;
  --script-text: #c9c9c9;
  color-scheme: dark;
}

/* ...or the visitor's system setting when no choice has been made. Keep in sync with the block above. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cream: #121212;
    --white: #1a1a1a;
    --ink: #ececec;
    --muted: #a3a3a3;
    --border: #333333;
    --rust: #d794e9;
    --rust-dark: #efd3f7;
    --on-accent: #2a0b3a;
    --surface: #242424;
    --surface-2: #1e1e1e;
    --bar: #2c2c2c;
    --script-text: #c9c9c9;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
}

a { color: var(--rust); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; }
h1, h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

.eyebrow {
  margin: 0 0 14px; color: var(--rust);
  font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.lead { color: var(--muted); font-size: 1.05rem; }
.narrow-text { max-width: 560px; }
.fineprint { color: var(--muted); font-size: .85rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(8px);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.brand span { color: var(--rust); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 500; }
.nav-links a.btn { color: var(--on-accent); }
.brand { margin-right: auto; }
.theme-toggle {
  margin-left: 16px; width: 38px; height: 38px; display: grid; place-items: center;
  background: none; border: 1px solid var(--border); border-radius: 50%;
  color: var(--ink); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--rust); color: var(--rust); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
.theme-toggle[data-state="dark"] .sun { display: block; }
.theme-toggle[data-state="dark"] .moon { display: none; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 1.5rem; cursor: pointer; }

/* Buttons */
.btn {
  display: inline-block; cursor: pointer;
  background: var(--rust); color: var(--on-accent);
  border: 1.5px solid var(--rust); border-radius: 999px;
  padding: 12px 24px; font: 600 .95rem var(--sans); text-decoration: none;
}
.btn:hover { background: var(--rust-dark); border-color: var(--rust-dark); }
.btn-outline:hover { background: transparent; border-color: var(--rust); color: var(--rust); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-small { padding: 9px 18px; font-size: .9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 16px; }

/* Hero */
.hero { padding: 56px 0 88px; border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; align-items: center; }
.hero .lead { max-width: 440px; }
/* Side by side: a narrower text column, so the headline is a little smaller and the screenshot gets about 60% of the row */
@media (min-width: 901px) {
  .hero h1 { font-size: clamp(2rem, 3.8vw, 2.7rem); }
}

/* Hero screenshot: the light or dark image follows the theme (manual toggle or system setting) */
.hero-shot {
  margin: 0; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(93, 32, 142, .22);
}
.hero-shot img { display: block; width: 100%; height: auto; }
/* Any light/dark image pair: img.shot-light and img.shot-dark swap with the theme */
img.shot-dark { display: none; }
:root[data-theme="dark"] img.shot-light { display: none; }
:root[data-theme="dark"] img.shot-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) img.shot-light { display: none; }
  :root:not([data-theme="light"]) img.shot-dark { display: block; }
}

/* Hero text link to the quick tour */
.hero-watch { margin: 0; font-size: .95rem; }
.hero-watch a { color: var(--rust); font-weight: 600; text-decoration: none; }
.hero-watch a:hover { text-decoration: underline; }

/* Quick tour video: poster with a play button, swapped for the YouTube player on click */
#overview { scroll-margin-top: 72px; }
#overview .lead { text-wrap: balance; }
.video {
  position: relative; max-width: 880px; margin: 32px auto 0; aspect-ratio: 16 / 9;
  overflow: hidden; background: #000; border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(93, 32, 142, .22);
}
.video-play, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { display: block; padding: 0; background: none; cursor: pointer; }
.video-play img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 76px; height: 76px; padding-left: 5px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.6rem;
  background: var(--rust); color: var(--on-accent); box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  transition: transform .15s, background .15s;
}
.video-play:hover .video-btn, .video-play:focus-visible .video-btn {
  background: var(--rust-dark); transform: translate(-50%, -50%) scale(1.08);
}
.video-play:focus-visible { outline: 3px solid var(--rust); outline-offset: -3px; }
.video-alt { margin: 14px 0 0; font-size: .9rem; }
@media (max-width: 600px) {
  .video-btn { width: 60px; height: 60px; font-size: 1.3rem; }
}

/* Sections */
.section { padding: 80px 0; }
.section.white { background: var(--white); }
.section.dark { background: var(--dark); color: #fff; }
.section.dark .eyebrow { color: var(--rust-light); }
.section.dark .lead { color: var(--tint); }
.section.cta { padding: 96px 0 72px; }
.center { text-align: center; }
.center .narrow-text { margin-left: auto; margin-right: auto; }
.center-row { justify-content: center; }

/* Cards */
.cards { display: grid; gap: 16px; margin-top: 32px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.card p { color: var(--muted); font-size: .9rem; margin: 0; }
.white .card { background: var(--surface); }

/* Diagram */
.diagram {
  display: grid; grid-template-columns: auto auto 1fr; gap: 0 18px; align-items: center;
  margin: 48px 0 40px;
}
.dg-computer {
  background: var(--cream); border: 2px solid var(--ink); border-radius: 16px; padding: 14px 16px 18px;
}
.dg-label { margin: 0 0 10px; font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dg-inner { display: flex; align-items: center; }
.dg-box {
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  min-width: 120px; min-height: 84px; padding: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: .9rem;
}
.dg-box span { font-size: .78rem; color: var(--muted); }
.dg-scrite { background: var(--rust); border-color: var(--rust); color: var(--on-accent); font-weight: 600; font-size: 1.05rem; min-width: 130px; }
.dg-line { width: 32px; height: 2px; background: var(--ink); }
.dg-arrow { display: flex; flex-direction: column; align-items: center; font-size: .85rem; }
.dg-arrow div { position: relative; width: 110px; height: 2px; background: var(--rust); margin-top: 6px; }
.dg-arrow div::after {
  content: ""; position: absolute; right: -2px; top: -6px;
  border: 7px solid transparent; border-left: 12px solid var(--rust); border-right: 0;
}
.dg-targets { display: grid; gap: 12px; }
.dg-target { background: var(--surface); border: 1.5px solid var(--ink); border-radius: 12px; padding: 12px 16px; }
.dg-target strong { display: block; font-size: .95rem; }
.dg-target span { font-size: .82rem; color: var(--muted); }
.dg-servers {
  grid-column: 1; justify-self: center; margin-top: 14px;
  border: 1.5px dashed #9e9e9e; border-radius: 8px; padding: 6px 18px; font-size: .82rem; color: var(--muted);
}

/* Step number sits right after the icon (card padding 22px + icon 30px + 12px gap).
   A line runs from it along the top row, across the gap, to the left edge of the next card. */
.dark-card { position: relative; }
.step-no {
  position: absolute; top: 21px; left: 64px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--rust-light); color: var(--dark);
  font-size: .9rem; font-weight: 700;
}
.dark-card:not(:last-child)::after {
  content: ""; position: absolute; top: 36px; left: 106px; right: -17px; height: 2px;
  background: rgba(215, 148, 233, .6);
}
.dark-card .promise { margin: 0 0 16px; color: var(--tint); font-size: .95rem; }

/* Dark cards */
.dark-card { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .16); }
.dark-card h3 { font-family: var(--serif); font-size: 1.4rem; color: #fff; }
.dark-card ul { margin: 0 -10px; padding: 0; list-style: none; display: grid; gap: 4px; }
.dark-card li { position: relative; padding: 6px 10px 6px 28px; font-size: .9rem; color: #f8e9fc; }
.dark-card li::before {
  content: ""; position: absolute; left: 12px; top: 1.1em; width: 6px; height: 6px; border-radius: 50%; background: var(--rust-light);
}
.icon { width: 30px; height: 30px; color: var(--rust-light); margin-bottom: 14px; }
.dark-card .stage { margin: 0 0 4px; color: var(--rust-light); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

/* Use-case panel, driven by the bullets above (see js/script.js) */
.examples {
  margin-top: 40px; padding: 24px; min-height: 260px;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
}
.ex-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; margin-bottom: 18px; }
.ex-head h3 { font-family: var(--serif); font-size: 1.4rem; margin: 0; }
.ex-cap { color: var(--rust-light); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; align-items: start; }
.ex-item { animation: ex-fade .3s ease; }
@keyframes ex-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ex-item { animation: none; } }
.ex-label { margin: 0 0 8px; color: var(--rust-light); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.ex-bubble {
  margin: 0; padding: 14px 18px; border-radius: var(--radius);
  font-size: .95rem; line-height: 1.5;
}
.ex-bubble.q { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: #fff; font-style: italic; }
.ex-bubble.a { background: #fff; border: 1px solid transparent; color: #1f1d1a; }
.ex-bubble.note { background: transparent; border: 1px dashed rgba(255, 255, 255, .35); color: var(--tint); }
.ex-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ex-chips span { font-size: .75rem; color: var(--rust-light); border: 1px solid var(--rust-light); border-radius: 999px; padding: 3px 12px; }

/* Bullets that drive the panel */
.dark-card li[data-example] { cursor: pointer; border-radius: 8px; transition: background .15s; }
.dark-card li[data-example]:hover,
.dark-card li[data-example]:focus-visible,
.dark-card li.is-active { background: rgba(255, 255, 255, .12); outline: none; }
.dark-card li.is-active::before { background: #fff; }

/* "Your script remembers": two lanes over three moments. The chat lane resets, the Scrite lane builds up. */
/* The memory block is its own band, in a deeper purple than the stage section above it */
.section.memory-section { background: #3d1259; }
.memory { margin-top: 0; }
.memory h3 { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 1.8rem); margin-bottom: .3em; }
.memory-sub { margin: 0 0 28px; max-width: 600px; color: var(--tint); }
.mem-lane { display: grid; grid-template-columns: 150px repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.mem-name { align-self: center; margin: 0; font-weight: 600; font-size: .95rem; }
.mem-step { padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .16); }
.mem-when { margin: 0 0 6px; color: var(--rust-light); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.mem-text { margin: 0 0 12px; font-size: .9rem; line-height: 1.45; min-height: 4.35em; } /* three lines, so chips line up across the row */
.mem-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.mem-chips span { padding: 3px 8px; border-radius: 999px; font-size: .7rem; }

.mem-lane.chat .mem-name,
.mem-lane.chat .mem-text { color: rgba(255, 255, 255, .6); }
.mem-lane.chat .mem-step { border-style: dashed; border-color: rgba(255, 255, 255, .25); }
.mem-lane.chat .mem-chips span { border: 1px dashed rgba(255, 255, 255, .35); color: rgba(255, 255, 255, .55); }

.mem-lane.scrite .mem-step { background: rgba(255, 255, 255, .1); border-color: rgba(215, 148, 233, .6); }
.mem-lane.scrite .mem-chips span { background: var(--rust-light); color: var(--dark); font-weight: 600; }

/* "Bring your chat app along" strip, right after the memory contrast */
.bring {
  margin-top: 32px; padding: 24px 28px; border-radius: var(--radius);
  border: 1px solid rgba(215, 148, 233, .45); background: rgba(255, 255, 255, .06);
}
.bring h3 { font-family: var(--serif); font-size: clamp(1.2rem, 2.6vw, 1.5rem); margin: 0 0 .3em; }
.bring-sub { margin: 0 0 16px; max-width: 660px; color: var(--tint); }
.bring-points { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px 20px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.bring-points li { position: relative; padding-left: 24px; font-size: .9rem; line-height: 1.45; }
.bring-points li::before { content: "\2713"; position: absolute; left: 0; color: var(--rust-light); font-weight: 700; }
.bring-fine { margin: 0; color: rgba(255, 255, 255, .65); font-size: .8rem; }
.bring-fine a { color: var(--rust-light); }

/* Steps */
.step .num { display: block; font-family: var(--serif); font-size: 2.4rem; font-weight: 700; color: var(--rust); line-height: 1; margin-bottom: 14px; }
.guide-link { margin-top: 28px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0 48px; font-size: .9rem; color: var(--muted); }
.site-footer p { margin: 0; }
.site-footer a { color: var(--ink); }
.site-footer a:hover { color: var(--rust); }

.social { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 32px; padding: 0; list-style: none; }
.social a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); color: var(--rust); font-size: 1.1rem; text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.social a:hover, .social a:focus-visible { background: var(--rust); border-color: var(--rust); color: var(--on-accent); }

.footer-heading { margin: 0 0 12px; color: var(--ink); font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; }
.site-footer address { margin: 0 0 24px; font-style: normal; line-height: 1.7; }
.site-footer address p { margin: 0 0 6px; }
.footer-legal { padding-top: 18px; border-top: 1px solid var(--border); font-size: .82rem; }

/* Request form (request/index.html) */
.form-page { padding: 32px 0 72px; }
.container.form-wrap { max-width: 720px; }
.back-link { display: inline-block; margin-bottom: 28px; font-size: .9rem; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.form-page h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: .6em; }
.form-intro p { color: var(--muted); }
.form-intro strong { color: var(--ink); }
.req-note { margin: 28px 0 8px; font-size: .9rem; color: var(--muted); }
.req { color: var(--rust); font-weight: 700; }

#beta-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
#beta-form fieldset.field { margin-bottom: 28px; } /* the reset above would otherwise wipe out .field's spacing */
.fsection { margin: 0 0 40px; padding: 0; }
.fsection > legend {
  padding: 0; margin-bottom: 20px; font-family: var(--serif); font-size: 1.4rem; font-weight: 700;
}
.field { margin-bottom: 24px; }
.field > label, .field > legend { display: block; margin-bottom: 8px; font-weight: 600; font-size: .95rem; padding: 0; }
.hint { margin: 0 0 10px; font-size: .88rem; color: var(--muted); line-height: 1.5; }

#beta-form input[type="text"], #beta-form input[type="email"], #beta-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit;
}
#beta-form textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
#beta-form input::placeholder, #beta-form textarea::placeholder { color: var(--muted); opacity: .85; }
#beta-form input:focus-visible, #beta-form textarea:focus-visible { outline: 2px solid var(--rust); outline-offset: 1px; }

/* Radio and checkbox choices drawn as tiles; the real inputs stay in place for keyboards and screen readers */
.opts { display: flex; flex-wrap: wrap; gap: 10px; }
.opts.stack { flex-direction: column; }
/* Compact: a tighter grid of smaller tiles, to save height */
.opts.compact { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.opts.compact .opt span { padding: 8px 12px; font-size: .9rem; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt span {
  display: block; padding: 10px 16px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); font-size: .95rem; line-height: 1.4;
}
.opt:hover span { border-color: var(--rust); }
.opt input:checked + span { border-color: var(--rust); background: color-mix(in srgb, var(--rust) 14%, var(--surface)); font-weight: 500; }
.opt input:focus-visible + span { outline: 2px solid var(--rust); outline-offset: 2px; }

.agree { margin-bottom: 22px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.agree p { margin: 0 0 14px; font-size: .92rem; color: var(--muted); }
.agree p strong { color: var(--ink); }
.agree .field-error { margin: 10px 0 0; }
.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-weight: 600; font-size: .95rem; }
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--rust); cursor: pointer; }

.field-error, .form-error { margin: 8px 0 0; color: #c62828; font-size: .88rem; font-weight: 500; }
.form-error { margin-bottom: 16px; padding: 12px 16px; border: 1px solid currentColor; border-radius: 10px; }
:root[data-theme="dark"] .field-error, :root[data-theme="dark"] .form-error { color: #ff8a80; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .field-error, :root:not([data-theme="light"]) .form-error { color: #ff8a80; }
}

.btn-submit { padding: 14px 32px; font-size: 1rem; }
.btn-submit:disabled { opacity: .6; cursor: default; }

.thanks { padding: 40px 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: center; }
.thanks:focus { outline: none; }
.thanks h2 { font-size: 1.8rem; }
.thanks p { color: var(--muted); }

/* Multi-page form: progress, page titles, navigation, review */
.progress { margin: 8px 0 28px; }
.progress-text { margin: 0 0 10px; font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--rust); }
.progress-bar { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.progress-bar li { height: 6px; border-radius: 999px; background: var(--border); }
.progress-bar li.done, .progress-bar li.now { background: var(--rust); }
.progress-bar li.now { box-shadow: 0 0 0 2px color-mix(in srgb, var(--rust) 30%, transparent); }

.step[hidden] { display: none; }
.step-title { margin: 0 0 18px; font-size: clamp(1.4rem, 3.2vw, 1.8rem); }
.step-title:focus { outline: none; }
.sub-title { margin: 36px 0 18px; font-family: var(--serif); font-size: 1.3rem; }
.step .req-note { margin: -6px 0 22px; }

.step-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 36px; }

.review-card { margin-bottom: 18px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.review-head h3 { margin: 0; font-size: 1.05rem; }
.review-edit { background: none; border: 0; padding: 4px 2px; color: var(--rust); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: underline; }
.review-edit:hover { color: var(--rust-dark); }
.review-list { display: grid; grid-template-columns: minmax(130px, 220px) 1fr; gap: 8px 20px; margin: 0; }
.review-list dt { color: var(--muted); font-size: .88rem; }
.review-list dd { margin: 0; font-size: .95rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-list dd.review-empty { color: var(--muted); font-style: italic; }

@media (max-width: 600px) {
  .review-list { grid-template-columns: 1fr; gap: 2px; }
  .review-list dd { margin-bottom: 10px; }
}

/* Downloads page (downloads/index.html): one card per operating system */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 280px)); justify-content: center; gap: 20px; margin: 24px 0 32px; }
/* The visitor's own build: big, centred, with the others in a smaller row below it */
.dl-hero { display: flex; justify-content: center; margin: 44px 0 8px; }
.dl-hero:empty { display: none; }
.dl-card.dl-card-big { width: 100%; max-width: 560px; padding: 40px 36px 34px; align-items: center; text-align: center; gap: 14px; }
.dl-card-big .dl-badge { left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .78rem; padding: 3px 14px; }
.dl-card-big .dl-os { font-size: 2rem; justify-content: center; }
.dl-card-big .dl-os i { font-size: 2.6rem; }
.dl-card-big .dl-req, .dl-card-big .dl-meta { font-size: 1rem; }
.dl-card.dl-card-big .btn { width: 100%; margin-top: 12px; padding: 17px 28px; font-size: 1.15rem; }
.dl-other-title { margin: 36px 0 0; text-align: center; font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dl-other-title[hidden] { display: none; }
.dl-grid.is-secondary { margin-top: 16px; }
.dl-grid.is-secondary .dl-card { padding: 18px 18px 16px; }
.dl-grid.is-secondary .dl-os { font-size: 1.05rem; }
.dl-grid.is-secondary .dl-os i { font-size: 1.3rem; }
.dl-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px 22px 22px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.dl-card.is-yours { border-color: var(--rust); box-shadow: 0 0 0 1px var(--rust); }
.dl-badge {
  position: absolute; top: -11px; left: 18px; padding: 2px 12px; border-radius: 999px;
  background: var(--rust); color: var(--on-accent); font-size: .72rem; font-weight: 600; letter-spacing: .04em;
}
.dl-os { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.3rem; }
.dl-os i { font-size: 1.6rem; color: var(--rust); }
.dl-req, .dl-meta { margin: 0; color: var(--muted); font-size: .88rem; }
.dl-card .btn { margin-top: auto; text-align: center; }
.dl-warning { display: flex; align-items: flex-start; gap: 14px; margin: 28px 0; padding: 18px 22px; border: 1px solid var(--rust); border-left-width: 5px; border-radius: var(--radius); background: var(--tint); color: #2a0b3a; }
.dl-warning > i { flex: none; margin-top: 3px; font-size: 1.3rem; color: var(--rust-dark); }
.dl-warning strong { display: block; margin-bottom: 4px; font-size: 1.05rem; }
.dl-warning p { margin: 0; font-size: .95rem; }
:root[data-theme="dark"] .dl-warning { background: #2a1236; color: var(--ink); }
:root[data-theme="dark"] .dl-warning > i { color: var(--rust); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dl-warning { background: #2a1236; color: var(--ink); }
  :root:not([data-theme="light"]) .dl-warning > i { color: var(--rust); }
}
.dl-note { margin-bottom: 40px; padding: 20px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.dl-note h2 { margin: 0 0 10px; font-size: 1.1rem; }
.dl-note ol { margin: 0 0 14px; padding-left: 20px; color: var(--muted); font-size: .95rem; }
.dl-note li { margin-bottom: 8px; }
.dl-note li strong { color: var(--ink); }
.dl-note .fineprint { margin: 0; }
#dl-bad:focus { outline: none; }
#dl-bad[hidden], #dl-ok[hidden], #dl-loading[hidden] { display: none; }

/* Honeypot: kept off screen, not display:none, so simple bots still fill it in */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Tablet / mobile */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .cards.three { grid-template-columns: 1fr; }
  .cards.four { grid-template-columns: repeat(2, 1fr); }
  .dark-card:not(:last-child)::after { display: none; }
  .mem-lane { grid-template-columns: 1fr; }
  .mem-text { min-height: 0; }

  /* No dynamic examples on small screens: the panel sits far from the bullets once the cards stack */
  .examples { display: none; }
  .dark-card li[data-example] { cursor: default; }
  .dark-card li[data-example]:hover,
  .dark-card li[data-example]:focus-visible,
  .dark-card li.is-active { background: none; }
  .dark-card li.is-active::before { background: var(--rust-light); }
  .mem-name { margin-top: 12px; }  .diagram { grid-template-columns: 1fr; gap: 20px; justify-items: stretch; }
  .dg-arrow { flex-direction: row; justify-content: center; gap: 12px; }
  .dg-arrow div { width: 2px; height: 36px; margin: 0; }
  .dg-arrow div::after { right: -6px; top: auto; bottom: -2px; border: 7px solid transparent; border-top: 12px solid var(--rust); border-bottom: 0; }
  .dg-inner { justify-content: center; }
}

@media (max-width: 600px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 14px;
    padding: 16px; background: var(--cream); border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .section { padding: 56px 0; }
  .cards.four { grid-template-columns: 1fr; }
  .dg-box, .dg-scrite { min-width: 0; flex: 1; }
  .dg-line { width: 18px; }
}
