/* LoadCairn stylesheet — RESTYLED Dec 1, 2026 to the Polsia design system.
 *
 * Source of truth: the Polsia source export (Nov 23, 2026),
 * src/app/brand-theme.css + src/app/globals.css @theme + the live
 * loadcairn-4.polsia.io markup. Near-black surfaces, graphite cards,
 * signal red #E0231C, Inter for display + body, ui-monospace for
 * eyebrows/labels/numbers, sharp corners (radius seed 3px), 80rem
 * container, mono red eyebrows, display headlines at -0.04em tracking.
 *
 * Every pre-restyle class selector is preserved — templates and the
 * client runtimes (exam.js, calculators.js, ask.js, forms.js, …) depend
 * on these names. Only the visual language changed. */

:root {
  /* Polsia brand-theme.css (.dark values — the live site's scheme) */
  --background: #0b0b0b;
  --foreground: #ededed;
  --card: #171717;
  --popover: #202020;
  --primary: #e0231c;
  --primary-hover: #bf1e19;
  --primary-deep: #981813;
  --secondary: #242424;
  --muted-bg: #1b1b1b;
  --muted-foreground: #a8a8a8;
  --accent-bg: #351311;
  --accent-foreground: #ffd8d5;
  --red-text: #ff746c;   /* brand-400 — red used for text on graphite */
  --red-soft: #ff8c85;   /* brand-300 — sample links */
  --border: #3a3a3a;
  --border-strong: #5a5a5a;
  --img-border: #303030;
  --input-border: #6b6b6b;
  --ring: #ff746c;
  --ok: #3fb950;

  --font-display: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 3px;
  --container: 80rem; /* max-w-7xl / max-w-screen-xl */

  /* Legacy aliases — older rules and inline references use these names. */
  --ink: var(--background);
  --paper: var(--card);
  --accent: var(--primary);
  --muted: var(--muted-foreground);
  --line: var(--border);
  --text: var(--foreground);

  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--foreground);
  background: var(--background);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--primary); color: #fff; }
a { color: var(--red-text); text-underline-offset: 4px; }
a:hover { color: var(--red-soft); }
img { max-width: 100%; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11, 11, 11, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
}
.header-inner {
  max-width: var(--container); margin: 0 auto;
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  min-height: 3.5rem; padding: 0.35rem 1.25rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--foreground); text-decoration: none; margin-right: 0.75rem;
}
.brand-mark { flex: none; display: block; }
.brand-word {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 800;
  letter-spacing: -0.055em; line-height: 1; color: var(--foreground);
  white-space: nowrap;
}
.brand-accent { color: var(--primary); }
.site-nav { display: flex; align-items: center; gap: 0.15rem; flex-wrap: wrap; }
.site-nav a {
  color: var(--foreground); text-decoration: none;
  font-size: 0.875rem; font-weight: 500; line-height: 1.25;
  padding: 0.5rem 0.75rem; border-radius: var(--radius);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { background: var(--secondary); color: #fff; }
.site-nav-right { margin-left: auto; }

/* ---------------------------------------------------------------- layout */
.page {
  max-width: var(--container); margin: 0 auto; width: 100%;
  padding: 3rem 1.25rem 4.5rem;
}
@media (min-width: 640px) { .page { padding-left: 2rem; padding-right: 2rem; } }
.page > section { margin-top: 3.5rem; }
.page > section:first-child { margin-top: 0; }

/* Type scale (Polsia @theme): display 3.815rem/1.04, h1 3.052/1.08,
   h2 2.441/1.14, h3 1.953/1.2 — weights 640–720, tight tracking. */
h1, h2, h3, h4 {
  font-family: var(--font-display); color: var(--foreground);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1.14;
  margin: 0 0 1rem; text-wrap: balance;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.05rem); letter-spacing: -0.04em; line-height: 1.08; }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); letter-spacing: -0.035em; }
h3 { font-size: 1.25rem; letter-spacing: -0.02em; }
p { margin: 0 0 1rem; }
main p, main li { color: var(--foreground); }
.small, .muted { color: var(--muted-foreground); font-size: 0.92rem; }

/* Interior page header block — the old site's signature: a 2px red left
   rule carrying a mono crumb/eyebrow, the display headline, and the intro. */
