/* ============================================================================
   The Compass — design system for "This is Human Centered Design"
   (BIS Publishers, 2026).

   Fonts: Söhne (sans, Klim Type Foundry) for headings/labels/UI; Hagel (serif,
   Scifipoetry) for body and quotes. Drop the licensed web-font files into
   /assets/fonts/ and uncomment the @font-face blocks below. Until then the tool
   falls back to Inter (sans) and a transitional serif — the font-family stacks
   are the only thing to change.
   ========================================================================== */

/*
@font-face {
  font-family: 'Söhne';
  src: url('/assets/fonts/soehne-buch.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Söhne';
  src: url('/assets/fonts/soehne-kraftig.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Söhne';
  src: url('/assets/fonts/soehne-dreiviertelfett.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Hagel';
  src: url('/assets/fonts/hagel-regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Hagel';
  src: url('/assets/fonts/hagel-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
*/

:root {
  /* Confirm exact hex with Jill Scarry. Mirrors js/theme.js. */
  --cobalt: #1b3c9b;
  --coral: #e8402c;
  --ink: #111318;
  --paper: #ffffff;
  --grid: #c9c9cf;
  --muted: #6b6f76;
  --hair: #e6e6ea;

  --font-sans: 'Söhne', Inter, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Hagel', Georgia, 'Times New Roman', serif;

  --max: 1180px;
  --gutter: clamp(20px, 4vw, 56px);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ── Ruler motif ─────────────────────────────────────────────────────────── */
.ruler {
  position: fixed;
  top: 0;
  right: 0;
  width: 26px;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  background: repeating-linear-gradient(
    to bottom,
    var(--coral) 0,
    var(--coral) 1px,
    transparent 1px,
    transparent 13px
  );
  border-left: 2px solid var(--coral);
  opacity: 0.9;
}
@media (max-width: 720px) {
  .ruler {
    width: 14px;
  }
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) calc(var(--gutter) + 26px) 40px var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
body[data-step='intro'] .layout {
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.live {
  position: sticky;
  top: 24px;
}
@media (max-width: 900px) {
  .live {
    position: static;
    order: -1;
  }
  /* Keep the tall A2 preview from dominating the top of the mobile layout. */
  .live-poster {
    max-width: 280px;
  }
}

/* ── Type primitives ─────────────────────────────────────────────────────── */
.label-sm {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin: 0 0 12px;
  display: block;
}
.display {
  font-family: var(--font-sans);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.98;
  color: var(--cobalt);
  font-size: clamp(30px, 5vw, 46px);
  margin: 0 0 14px;
}
.display.xl {
  font-size: clamp(52px, 12vw, 116px);
}
.subhead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(20px, 3vw, 28px);
  color: var(--cobalt);
  margin: 0 0 22px;
}
.lead {
  max-width: 52ch;
  color: var(--ink);
  margin: 0 0 24px;
}
.dot-accent {
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: var(--coral);
  vertical-align: 0.08em;
  margin: 0 0.2em;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 13px 22px;
  border: 2px solid var(--cobalt);
  background: var(--cobalt);
  color: #fff;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease, opacity 0.15s;
}
.btn:hover {
  background: #16327f;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn.ghost {
  background: transparent;
  color: var(--cobalt);
}
.btn.ghost:hover {
  background: rgba(27, 60, 155, 0.06);
}
.btn.small {
  padding: 8px 14px;
  font-size: 13px;
}
.linkbtn {
  font-family: var(--font-sans);
  font-weight: 600;
  background: none;
  border: none;
  color: var(--coral);
  cursor: pointer;
  padding: 0;
  font-size: inherit;
}
.linkbtn:hover {
  text-decoration: underline;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* ── Intro / path choice ─────────────────────────────────────────────────── */
.intro {
  max-width: 900px;
}
.path-choice {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 8px 0 26px;
}
.path-card {
  text-align: left;
  background: #fff;
  border: 2px solid var(--hair);
  border-radius: 3px;
  padding: 24px 22px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s, transform 0.08s;
}
.path-card:hover {
  border-color: var(--cobalt);
  transform: translateY(-2px);
}
.path-card.feature {
  border-color: var(--cobalt);
}
.path-card .path-title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 22px;
  color: var(--cobalt);
}
.path-card .path-desc {
  color: var(--muted);
  font-size: 16px;
}
.fineprint {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--muted);
}
.fineprint.upsell {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
}

/* ── Step head ───────────────────────────────────────────────────────────── */
.step-head {
  margin-bottom: 26px;
}

