/* Better StudyPlace Documentation Site
   Direction: One motif (seed 1527423830) · Albert Sans · Black & Crimson + Off-White Field */

:root {
  --bg: #0a0a0a;
  --surface: #151515;
  --surface-2: #202024;
  --surface-3: #2a2a2f;
  --ink: #efefef;
  --muted: #a6a6a6;
  --accent: #b11226;
  --accent-ink: #ffffff;
  --field-1: #efefef;
  --field-1-ink: #0a0a0a;
  --field-1-surface: #dfe3e3;
  --field-1-muted: #4a4d50;

  --font-display: "Albert Sans", system-ui, -apple-system, sans-serif;
  --font-text: "Albert Sans", system-ui, -apple-system, sans-serif;

  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1rem, 0.98rem + 0.12vw, 1.0625rem);
  --step-lead: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
  --step-head: clamp(1.85rem, 1.35rem + 2.1vw, 3.2rem);
  --step-display: clamp(2.65rem, 1.4rem + 5.2vw, 6.4rem);

  --margin: clamp(1rem, 2.4vw, 2.25rem);
  --gutter: clamp(0.75rem, 1.6vw, 1.5rem);
  --section: clamp(4.5rem, 9vw, 8.5rem);
  --radius: 10px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 200ms;
  --t-ui: 260ms;
  --t-reveal: 760ms;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  font-weight: 400;
  line-height: 1.5;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd {
  margin: 0;
}

ul[class], ol[class] {
  padding: 0;
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
  background: var(--surface);
}

button, input, select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  color: var(--ink);
  padding: 0.12em 0.42em;
  border-radius: 6px;
}

.field-light code {
  background: var(--field-1-surface);
  color: var(--field-1-ink);
}

:target {
  scroll-margin-top: 4.5rem;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  text-wrap: balance;
  hyphens: none;
}

.wrap {
  padding-inline: var(--margin);
}

.nums {
  font-variant-numeric: tabular-nums;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.45rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}

.button:hover {
  background: #920e1e;
}

.button:active {
  transform: scale(0.97);
}

.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.35rem;
  background: var(--surface-2);
  color: var(--ink);
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}

.button-secondary:hover {
  background: var(--surface-3);
}

.button-secondary:active {
  transform: scale(0.97);
}

/* ---------- Navigation Header ---------- */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem var(--margin);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--step-body);
  justify-self: start;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  justify-self: center;
  font-size: var(--step-small);
  font-weight: 500;
}

.topbar-nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color var(--t-hover) ease;
}

.topbar-nav a:hover,
.topbar-nav a:focus-visible {
  color: var(--ink);
}

.topbar-cta {
  justify-self: end;
  font-size: var(--step-small);
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius);
  background: var(--surface);
  transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}

.topbar-cta:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ---------- 1. Hero: Tabbed Folder Stack ---------- */
.hero {
  padding-top: clamp(0.9rem, 2.2vw, 1.75rem);
  padding-bottom: clamp(1.5rem, 3.5vw, 2.5rem);
}

.hero-head {
  text-align: center;
  max-width: 72rem;
  margin-inline: auto;
}

.hero-title {
  font-size: var(--step-display);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.hero-sub {
  margin: 0.9rem auto 0;
  max-width: 48ch;
  font-size: var(--step-lead);
  line-height: 1.35;
  color: var(--muted);
}

.folder-stack {
  margin: clamp(1.4rem, 3vw, 2.25rem) auto 0;
  max-width: min(1240px, 100%);
  position: relative;
}

.folder-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 6px;
  padding-inline: 0.5rem;
}

.folder-tab {
  position: relative;
  min-height: 44px;
  padding: 0.6rem 1.5rem 0.55rem 1.2rem;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  clip-path: polygon(0 100%, 10px 0, calc(100% - 18px) 0, 100% 100%);
  transition: background-color var(--t-ui) ease, color var(--t-ui) ease, transform var(--t-ui) var(--ease-out);
}

.folder-tab:hover {
  color: var(--ink);
  transform: translateY(-2px);
}

.folder-tab[aria-selected="true"] {
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 600;
}