.page-head {
  border-left: 2px solid var(--primary);
  padding-left: 1rem; margin-bottom: 2.5rem; max-width: 52rem;
}
@media (min-width: 640px) { .page-head { padding-left: 1.5rem; } }
.page-head h1 { margin-bottom: 0.75rem; }
.page-head p { color: var(--muted-foreground); font-size: 1.05rem; line-height: 1.7; }
main.page > h1:first-child {
  border-left: 2px solid var(--primary); padding-left: 1rem;
}
@media (min-width: 640px) {
  main.page > h1:first-child { padding-left: 1.5rem; }
}
.crumb, .eyebrow {
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--red-text); margin: 0 0 0.8rem;
}
.crumb { display: flex; align-items: center; gap: 0.75rem; }
.crumb::before { content: ""; width: 2.25rem; height: 1px; background: var(--primary); flex: none; }

.staging-note {
  border: 1px dashed var(--primary); color: var(--muted-foreground);
  padding: 0.75rem 1rem; font-size: 0.92rem;
}

/* ---------------------------------------------------------------- buttons */
.hub-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: 0.55rem 1.1rem;
  background: var(--primary); color: #fff; border: 1px solid var(--primary);
  border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.hub-btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: 0.55rem 1.1rem;
  background: transparent; color: var(--foreground);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 500; text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn-secondary:hover { background: var(--secondary); border-color: var(--foreground); color: #fff; }
.sample-link {
  color: var(--red-soft); font-weight: 500; font-size: 0.875rem;
  text-decoration: underline; text-decoration-color: rgba(224, 35, 28, 0.6);
  text-underline-offset: 4px;
}
.sample-link:hover { color: var(--red-soft); text-decoration-color: var(--primary); }
.link-btn {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  color: var(--red-text); text-decoration: underline; text-underline-offset: 4px;
}

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--background) 55%, rgba(27, 27, 27, 0.55));
  margin: -3rem -1.25rem 0; padding: 4rem 1.25rem 3.5rem;
}
@media (min-width: 640px) { .hero { margin-left: -2rem; margin-right: -2rem; padding: 5.5rem 2rem 4.5rem; } }
@media (min-width: 1024px) { .hero { padding-top: 7rem; padding-bottom: 6rem; } }
/* Concentric survey circles, top-right — the old hero's backdrop. */
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%;
  border: 1px solid rgba(58, 58, 58, 0.7); pointer-events: none;
}
.hero::before { width: 42rem; height: 42rem; right: -12rem; top: -13rem; }
.hero::after {
  width: 27rem; height: 27rem; right: -4.5rem; top: -5.5rem;
  border-color: rgba(224, 35, 28, 0.22);
}
.hero-grid { display: grid; gap: 3rem; align-items: start; }
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 7fr 5fr; gap: 2rem; }
  .hero-side { margin-top: 4rem; }
}
.hero h1 {
  font-size: clamp(2.75rem, 6vw, 4.5rem); font-weight: 600;
  line-height: 0.98; letter-spacing: -0.055em; max-width: 56rem; margin-bottom: 0;
}
.hero .hero-sub {
  font-family: var(--font-display); font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  line-height: 1.45; color: var(--foreground); margin-top: 1.75rem; max-width: 36rem;
}
.hero .hero-body { color: var(--muted-foreground); font-size: 1.05rem; line-height: 1.75; margin-top: 1rem; max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }
.hero-note { color: var(--muted-foreground); font-size: 0.875rem; margin-top: 1.25rem; }
.hero-tools {
  font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--muted-foreground); margin-top: 2.25rem; line-height: 2;
}
.hero-img {
  width: 100%; aspect-ratio: 7 / 3; object-fit: cover; display: block;
  border: 1px solid var(--img-border); margin-bottom: 1.25rem;
}

/* Live-preview card (the old hero's right-rail worked example). */
.preview-block {
  background: rgba(23, 23, 23, 0.95); border: 1px solid var(--border);
  padding: 1.5rem; border-radius: 0;
}
@media (min-width: 640px) { .preview-block { padding: 1.75rem; } }
.preview-block h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.7rem); letter-spacing: -0.03em;
  margin: 0.9rem 0 0.75rem; max-width: 24rem;
}
.preview-block p { color: var(--muted-foreground); font-size: 0.92rem; line-height: 1.65; }
.preview-block strong, .preview-block a { color: var(--foreground); }
.preview-block a { text-decoration-color: var(--primary); }
.preview-out {
  font-family: var(--font-display); font-size: 2.25rem; font-weight: 600;
  letter-spacing: -0.04em; color: var(--foreground); margin: 0.5rem 0 0.25rem;
}