/* ── Principle cards / scoring ───────────────────────────────────────────── */
.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.principle {
  border: 1px solid var(--hair);
  border-radius: 3px;
  padding: 18px 20px;
}
.principle-head {
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.principle-num {
  font-family: var(--font-sans);
  font-weight: 800;
  color: var(--coral);
  font-size: 15px;
  letter-spacing: 0.05em;
}
.principle-name {
  font-family: var(--font-sans);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--cobalt);
  font-size: 17px;
  margin: 0 0 2px;
}
.principle-short {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--cobalt);
  margin: 0;
  font-size: 16px;
}
.statement {
  margin: 12px 0 14px;
  font-size: 17px;
}
.statement .who {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 6px;
}
.scale {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.scale-btn {
  font-family: var(--font-sans);
  font-weight: 600;
  width: 44px;
  height: 44px;
  border: 2px solid var(--hair);
  background: #fff;
  color: var(--ink);
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.12s;
}
.scale-btn:hover {
  border-color: var(--cobalt);
}
.scale-btn.is-on {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #fff;
}
.scale-end {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.scale-end:last-child {
  margin-left: auto;
}

/* ── Live A2 print preview ───────────────────────────────────────────────── */
.live-title {
  margin-bottom: 10px;
}
/* The frame carries the exact A2 aspect ratio (420 : 594) so the reader can see
   they are building a real print, and drops a soft shadow like a page on a desk. */
.live-poster {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  aspect-ratio: 420 / 594;
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: 2px;
  box-shadow: 0 6px 24px rgba(17, 19, 24, 0.08);
  overflow: hidden;
}
/* Direct child only — the poster contains a nested radar <svg> that must keep
   its own width/height and not be stretched to fill the frame. */
.live-poster > svg {
  width: 100%;
  height: 100%;
  display: block;
}
.live-hint {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
  margin: 12px auto 2px;
  max-width: 400px;
  text-align: center;
}

/* ── Forms ───────────────────────────────────────────────────────────────── */
.details-form,
.field {
  display: flex;
  flex-direction: column;
}
.details-form {
  max-width: 520px;
  gap: 18px;
}
/* The reveal-screen capture block reads as a distinct "get it" panel. */
.details-form.gate {
  max-width: none;
  margin-top: 30px;
  padding: 26px 24px;
  border: 2px solid var(--cobalt);
  border-radius: 3px;
  background: rgba(27, 60, 155, 0.03);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 460px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}
.field.inline {
  max-width: 420px;
  margin-bottom: 18px;
}
.field input,
select {
  font-family: var(--font-sans);
  font-size: 16px;
  padding: 12px 14px;
  border: 2px solid var(--hair);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
}
.field input:focus,
select:focus,
.scale-btn:focus-visible,
.btn:focus-visible,
.path-card:focus-visible {
  outline: 3px solid rgba(27, 60, 155, 0.35);
  outline-offset: 2px;
  border-color: var(--cobalt);
}
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.5;
}
.consent input {
  margin-top: 4px;
  width: 20px;
  height: 20px;
  flex: none;
  accent-color: var(--cobalt);
}
.consent em {
  font-style: italic;
}
.form-error {
  color: var(--coral);
  font-family: var(--font-sans);
  font-size: 14px;
  margin: 0;
}
/* ── Quotes ──────────────────────────────────────────────────────────────── */
.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.quote-card {
  border: 2px solid var(--hair);
  border-radius: 3px;
  padding: 22px 20px;
  cursor: pointer;
  display: block;
  transition: border-color 0.15s;
}
.quote-card:hover {
  border-color: var(--cobalt);
}
.quote-card.is-on {
  border-color: var(--cobalt);
  background: rgba(27, 60, 155, 0.04);
}
.quote-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.quote-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  color: var(--cobalt);
}

/* ── Render / download ───────────────────────────────────────────────────── */
.download-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.download-note {
  color: var(--coral);
  font-family: var(--font-sans);
  font-size: 14px;
}
.pdf-frame {
  margin: 16px 0 4px;
}
.pdf-frame iframe {
  width: 100%;
  height: 70vh;
  border: 1px solid var(--hair);
  border-radius: 3px;
}
.status {
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 14px 16px;
  border-radius: 3px;
  margin: 6px 0 18px;
  border: 1px solid var(--hair);
}
.status.ok {
  border-color: var(--cobalt);
  background: rgba(27, 60, 155, 0.04);
}
.status.error {
  border-color: var(--coral);
  background: rgba(232, 64, 44, 0.05);
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* ── Reading teaser (intrigue before the gate) ───────────────────────────── */
.reading-teaser {
  margin: 26px 0 2px;
  padding-top: 24px;
  border-top: 2px solid var(--cobalt);
}
.teaser-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 56ch;
}
.teaser-list li {
  position: relative;
  padding-left: 24px;
  font-size: 17px;
  color: var(--ink);
}
.teaser-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
}

/* ── Reading / report ────────────────────────────────────────────────────── */
.report {
  margin: 30px 0 8px;
  padding-top: 26px;
  border-top: 2px solid var(--cobalt);
}
.report-bearing {
  font-family: var(--font-sans);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--cobalt);
  font-size: clamp(24px, 3.5vw, 34px);
  margin: 4px 0 12px;
}
.report-blurb {
  max-width: 58ch;
}
.report-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 8px 0 26px;
}
.report-card {
  border: 1px solid var(--hair);
  border-radius: 3px;
  padding: 18px 20px;
}
.report-principle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  color: var(--cobalt);
  margin: 0 0 8px;
}
.report-advice {
  margin: 0;
  font-size: 16px;
}
.signals-title {
  margin-bottom: 12px;
}
.signals {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.signal {
  border-left: 3px solid var(--cobalt);
  padding: 4px 0 4px 16px;
}
.signal--lean,
.signal--watch {
  border-left-color: var(--coral);
}
.signal strong {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--cobalt);
  display: block;
  margin-bottom: 3px;
}
.signal--lean strong,
.signal--watch strong {
  color: var(--coral);
}
.signal span {
  color: var(--ink);
}

/* ── Download page ───────────────────────────────────────────────────────── */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 6px;
}
.dl-card {
  border: 1px solid var(--hair);
  border-radius: 3px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dl-card .dl-desc {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 16px;
}
.dl-card .btn {
  margin-top: auto;
  text-align: center;
  text-decoration: none;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px calc(var(--gutter) + 26px) 40px var(--gutter);
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--hair);
}
.foot-note {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
