@layer reset, tokens, base, components, screens, utilities;

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

  html {
    scroll-behavior: smooth;
  }

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

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

  button {
    color: inherit;
  }

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

@layer tokens {
  :root {
    color-scheme: light;
    --ink: #143c35;
    --ink-2: #315d54;
    --paper: #f7f1e6;
    --paper-2: #efe5d3;
    --white: #fffdf8;
    --lime: #d7ed72;
    --lime-strong: #bed846;
    --coral: #f47c62;
    --coral-soft: #ffd6cb;
    --sky: #8fd3ee;
    --sky-soft: #d8f3fb;
    --sun: #f4c752;
    --sun-soft: #fff0bd;
    --violet: #bca9ea;
    --violet-soft: #e9e0fb;
    --mint: #8fd8bd;
    --mint-soft: #d8f3e8;
    --danger: #a93636;
    --success: #0d7659;
    --line: #173f37;
    --muted-line: color-mix(in srgb, var(--ink) 22%, transparent);
    --shadow: 5px 6px 0 var(--ink);
    --shadow-small: 3px 3px 0 var(--ink);
    --radius: 18px;
    --radius-small: 11px;
    --max: 1220px;
    --reading-scale: 1;
    --display:
      "Arial Black", "Avenir Next Condensed", "Roboto Condensed", Impact,
      sans-serif;
    --body: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  }
}

@layer base {
  body {
    min-width: 320px;
    min-height: 100vh;
    background:
      linear-gradient(90deg, rgba(20, 60, 53, 0.045) 1px, transparent 1px)
        0 0 / 48px 48px,
      linear-gradient(rgba(20, 60, 53, 0.045) 1px, transparent 1px) 0 0 /
        48px 48px,
      var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: calc(16px * var(--reading-scale));
    line-height: 1.5;
    text-rendering: optimizeLegibility;
  }

  body.reading-mode {
    --reading-scale: 1.08;
    letter-spacing: 0.012em;
  }

  button,
  a,
  input,
  textarea,
  select {
    -webkit-tap-highlight-color: transparent;
  }

  button {
    cursor: pointer;
  }

  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible,
  [tabindex]:focus-visible {
    outline: 4px solid var(--coral);
    outline-offset: 3px;
  }

  a {
    color: inherit;
  }

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

  h1,
  h2,
  h3,
  .display {
    font-family: var(--display);
    font-weight: 900;
    letter-spacing: -0.045em;
    line-height: 0.95;
    text-wrap: balance;
  }

  .site-shell {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
  }

  main {
    flex: 1;
  }

  .skip-link {
    position: fixed;
    z-index: 200;
    top: 12px;
    left: 12px;
    padding: 12px 18px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow-small);
    font-weight: 800;
    transform: translateY(-160%);
    transition: transform 160ms ease;
  }

  .skip-link:focus {
    transform: translateY(0);
  }
}

@layer components {
  .topbar {
    position: sticky;
    z-index: 90;
    top: 0;
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
    align-items: center;
    min-height: 76px;
    padding: 10px clamp(16px, 3vw, 44px);
    border-bottom: 2px solid var(--ink);
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    backdrop-filter: blur(16px);
  }

  .brand-button {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 11px;
    padding: 2px;
    border: 0;
    background: none;
    text-align: left;
  }

  .brand-button strong {
    display: block;
    font-family: var(--display);
    font-size: 1.06rem;
    letter-spacing: -0.035em;
    line-height: 1;
  }

  .brand-button small {
    display: block;
    margin-top: 4px;
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
  }

  .brand-mark {
    position: relative;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--lime);
  }

  .brand-mark i {
    position: absolute;
    width: 4px;
    height: 22px;
    border-radius: 4px;
    background: var(--ink);
  }

  .brand-mark i:nth-child(1) {
    transform: rotate(0deg);
  }

  .brand-mark i:nth-child(2) {
    transform: rotate(60deg);
  }

  .brand-mark i:nth-child(3) {
    transform: rotate(120deg);
  }

  .top-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
  }

  .text-button,
  .icon-button,
  .footer-link {
    min-height: 44px;
    border: 0;
    background: transparent;
    font-weight: 800;
  }

  .text-button {
    padding: 8px 12px;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
  }

  .icon-button {
    display: grid;
    width: 44px;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--white);
    font-size: 0.86rem;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .icon-button[aria-pressed="true"] {
    background: var(--lime);
    box-shadow: none;
    transform: translate(2px, 2px);
  }

  .session-hud {
    display: flex;
    min-width: 280px;
    align-items: center;
    gap: 16px;
    padding: 8px 12px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--white);
  }

  .hud-progress {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 9px;
  }

  .hud-progress > span {
    white-space: nowrap;
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 800;
  }

  .mini-track,
  .progress-track {
    overflow: hidden;
    height: 9px;
    border: 1.5px solid var(--ink);
    border-radius: 99px;
    background: var(--paper-2);
  }

  .mini-track {
    flex: 1;
  }

  .mini-track i,
  .progress-track i {
    display: block;
    width: var(--progress, 0%);
    height: 100%;
    border-right: 1.5px solid var(--ink);
    background: var(--lime);
    transition: width 450ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .hud-rank {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 0.76rem;
    font-weight: 900;
  }

  .rank-dot {
    width: 10px;
    height: 10px;
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    background: var(--coral);
  }

  .button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--white);
    box-shadow: var(--shadow-small);
    font-weight: 900;
    line-height: 1.1;
    text-decoration: none;
    transition:
      transform 140ms ease,
      box-shadow 140ms ease,
      background 140ms ease;
  }

  .button:hover:not(:disabled) {
    transform: translate(-1px, -1px);
    box-shadow: 5px 5px 0 var(--ink);
  }

  .button:active:not(:disabled) {
    transform: translate(3px, 3px);
    box-shadow: 0 0 0 var(--ink);
  }

  .button:disabled {
    cursor: not-allowed;
    opacity: 0.46;
    box-shadow: none;
  }

  .button-primary {
    background: var(--lime);
  }

  .button-dark {
    background: var(--ink);
    color: var(--white);
  }

  .button-coral {
    background: var(--coral);
  }

  .button-quiet {
    box-shadow: none;
  }

  .button-small {
    min-height: 42px;
    padding: 9px 15px;
    font-size: 0.86rem;
  }

  .button-arrow::after {
    content: "↗";
    font-size: 1.2em;
  }

  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .eyebrow::before {
    width: 22px;
    height: 3px;
    background: currentColor;
    content: "";
  }

  .tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }

  .tag {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 4px 9px;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    background: var(--white);
    font-family: var(--mono);
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.02em;
  }

  .tag-lime {
    background: var(--lime);
  }

  .tag-coral {
    background: var(--coral-soft);
  }

  .tag-sky {
    background: var(--sky-soft);
  }

  .tag-violet {
    background: var(--violet-soft);
  }

  .tag-mint {
    background: var(--mint-soft);
  }

  .paper-card {
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .section-shell {
    width: min(var(--max), calc(100% - 32px));
    margin-inline: auto;
  }

  .section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
  }

  .section-heading h2 {
    max-width: 760px;
    margin-top: 10px;
    font-size: clamp(2.2rem, 6vw, 4.8rem);
  }

  .section-heading p {
    max-width: 430px;
    color: var(--ink-2);
  }

  .site-footer {
    display: flex;
    width: min(var(--max), calc(100% - 32px));
    justify-content: space-between;
    gap: 24px;
    margin: 70px auto 0;
    padding: 24px 0 30px;
    border-top: 2px solid var(--ink);
    color: var(--ink-2);
    font-size: 0.84rem;
  }

  .site-footer > p {
    max-width: 620px;
  }

  .site-footer > div {
    display: flex;
    gap: 10px;
  }

  .footer-link {
    padding: 4px 6px;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .modal-backdrop {
    position: fixed;
    z-index: 120;
    inset: 0;
    display: grid;
    overflow-y: auto;
    padding: 20px;
    background: color-mix(in srgb, var(--ink) 76%, transparent);
    place-items: center;
  }

  .modal-card {
    position: relative;
    width: min(820px, 100%);
    max-height: min(860px, calc(100vh - 40px));
    overflow-y: auto;
    padding: clamp(24px, 5vw, 48px);
    border: 3px solid var(--ink);
    border-radius: 24px;
    background: var(--paper);
    box-shadow: 9px 9px 0 #081f1b;
  }

  .modal-card.modal-wide {
    width: min(1020px, 100%);
  }

  .modal-card h2 {
    max-width: 720px;
    margin-top: 10px;
    font-size: clamp(2.2rem, 6vw, 4.2rem);
  }

  .modal-card > p {
    max-width: 680px;
    margin-top: 14px;
    color: var(--ink-2);
  }

  .modal-close {
    position: sticky;
    z-index: 3;
    top: 0;
    display: grid;
    width: 46px;
    height: 46px;
    float: right;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--white);
    box-shadow: var(--shadow-small);
    font-size: 1.5rem;
    font-weight: 900;
  }

  .toast {
    position: fixed;
    z-index: 150;
    right: 18px;
    bottom: 18px;
    max-width: min(380px, calc(100vw - 36px));
    padding: 13px 18px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--lime);
    box-shadow: var(--shadow-small);
    font-weight: 900;
    animation: toast-in 220ms ease both;
  }

  @keyframes toast-in {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
  }
}