/* Doors band — the old homepage's second section: a #101010 strip with
   hairline borders carrying the three article cards. */
.doors {
  background: #101010;
  border-top: 1px solid var(--img-border); border-bottom: 1px solid var(--img-border);
  margin-left: -1.25rem; margin-right: -1.25rem;
  padding: 3.5rem 1.25rem;
}
@media (min-width: 640px) {
  .doors { margin-left: -2rem; margin-right: -2rem; padding-left: 2rem; padding-right: 2rem; }
}

/* ----------------------------------------------------------------- cards */
.door-cards, .exam-cards, .price-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem; margin: 1.5rem 0;
}
.door-card, .exam-card, .price-card, .app-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 0;
  padding: 1.25rem; display: flex; flex-direction: column;
}
@media (min-width: 640px) { .door-card, .exam-card, .price-card, .app-card { padding: 1.5rem; } }
.door-card h3, .exam-card h3 {
  font-size: 1.15rem; line-height: 1.35; letter-spacing: -0.02em; margin-bottom: 0.5rem;
}
.door-card p, .exam-card p, .price-card p, .app-card p {
  color: var(--muted-foreground); font-size: 0.9rem; line-height: 1.65;
}
.door-card p:last-child, .exam-card p:last-child { margin-top: auto; padding-top: 0.75rem; margin-bottom: 0; }
.card-eyebrow {
  font-family: var(--font-mono); font-size: 0.65rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--red-text);
  margin: 0 0 0.9rem;
}
.card-link {
  color: var(--foreground); font-weight: 500; font-size: 0.95rem;
  text-decoration: underline; text-decoration-color: var(--primary);
  text-underline-offset: 5px;
}
.card-link:hover { color: #fff; }
.exam-card { min-height: 13rem; }
.exam-card .hub-btn { display: flex; width: 100%; }
.badge {
  display: inline-block; border: 1px solid var(--border-strong);
  background: var(--secondary); color: var(--foreground);
  font-family: var(--font-mono); font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 0.3rem 0.55rem;
}
.tiers-line { font-weight: 500; color: var(--foreground); font-size: 0.9rem; }
.tier-buttons { display: grid; gap: 0.5rem; margin: 0.75rem 0; }
.tier-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; width: 100%; padding: 0.55rem 0.75rem;
  background: var(--secondary); color: var(--foreground);
  border: 1px solid var(--border-strong); border-radius: 0;
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: -0.02em;
  text-decoration: none; text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.tier-btn:hover { border-color: var(--primary); background: #303030; color: #fff; }
@media (min-width: 640px) {
  .buy-block .tier-buttons { grid-template-columns: repeat(3, 1fr); }
}

/* Section headings with the red left rule (exams groups, toolkit, calc groups). */
.exam-group > h2, .calc-group > h2, .toolkit > h2, .toolkit > h3 {
  border-left: 2px solid var(--primary); padding-left: 1rem;
}
.toolkit > h3 { font-size: 1.35rem; margin-top: 2.5rem; }
.toolkit-list { columns: 2; padding-left: 1.2rem; }
.toolkit-list a { color: var(--foreground); text-decoration: none; }
.toolkit-list a:hover { color: var(--red-text); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 640px) { .toolkit-list { columns: 1; } }

/* Homepage section images — restored Dec 1, 2026: on the old homepage a
   photo separated each calculator group and headed the door cards. */
.section-img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--img-border); border-radius: var(--radius);
}
.toolkit-img { margin: 0.75rem 0 1.25rem; }
.door-card-img { margin-bottom: 1rem; }
.exam-prep-img { margin-bottom: 1.5rem; }

/* ------------------------------------------------------------- buy block */
.buy-block {
  background: var(--card); border: 1px solid var(--border); border-radius: 0;
  padding: 1.25rem; margin: 1.5rem 0;
}
@media (min-width: 640px) { .buy-block { padding: 1.5rem; } }
.buy-block h2 { font-size: 1.35rem; letter-spacing: -0.02em; }
.buy-block .small {
  border-left: 2px solid var(--primary); background: #101014;
  color: var(--foreground); padding: 0.6rem 0.9rem; font-size: 0.875rem;
}

