:root {
  color-scheme: light;
  /* Graphite and navy, one accent (the red of a REMOVE BEFORE FLIGHT tag), no gradients. */
  --paper: #f4f5f7;
  --surface: #ffffff;
  --stage: #e7eaee;
  --ink: #14233c;          /* navy: headings, primary buttons, links */
  --graphite: #2c3138;     /* body text */
  --muted: #5c636e;
  --line: #d6dbe1;
  --accent: #b4232c;
  --accent-soft: #f7e8e9;
  --neutral-soft: #e6eaf0;
  --warn: #b4232c;
  --radius-lg: 6px;
  --radius-sm: 4px;
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); text-underline-offset: 3px; }
h1, h2, h3 { color: var(--ink); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

/* Header */
.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 46px; height: 46px; }
.brand strong { display: block; font-weight: 600; font-size: 15px; letter-spacing: .06em; }
.brand span { display: block; font-size: 13px; color: var(--muted); }
.prepared { text-align: right; }
.prepared span { display: block; font-size: 12px; color: var(--muted); }
.prepared strong { display: block; font-size: 20px; font-weight: 500; letter-spacing: -.01em; }

/* Type */
h1 {
  font-size: clamp(34px, 5.4vw, 62px); line-height: 1.04; letter-spacing: -.03em;
  font-weight: 500; margin: 6px 0 14px; max-width: 18ch;
}
h2 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.1; letter-spacing: -.02em; font-weight: 500; margin: 0 0 12px; }
h3 { font-size: 20px; line-height: 1.25; font-weight: 500; margin: 0 0 8px; letter-spacing: -.01em; }
.kicker { color: var(--accent); font-size: 14px; font-weight: 600; margin: 0; }
.lede { font-size: 18px; color: var(--muted); max-width: 60ch; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface);
  text-decoration: none; color: var(--ink); cursor: pointer; font-size: 15px;
}
.btn:hover { border-color: #bcbcc8; }
.btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-primary:hover { background: #22375a; border-color: #22375a; }
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 15px; margin: 26px 0 10px; }

/* Pills */
.status {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--neutral-soft); color: var(--ink);
}

/* Library home */
.home-intro { padding: 54px 0 36px; }
.concept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; padding-bottom: 70px; }
.concept-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: var(--ink);
}
.concept-card:hover { border-color: #8f9bad; }
.concept-card .thumb { aspect-ratio: 16 / 10; background: var(--stage); }
.concept-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.concept-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.concept-card .meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.concept-card h3 { margin: 4px 0 0; }
.concept-card p { margin: 0; color: var(--muted); font-size: 15px; }
.concept-card .open { margin-top: auto; padding-top: 12px; color: var(--accent); font-size: 15px; }

.empty {
  border: 1px dashed #c9c9d4; border-radius: var(--radius-lg); padding: 40px 28px; background: var(--surface);
  max-width: 640px; margin-bottom: 70px;
}
.empty h2 { font-size: 24px; }

/* Concept page */
.concept-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding-bottom: 26px; }
.concept-head .lede { margin-top: 2px; }