.folder-back-strip {
  height: 12px;
  background: var(--accent);
  border-radius: var(--radius) var(--radius) 0 0;
  transform-origin: left center;
  transition: background-color var(--t-ui) ease;
}

.folder-front {
  background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: clamp(1.35rem, 3vw, 2.5rem);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.28fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
}

.folder-copy-title {
  font-size: var(--step-lead);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.folder-copy-desc {
  margin-top: 0.9rem;
  font-size: var(--step-body);
  color: var(--ink);
  max-width: 44ch;
}

.folder-actions {
  margin-top: 1.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.folder-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  aspect-ratio: 16 / 10;
}

.folder-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 520ms var(--ease-out), transform 900ms var(--ease-soft);
}

.folder-media img.is-active {
  opacity: 1;
  transform: scale(1);
}

/* ---------- 2. Intro: Statement with Inline Thumbnails ---------- */
.intro-section {
  padding-block: clamp(4.5rem, 9vw, 8rem);
  background: var(--bg);
}

.intro-inner {
  max-width: 58rem;
  margin-inline: auto;
  text-align: center;
}

.intro-heading {
  font-size: var(--step-lead);
  color: var(--muted);
  margin-bottom: 1rem;
}

.statement-text {
  font-size: clamp(1.25rem, 1.08rem + 0.7vw, 1.65rem);
  line-height: 1.32;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 44ch;
  margin-inline: auto;
}

.inline-thumb {
  display: inline-block;
  vertical-align: -0.14em;
  width: 1.38em;
  height: 0.86em;
  margin-inline: 0.14em;
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface-2);
}

.inline-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 3. How It Works: Drag Through the Stages ---------- */
.stages-section {
  background: var(--bg);
  padding-bottom: clamp(4rem, 7vw, 6.5rem);
}

.stages-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 360px;
}

.stages-left {
  background: var(--surface);
  padding: clamp(2rem, 4vw, 3.25rem) var(--margin);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.15rem;
}

.stages-title {
  font-size: var(--step-head);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 14ch;
}

.stages-body {
  font-size: var(--step-body);
  color: var(--ink);
  max-width: 44ch;
}

.stages-path {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: var(--step-small);
  font-weight: 500;
  color: var(--muted);
}

.stages-right {
  background: var(--surface-2);
  padding: clamp(2rem, 4vw, 3.5rem) var(--margin);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-demo-wrap {
  width: 100%;
  max-width: 460px;
}

.stages-control {
  background: var(--surface);
  padding: 1.5rem var(--margin) 2rem;
}

.stage-range {
  width: 100%;
  height: 32px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.stage-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 6px;
  background: var(--surface-3);
}

.stage-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -10px;
  border-radius: 8px;
  background: var(--accent);
}

.stage-range::-moz-range-track {
  height: 8px;
  border-radius: 6px;
  background: var(--surface-3);
}

.stage-range::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
}

.stage-labels {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.stage-step-btn {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--t-hover) ease, background-color var(--t-hover) ease;
}

.stage-step-btn[aria-pressed="true"] {
  color: var(--ink);
  background: var(--surface-2);
}

/* ---------- Mock StudyPlace data-ui Fragments ---------- */
[data-ui="studyplace-fragment"] {
  border-radius: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(20, 22, 28, 0.96);
  color: #f3f4f6;
  transition: background-color 240ms var(--ease-out), color 240ms var(--ease-out);
}

[data-ui="studyplace-fragment"].is-light {
  background: rgba(250, 251, 252, 0.96);
  color: #14161a;
  border-color: rgba(0, 0, 0, 0.1);
}

.ui-win-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}

.ui-win-dots {
  display: flex;
  gap: 6px;
}

.ui-win-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #4b5563;
}