@layer screens {
  .hero {
    position: relative;
    overflow: hidden;
    padding: clamp(52px, 8vw, 112px) 0 66px;
  }

  .hero::before {
    position: absolute;
    z-index: -1;
    top: -140px;
    right: -100px;
    width: min(46vw, 610px);
    aspect-ratio: 1;
    border: 3px solid var(--ink);
    border-radius: 50%;
    background:
      repeating-conic-gradient(
        from 0deg,
        var(--lime) 0 12deg,
        var(--paper) 12deg 24deg
      );
    content: "";
    opacity: 0.44;
    transform: rotate(11deg);
  }

  .hero-grid {
    display: grid;
    width: min(var(--max), calc(100% - 32px));
    grid-template-columns: minmax(0, 1.06fr) minmax(330px, 0.7fr);
    align-items: center;
    gap: clamp(42px, 7vw, 100px);
    margin-inline: auto;
  }

  .hero-copy h1 {
    max-width: 850px;
    margin: 16px 0 22px;
    font-size: clamp(4rem, 10vw, 8.6rem);
    line-height: 0.78;
    text-transform: uppercase;
  }

  .hero-copy h1 span {
    position: relative;
    display: inline-block;
    color: var(--paper);
    isolation: isolate;
    -webkit-text-stroke: 2px var(--ink);
  }

  .hero-copy h1 span::before {
    position: absolute;
    z-index: -1;
    inset: 2px -10px -1px;
    background: var(--coral);
    content: "";
    transform: rotate(-1.3deg);
  }

  .hero-lede {
    max-width: 670px;
    font-size: clamp(1.05rem, 2vw, 1.28rem);
    line-height: 1.55;
  }

  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
  }

  .hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 29px;
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 800;
  }

  .hero-proof span::before {
    margin-right: 7px;
    color: var(--success);
    content: "●";
  }

  .case-teaser {
    position: relative;
    padding: clamp(22px, 4vw, 34px);
    transform: rotate(1.7deg);
  }

  .case-teaser::after {
    position: absolute;
    z-index: -1;
    right: -26px;
    bottom: -24px;
    width: 120px;
    height: 120px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--sky);
    content: "";
  }

  .case-teaser .case-number {
    position: absolute;
    top: -24px;
    right: 22px;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--sun);
    box-shadow: var(--shadow-small);
    font-family: var(--mono);
    font-weight: 900;
  }

  .teaser-dateline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 13px;
    border-bottom: 2px solid var(--ink);
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 900;
  }

  .case-teaser h2 {
    margin: 25px 0 13px;
    font-size: clamp(2.5rem, 5vw, 4.6rem);
  }

  .case-teaser blockquote {
    margin: 21px 0;
    padding: 16px;
    border-left: 7px solid var(--coral);
    background: var(--paper);
    font-size: 1.02rem;
    font-weight: 700;
  }

  .teaser-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 17px;
    border-top: 2px solid var(--ink);
    font-weight: 900;
  }

  .pulse-dot {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--lime) 45%, transparent);
    animation: pulse 2.2s ease-in-out infinite;
  }

  @keyframes pulse {
    50% {
      box-shadow: 0 0 0 13px transparent;
    }
  }

  .promise-strip {
    border-block: 2px solid var(--ink);
    background: var(--ink);
    color: var(--white);
  }

  .promise-grid {
    display: grid;
    width: min(var(--max), 100%);
    grid-template-columns: repeat(4, 1fr);
    margin-inline: auto;
  }

  .promise {
    min-height: 160px;
    padding: 26px;
    border-right: 1px solid color-mix(in srgb, var(--white) 34%, transparent);
  }

  .promise:last-child {
    border-right: 0;
  }

  .promise b {
    display: block;
    margin-bottom: 15px;
    color: var(--lime);
    font-family: var(--mono);
    font-size: 1.8rem;
  }

  .promise h3 {
    margin-bottom: 8px;
    font-family: var(--body);
    font-size: 1rem;
    letter-spacing: 0;
    line-height: 1.2;
  }

  .promise p {
    color: color-mix(in srgb, var(--white) 76%, transparent);
    font-size: 0.86rem;
  }

  .how-section {
    padding: 100px 0 45px;
  }

  .spor-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }

  .spor-card {
    position: relative;
    min-height: 270px;
    padding: 24px;
    overflow: hidden;
  }

  .spor-card:nth-child(1) {
    background: var(--sun-soft);
  }

  .spor-card:nth-child(2) {
    background: var(--sky-soft);
  }

  .spor-card:nth-child(3) {
    background: var(--violet-soft);
  }

  .spor-card:nth-child(4) {
    background: var(--mint-soft);
  }

  .spor-letter {
    position: absolute;
    right: -12px;
    bottom: -35px;
    color: color-mix(in srgb, var(--ink) 12%, transparent);
    font-family: var(--display);
    font-size: 11rem;
    line-height: 1;
  }

  .spor-card h3 {
    position: relative;
    margin: 35px 0 12px;
    font-size: 1.75rem;
    line-height: 1;
  }

  .spor-card p {
    position: relative;
    max-width: 27ch;
  }

  .curriculum-ribbon {
    margin-top: 80px;
    padding: 38px;
    background: var(--lime);
  }

  .curriculum-ribbon-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 34px;
  }

  .curriculum-ribbon h3 {
    margin: 8px 0 8px;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
  }

  /* Setup */
  .setup-screen {
    padding: 70px 0 50px;
  }

  .setup-intro {
    max-width: 830px;
  }

  .setup-intro h1 {
    margin: 14px 0 17px;
    font-size: clamp(3rem, 8vw, 6.8rem);
  }

  .setup-intro > p {
    max-width: 660px;
    color: var(--ink-2);
    font-size: 1.08rem;
  }

  .setup-form {
    margin-top: 50px;
  }

  .form-section + .form-section {
    margin-top: 46px;
  }

  .form-section > h2 {
    margin-bottom: 8px;
    font-family: var(--body);
    font-size: 1.12rem;
    letter-spacing: 0;
    line-height: 1.2;
  }

  .form-help {
    margin-bottom: 19px;
    color: var(--ink-2);
  }

  .choice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .choice-grid-modes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .choice-radio {
    position: relative;
  }

  .choice-radio input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
  }

  .choice-radio label {
    position: relative;
    display: flex;
    min-height: 190px;
    cursor: pointer;
    flex-direction: column;
    padding: 22px;
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-small);
    transition:
      transform 140ms ease,
      background 140ms ease;
  }

  .choice-radio label:hover {
    transform: translateY(-3px);
  }

  .choice-radio input:focus-visible + label {
    outline: 4px solid var(--coral);
    outline-offset: 3px;
  }

  .choice-radio input:checked + label {
    background: var(--lime);
    box-shadow: inset 0 0 0 3px var(--ink);
    transform: translate(3px, 3px);
  }

  .choice-radio input:checked + label::after {
    position: absolute;
    top: 15px;
    right: 15px;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--white);
    content: "✓";
    font-weight: 900;
  }

  .choice-radio b {
    display: block;
    padding-right: 30px;
    font-size: 1.13rem;
  }

  .choice-radio p {
    margin: 10px 0 18px;
    color: var(--ink-2);
    font-size: 0.9rem;
  }

  .choice-radio small {
    margin-top: auto;
    font-family: var(--mono);
    font-size: 0.69rem;
    font-weight: 800;
  }

  .name-field {
    display: grid;
    max-width: 620px;
    gap: 8px;
  }

  .name-field label {
    font-weight: 900;
  }

  .name-field input {
    width: 100%;
    min-height: 54px;
    padding: 12px 16px;
    border: 2px solid var(--ink);
    border-radius: var(--radius-small);
    background: var(--white);
    box-shadow: var(--shadow-small);
  }

  .privacy-note {
    max-width: 700px;
    margin-top: 13px;
    color: var(--ink-2);
    font-size: 0.82rem;
  }

  .setup-submit {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 42px;
  }

  .setup-submit small {
    max-width: 390px;
    color: var(--ink-2);
  }

  /* Map */
  .map-screen {
    padding: 46px 0 44px;
  }

  .map-welcome {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.62fr);
    align-items: end;
    gap: 44px;
    margin-bottom: 40px;
  }

  .map-welcome h1 {
    margin: 10px 0 15px;
    font-size: clamp(3rem, 8vw, 6.6rem);
  }

  .map-welcome p {
    max-width: 680px;
    color: var(--ink-2);
    font-size: 1.04rem;
  }

  .profile-card {
    padding: 20px;
    box-shadow: var(--shadow-small);
  }

  .profile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .profile-top strong {
    display: block;
    font-size: 1.04rem;
  }

  .profile-top small {
    color: var(--ink-2);
  }

  .profile-badge {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--sun);
    font-family: var(--display);
    font-size: 1.3rem;
  }

  .profile-progress {
    margin-top: 16px;
  }

  .profile-progress > div:first-child {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-family: var(--mono);
    font-size: 0.69rem;
    font-weight: 800;
  }

  .map-board {
    position: relative;
    overflow: hidden;
    padding: clamp(22px, 4vw, 48px);
    border: 3px solid var(--ink);
    border-radius: 30px;
    background:
      radial-gradient(circle at 28% 23%, var(--sky-soft) 0 7%, transparent 7.3%),
      radial-gradient(circle at 77% 73%, var(--mint-soft) 0 9%, transparent 9.3%),
      linear-gradient(113deg, transparent 0 42%, rgba(20, 60, 53, 0.07) 42% 45%, transparent 45%),
      var(--paper-2);
    box-shadow: 8px 9px 0 var(--ink);
  }

  .map-board::before,
  .map-board::after {
    position: absolute;
    pointer-events: none;
    content: "";
  }

  .map-board::before {
    top: 12%;
    right: -12%;
    width: 47%;
    height: 88%;
    border: 3px solid var(--ink);
    border-radius: 50% 0 0 50%;
    background: color-mix(in srgb, var(--sky) 48%, transparent);
    transform: rotate(-8deg);
  }

  .map-board::after {
    inset: 0;
    background-image: radial-gradient(var(--ink) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: 0.1;
  }

  .map-label {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
  }

  .map-label span {
    padding: 7px 10px;
    border: 1.5px solid var(--ink);
    background: var(--white);
    font-family: var(--mono);
    font-size: 0.67rem;
    font-weight: 900;
  }

  .chapter-jumps {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
  }

  .chapter-jumps a {
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border: 1.5px solid var(--ink);
    border-radius: 14px;
    background: var(--white);
    box-shadow: 2px 2px 0 var(--ink);
    font-size: 0.75rem;
    text-decoration: none;
  }

  .chapter-jumps a:hover {
    background: var(--lime);
    transform: translateY(-2px);
  }

  .chapter-jumps span {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    place-items: center;
    border: 1.5px solid var(--ink);
    border-radius: 8px;
    background: var(--paper-2);
    font-family: var(--mono);
    font-weight: 900;
  }

  .chapter-list {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 28px;
  }

  .map-chapter {
    padding: clamp(16px, 3vw, 26px);
    border: 2px solid var(--ink);
    border-radius: 22px;
    background: color-mix(in srgb, var(--white) 88%, transparent);
    box-shadow: 4px 5px 0 var(--ink);
  }

  .map-chapter-information {
    --chapter-color: var(--sun);
  }

  .map-chapter-society {
    --chapter-color: var(--mint);
  }

  .map-chapter-participation {
    --chapter-color: var(--sky);
  }

  .map-chapter-future {
    --chapter-color: var(--violet);
  }

  .chapter-heading {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
  }

  .chapter-number {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 14px;
    background: var(--chapter-color);
    font-family: var(--mono);
    font-weight: 900;
  }

  .chapter-heading h2 {
    font-size: clamp(1.45rem, 3vw, 2.2rem);
    line-height: 1;
  }

  .chapter-heading p {
    margin-top: 4px;
    color: var(--ink-2);
    font-size: 0.82rem;
  }

  .chapter-progress {
    padding: 7px 10px;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    background: var(--white);
    font-family: var(--mono);
    font-size: 0.66rem;
    font-weight: 900;
  }

  .case-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }

  .map-case {
    position: relative;
    display: flex;
    min-height: 245px;
    flex-direction: column;
    padding: 20px;
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-small);
    text-align: left;
    transition:
      transform 160ms ease,
      box-shadow 160ms ease;
  }

  .map-case:nth-child(2),
  .map-case:nth-child(6) {
    transform: translateY(18px) rotate(0.6deg);
  }

  .map-case:nth-child(3),
  .map-case:nth-child(7) {
    transform: rotate(-0.7deg);
  }

  .map-case:hover {
    z-index: 3;
    transform: translateY(-6px) rotate(0deg);
    box-shadow: 7px 8px 0 var(--ink);
  }

  .map-case.is-complete {
    background: var(--mint-soft);
  }

  .map-case.is-current {
    background: var(--lime);
  }

  .map-case.is-extra {
    opacity: 0.72;
  }

  .case-pin {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
  }

  .case-pin span:first-child {
    display: grid;
    width: 33px;
    height: 33px;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--case-color, var(--sun));
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 900;
  }

  .case-status {
    font-family: var(--mono);
    font-size: 0.63rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }

  .case-design {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 13px;
  }

  .case-design > span {
    padding: 4px 7px;
    border: 1px solid var(--ink);
    border-radius: 999px;
    background: var(--paper-2);
    font-family: var(--mono);
    font-size: 0.56rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    line-height: 1;
    text-transform: uppercase;
  }

  .case-design .case-new {
    background: var(--lime);
  }

  .map-case h3 {
    margin-bottom: 10px;
    font-size: 1.47rem;
    line-height: 1;
  }

  .map-case p {
    margin-bottom: 18px;
    color: var(--ink-2);
    font-size: 0.84rem;
  }

  .case-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
  }

  .case-meta span {
    font-family: var(--mono);
    font-size: 0.63rem;
    font-weight: 800;
  }

  .case-meta span + span::before {
    margin-right: 6px;
    content: "·";
  }

  .map-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 34px;
  }

  .skill-overview {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 42px;
  }

  .skill-mini {
    padding: 14px;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius-small);
    background: var(--white);
  }

  .skill-mini-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 9px;
    font-size: 0.76rem;
    font-weight: 900;
  }

  .skill-mini-top span:last-child {
    font-family: var(--mono);
  }

  .quick-context {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
  }

  .quick-context span {
    padding: 6px 10px;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    background: var(--sky-soft);
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .quick-context span:last-child {
    background: var(--lime);
  }

  /* Case shell */
  .case-screen {
    min-height: calc(100vh - 78px);
    padding: 26px 0 56px;
  }

  .case-shell {
    width: min(1160px, calc(100% - 32px));
    margin-inline: auto;
  }

  .case-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
  }

  .back-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 8px;
    padding: 6px 9px;
    border: 0;
    background: transparent;
    font-weight: 900;
  }

  .back-button::before {
    content: "←";
    font-size: 1.3rem;
  }

  .case-step-label {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .stepper {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 7px;
    margin-bottom: 26px;
  }

  .stepper i {
    height: 9px;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    background: var(--paper-2);
  }

  .stepper i.is-done {
    background: var(--lime);
  }

  .stepper i.is-current {
    background: var(--coral);
    animation: step-pop 420ms ease both;
  }

  @keyframes step-pop {
    50% {
      transform: scaleY(1.6);
    }
  }

  .case-stage {
    min-height: 620px;
    padding: clamp(24px, 5vw, 54px);
  }

  .mission-strip {
    display: grid;
    grid-template-columns: 0.7fr 0.7fr 1.6fr;
    margin-bottom: 22px;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius-small);
    background: var(--paper-2);
  }

  .mission-strip > span {
    display: grid;
    gap: 3px;
    padding: 11px 14px;
  }

  .mission-strip > span + span {
    border-left: 1.5px solid var(--ink);
  }

  .mission-strip small {
    font-family: var(--mono);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .mission-strip strong {
    font-size: 0.86rem;
  }

  .stage-head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 26px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--ink);
  }

  .stage-head h1 {
    max-width: 810px;
    margin: 11px 0 0;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
  }

  .stage-seal {
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--case-color, var(--sun));
    box-shadow: var(--shadow-small);
    font-family: var(--display);
    font-size: 2rem;
    transform: rotate(5deg);
  }

  .stage-body {
    margin-top: 30px;
  }

  .brief-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(310px, 0.72fr);
    gap: clamp(28px, 5vw, 64px);
  }

  .brief-copy {
    max-width: 68ch;
  }

  .brief-copy p {
    font-size: clamp(1rem, 1.8vw, 1.18rem);
    line-height: 1.68;
  }

  .brief-copy p + p {
    margin-top: 14px;
  }

  .simulated-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 10px;
    border: 1.5px solid var(--ink);
    border-radius: 8px;
    background: var(--sun-soft);
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 900;
  }

  .simulated-note::before {
    content: "◇";
    font-size: 1rem;
  }

  .brief-facts {
    display: grid;
    align-content: start;
    gap: 12px;
  }

  .brief-fact {
    padding: 16px;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius-small);
    background: var(--paper);
  }

  .brief-fact small {
    display: block;
    margin-bottom: 5px;
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .brief-fact strong {
    display: block;
    line-height: 1.25;
  }

  .stage-question {
    margin-top: 35px;
    padding-top: 27px;
    border-top: 2px dashed var(--ink);
  }

  .stage-question h2 {
    max-width: 850px;
    margin: 8px 0 8px;
    font-family: var(--body);
    font-size: clamp(1.25rem, 3vw, 1.8rem);
    letter-spacing: -0.02em;
    line-height: 1.24;
  }

  .stage-question > p {
    max-width: 720px;
    color: var(--ink-2);
  }

  .option-list {
    display: grid;
    max-width: 900px;
    gap: 11px;
    margin-top: 20px;
  }

  .option-card {
    position: relative;
  }

  .option-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
  }

  .option-card label,
  button.option-card-button {
    position: relative;
    display: grid;
    width: 100%;
    min-height: 58px;
    cursor: pointer;
    grid-template-columns: 34px 1fr;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border: 2px solid var(--ink);
    border-radius: var(--radius-small);
    background: var(--white);
    text-align: left;
    transition:
      transform 130ms ease,
      background 130ms ease;
  }

  .option-card label:hover,
  button.option-card-button:hover {
    transform: translateX(4px);
  }

  .option-card input:focus-visible + label {
    outline: 4px solid var(--coral);
    outline-offset: 3px;
  }

  .option-card input:checked + label,
  button.option-card-button.is-selected {
    background: var(--lime);
    box-shadow: inset 0 0 0 2px var(--ink);
  }

  .option-marker {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--paper);
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 900;
  }

  input:checked + label .option-marker,
  .is-selected .option-marker {
    background: var(--coral);
  }

  .confidence-wrap {
    max-width: 630px;
    margin-top: 23px;
    padding: 16px 18px;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius-small);
    background: var(--paper);
  }

  .confidence-wrap label {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-weight: 900;
  }

  .confidence-wrap output {
    font-family: var(--mono);
  }

  .confidence-wrap input {
    width: 100%;
    margin-top: 13px;
    accent-color: var(--ink);
  }

  .range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 3px;
    color: var(--ink-2);
    font-size: 0.72rem;
  }

  .stage-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 32px;
    padding-top: 22px;
    border-top: 2px solid var(--ink);
  }

  .stage-actions-left,
  .stage-actions-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }

  .stage-message {
    max-width: 560px;
    color: var(--danger);
    font-size: 0.86rem;
    font-weight: 800;
  }

  .guide-box {
    max-width: 760px;
    margin: 18px 0;
    padding: 15px 17px;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius-small);
    background: var(--sun-soft);
    animation: reveal 220ms ease both;
  }

  .guide-box strong {
    display: block;
    margin-bottom: 4px;
  }

  @keyframes reveal {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }
  }

  /* Source lab */
  .source-instruction {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 22px;
  }

  .source-instruction h2 {
    margin-bottom: 7px;
    font-family: var(--body);
    font-size: clamp(1.3rem, 3vw, 1.9rem);
    letter-spacing: -0.02em;
    line-height: 1.2;
  }

  .source-instruction p {
    max-width: 720px;
    color: var(--ink-2);
  }

  .selection-counter {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--lime);
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 900;
  }

  .source-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .source-card {
    position: relative;
    display: flex;
    min-height: 310px;
    flex-direction: column;
    padding: 21px;
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-small);
    transition:
      transform 140ms ease,
      background 140ms ease;
  }

  .source-card.is-selected {
    background: var(--sky-soft);
    box-shadow: inset 0 0 0 3px var(--ink);
    transform: translate(3px, 3px);
  }

  .source-card.is-recommended {
    background: var(--mint-soft);
  }

  .source-card.is-missed {
    border-style: dashed;
  }

  .source-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid var(--ink);
  }

  .source-type {
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .source-id {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    background: var(--case-color, var(--sun));
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 900;
  }

  .source-card h3 {
    margin: 17px 0 8px;
    font-family: var(--body);
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    line-height: 1.18;
  }

  .source-byline {
    margin-bottom: 13px;
    color: var(--ink-2);
    font-size: 0.76rem;
    font-weight: 700;
  }

  .source-excerpt {
    font-size: 0.91rem;
    line-height: 1.55;
  }

  .source-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 17px;
  }

  .source-meta div {
    padding: 9px;
    border: 1px solid var(--muted-line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--paper) 66%, transparent);
  }

  .source-meta small {
    display: block;
    margin-bottom: 2px;
    font-family: var(--mono);
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .source-meta span {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
  }

  .source-select {
    display: flex;
    width: 100%;
    min-height: 45px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    padding: 9px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--paper);
    font-weight: 900;
  }

  .source-select::before {
    display: grid;
    width: 21px;
    height: 21px;
    place-items: center;
    border: 1.5px solid var(--ink);
    border-radius: 5px;
    content: "";
    font-size: 0.75rem;
  }

  .source-card.is-selected .source-select {
    background: var(--lime);
  }

  .source-card.is-selected .source-select::before {
    content: "✓";
  }

  .feedback-panel {
    margin-top: 26px;
    padding: clamp(20px, 4vw, 32px);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    background: var(--mint-soft);
    animation: feedback-in 260ms ease both;
  }

  .feedback-panel.is-developing {
    background: var(--sun-soft);
  }

  @keyframes feedback-in {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  }

  .feedback-title {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 12px;
  }

  .feedback-icon {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--white);
    font-weight: 900;
  }

  .feedback-title h3 {
    font-family: var(--body);
    font-size: 1.2rem;
    letter-spacing: 0;
    line-height: 1.2;
  }

  .feedback-panel > p {
    max-width: 78ch;
  }

  .feedback-points {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 18px;
  }

  .feedback-point {
    padding: 12px;
    border: 1px solid var(--muted-line);
    border-radius: 9px;
    background: color-mix(in srgb, var(--white) 65%, transparent);
    font-size: 0.84rem;
  }

  .feedback-point strong {
    display: block;
    margin-bottom: 3px;
  }

  /* Perspective */
  .perspective-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 22px 0 34px;
  }

  .person-card {
    position: relative;
    padding: 19px;
    overflow: hidden;
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    background: var(--paper);
  }

  .person-card.is-focus {
    background: var(--violet-soft);
    box-shadow: var(--shadow-small);
  }

  .person-head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 13px;
  }

  .person-avatar {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 50% 50% 45% 55%;
    background: var(--person-color, var(--sky));
    font-family: var(--display);
  }

  .person-head strong {
    display: block;
    line-height: 1.1;
  }

  .person-head small {
    color: var(--ink-2);
  }

  .person-card blockquote {
    font-size: 0.91rem;
    line-height: 1.5;
  }

  .focus-ribbon {
    position: absolute;
    top: 13px;
    right: -34px;
    width: 130px;
    padding: 4px;
    border-block: 1.5px solid var(--ink);
    background: var(--lime);
    font-family: var(--mono);
    font-size: 0.55rem;
    font-weight: 900;
    text-align: center;
    transform: rotate(36deg);
  }

  /* Argument */
  .argument-intro {
    max-width: 780px;
    margin-bottom: 28px;
  }

  .argument-intro h2 {
    margin-bottom: 8px;
    font-family: var(--body);
    font-size: clamp(1.3rem, 3vw, 1.85rem);
    letter-spacing: -0.02em;
    line-height: 1.2;
  }

  .argument-intro p {
    color: var(--ink-2);
  }

  .argument-builder {
    display: grid;
    gap: 15px;
  }

  .argument-row {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 16px;
    padding: 17px;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius);
    background: var(--paper);
  }

  .argument-label {
    padding-top: 4px;
  }

  .argument-label b {
    display: block;
  }

  .argument-label small {
    color: var(--ink-2);
  }

  .argument-options {
    display: grid;
    gap: 8px;
  }

  .mini-choice {
    position: relative;
  }

  .mini-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
  }

  .mini-choice label {
    display: block;
    cursor: pointer;
    padding: 10px 12px;
    border: 1.5px solid var(--ink);
    border-radius: 9px;
    background: var(--white);
    font-size: 0.86rem;
  }

  .mini-choice input:focus-visible + label {
    outline: 4px solid var(--coral);
    outline-offset: 2px;
  }

  .mini-choice input:checked + label {
    background: var(--lime);
    box-shadow: inset 0 0 0 1px var(--ink);
    font-weight: 800;
  }

  .argument-score {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 17px;
  }

  .score-pill {
    padding: 7px 10px;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    background: var(--white);
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 900;
  }

  /* Decision */
  .decision-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    margin-top: 24px;
  }

  .decision-option {
    position: relative;
    display: flex;
    min-height: 330px;
    flex-direction: column;
    padding: 20px;
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-small);
    text-align: left;
    transition:
      transform 140ms ease,
      background 140ms ease;
  }

  .decision-option:hover {
    transform: translateY(-4px);
  }

  .decision-option.is-selected {
    background: var(--lime);
    box-shadow: inset 0 0 0 3px var(--ink);
    transform: translate(3px, 3px);
  }

  .decision-letter {
    display: grid;
    width: 37px;
    height: 37px;
    place-items: center;
    margin-bottom: 20px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--case-color, var(--sun));
    font-family: var(--mono);
    font-weight: 900;
  }

  .decision-option h3 {
    margin-bottom: 10px;
    font-family: var(--body);
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    line-height: 1.18;
  }

  .decision-option > p {
    margin-bottom: 20px;
    color: var(--ink-2);
    font-size: 0.88rem;
  }

  .decision-tradeoff {
    margin-top: auto;
    padding-top: 13px;
    border-top: 1.5px dashed var(--ink);
    font-size: 0.78rem;
  }

  .decision-tradeoff strong {
    display: block;
    margin-bottom: 3px;
  }

  .reason-field {
    margin-top: 25px;
  }

  .reason-field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 900;
  }

  .reason-field textarea {
    width: 100%;
    min-height: 105px;
    resize: vertical;
    padding: 13px 15px;
    border: 2px solid var(--ink);
    border-radius: var(--radius-small);
    background: var(--paper);
  }

  .reason-field small {
    display: block;
    margin-top: 5px;
    color: var(--ink-2);
  }

  /* Consequences */
  .decision-recap {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 17px;
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    background: var(--lime);
  }

  .decision-recap .decision-letter {
    margin: 0;
  }

  .decision-recap strong {
    display: block;
  }

  .decision-recap p {
    font-size: 0.87rem;
  }

  .timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 25px 0 35px;
  }

  .timeline::before {
    position: absolute;
    z-index: 0;
    top: 19px;
    right: 8%;
    left: 8%;
    height: 3px;
    background: var(--ink);
    content: "";
  }

  .timeline-item {
    position: relative;
    z-index: 1;
    padding-top: 47px;
  }

  .timeline-item::before {
    position: absolute;
    top: 8px;
    left: calc(50% - 12px);
    width: 24px;
    height: 24px;
    border: 3px solid var(--ink);
    border-radius: 50%;
    background: var(--case-color, var(--sun));
    content: "";
  }

  .timeline-card {
    min-height: 155px;
    padding: 15px;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius-small);
    background: var(--paper);
  }

  .timeline-card small {
    display: block;
    margin-bottom: 7px;
    font-family: var(--mono);
    font-size: 0.63rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .timeline-card p {
    font-size: 0.84rem;
  }

  .impact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 11px;
  }

  .impact-card {
    padding: 14px;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius-small);
    background: var(--white);
  }

  .impact-card strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.88rem;
  }

  .impact-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mono);
    font-size: 0.67rem;
    font-weight: 900;
  }

  .impact-state::before {
    width: 10px;
    height: 10px;
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    background: var(--impact-color, var(--sun));
    content: "";
  }

  .impact-card p {
    margin-top: 8px;
    color: var(--ink-2);
    font-size: 0.76rem;
  }

  .uncertainty-note {
    margin-top: 23px;
    padding: 16px;
    border: 2px dashed var(--ink);
    border-radius: var(--radius-small);
    background: var(--sun-soft);
  }

  .uncertainty-note strong {
    display: block;
    margin-bottom: 4px;
  }

  /* Debrief */
  .debrief-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.55fr);
    gap: 34px;
  }

  .debrief-hero h2 {
    margin: 10px 0 13px;
    font-size: clamp(2.8rem, 7vw, 5.8rem);
  }

  .debrief-hero p {
    max-width: 680px;
    color: var(--ink-2);
  }

  .debrief-score {
    display: grid;
    place-items: center;
    padding: 24px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--case-color, var(--sun));
    aspect-ratio: 1;
    box-shadow: var(--shadow);
    text-align: center;
  }

  .debrief-score strong {
    display: block;
    font-family: var(--display);
    font-size: clamp(2.5rem, 6vw, 4.8rem);
    line-height: 0.9;
  }

  .debrief-score span {
    display: block;
    margin-top: 6px;
    font-family: var(--mono);
    font-size: 0.67rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .reflection-panel {
    margin-top: 35px;
    padding: 25px;
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    background: var(--paper);
  }

  .reflection-compare {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
  }

  .reflection-box {
    padding: 15px;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius-small);
    background: var(--white);
  }

  .reflection-box small {
    display: block;
    margin-bottom: 5px;
    font-family: var(--mono);
    font-size: 0.62rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .reflection-arrow {
    font-size: 1.6rem;
    font-weight: 900;
  }

  .reflection-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
  }

  .chip-choice {
    position: relative;
  }

  .chip-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
  }

  .chip-choice label {
    display: inline-flex;
    min-height: 42px;
    cursor: pointer;
    align-items: center;
    padding: 8px 12px;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    background: var(--white);
    font-size: 0.82rem;
    font-weight: 800;
  }

  .chip-choice input:focus-visible + label {
    outline: 4px solid var(--coral);
    outline-offset: 2px;
  }

  .chip-choice input:checked + label {
    background: var(--lime);
  }

  .debrief-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 26px;
  }

  .debrief-card {
    padding: 20px;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius);
    background: var(--white);
  }

  .debrief-card h3 {
    margin-bottom: 9px;
    font-family: var(--body);
    font-size: 1.05rem;
    letter-spacing: 0;
    line-height: 1.2;
  }

  .debrief-card p,
  .debrief-card li {
    color: var(--ink-2);
    font-size: 0.86rem;
  }

  .debrief-card ul {
    margin: 9px 0 0;
    padding-left: 20px;
  }

  .goal-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 11px;
  }

  /* Report */
  .report-screen {
    padding: 55px 0 44px;
  }

  .report-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 30px;
    padding-bottom: 32px;
    border-bottom: 3px solid var(--ink);
  }

  .report-header h1 {
    margin: 11px 0 12px;
    font-size: clamp(3rem, 9vw, 7rem);
  }

  .report-header p {
    max-width: 680px;
    color: var(--ink-2);
  }

  .report-stamp {
    display: grid;
    width: 145px;
    height: 145px;
    place-items: center;
    border: 3px solid var(--ink);
    border-radius: 50%;
    background: var(--lime);
    box-shadow: var(--shadow);
    font-family: var(--display);
    font-size: 1.15rem;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    transform: rotate(5deg);
  }

  .report-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.64fr);
    gap: 28px;
    margin-top: 32px;
  }

  .report-panel {
    padding: 25px;
  }

  .report-panel h2 {
    margin-bottom: 18px;
    font-family: var(--body);
    font-size: 1.22rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
  }

  .skill-bars {
    display: grid;
    gap: 16px;
  }

  .skill-bar-head {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 7px;
  }

  .skill-bar-head strong {
    font-size: 0.88rem;
  }

  .skill-bar-head span {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 900;
  }

  .skill-bar p {
    margin-top: 5px;
    color: var(--ink-2);
    font-size: 0.72rem;
  }

  .badge-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .badge-card {
    padding: 15px;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius-small);
    background: var(--paper);
  }

  .badge-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    margin-bottom: 11px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--badge-color, var(--sun));
    font-family: var(--display);
  }

  .badge-card strong {
    display: block;
    line-height: 1.15;
  }

  .badge-card p {
    margin-top: 4px;
    color: var(--ink-2);
    font-size: 0.73rem;
  }

  .badge-card.is-locked {
    filter: grayscale(1);
    opacity: 0.45;
  }

  .coverage-summary {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
  }

  .coverage-number {
    font-family: var(--display);
    font-size: 3.1rem;
    line-height: 1;
  }

  .coverage-summary p {
    color: var(--ink-2);
    font-size: 0.84rem;
  }

  .coverage-cases {
    display: grid;
    gap: 8px;
  }

  .coverage-case {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--muted-line);
    font-size: 0.82rem;
  }

  .coverage-case span:last-child {
    font-family: var(--mono);
    font-size: 0.67rem;
    font-weight: 900;
  }

  .next-step {
    margin-top: 24px;
    padding: 20px;
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    background: var(--sun-soft);
  }

  .next-step strong {
    display: block;
    margin-bottom: 6px;
  }

  .next-step p {
    font-size: 0.86rem;
  }

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

  /* Teacher */
  .teacher-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 28px 0 22px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--ink);
  }

  .teacher-tab {
    min-height: 42px;
    padding: 8px 13px;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    background: var(--white);
    font-weight: 900;
  }

  .teacher-tab[aria-pressed="true"] {
    background: var(--lime);
  }

  .teacher-panel {
    animation: reveal 180ms ease both;
  }

  .lesson-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 13px;
  }

  .lesson-card {
    display: flex;
    min-height: 250px;
    flex-direction: column;
    padding: 18px;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius);
    background: var(--white);
  }

  .lesson-card h3 {
    margin: 14px 0 8px;
    font-family: var(--body);
    font-size: 1.08rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
  }

  .lesson-card p {
    color: var(--ink-2);
    font-size: 0.82rem;
  }

  .lesson-card .button {
    margin-top: auto;
  }

  .teacher-note {
    margin-top: 18px;
    padding: 15px;
    border: 1.5px dashed var(--ink);
    border-radius: var(--radius-small);
    background: var(--sun-soft);
    font-size: 0.84rem;
  }

  .curriculum-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
  }

  .curriculum-table th,
  .curriculum-table td {
    padding: 12px 10px;
    border-bottom: 1.5px solid var(--ink);
    text-align: left;
    vertical-align: top;
  }

  .curriculum-table th {
    font-family: var(--mono);
    font-size: 0.66rem;
    text-transform: uppercase;
  }

  .curriculum-table td:first-child {
    min-width: 150px;
    font-weight: 900;
  }

  .teacher-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
  }

  .data-actions {
    display: grid;
    gap: 13px;
  }

  .data-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius-small);
    background: var(--white);
  }

  .data-action p {
    color: var(--ink-2);
    font-size: 0.8rem;
  }

  .noscript-card {
    width: min(620px, calc(100% - 32px));
    margin: 80px auto;
    padding: 28px;
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
  }
}