/* ------------------------------------------------------------ calculators */
.calc-form {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.1rem; margin: 1.5rem 0;
  background: var(--card); border: 1px solid var(--border); padding: 1.5rem;
}
.calc-field { display: grid; gap: 0.45rem; font-size: 0.9rem; font-weight: 500; }
.calc-field .unit, .results-table .unit {
  color: var(--muted-foreground); font-weight: 400;
  font-family: var(--font-mono); font-size: 0.75rem;
}
.calc-field input, .calc-field select,
.license-form input, .license-form textarea,
.capture-row input, .capture-form textarea, .capture-form select,
.domain-filter select, .planner-save-row input, .planner-save-row select {
  padding: 0.5rem 0.75rem; min-height: 2.5rem;
  border: 1px solid var(--input-border); border-radius: var(--radius);
  font: inherit; background: transparent; color: var(--foreground);
}
.calc-field input:focus, .calc-field select:focus,
.license-form input:focus, .capture-row input:focus {
  border-color: var(--red-text); outline: 2px solid rgba(255, 116, 108, 0.35); outline-offset: 1px;
}
.calc-block { margin: 2rem 0; }
.calc-block > h2 { font-size: 1.45rem; }
.results-table { border-collapse: collapse; width: 100%; max-width: 44rem; }
.results-table th, .results-table td {
  border: 1px solid var(--border); padding: 0.6rem 0.9rem; text-align: left;
}
.results-table th { color: var(--muted-foreground); font-weight: 500; background: var(--muted-bg); }
.results-table td {
  font-family: var(--font-mono); font-weight: 600; color: var(--foreground);
  font-variant-numeric: tabular-nums;
}
.calc-steps {
  margin: 0.5rem 0; padding: 1rem 1rem 1rem 2.4rem;
  background: var(--muted-bg); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.9;
}
.calc-steps li { margin: 0.25rem 0; font-variant-numeric: tabular-nums; }
.formula {
  font-family: var(--font-mono); font-size: 0.85rem;
  background: var(--muted-bg); border: 1px solid var(--border);
  padding: 0.7rem 0.9rem; overflow-x: auto;
}
.disclaimer {
  color: var(--muted-foreground); font-size: 0.9rem;
  border-left: 2px solid var(--primary); background: #101014;
  padding: 0.75rem 1rem;
}
.related-tools { font-size: 0.95rem; color: var(--muted-foreground); }
.exam-tiein { font-weight: 600; }
.calc-list {
  list-style: none; padding: 0; margin: 1rem 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem;
}
.calc-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 0;
  padding: 1.25rem; color: var(--muted-foreground); font-size: 0.9rem; line-height: 1.6;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}
.calc-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.52); }
.calc-card a { color: var(--foreground); text-decoration: none; font-family: var(--font-display); }
.calc-card a:hover { color: var(--red-text); }

/* -------------------------------------------------------------- pricing */
.price { font-family: var(--font-display); font-size: 2.3rem; font-weight: 500; letter-spacing: -0.045em; line-height: 1.15; color: var(--foreground); }
.price-card ul { padding-left: 1.1rem; color: var(--muted-foreground); font-size: 0.9rem; line-height: 1.7; }
.price-card[id="pro"] { background: var(--muted-bg); border-color: var(--red-text); }
.price-card button, .app-card button:not(.link-btn) {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: 0.55rem 1.1rem; margin: 0.25rem 0.4rem 0.25rem 0;
  background: var(--primary); color: #fff; border: 1px solid var(--primary);
  border-radius: var(--radius); font-size: 0.95rem; font-weight: 600; cursor: pointer;
}
.price-card button:hover, .app-card button:not(.link-btn):hover { background: var(--primary-hover); }
.compare-table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.compare-table th, .compare-table td {
  border: 1px solid var(--border); padding: 0.6rem 0.9rem; text-align: left; vertical-align: top;
}
.compare-table th { background: var(--muted-bg); color: var(--foreground); }
.faq-item { margin: 1.2rem 0; border-bottom: 1px solid var(--border); padding-bottom: 1.2rem; }
.giving-block { border-left: 2px solid var(--primary); padding-left: 1.25rem; }
.giving-note strong, .giving-block strong { color: var(--foreground); }