.ui-win-dot.red { background: #ef4444; }
.ui-win-dot.amber { background: #f59e0b; }
.ui-win-dot.green { background: #22c55e; }

.ui-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(128, 134, 148, 0.14);
  font-size: 13px;
}

.ui-row-item + .ui-row-item {
  margin-top: 8px;
}

.ui-pill {
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(128, 134, 148, 0.22);
}

.ui-pill.accent {
  background: #005fcc;
  color: #ffffff;
}

/* ---------- 4. Showcase: One Control, Blown Up (Inverted Off-White Field) ---------- */
.showcase-section {
  background: var(--field-1);
  color: var(--field-1-ink);
  padding-block: clamp(4.5rem, 8vw, 7rem);
  overflow: hidden;
}

.showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.showcase-title {
  font-size: var(--step-head);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--field-1-ink);
  max-width: 14ch;
}

.showcase-copy {
  margin-top: 1.1rem;
  font-size: var(--step-body);
  color: var(--field-1-muted);
  max-width: 44ch;
}

.showcase-readout {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.mode-btn {
  min-height: 44px;
  padding: 0 1.1rem;
  border-radius: var(--radius);
  background: var(--field-1-surface);
  color: var(--field-1-ink);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease;
}

.mode-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}

.poster-control-stage {
  background: var(--field-1-surface);
  border-radius: 16px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  position: relative;
  overflow: hidden;
}

.poster-opacity-control {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.poster-opacity-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--step-lead);
  font-weight: 600;
}

.poster-range {
  width: 100%;
  height: 44px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.poster-range::-webkit-slider-runnable-track {
  height: 18px;
  border-radius: 9px;
  background: #c7cccc;
}

.poster-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 44px;
  height: 44px;
  margin-top: -13px;
  border-radius: 10px;
  background: var(--accent);
}

.poster-range::-moz-range-track {
  height: 18px;
  border-radius: 9px;
  background: #c7cccc;
}

.poster-range::-moz-range-thumb {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
}

.overlap-preview {
  margin-top: 1.5rem;
  position: relative;
  min-height: 220px;
  background: #233840;
  border-radius: 12px;
  padding: 18px;
  overflow: hidden;
  transition: background-color 220ms ease;
}

.overlap-preview.is-light-mode {
  background: #cbd7da;
}

.overlap-win-back {
  width: 78%;
  padding: 14px;
  border-radius: 10px;
  background: rgba(16, 18, 24, 0.96);
  color: #f3f4f6;
  font-size: 13px;
}

.overlap-preview.is-light-mode .overlap-win-back {
  background: rgba(255, 255, 255, 0.98);
  color: #14161a;
}

.overlap-win-front {
  position: relative;
  margin: -56px 0 0 auto;
  width: 78%;
  padding: 14px;
  border-radius: 10px;
  color: #f3f4f6;
  font-size: 13px;
  transition: background-color 180ms ease;
}

.overlap-preview.is-light-mode .overlap-win-front {
  color: #111317;
}

/* ---------- 5. Features Mosaic: Close-ups on a Board ---------- */
.mosaic-section {
  background: var(--bg);
  padding-block: clamp(4.5rem, 8vw, 7.5rem);
}

.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 112px;
  gap: 10px;
}

.mosaic-tile {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform var(--t-ui) var(--ease-out), background-color var(--t-ui) ease;
}

.mosaic-tile:hover {
  background: var(--surface-2);
}

.tile-heading {
  grid-column: span 6;
  grid-row: span 2;
  background: var(--bg);
  justify-content: center;
  padding-left: 0;
}

.tile-heading h2 {
  font-size: var(--step-head);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 12ch;
}

.tile-at { grid-column: span 6; grid-row: span 4; }
.tile-spot { grid-column: span 6; grid-row: span 2; }
.tile-whatif { grid-column: span 3; grid-row: span 3; }
.tile-assign { grid-column: span 3; grid-row: span 3; }
.tile-notes { grid-column: span 6; grid-row: span 3; }
.tile-whisper { grid-column: span 6; grid-row: span 2; }
.tile-rec { grid-column: span 6; grid-row: span 2; background: var(--accent); color: var(--accent-ink); }

.tile-caption h3 {
  font-size: var(--step-lead);
  font-weight: 600;
  line-height: 1.25;
}

.tile-caption p {
  margin-top: 0.3rem;
  font-size: var(--step-body);
  color: var(--muted);
  max-width: 44ch;
}