@layer utilities {
  .sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .muted {
    color: var(--ink-2);
  }

  .mono {
    font-family: var(--mono);
  }

  .mt-1 {
    margin-top: 8px;
  }

  .mt-2 {
    margin-top: 16px;
  }

  .mt-3 {
    margin-top: 24px;
  }

  .center {
    text-align: center;
  }
}

@media (max-width: 1040px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .session-hud {
    position: fixed;
    z-index: 88;
    right: 16px;
    bottom: 16px;
    left: 16px;
    min-width: 0;
    box-shadow: var(--shadow-small);
  }

  .hero-grid {
    grid-template-columns: 1fr 0.72fr;
    gap: 40px;
  }

  .case-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chapter-jumps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-grid-modes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skill-overview {
    grid-template-columns: repeat(3, 1fr);
  }

  .report-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .topbar {
    min-height: 68px;
    padding-inline: 16px;
  }

  .brand-button small {
    display: none;
  }

  .text-button {
    display: none;
  }

  .hero {
    padding-top: 48px;
  }

  .hero-grid,
  .map-welcome,
  .brief-grid,
  .debrief-hero {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: clamp(4rem, 18vw, 7rem);
  }

  .case-teaser {
    width: min(560px, 95%);
    margin: 20px auto 0;
  }

  .promise-grid,
  .spor-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .promise:nth-child(2) {
    border-right: 0;
  }

  .promise:nth-child(-n + 2) {
    border-bottom: 1px solid color-mix(in srgb, var(--white) 34%, transparent);
  }

  .curriculum-ribbon-inner,
  .section-heading {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .section-heading {
    display: grid;
  }

  .choice-grid,
  .lesson-grid {
    grid-template-columns: 1fr;
  }

  .choice-radio label {
    min-height: 145px;
  }

  .map-welcome {
    gap: 24px;
  }

  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-case:nth-child(n) {
    transform: none;
  }

  .source-grid,
  .decision-grid {
    grid-template-columns: 1fr;
  }

  .source-card,
  .decision-option {
    min-height: 0;
  }

  .perspective-grid {
    grid-template-columns: 1fr;
  }

  .argument-row {
    grid-template-columns: 1fr;
  }

  .timeline {
    grid-template-columns: 1fr 1fr;
  }

  .timeline::before {
    display: none;
  }

  .timeline-item {
    padding-top: 0;
  }

  .timeline-item::before {
    display: none;
  }

  .impact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .report-header {
    grid-template-columns: 1fr;
  }

  .report-stamp {
    width: 105px;
    height: 105px;
    font-size: 0.9rem;
  }
}

@media (max-width: 560px) {
  .top-actions {
    gap: 5px;
  }

  .brand-button strong {
    font-size: 0.9rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .hero::before {
    width: 100vw;
    opacity: 0.25;
  }

  .hero-copy h1 {
    line-height: 0.84;
  }

  .hero-actions,
  .setup-submit {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button,
  .setup-submit .button {
    width: 100%;
  }

  .promise-grid,
  .spor-grid,
  .case-grid,
  .skill-overview,
  .feedback-points,
  .debrief-grid,
  .badge-grid,
  .impact-grid {
    grid-template-columns: 1fr;
  }

  .promise {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--white) 34%, transparent);
  }

  .promise:last-child {
    border-bottom: 0;
  }

  .map-board {
    padding: 15px;
  }

  .chapter-jumps {
    grid-template-columns: 1fr;
  }

  .chapter-heading {
    grid-template-columns: auto 1fr;
  }

  .chapter-progress {
    grid-column: 2;
    width: fit-content;
  }

  .case-stage {
    min-height: 0;
    padding: 21px 17px;
  }

  .mission-strip {
    grid-template-columns: 1fr;
  }

  .mission-strip > span + span {
    border-top: 1.5px solid var(--ink);
    border-left: 0;
  }

  .stage-head {
    grid-template-columns: 1fr;
  }

  .stage-seal {
    width: 64px;
    height: 64px;
    grid-row: 1;
    font-size: 1.4rem;
  }

  .stage-head h1 {
    font-size: 2.7rem;
  }

  .source-instruction,
  .stage-actions,
  .case-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .selection-counter {
    width: fit-content;
  }

  .stage-actions-left,
  .stage-actions-right {
    display: grid;
    width: 100%;
  }

  .stage-actions .button {
    width: 100%;
  }

  .source-meta {
    grid-template-columns: 1fr;
  }

  .reflection-compare {
    grid-template-columns: 1fr;
  }

  .reflection-arrow {
    transform: rotate(90deg);
    text-align: center;
  }

  .timeline {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding-bottom: 94px;
    flex-direction: column;
  }

  .site-footer > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal-backdrop {
    padding: 8px;
  }

  .modal-card {
    max-height: calc(100vh - 16px);
    padding: 22px 17px;
    border-radius: 18px;
  }

  .curriculum-table thead {
    display: none;
  }

  .curriculum-table,
  .curriculum-table tbody,
  .curriculum-table tr,
  .curriculum-table td {
    display: block;
    width: 100%;
  }

  .curriculum-table tr {
    padding: 12px 0;
    border-bottom: 2px solid var(--ink);
  }

  .curriculum-table td {
    padding: 4px 0;
    border: 0;
  }

  .data-action {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body {
    background: white;
    color: black;
    font-size: 11pt;
  }

  .topbar,
  .site-footer,
  .report-actions,
  .modal-backdrop,
  .toast,
  .button {
    display: none !important;
  }

  .report-screen {
    padding: 0;
  }

  .section-shell {
    width: 100%;
  }

  .paper-card,
  .report-stamp {
    box-shadow: none;
  }

  .report-layout {
    display: block;
  }

  .report-panel,
  .coverage-case,
  .badge-card {
    break-inside: avoid;
  }

  .report-panel {
    margin-top: 18px;
  }
}