.showcase {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
}
.stage { position: relative; background: var(--stage); min-height: 520px; }
.stage-canvas { position: absolute; inset: 0; }
.stage-canvas canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.stage-canvas canvas:active { cursor: grabbing; }
.stage-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; pointer-events: none; }
.stage-top > * { pointer-events: auto; }
.segmented { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.segmented button { border: 0; background: none; padding: 8px 12px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.segmented button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.stage-actions { display: flex; gap: 8px; }
.stage-actions .btn { min-height: 38px; padding: 0 12px; font-size: 14px; }
.stage-bottom { position: absolute; left: 18px; right: 18px; bottom: 14px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; pointer-events: none; }
.stage-bottom .hint { font-size: 12px; color: var(--muted); }
.stage-note {
  position: absolute; left: 50%; top: 66px; transform: translateX(-50%); max-width: calc(100% - 28px);
  background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; padding: 6px 14px; color: var(--muted); text-align: center;
}
.stage-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; }
.stage-fallback img { max-height: 80%; border-radius: var(--radius-sm); margin: 0 auto 12px; }
.stage-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.showcase:fullscreen { border-radius: 0; grid-template-columns: minmax(0, 1fr) 300px; }
.showcase:fullscreen .stage { min-height: 100vh; }

.panel { border-left: 1px solid var(--line); padding: 22px 22px 26px; display: flex; flex-direction: column; gap: 22px; }
.panel h4 { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 10px; }
.panel section + section { border-top: 1px solid var(--line); padding-top: 20px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; cursor: pointer; font-size: 15px; }
.toggle input { appearance: none; width: 40px; height: 22px; border-radius: 999px; background: #c3c9d2; position: relative; cursor: pointer; margin: 0; flex: none; transition: background .15s; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { transform: translateX(18px); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.pair .btn { justify-content: center; min-height: 38px; font-size: 14px; padding: 0 8px; }
.swatches { display: flex; gap: 10px; }
.swatch { width: 40px; height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; padding: 0; }
.swatch span { width: 24px; height: 24px; border-radius: 50%; }
.swatch[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.swatch-name { font-size: 14px; margin: 8px 0 0; }
.range-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
input[type="range"] { width: 100%; accent-color: var(--accent); margin: 8px 0 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }

.below-stage { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); padding: 10px 2px 0; }

/* Content sections */
.section { padding: 64px 0; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; align-items: start; }
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.product { border-top: 1px solid var(--ink); padding-top: 14px; }
.product .kicker { margin-bottom: 8px; font-weight: 500; }
.product p { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.product button { border: 0; background: none; color: var(--accent); padding: 0; cursor: pointer; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; }

.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.figure img { border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--stage); width: 100%; }
.figure figcaption { font-size: 14px; margin-top: 8px; }
.figure figcaption span { display: block; font-size: 12px; color: var(--muted); }

.slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.slide-btn { border: 1px solid var(--line); background: var(--surface); padding: 0; border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; text-align: left; }
.slide-btn img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.slide-btn span { display: block; padding: 8px 12px; font-size: 13px; color: var(--muted); }

.downloads { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.downloads li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.downloads strong { font-weight: 500; display: block; }
.downloads .small { color: var(--muted); }
.downloads .pending { font-size: 14px; color: var(--muted); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; counter-reset: step; }
.steps li { border-top: 1px solid var(--line); padding-top: 14px; counter-increment: step; }
.steps li::before { content: counter(step); display: block; color: var(--accent); font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.steps strong { display: block; font-weight: 500; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: 15px; }

/* Lightbox */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1200px, 96vw); width: 100%; }
dialog.lightbox::backdrop { background: rgba(12, 20, 34, .86); }
.lightbox img { width: 100%; border-radius: var(--radius-sm); background: #fff; }
.lightbox-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; color: #fff; font-size: 14px; }
.lightbox-bar .btn { min-height: 38px; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 26px 0 40px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.site-foot .brand img { width: 40px; height: 40px; }
.site-foot .brand strong { font-size: 14px; letter-spacing: 0; }
.site-foot a { color: var(--ink); }

/* Landing / team */
.landing { padding: 70px 0 80px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.landing .mark { width: min(100%, 320px); height: auto; justify-self: center; opacity: .95; }
.howto { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; counter-reset: s; max-width: 520px; }
.howto li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 10px; }
.howto li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; display: grid; place-items: center; }
.client-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.client-table th, .client-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
.client-table th { font-size: 13px; color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; margin-bottom: 60px; }


/* Progress, on-page nav */
.version { text-align: right; margin: 0; }
.progress { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; max-width: 720px; }
.progress li { position: relative; padding-top: 14px; font-size: 14px; color: var(--muted); }
.progress li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 4px; background: var(--line); }
.progress li.done::before, .progress li.current::before { background: var(--accent); }
.progress li.current { color: var(--ink); font-weight: 600; }
.jump-nav { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; overflow-x: auto; padding: 8px 0; margin-bottom: 18px;
  background: var(--paper); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.jump-nav::-webkit-scrollbar { display: none; }
.jump-nav button { flex: none; border: 0; background: none; padding: 8px 12px; border-radius: 7px; cursor: pointer; font-size: 14px; color: var(--muted); min-height: 38px; }
.jump-nav button:hover { background: var(--surface); color: var(--ink); }
#showcase, .section { scroll-margin-top: 64px; }

/* At a glance */
.specs { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-top: 1px solid var(--line); }
.spec { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); }
.spec dt { font-size: 13px; color: var(--muted); }
.spec dd { margin: 2px 0 0; font-size: 15px; }
.spec dd.tbc { color: var(--muted); font-style: italic; }

/* Version history */
.history-title { margin: 30px 0 10px; font-size: 17px; }
.history { list-style: none; padding: 0; margin: 0; }
.history li { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.history li strong { font-weight: 500; }
.history li span:last-child { grid-column: 1 / -1; color: var(--muted); }

/* Feedback */
.feedback { display: grid; gap: 18px; max-width: 680px; }
.feedback label:not(.check) { display: grid; gap: 6px; font-size: 14px; }
.feedback input:not([type="radio"]), .feedback textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 16px; }
.feedback textarea { resize: vertical; line-height: 1.45; }
#fb-summary { font-size: 14px; background: var(--paper); color: var(--muted); }
.fb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fb-current { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--accent-soft); font-size: 15px; }
.fb-current strong { font-weight: 600; font-size: 13px; color: var(--accent); }
.fb-decision { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.fb-decision legend { font-size: 14px; margin-bottom: 8px; padding: 0; }
.fb-decision .check { min-height: 30px; font-size: 15px; }
.fb-decision input { accent-color: var(--accent); }
.fb-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.fb-status { margin: 0; color: var(--muted); min-height: 1.4em; }
@media (max-width: 560px) {
  .fb-grid { grid-template-columns: 1fr; }
  .stage-actions .snap { display: none; }
  .version { text-align: left; }
}

/* Print summary */
#print-sheet { display: none; }
@media print {
  body > *:not(#print-sheet) { display: none !important; }
  body { background: #fff; color: #000; }
  #print-sheet { display: block; font-size: 12pt; }
  #print-sheet .ps-head { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #999; padding-bottom: 10px; }
  #print-sheet .ps-head img { width: 54px; height: 54px; }
  #print-sheet .ps-date { margin-left: auto; }
  #print-sheet h1 { font-size: 22pt; margin: 18px 0 10px; max-width: none; }
  #print-sheet h2 { font-size: 14pt; margin: 18px 0 6px; }
  #print-sheet pre { font-family: inherit; white-space: pre-wrap; font-size: 12pt; line-height: 1.5; }
  #print-sheet table { border-collapse: collapse; width: 100%; }
  #print-sheet th, #print-sheet td { text-align: left; border-bottom: 1px solid #ccc; padding: 5px 8px 5px 0; vertical-align: top; }
  #print-sheet th { width: 34%; font-weight: 600; }
  #print-sheet .ps-foot { margin-top: 18px; font-size: 10pt; color: #555; }
}

/* Responsive */
@media (max-width: 900px) {
  .showcase, .showcase:fullscreen { grid-template-columns: 1fr; }
  .panel { border-left: 0; border-top: 1px solid var(--line); }
  .stage { min-height: 420px; }
  .split { grid-template-columns: 1fr; gap: 24px; }
  .landing { grid-template-columns: 1fr; gap: 30px; padding-top: 44px; }
  .landing .mark { width: 180px; justify-self: start; order: -1; }
}
@media (max-width: 560px) {
  .wrap { width: min(100% - 32px, var(--wrap)); }
  .brand img { width: 38px; height: 38px; }
  .brand strong { font-size: 13px; }
  .prepared strong { font-size: 16px; }
  .stage { min-height: 360px; }
  .stage-top { flex-direction: column; align-items: flex-start; }
  .stage-actions .expand { display: none; }
  .stage-note { top: auto; bottom: 46px; }
  .segmented button { padding: 8px 9px; font-size: 13px; }
  .section { padding: 46px 0; }
  .concept-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

.mini-links { display: flex; gap: 16px; flex-wrap: wrap; width: 100%; }
.mini-links a { color: var(--muted); }