.tile-rec .tile-caption p {
  color: #fce7ea;
}

.macro-ui {
  align-self: flex-end;
  transform-origin: bottom right;
  margin-bottom: 8px;
}

.keycap-pair {
  display: flex;
  gap: 10px;
  align-items: center;
}

.keycap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 58px;
  padding-inline: 16px;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 600;
}

.tile-media-crop {
  border-radius: 8px;
  overflow: hidden;
  max-height: 220px;
  margin-bottom: 12px;
}

.tile-media-crop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 6. Reference & Icon Map: Giant Word + Filled Bar Rows + Preview ---------- */
.ref-section {
  background: var(--bg);
  padding-block: clamp(4rem, 7vw, 7rem);
}

.ref-shell {
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.ref-left {
  container-type: inline-size;
}

.giant-word {
  font-size: var(--step-display);
  line-height: 0.88;
  letter-spacing: -0.04em;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.ref-heading {
  font-size: var(--step-lead);
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.bar-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bar-item {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}

.bar-item summary {
  list-style: none;
  min-height: 56px;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: var(--step-body);
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--t-hover) ease;
}

.bar-item summary::-webkit-details-marker {
  display: none;
}

.bar-item summary:hover {
  background: var(--surface-2);
}

.bar-item[open] > summary {
  background: var(--surface-2);
}

.bar-plus {
  font-size: 1.35rem;
  line-height: 1;
  color: var(--muted);
  transition: transform 200ms var(--ease-out);
}

.bar-item[open] .bar-plus {
  transform: rotate(45deg);
  color: var(--ink);
}

.bar-body {
  padding: 0.4rem 1.25rem 1.25rem;
}

.ref-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-block: 0.65rem;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color var(--t-hover) ease, padding-inline var(--t-hover) ease;
}

.ref-row:hover,
.ref-row.is-active {
  background: var(--surface-2);
  padding-inline: 0.65rem;
}

.ref-row-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 500;
  color: var(--ink);
}

.ref-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.ref-row-val {
  color: var(--muted);
  font-size: var(--step-small);
  text-align: right;
}

.ref-preview-pane {
  position: sticky;
  top: 2rem;
  background: var(--surface);
  border-radius: 14px;
  padding: 1.25rem;
}

.ref-preview-frame {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg);
}

.ref-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 240ms var(--ease-out);
}

.ref-preview-caption {
  margin-top: 1rem;
}

.ref-preview-caption h3 {
  font-size: var(--step-lead);
  font-weight: 600;
}

.ref-preview-caption p {
  margin-top: 0.35rem;
  font-size: var(--step-body);
  color: var(--muted);
}

/* ---------- 7. FAQ: Accordion of Filled Tiles (Off-White Field) ---------- */
.faq-section {
  background: var(--field-1);
  color: var(--field-1-ink);
  padding-block: clamp(4.5rem, 8vw, 7.5rem);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
  align-items: start;
}

.faq-aside {
  grid-column: 1 / 5;
  position: sticky;
  top: 4rem;
}

.faq-aside h2 {
  font-size: var(--step-head);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--field-1-ink);
}

.faq-aside p {
  margin-top: 1rem;
  color: var(--field-1-muted);
}

.faq-list {
  grid-column: 5 / 13;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-tile {
  background: var(--field-1-surface);
  color: var(--field-1-ink);
  border-radius: var(--radius);
  overflow: hidden;
  transition: background-color var(--t-ui) ease, color var(--t-ui) ease;
}

.faq-tile[open] {
  background: var(--accent);
  color: var(--accent-ink);
}

.faq-tile summary {
  list-style: none;
  min-height: 72px;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  font-size: var(--step-lead);
  font-weight: 500;
  cursor: pointer;
}

.faq-tile summary::-webkit-details-marker {
  display: none;
}

.faq-sign {
  position: relative;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.faq-sign::before,
.faq-sign::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background: currentColor;
  transition: transform 220ms var(--ease-out);
}

.faq-sign::before {
  width: 16px;
  height: 3px;
}

.faq-sign::after {
  width: 3px;
  height: 16px;
}

.faq-tile[open] .faq-sign::after {
  transform: rotate(90deg);
}

.faq-answer {
  padding: 0 1.5rem 1.5rem;
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 56ch;
}

/* ---------- 8. CTA: The Action Tile ---------- */
.cta-section {
  background: var(--field-1);
  color: var(--field-1-ink);
  padding-bottom: clamp(4.5rem, 8vw, 7rem);
}

.cta-board {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  padding-inline: var(--margin);
}

.cta-flank {
  grid-column: span 2;
  min-height: 330px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--field-1-surface);
}