/* ------------------------------------------------------------ forms/apps */
.license-form { display: grid; gap: 0.6rem; max-width: 460px; margin-top: 1.25rem; }
.license-form button, .capture-row button {
  background: var(--primary); color: #fff; border: 1px solid var(--primary);
  border-radius: var(--radius); min-height: 2.75rem;
  padding: 0.6rem 1.1rem; font-size: 1rem; font-weight: 600; cursor: pointer;
}
.license-form button:hover, .capture-row button:hover { background: var(--primary-hover); }
.license-result { min-height: 1.4em; font-weight: 600; }
.form-result { min-height: 1.4em; font-weight: 600; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.capture-form {
  background: var(--card); border: 1px solid var(--border); border-radius: 0;
  padding: 1.25rem; margin: 1.75rem 0; max-width: 560px; position: relative;
}
.capture-form label { font-weight: 600; display: block; margin-bottom: 0.5rem; }
.capture-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.capture-row input { flex: 1 1 220px; }
.capture-form textarea, .capture-form select { width: 100%; }
.pro-actions { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.pro-actions button {
  border: 1px solid var(--border-strong); background: var(--secondary); color: var(--foreground);
  border-radius: 0; min-height: 2.5rem; padding: 0.5rem 0.9rem;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; cursor: pointer;
}
.pro-actions button:hover { border-color: var(--primary); color: #fff; }
.pro-actions .small { flex-basis: 100%; margin: 0.2rem 0 0; }
.pro-actions .form-result { flex-basis: 100%; margin: 0; }
.app-card { margin: 1rem 0; }

/* --------------------------------------------------------- hub / sampler */
.lang-toggle { display: inline-flex; gap: 0.5rem; margin: 0 0 1rem; }
.lang-toggle button {
  border: 1px solid var(--border-strong); background: var(--secondary); color: var(--foreground);
  border-radius: 0; padding: 0.45rem 0.95rem; cursor: pointer; font-size: 0.9rem;
}
.lang-toggle button.active { background: var(--muted-bg); color: #fff; border-color: var(--primary); }
.lang-disclaimer {
  border-left: 2px solid var(--primary); background: #101014; color: var(--foreground);
  padding: 0.75rem 1rem; font-size: 0.95rem;
}
.unlock-note { font-weight: 600; }
.mode-panel .mode-buttons { display: grid; gap: 0.6rem; max-width: 640px; }
.mode-panel .mode-buttons button {
  text-align: left; border: 1px solid var(--border); background: var(--card);
  border-radius: 0; padding: 0.9rem 1.1rem; font-size: 1rem; cursor: pointer; color: var(--foreground);
}
.mode-panel .mode-buttons button:hover { border-color: var(--primary); }
.domain-filter { display: block; margin-top: 1rem; font-size: 0.95rem; color: var(--muted-foreground); }
.domain-filter select { margin-left: 0.5rem; }
.quiz-head {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  color: var(--muted-foreground); font-family: var(--font-mono); font-size: 0.8rem;
  margin-bottom: 0.75rem;
}
.quiz-timer { font-weight: 700; color: var(--red-text); }
.quiz-stem { font-size: 1.08rem; font-weight: 600; color: var(--foreground); }
.quiz-options { display: grid; gap: 0.55rem; margin: 1rem 0; }
.quiz-option {
  text-align: left; border: 1px solid var(--border); background: var(--card);
  border-radius: 0; padding: 0.8rem 1rem; font-size: 1rem; cursor: pointer; color: var(--foreground);
}
.quiz-option:hover { border-color: var(--foreground); }
.quiz-option.picked { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.quiz-option.correct { border-color: var(--ok); background: rgba(63, 185, 80, 0.12); }
.quiz-option.wrong { border-color: var(--primary); background: rgba(224, 35, 28, 0.12); }
.quiz-explanation {
  border: 1px solid var(--border); border-radius: 0; padding: 0.85rem 1rem;
  background: var(--muted-bg); font-size: 0.96rem; margin: 0.75rem 0; color: var(--foreground);
}
.quiz-nav { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.quiz-nav button {
  border: 1px solid var(--border-strong); background: var(--secondary); color: var(--foreground);
  border-radius: 0; padding: 0.55rem 1rem; font-size: 0.95rem; cursor: pointer;
}
.quiz-nav button:disabled { opacity: 0.45; cursor: default; }
.quiz-nav #quiz-submit { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.domain-table { border-collapse: collapse; margin: 1rem 0; }
.domain-table th, .domain-table td { border: 1px solid var(--border); padding: 0.45rem 0.9rem; text-align: left; }
.domain-table th { background: var(--muted-bg); }
.review-item { border: 1px solid var(--border); border-radius: 0; padding: 1rem; margin: 0.75rem 0; background: var(--card); }
.review-item.is-correct { border-left: 4px solid var(--ok); }
.review-item.is-wrong { border-left: 4px solid var(--primary); }
.sampler-cta { margin-top: 2rem; }

/* ---------------------------------------------------------------- footer */
.site-footer {
  border-top: 1px solid var(--border); color: var(--muted-foreground);
  padding: 2.5rem 1.25rem 2rem; font-size: 0.9rem;
}
.footer-inner { max-width: var(--container); margin: 0 auto; }
.footer-top {
  display: flex; justify-content: space-between; gap: 2.5rem; flex-wrap: wrap;
  padding-bottom: 2rem;
}
.footer-top p { max-width: 22rem; margin-top: 0.9rem; line-height: 1.7; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; align-content: start; max-width: 34rem; }
.footer-links a {
  color: var(--foreground); text-decoration: none; font-size: 0.875rem; font-weight: 500;
  padding: 0.45rem 0.7rem; border-radius: var(--radius);
}
.footer-links a:hover { background: var(--secondary); color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid var(--border); padding-top: 1.25rem; font-size: 0.8rem;
}
.site-footer .giving-line { color: var(--muted-foreground); }
.site-footer .giving-line strong { color: var(--foreground); }

/* ------------------------------------------------------- Ask LoadCairn */
.ask-toggle {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  background: var(--primary); color: #fff; border: 0; border-radius: 999px;
  padding: 0.7rem 1.15rem; font-size: 0.98rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 30px -6px rgba(224, 35, 28, 0.28);
}
.ask-toggle:hover { background: var(--primary-hover); }
.ask-panel {
  position: fixed; right: 16px; bottom: 76px; z-index: 60;
  width: min(380px, calc(100vw - 24px));
  max-height: min(560px, calc(100vh - 110px));
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border); border-radius: 4px;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.68); overflow: hidden;
}
.ask-panel[hidden] { display: none; }
.ask-head {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--background); color: var(--foreground);
  border-bottom: 1px solid var(--border); padding: 0.65rem 0.9rem; font-weight: 600;
}
.ask-head button {
  background: none; border: 0; color: var(--foreground); font-size: 1.25rem; cursor: pointer; line-height: 1;
}
.ask-head strong { flex: 1; }
/* The golem mascot — permanent Ask panel resident (88px since Dec 1, 2026,
   at Chris's direction; holiday.js swaps in the Santa version in season). */
.ask-mascot {
  width: 88px; height: 88px; flex: none;
  border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border);
  margin-right: 0.5rem;
}
.ask-messages { padding: 0.8rem 0.9rem; overflow-y: auto; display: grid; gap: 0.55rem; }
.ask-msg {
  border-radius: 4px; padding: 0.55rem 0.75rem; font-size: 0.94rem;
  white-space: pre-wrap; word-break: break-word; max-width: 92%;
}
.ask-user { background: var(--primary); color: #fff; justify-self: end; }
.ask-bot { background: var(--secondary); color: var(--foreground); justify-self: start; }
.ask-form { display: flex; gap: 0.45rem; padding: 0.65rem; border-top: 1px solid var(--border); }
.ask-form input {
  flex: 1; padding: 0.55rem 0.7rem; border: 1px solid var(--input-border);
  border-radius: var(--radius); font-size: 0.98rem; min-width: 0;
  background: transparent; color: var(--foreground);
}
.ask-form button {
  background: var(--primary); color: #fff; border: 0; border-radius: var(--radius);
  padding: 0.55rem 0.95rem; font-weight: 700; cursor: pointer;
}
@media (max-width: 480px) {
  .ask-panel { right: 12px; bottom: 72px; }
  .ask-toggle { right: 12px; bottom: 12px; }
}

/* --------------------------------------------------- Question of the Day */
.qotd { margin-top: 3rem; }
.qotd-card {
  display: flex; gap: 1.4rem; align-items: flex-start;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
}
.qotd-golem {
  width: 132px; height: 132px; flex: none;
  border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border);
}
.qotd-main { flex: 1; min-width: 0; }
.qotd-main h2 { margin-top: 0.1rem; }
.qotd-exam { color: var(--muted-foreground); font-size: 0.92rem; }
.qotd-stem { font-size: 1.08rem; font-weight: 600; }
.qotd-options { display: grid; gap: 0.5rem; margin: 0.9rem 0; }
.qotd-opt {
  text-align: left; background: var(--secondary); color: var(--foreground);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 0.6rem 0.85rem; font-size: 0.98rem; cursor: pointer;
}
.qotd-opt:hover:not(:disabled) { border-color: var(--primary); }
.qotd-opt:disabled { cursor: default; opacity: 0.8; }
.qotd-opt.qotd-correct { border-color: #2e9e5b; background: rgba(46, 158, 91, 0.14); opacity: 1; }
.qotd-opt.qotd-wrong { border-color: var(--primary); background: rgba(224, 35, 28, 0.12); opacity: 1; }
.qotd-verdict { font-weight: 700; }
.qotd-fact {
  color: var(--muted-foreground); font-size: 0.92rem;
  border-top: 1px solid var(--border); padding-top: 0.7rem; margin-top: 1rem;
}
@media (max-width: 639px) {
  .qotd-card { flex-direction: column; }
  .qotd-golem { width: 96px; height: 96px; }
}

/* ------------------------------------------------------------ Room Planner */
.planner-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.planner-toolbar button, .planner-selected button, .planner-save-row button {
  border: 1px solid var(--border-strong); background: var(--secondary); color: var(--foreground);
  border-radius: 0; padding: 0.55rem 1rem; font-size: 0.95rem; font-weight: 600; cursor: pointer;
}
.planner-toolbar button:hover, .planner-selected button:hover, .planner-save-row button:hover {
  border-color: var(--primary); color: #fff;
}
.planner-canvas-wrap { margin: 0.5rem 0 1.5rem; }
#planner-svg {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--border); border-radius: 0; background: var(--muted-bg);
  touch-action: none;
}
#planner-svg [data-rack] { cursor: grab; }
#planner-svg [data-rack]:active { cursor: grabbing; }
.planner-capacity { font-weight: 700; margin-top: 0.9rem; }
.planner-selected .calc-field { max-width: 260px; margin: 0.6rem 0; }
.planner-save-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; }

/* ----------------------------------------------------------------- Gifts */
.gift-mascot { width: 120px; height: auto; float: right; margin: 0 0 1rem 1rem; }
.gift-tiers { border: 1px solid var(--border); background: var(--card); margin: 0.75rem 0; padding: 0.75rem 1rem; }
.gift-tiers label { display: block; font-weight: 400; margin: 0.3rem 0; }
.gift-card-print {
  background: #ffffff; color: #101014;
  border: 2px solid var(--foreground); border-radius: 4px; padding: 1.5rem;
  max-width: 560px; overflow: hidden;
}
.gift-card-print .gift-code {
  font-size: 1.45rem; font-weight: 800; letter-spacing: 0.05em; color: var(--primary);
  font-family: var(--font-mono);
}
@media print {
  .site-header, .site-footer, #ask-root, .no-print { display: none; }
  body { background: #fff; }
  .page { max-width: none; padding: 0; }
}

/* ================================================================ HOLIDAY
 * DRESSING — START (spec: holiday-dressing-spec-2026-11-21.md).
 * Everything in this block is scoped to .season-on (set on <html> by
 * src/layout.mjs SEASON_ON) and uses ONLY the holiday palette: brand
 * red, warm white, soft gold — plus Christmas green in the header
 * string lights only (owner override, Dec 1, 2026). Takedown Fri
 * Jan 2, 2027: delete this whole block + public/assets/holiday.js +
 * the "holiday" template hooks. */
.season-on {
  --gold: #d9a441;        /* soft gold — glyph accents */
  --gold-soft: #e8c476;   /* pale gold — highlights */
  --warm-white: #fdf6e9;  /* warm white — bulbs, snow */
  --bulb-green: #1f9d4d;  /* Christmas green — header string-lights bulbs ONLY (owner override, Dec 1, 2026) */
}

/* Holiday banner — one slim red bar above the header (spec element 4). */
.holiday-banner {
  display: none;
}
.season-on .holiday-banner {
  display: block;
  background: var(--primary);
  color: #fff;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.4;
  padding: 0.5rem 1rem;
}
.season-on .holiday-banner a {
  color: #fff; text-decoration: none;
}
.season-on .holiday-banner a:hover { text-decoration: underline; }
.season-on .holiday-banner strong { color: var(--warm-white); font-weight: 700; }

/* Header string lights — a wire along the header's bottom edge with
   red / warm-white / green bulbs (spec element 2; green added by owner
   override, Dec 1, 2026). Pure CSS: three
   repeating radial-gradient layers, offset so the colors alternate.
   Gentle twinkle; animation off under prefers-reduced-motion. */
.season-on .site-header { position: sticky; }
.season-on .header-lights {
  height: 12px;
  background-image:
    radial-gradient(circle 3px at 8px 7px, var(--primary) 96%, transparent),
    radial-gradient(circle 3px at 24px 7px, var(--warm-white) 96%, transparent),
    radial-gradient(circle 3px at 40px 7px, var(--bulb-green) 96%, transparent),
    linear-gradient(var(--border-strong), var(--border-strong));
  background-size: 48px 12px, 48px 12px, 48px 12px, 100% 1px;
  background-position: 0 0, 0 0, 0 0, 0 2px;
  background-repeat: repeat-x, repeat-x, repeat-x, no-repeat;
  filter: drop-shadow(0 2px 3px rgba(224, 35, 28, 0.35));
  animation: holiday-twinkle 3.2s ease-in-out infinite alternate;
}
@keyframes holiday-twinkle {
  from { opacity: 0.82; }
  to { opacity: 1; }
}

/* Snowfall canvas — created by holiday.js; never intercepts clicks. */
.holiday-snow {
  position: fixed; inset: 0; z-index: 55;
  pointer-events: none;
}

/* Santa golem in the Ask panel header — holiday.js swaps the permanent
   .ask-mascot img's src to the Santa version; sizing lives with the Ask
   styles above (the mascot itself is NOT seasonal and stays after the
   Jan 2 takedown). */

/* Homepage reindeer band (spec element 7). */
.season-on .holiday-band { margin-top: 3.5rem; }
.holiday-band-img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--img-border); border-radius: var(--radius);
}
.holiday-band-caption {
  color: var(--muted-foreground); font-size: 0.92rem;
  margin-top: 0.6rem; text-align: center;
}
.holiday-band-caption a { color: var(--red-text); }