.cta-flank img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-center {
  grid-column: span 8;
  min-height: 330px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cta-center h2 {
  font-size: var(--step-head);
  line-height: 1.04;
  max-width: 18ch;
}

.cta-center p {
  margin-top: 0.85rem;
  font-size: var(--step-body);
  color: #fde8eb;
  max-width: 48ch;
}

.cta-btn-row {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button-paper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.45rem;
  background: var(--field-1);
  color: var(--field-1-ink);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--t-press) var(--ease-out);
}

.button-paper:active {
  transform: scale(0.97);
}

/* ---------- 9. Footer: The Mark, Built Large ---------- */
.site-footer {
  background: var(--bg);
  color: var(--ink);
  padding-top: clamp(3.5rem, 7vw, 5.5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.footer-mark {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: clamp(88px, 16vw, 180px);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.mark-block {
  flex: 1;
  background: var(--surface);
  color: var(--ink);
  border-radius: 6px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.45rem;
  font-weight: 600;
  font-size: var(--step-head);
  line-height: 1;
  transition: background-color 220ms ease, color 220ms ease;
}

.mark-block.is-accent {
  background: var(--accent);
  color: var(--accent-ink);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
}

.footer-col {
  grid-column: span 2;
}

.footer-col h3 {
  font-size: var(--step-small);
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: var(--step-small);
}

.footer-col a {
  text-decoration: none;
}

.footer-col a:hover {
  text-decoration: underline;
}

.footer-contact {
  grid-column: 9 / 13;
  font-size: var(--step-small);
  color: var(--muted);
}

.footer-contact a {
  color: var(--ink);
  font-weight: 500;
}

.footer-bottom {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: var(--step-small);
  color: var(--muted);
}

/* ---------- Choreographed Reveals & Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] {
    opacity: 0;
    transform: translateY(18px);
    animation: bsp-rise var(--t-reveal) var(--ease-expo) forwards;
    animation-delay: calc(var(--i, 0) * 75ms + 90ms);
  }

  .js [data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 640ms var(--ease-out), transform 780ms var(--ease-expo);
    transition-delay: calc(var(--i, 0) * 55ms);
  }

  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }
}

@keyframes bsp-rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive (Tablet <= 900px, Phone <= 640px) ---------- */
@media (max-width: 900px) {
  .topbar {
    grid-template-columns: auto auto;
  }
  .topbar-nav {
    display: none;
  }
  .folder-front,
  .stages-split,
  .showcase-grid,
  .ref-shell {
    grid-template-columns: 1fr;
  }
  .mosaic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
  }
  .mosaic-tile {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 220px;
  }
  .tile-heading,
  .tile-at,
  .tile-notes,
  .tile-rec {
    grid-column: span 2;
  }
  .ref-preview-pane {
    position: static;
  }
  .faq-aside,
  .faq-list {
    grid-column: 1 / -1;
    position: static;
  }
  .cta-flank {
    grid-column: span 6;
    min-height: 150px;
  }
  .cta-center {
    grid-column: 1 / -1;
    order: -1;
    min-height: 260px;
  }
  .footer-col {
    grid-column: span 3;
  }
  .footer-contact {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .stage-labels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mosaic-grid {
    grid-template-columns: 1fr;
  }
  .tile-heading,
  .tile-at,
  .tile-spot,
  .tile-whatif,
  .tile-assign,
  .tile-notes,
  .tile-whisper,
  .tile-rec {
    grid-column: span 1;
  }
  .mark-block {
    font-size: var(--step-lead);
  }
  .footer-col {
    grid-column: span 6;
  }
}