/* Section figures — snowman on /exams, elves on /study-forum. */
.holiday-figure { margin: 0 0 2.5rem; }
.holiday-figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--img-border); border-radius: var(--radius);
}
.holiday-figure figcaption {
  color: var(--muted-foreground); font-size: 0.92rem;
  margin-top: 0.6rem; text-align: center;
}

/* Snowflake glyph accents on section headings — homepage + /exams
   only (spec element 5); calculators and hubs stay clean. */
.season-on main[data-route="/"] h2::before,
.season-on main[data-route="/exams"] h2::before {
  content: "❄ ";
  color: var(--gold);
  font-size: 0.72em;
  vertical-align: 0.12em;
}

/* Seasonal Santa hero — mobile framing (owner phone screenshot,
   Dec 1, 2026). Santa stands left-of-center in the wide source image
   (~28% across the frame), so the base .hero-img rule's default 50%
   object-position center-crops him almost entirely off a phone; the
   hero box also balloons toward portrait at phone widths. This rule is
   scoped twice over — .hero-img-santa is emitted ONLY for the seasonal
   hero (src/core-pages.mjs HERO_CLASS), and the media query caps it to
   phone widths — so desktop rendering and the original (non-season)
   hero are completely untouched. 25% horizontal keeps Santa's center
   (~28%) in frame; the 7/3 ratio + 60vw max-height keep the box wide
   and shallow like desktop instead of near-portrait. */
@media (max-width: 639px) {
  .season-on .hero-img-santa {
    aspect-ratio: 7 / 3;
    max-height: 60vw;
    object-position: 25% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .season-on .header-lights { animation: none; }
}
/* ================================================================ HOLIDAY
 * DRESSING — END */
