/* AVC (avc.gcppartner.com) — design system
   Light, minimal, keynote-like. White / warm-white grounds, ink text, node colors as accents only.
   Node colors (shared with deck + doc): Value #1A73E8 · Output #EA4335 · Loop #F9AB00 · Input #188038 */

@font-face {
  font-family: "Google Sans";
  src: url("../fonts/google-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  /* Latin letters + digits only: CJK punctuation (“” —) stays full-width from the CJK face. */
  unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2122, U+2212;
}

:root {
  --white: #ffffff;
  --warm: #fafaf7;
  --warm-2: #f2f1eb;
  --warm-3: #e9e7df;
  --ink: #202124;
  --ink-2: #3c4043;
  --muted: #5f6368;
  --faint: #9aa0a6;
  --line: #e7e5de;
  --line-2: #dadce0;

  --value: #1a73e8;
  --value-ink: #1558b0;
  --value-tint: #e8f0fe;
  --output: #ea4335;
  --output-ink: #b3261e;
  --output-tint: #fce8e6;
  --loop: #f9ab00;
  --loop-ink: #6f4a00;
  --loop-tint: #fef4d6;
  --input: #188038;
  --input-ink: #11652c;
  --input-tint: #e6f4ea;
  --struct: #202124;
  --taste: #5f6368;

  --font: "Google Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC",
    "Source Han Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px rgba(32, 33, 36, 0.06), 0 1px 3px rgba(32, 33, 36, 0.04);
  --shadow-2: 0 1px 2px rgba(32, 33, 36, 0.05), 0 10px 28px -14px rgba(32, 33, 36, 0.22);
  --shadow-3: 0 2px 6px rgba(32, 33, 36, 0.05), 0 28px 56px -28px rgba(32, 33, 36, 0.3);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: 20px;
  --section: 72px;
  --top: 84px;
}

@media (min-width: 720px) {
  :root {
    --pad: 32px;
    --section: 112px;
    --top: 60px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--top) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

@media (min-width: 1024px) {
  body {
    font-size: 18px;
  }
}

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

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

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

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

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

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

:focus-visible {
  outline: 2px solid var(--value);
  outline-offset: 2px;
  border-radius: 6px;
}

input,
textarea {
  caret-color: var(--value);
}

html {
  scrollbar-color: #c9c7bf transparent;
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #d3d1c9;
  border-radius: 999px;
  border: 3px solid var(--white);
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  text-decoration: none;
}

.skip:focus {
  top: 10px;
}

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

[hidden] {
  display: none !important;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------------------------------------------ layout */
.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: max(var(--pad), env(safe-area-inset-left));
}

.narrow {
  max-width: 820px;
}

.section {
  padding-block: var(--section);
}

.section--warm {
  background: var(--warm);
}

.section--tight {
  padding-block: calc(var(--section) * 0.6);
}

.stack > * + * {
  margin-top: var(--gap, 16px);
}

/* ------------------------------------------------------------------ type */
.display {
  font-size: clamp(2.9rem, 13vw, 6rem);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.h1 {
  font-size: clamp(2.1rem, 8.4vw, 3.6rem);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(1.7rem, 6.2vw, 2.9rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.h3 {
  font-size: clamp(1.15rem, 3.8vw, 1.4rem);
  line-height: 1.4;
  font-weight: 650;
  letter-spacing: -0.005em;
}

.lead {
  font-size: clamp(1.1rem, 3.9vw, 1.45rem);
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 34em;
  text-wrap: pretty;
}

.body-m {
  color: var(--ink-2);
  max-width: 38em;
  text-wrap: pretty;
}

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

.small {
  font-size: 0.875rem;
  line-height: 1.6;
}

.latin {
  font-family: "Google Sans", system-ui, sans-serif;
}

.section-head {
  display: grid;
  gap: 14px;
  margin-bottom: clamp(32px, 6vw, 56px);
}

.cite {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ------------------------------------------------------------------ topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(32, 33, 36, 0.07);
}

.topbar-inner {
  height: var(--top);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 4px;
  padding-block: 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  min-height: 32px;
  max-width: 100%;
  overflow: hidden;
}

.brand-mark {
  width: 28px;
  height: 11px;
  flex: none;
}

.brand-text {
  font-family: "Google Sans", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  flex: none;
}

.brand-sub {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  padding-left: 8px;
  border-left: 1px solid var(--line-2);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  text-decoration: none;
  font-size: 13.5px;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s, background-color 0.2s;
}

.nav a:hover {
  color: var(--ink);
  background: var(--warm-2);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--warm-2);
  font-weight: 600;
}

@media (min-width: 720px) {
  .topbar-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-block: 0;
  }

  .brand {
    gap: 10px;
    font-size: 17px;
    min-height: 44px;
  }

  .brand-mark {
    width: 30px;
    height: 12px;
  }

  .brand-sub {
    font-size: 13px;
    padding-left: 10px;
  }

  .nav {
    justify-content: flex-end;
    gap: 4px;
    margin-right: -8px;
  }

  .nav a {
    min-height: 40px;
    padding: 0 12px;
    font-size: 15px;
  }
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--warm-2);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s var(--ease-out), box-shadow 0.25s var(--ease-out), background-color 0.2s,
    border-color 0.2s, color 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:hover {
  background: #000;
  box-shadow: 0 10px 24px -12px rgba(32, 33, 36, 0.55);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border-color: var(--line-2);
}

.btn-secondary:hover {
  border-color: #b9bcc0;
  box-shadow: var(--shadow-1);
  transform: translateY(-1px);
}

.btn-quiet {
  background: transparent;
  color: var(--ink-2);
  padding: 0 14px;
}

.btn-quiet:hover {
  background: var(--warm-2);
  color: var(--ink);
}

.btn-sm {
  min-height: 42px;
  padding: 0 16px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
}

.link-arrow .icon {
  transition: transform 0.25s var(--ease-out);
}

.link-arrow:hover .icon {
  transform: translateX(3px);
}

/* ------------------------------------------------------------------ chips & tags */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--white);
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.3;
  text-align: left;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.chip:hover {
  border-color: #b9bcc0;
  color: var(--ink);
}

.chip:active {
  transform: scale(0.98);
}

.chip[aria-pressed="true"],
.chip[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: var(--warm-2);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.tag--value {
  background: var(--value-tint);
  color: var(--value-ink);
}

.tag--output {
  background: var(--output-tint);
  color: var(--output-ink);
}

.tag--loop {
  background: var(--loop-tint);
  color: var(--loop-ink);
}

.tag--input {
  background: var(--input-tint);
  color: var(--input-ink);
}

.tag--ink {
  background: var(--ink);
  color: #fff;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  background: var(--ink);
}

.dot--value {
  background: var(--value);
}

.dot--output {
  background: var(--output);
}

.dot--loop {
  background: var(--loop);
}

.dot--input {
  background: var(--input);
}

.dot--struct {
  background: var(--struct);
}

.dot--taste {
  background: var(--taste);
}

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  border: 1px solid rgba(32, 33, 36, 0.05);
  padding: 22px;
}

@media (min-width: 720px) {
  .card {
    padding: 30px;
  }
}

.panel {
  background: var(--warm);
  border-radius: var(--r-lg);
  padding: 20px;
}

/* ------------------------------------------------------------------ hero */
.hero {
  padding-top: clamp(48px, 11vw, 120px);
  padding-bottom: clamp(56px, 10vw, 112px);
}

.hero-grid {
  display: grid;
  gap: 40px;
}

.hero-main {
  display: grid;
  gap: 28px;
  align-content: start;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    align-items: center;
    column-gap: 72px;
  }
}

.hero-card {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-3);
  border: 1px solid rgba(32, 33, 36, 0.06);
  padding: 24px 20px 22px;
}

@media (min-width: 720px) {
  .hero-card {
    padding: 32px 30px 28px;
  }
}

.hero-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.hero-card-title .dot {
  width: 12px;
  height: 12px;
}

.hero-card-q {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.65;
}

.nst {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.nst-row {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--warm);
}

.nst-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.nst-icon .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}

.nst-label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.nst-text {
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.5;
}

.nst-row.is-no .nst-icon {
  background: var(--output-tint);
  color: var(--output-ink);
}

.nst-row.is-no .nst-text {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(234, 67, 53, 0.65);
  text-decoration-thickness: 1.5px;
}

.nst-row.is-yes {
  background: var(--value-tint);
}

.nst-row.is-yes .nst-icon {
  background: var(--value);
  color: #fff;
}

.nst-row.is-yes .nst-label {
  color: var(--value-ink);
}

.hero-formula {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-2);
}

.hero-formula mark {
  background: none;
  color: var(--value-ink);
  font-weight: 650;
}

.hero .display {
  max-width: 9em;
}

.display .phrase {
  display: inline-block;
}

.hero-sub {
  font-size: clamp(1.15rem, 4.2vw, 1.6rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 30em;
}

.hero-sub .neq {
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
}

.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 14px;
  color: var(--muted);
  padding-top: 8px;
}

.byline .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--faint);
}

/* trap */
.trap {
  display: grid;
  gap: 14px;
  margin-top: 36px;
}

.trap-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--white);
  box-shadow: var(--shadow-1);
}

.trap-step .icon {
  color: var(--muted);
  width: 22px;
  height: 22px;
}

.trap-input {
  font-family: "Google Sans", system-ui, sans-serif;
}

.trap-input .typed {
  color: var(--ink);
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--value);
  vertical-align: -0.18em;
  margin-left: 2px;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.trap-arrow {
  justify-self: center;
  color: var(--faint);
}

.trap-arrow .icon {
  transform: rotate(90deg);
}

.trap-dead {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--output);
  text-decoration-thickness: 1.5px;
}

.trap-expert {
  margin-top: 26px;
  font-size: clamp(1.15rem, 4vw, 1.4rem);
  font-weight: 650;
  line-height: 1.5;
}

.trap-expert em {
  font-style: normal;
  color: var(--value-ink);
}

@media (min-width: 900px) {
  .trap {
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: stretch;
  }

  .trap-arrow {
    align-self: center;
  }

  .trap-arrow .icon {
    transform: none;
  }
}

/* ------------------------------------------------------------------ framework diagram */
.fw {
  --dot: 54px;
  --col: 25%;
  position: relative;
  padding: 6px 0 4px;
  user-select: none;
}

@media (min-width: 720px) {
  .fw {
    --dot: 84px;
  }
}

.fw-rail {
  position: relative;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.fw-rail-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.01em;
  text-align: center;
  text-wrap: balance;
}

@media (min-width: 720px) {
  .fw-rail-label {
    font-size: 16px;
  }
}

.fw-rail-track {
  position: relative;
  width: calc(100% - var(--col));
  height: 14px;
}

.fw-rail-track::before,
.fw-rail-track::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1.5px;
  margin-top: -0.75px;
  background: var(--line-2);
}

.fw-rail-track::after {
  background: var(--ink);
  transform: scaleX(var(--progress, 1));
  transition: transform 0.7s var(--ease-out);
}

.fw-rail--back .fw-rail-track::after {
  transform-origin: right center;
}

.fw-rail--fwd .fw-rail-track::after {
  transform-origin: left center;
  background: var(--muted);
}

.fw-head {
  position: absolute;
  top: 0;
  width: 14px;
  height: 14px;
  stroke: var(--ink);
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fw-rail--back .fw-head {
  left: -2px;
}

.fw-rail--fwd .fw-head {
  right: -2px;
  stroke: var(--muted);
}

.fw-nodes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 18px 0 10px;
}

.fw-nodes::before {
  content: "";
  position: absolute;
  top: calc(var(--dot) / 2);
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  margin-top: -1px;
  background: var(--line-2);
}

.fw-node {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  padding: 0 2px 6px;
  background: none;
  border: 0;
  border-radius: var(--r-md);
  text-align: center;
  min-height: 44px;
  transition: opacity 0.35s var(--ease-out);
}

.fw-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  box-shadow: 0 0 0 5px var(--white);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}

.section--warm .fw-dot {
  box-shadow: 0 0 0 5px var(--warm);
}

.fw-dot .icon {
  width: 46%;
  height: 46%;
  stroke-width: 2;
}

.fw-node[data-node="loop"] .fw-dot {
  color: var(--ink);
}

.fw-name {
  font-family: "Google Sans", system-ui, sans-serif;
  font-weight: 650;
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.fw-sub {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  max-width: 8em;
  text-wrap: balance;
}

@media (min-width: 720px) {
  .fw-name {
    font-size: 18px;
  }

  .fw-sub {
    font-size: 14px;
    max-width: 10em;
  }
}

.fw-node:hover .fw-dot {
  transform: translateY(-2px);
}

.fw-node[aria-pressed="true"] .fw-dot {
  transform: scale(1.1);
  box-shadow: 0 0 0 5px var(--white), 0 12px 22px -10px var(--c);
}

.section--warm .fw-node[aria-pressed="true"] .fw-dot {
  box-shadow: 0 0 0 5px var(--warm), 0 12px 22px -10px var(--c);
}

.fw-node[aria-pressed="true"] .fw-name {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--c);
}

.fw[data-mode="demo"] .fw-node:not([aria-pressed="true"]) {
  opacity: 0.38;
}

.fw-node[data-node="value"] {
  --c: var(--value);
}

.fw-node[data-node="output"] {
  --c: var(--output);
}

.fw-node[data-node="loop"] {
  --c: var(--loop);
}

.fw-node[data-node="input"] {
  --c: var(--input);
}

.fw-step {
  position: absolute;
  top: -6px;
  right: calc(50% - var(--dot) / 2 - 8px);
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--ink);
  color: #fff;
  font: 600 12px/22px "Google Sans", system-ui, sans-serif;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.3s, transform 0.4s var(--ease-out);
}

.fw-node.has-step .fw-step {
  opacity: 1;
  transform: scale(1);
}

.fw-bands {
  display: grid;
  gap: 2px;
  margin: 4px 0 18px;
}

.fw-band {
  position: relative;
  display: block;
  width: 100%;
  height: 34px;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 8px;
}

.fw-band-line {
  position: absolute;
  left: 12.5%;
  right: 12.5%;
  top: 50%;
  height: 1px;
  background: var(--bc);
  transition: height 0.25s, margin 0.25s;
}

.fw-band-line i {
  position: absolute;
  top: -3px;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--bc);
}

.fw-band-line i:nth-child(1) {
  left: 0;
}

.fw-band-line i:nth-child(2) {
  left: 33.333%;
}

.fw-band-line i:nth-child(3) {
  left: 66.666%;
}

.fw-band-line i:nth-child(4) {
  left: 100%;
}

.fw-band-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 0 10px;
  background: var(--white);
  font-size: 13px;
  font-weight: 650;
  color: var(--bc);
  letter-spacing: 0.08em;
  line-height: 1;
}

.section--warm .fw-band-label {
  background: var(--warm);
}

.fw-band[data-node="structure"] {
  --bc: var(--struct);
}

.fw-band[data-node="taste"] {
  --bc: var(--taste);
}

.fw-band:hover .fw-band-line,
.fw-band[aria-pressed="true"] .fw-band-line {
  height: 2px;
  margin-top: -0.5px;
}

.fw-band[aria-pressed="true"] .fw-band-label {
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

.fw-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
}

.fw-detail {
  margin-top: 22px;
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  border: 1px solid rgba(32, 33, 36, 0.05);
  padding: 22px 20px;
  min-height: 210px;
}

.section--warm .fw-detail {
  background: var(--white);
}

@media (min-width: 720px) {
  .fw-detail {
    padding: 30px 34px;
  }
}

.fw-detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fw-detail-head .dot {
  width: 12px;
  height: 12px;
}

.fw-detail-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.fw-detail-def {
  margin-top: 10px;
  font-size: clamp(1.05rem, 3.6vw, 1.25rem);
  font-weight: 600;
  line-height: 1.55;
}

.fw-detail-body {
  margin-top: 12px;
  color: var(--ink-2);
}

.fw-detail-body li {
  position: relative;
  padding-left: 18px;
  margin-top: 6px;
}

.fw-detail-body li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.78em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
}

.fw-detail-q {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

.fw-detail.is-swap {
  animation: swap 0.45s var(--ease-out);
}

@keyframes swap {
  from {
    opacity: 0.2;
    transform: translateY(6px);
  }
}

/* ------------------------------------------------------------------ layers */
.layers {
  display: grid;
  gap: 18px;
}

@media (min-width: 900px) {
  .layers {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

.layer-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.layer-title .dot {
  width: 12px;
  height: 12px;
}

.pairs {
  display: grid;
  margin-top: 16px;
}

.pairs > div {
  display: grid;
  grid-template-columns: 4.5em 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.pairs dt {
  color: var(--muted);
}

.pairs dd {
  margin: 0;
  font-weight: 600;
}

.ask-line {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--warm);
  font-weight: 600;
}

.ask-line .muted {
  display: block;
  font-weight: 400;
  font-size: 14px;
  margin-bottom: 4px;
}

.taste-layers {
  margin-top: 16px;
  display: grid;
}

.taste-layers li {
  display: grid;
  grid-template-columns: 1.6em 1fr;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.taste-layers .n {
  font: 600 14px/1.9 "Google Sans", system-ui, sans-serif;
  color: var(--muted);
}

.taste-layers b {
  display: block;
}

.taste-layers span {
  color: var(--ink-2);
  font-size: 15px;
}

.taste-layers .tag {
  margin-left: 6px;
  vertical-align: 2px;
}

.split-line {
  margin-top: 18px;
  font-weight: 650;
  font-size: 1.1rem;
  line-height: 1.55;
}

/* ------------------------------------------------------------------ five questions */
.five {
  counter-reset: q;
  display: grid;
}

.five li {
  display: grid;
  grid-template-columns: 2.2em 1fr;
  gap: 4px 14px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.five li:last-child {
  border-bottom: 1px solid var(--line);
}

.five .qn {
  font: 650 clamp(1.6rem, 6vw, 2.2rem) / 1 "Google Sans", system-ui, sans-serif;
  color: var(--ink);
  letter-spacing: -0.03em;
  padding-top: 4px;
}

.five .qt {
  font-size: clamp(1.1rem, 4vw, 1.45rem);
  font-weight: 650;
  line-height: 1.5;
  text-wrap: pretty;
}

.five .qm {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.five-follow {
  margin-top: 26px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: clamp(1.05rem, 3.8vw, 1.3rem);
  font-weight: 650;
  line-height: 1.55;
}

.five-follow .icon {
  width: 26px;
  height: 26px;
  margin-top: 2px;
  color: var(--taste);
}

/* ------------------------------------------------------------------ cases */
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 2px 6px;
  margin: 0 -2px;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs .chip {
  flex: none;
}

.case {
  margin-top: 18px;
}

.case-rows {
  display: grid;
}

.case-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.case-row:first-child {
  border-top: 0;
  padding-top: 4px;
}

.case-k {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 650 14px/1.4 "Google Sans", system-ui, sans-serif;
  color: var(--muted);
}

.case-v {
  font-size: clamp(1.05rem, 3.7vw, 1.25rem);
  font-weight: 600;
  line-height: 1.55;
}

@media (min-width: 720px) {
  .case-row {
    grid-template-columns: 9em 1fr;
    gap: 18px;
  }

  .case-k {
    padding-top: 4px;
  }
}

/* ------------------------------------------------------------------ CTA band */
.cta-band {
  display: grid;
  gap: 22px;
}

.entry-list {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.entry {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--shadow-1);
  border: 1px solid rgba(32, 33, 36, 0.05);
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.entry:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.entry b {
  display: block;
  font-size: 1.1rem;
}

.entry span {
  color: var(--muted);
  font-size: 15px;
}

.entry .icon {
  width: 22px;
  height: 22px;
  transition: transform 0.25s var(--ease-out);
}

.entry:hover .icon {
  transform: translateX(3px);
}

@media (min-width: 900px) {
  .entry-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ------------------------------------------------------------------ footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 calc(32px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  display: grid;
  gap: 8px;
}

@media (min-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

/* ------------------------------------------------------------------ forms */
.form {
  display: grid;
  gap: 22px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-weight: 650;
  font-size: 16px;
}

.field-opt {
  font-weight: 400;
  color: var(--muted);
  font-size: 14px;
}

.counter {
  font: 500 13px/1 "Google Sans", system-ui, sans-serif;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.counter.is-over {
  color: var(--output-ink);
}

.input,
.textarea {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--white);
  padding: 13px 15px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.textarea {
  resize: vertical;
  min-height: 132px;
}

.textarea--sm {
  min-height: 84px;
}

.input::placeholder,
.textarea::placeholder {
  color: #767b80;
}

.input:hover,
.textarea:hover {
  border-color: #bfc3c7;
}

.input:focus,
.textarea:focus {
  outline: none;
  border-color: var(--value);
  box-shadow: 0 0 0 1px var(--value);
}

.hint {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

details.more {
  border-radius: var(--r-lg);
  background: var(--warm);
}

details.more > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 650;
  border-radius: var(--r-lg);
}

details.more > summary::-webkit-details-marker {
  display: none;
}

.summary-hint {
  margin-left: 10px;
  margin-right: auto;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

details.more > summary .icon {
  transition: transform 0.3s var(--ease-out);
}

details.more[open] > summary .icon {
  transform: rotate(180deg);
}

details.more .more-body {
  display: grid;
  gap: 18px;
  padding: 4px 18px 20px;
}

.privacy {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.privacy .icon {
  margin-top: 3px;
  width: 16px;
  height: 16px;
}

.code-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.code-row .input {
  max-width: 220px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.submit-bar {
  padding-top: 2px;
}

/* ------------------------------------------------------------------ lab */
.lab-head {
  padding-top: clamp(36px, 8vw, 80px);
  padding-bottom: 4px;
}

.lab-body {
  padding-top: 24px;
}

.examples {
  gap: 8px;
}

.examples .chip {
  min-height: 44px;
}

.lab-attach {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--value-tint);
  color: var(--value-ink);
  font-size: 15px;
  font-weight: 600;
}

/* progress / stages */
.stages {
  display: grid;
  gap: 4px;
  margin-top: 14px;
}

.stages li {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  color: var(--faint);
  transition: color 0.3s;
}

.stages li.is-active,
.stages li.is-done {
  color: var(--ink);
}

.stage-mark {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  display: grid;
  place-items: center;
}

.stage-mark .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.4;
  opacity: 0;
  color: #fff;
}

.stages li.is-done .stage-mark {
  background: var(--sc, var(--ink));
  border-color: var(--sc, var(--ink));
}

.stages li.is-done .stage-mark .icon {
  opacity: 1;
}

.stages li[data-node="loop"].is-done .stage-mark .icon {
  color: var(--ink);
}

.stages li.is-active .stage-mark {
  border-color: transparent;
}

.stages li.is-active .stage-mark::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: 50%;
  border: 2px solid var(--sc, var(--ink));
  border-right-color: transparent;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.stages li[data-node="value"] {
  --sc: var(--value);
}

.stages li[data-node="output"] {
  --sc: var(--output);
}

.stages li[data-node="loop"] {
  --sc: var(--loop);
}

.stages li[data-node="input"] {
  --sc: var(--input);
}

.stages li[data-node="structure"] {
  --sc: var(--struct);
}

.stages li[data-node="taste"] {
  --sc: var(--taste);
}

.elapsed {
  font: 500 14px/1 "Google Sans", system-ui, sans-serif;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.run-card {
  display: grid;
  gap: 6px;
}

.run-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* results */
.results {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.rcard {
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  border: 1px solid rgba(32, 33, 36, 0.05);
  padding: 22px 20px;
  animation: rise 0.6s var(--ease-out) both;
}

@media (min-width: 720px) {
  .rcard {
    padding: 30px 32px;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.rcard-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.rcard-head .dot {
  width: 12px;
  height: 12px;
}

.rcard-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.rcard-title small {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: 6px;
}

.rcard.is-skeleton {
  animation: none;
  min-height: 132px;
  background: linear-gradient(100deg, var(--white) 30%, var(--warm) 50%, var(--white) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.6s linear infinite;
  box-shadow: var(--shadow-1);
}

@keyframes shimmer {
  to {
    background-position: -150% 0;
  }
}

.rcard.is-skeleton .rcard-head {
  opacity: 0.55;
}

.kv {
  display: grid;
  gap: 0;
}

.kv > div {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.kv > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.kv dt {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.kv dd {
  margin: 0;
}

@media (min-width: 720px) {
  .kv > div {
    grid-template-columns: 8.5em 1fr;
    gap: 16px;
  }
}

.fromto {
  display: grid;
  gap: 8px;
  margin: 4px 0 2px;
}

.fromto-box {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--warm);
}

.fromto-box.to {
  background: var(--value-tint);
}

.fromto-box small {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.fromto-box.to small {
  color: var(--value-ink);
}

.fromto-arrow {
  justify-self: center;
  color: var(--faint);
}

.fromto-arrow .icon {
  transform: rotate(90deg);
}

@media (min-width: 720px) {
  .fromto {
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
  }

  .fromto-arrow {
    align-self: center;
  }

  .fromto-arrow .icon {
    transform: none;
  }
}

.list-dots li {
  position: relative;
  padding-left: 18px;
  margin-top: 6px;
}

.list-dots li:first-child {
  margin-top: 0;
}

.list-dots li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.75em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lc, var(--faint));
}

.list-num {
  counter-reset: n;
  display: grid;
  gap: 12px;
}

.list-num > li {
  counter-increment: n;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
}

.list-num > li::before {
  content: counter(n);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--warm-2);
  font: 650 13px/1 "Google Sans", system-ui, sans-serif;
  margin-top: 2px;
}

.list-num .sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 15px;
}

.summary-line {
  font-size: clamp(1.25rem, 4.6vw, 1.75rem);
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.summary-line mark {
  background: none;
  color: var(--value-ink);
}

.summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.assume {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--warm);
  font-size: 15px;
  color: var(--ink-2);
}

.assume b {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.score {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.score-row {
  display: grid;
  grid-template-columns: 7.2em 1fr 2.6em;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}

.score-row .n {
  font: 650 15px/1 "Google Sans", system-ui, sans-serif;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bar {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--warm-2);
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  width: calc(var(--v, 0) * 20%);
  background: var(--bc, var(--ink));
  border-radius: inherit;
  transition: width 0.9s var(--ease-out);
}

.score-tip {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--warm);
  font-size: 15px;
}

.sublabel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 10px;
  font-size: 14px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.sublabel:first-child {
  margin-top: 0;
}

.order-pill {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: var(--ink);
  color: #fff;
  font: 650 12px/1 "Google Sans", system-ui, sans-serif;
}

.carrier {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.carrier:first-child {
  border-top: 0;
  padding-top: 0;
}

.carrier b {
  display: block;
  font-size: 1.05rem;
}

.carrier .tag {
  margin-bottom: 6px;
}

.verdict {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--warm);
  margin-bottom: 4px;
}

.loop-steps {
  display: grid;
  gap: 0;
}

.loop-steps li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  padding: 10px 0;
  position: relative;
}

.loop-steps li::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 40px;
  bottom: -6px;
  width: 1.5px;
  background: var(--line-2);
}

.loop-steps li:last-child::after {
  display: none;
}

.loop-steps .ln {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--loop-tint);
  color: var(--loop-ink);
  font: 700 12px/1 "Google Sans", system-ui, sans-serif;
}

.loop-steps b {
  display: block;
  font-size: 15px;
}

.checks li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 8px 0;
}

.check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border-radius: 7px;
  border: 1.5px solid var(--line-2);
  background: var(--white);
  padding: 0;
  transition: background-color 0.2s, border-color 0.2s;
}

.check .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.6;
  color: #fff;
  opacity: 0;
}

.check[aria-checked="true"] {
  background: var(--ink);
  border-color: var(--ink);
}

.check[aria-checked="true"] .icon {
  opacity: 1;
}

.checks li.is-checked span {
  color: var(--muted);
}

.io-grid {
  display: grid;
  gap: 10px;
}

.io-item {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.io-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.io-item .why {
  color: var(--muted);
  font-size: 15px;
}

.two-col {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

.keepcut {
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--warm);
}

.keepcut h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  margin-bottom: 8px;
}

.keepcut.cut li {
  color: var(--ink-2);
}

.angles {
  display: grid;
  gap: 10px;
}

.angle {
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}

.angle.is-pick {
  border-color: transparent;
  background: var(--warm);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.angle-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 650;
}

.angle p {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 15px;
}

.pick-why {
  margin-top: 12px;
  font-size: 15px;
}

.prompt-box {
  position: relative;
  margin-top: 4px;
  padding: 18px 16px;
  border-radius: var(--r-md);
  background: var(--warm);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 15px;
  line-height: 1.75;
  max-height: 460px;
  overflow: auto;
}

.prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.result-actions {
  display: grid;
  gap: 10px;
}

@media (min-width: 720px) {
  .result-actions {
    display: flex;
    flex-wrap: wrap;
  }
}

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--output-tint);
  color: var(--output-ink);
}

.notice .icon {
  margin-top: 4px;
}

.notice p {
  color: var(--ink);
}

.notice .btn-row {
  margin-top: 12px;
}

/* ------------------------------------------------------------------ toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  box-shadow: var(--shadow-3);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease-out), opacity 0.25s;
}

.toast.is-on {
  transform: translate(-50%, 0);
  opacity: 1;
}

.toast .icon {
  width: 16px;
  height: 16px;
}

/* ------------------------------------------------------------------ course */
.course-head {
  padding-top: clamp(36px, 8vw, 80px);
  padding-bottom: 28px;
}

.progress-wrap {
  display: grid;
  gap: 8px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}

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

.progress span {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--warm-3);
  transition: background-color 0.4s;
}

.progress span.is-part {
  background: #bdc1c6;
}

.progress span.is-done {
  background: var(--ink);
}

.mods {
  display: grid;
  gap: 12px;
}

.mod {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 18px 18px;
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--shadow-1);
  border: 1px solid rgba(32, 33, 36, 0.05);
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.mod:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.mod-n {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--warm-2);
  font: 650 16px/1 "Google Sans", system-ui, sans-serif;
}

.mod.is-done .mod-n {
  background: var(--ink);
  color: #fff;
}

.mod-t {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.4;
}

.mod-q {
  display: block;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 2px;
}

.mod-s {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.mod.is-done .mod-s {
  color: var(--input-ink);
  font-weight: 600;
}

.course-meta {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.module-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.module-q {
  margin-top: 12px;
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  color: var(--ink-2);
  line-height: 1.55;
}

.module-nav {
  position: sticky;
  top: var(--top);
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.module-nav .container {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 8px;
}

.module-nav .container::-webkit-scrollbar {
  display: none;
}

.module-nav a {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  text-decoration: none;
  font-size: 14px;
  color: var(--muted);
}

.module-nav a:hover {
  background: var(--warm-2);
  color: var(--ink);
}

.module-nav a.is-done {
  color: var(--ink);
}

.module-nav a .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
  color: var(--input);
}

.msection {
  padding-top: 44px;
}

.msection-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.concepts {
  display: grid;
  gap: 14px;
}

.concept {
  position: relative;
  padding: 22px 20px;
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--shadow-1);
  border: 1px solid rgba(32, 33, 36, 0.05);
}

@media (min-width: 720px) {
  .concept {
    padding: 28px 30px;
  }
}

.concept-n {
  position: absolute;
  top: 24px;
  right: 20px;
  font: 600 13px/1 "Google Sans", system-ui, sans-serif;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 720px) {
  .concept-n {
    top: 30px;
    right: 30px;
  }
}

.concept h3 {
  padding-right: 3.2em;
}

.concept p {
  margin-top: 8px;
  color: var(--ink-2);
}

.concept .eg {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--warm);
  font-size: 15px;
}

.concept .eg b {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 2px;
}

.concept .cite {
  margin-top: 12px;
}

.concept ul {
  margin-top: 10px;
}

.ex {
  padding: 22px 20px;
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--shadow-2);
  border: 1px solid rgba(32, 33, 36, 0.05);
}

@media (min-width: 720px) {
  .ex {
    padding: 30px;
  }
}

.ex + .ex {
  margin-top: 16px;
}

.ex-head {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.ex-kind {
  justify-self: start;
  margin-top: 2px;
}

.ex-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.45;
}

.ex-desc {
  color: var(--ink-2);
  font-size: 15px;
}

.ex-score {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.ex-item {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.ex-item:first-of-type {
  border-top: 0;
  padding-top: 4px;
}

.ex-stmt {
  font-weight: 600;
  line-height: 1.6;
}

.opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.opts--stack {
  display: grid;
}

.opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: var(--white);
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
  color: var(--ink);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.opts--pill .opt {
  border-radius: var(--r-pill);
  padding: 0 16px;
}

.opt:hover:not([disabled]) {
  border-color: #b4b8bc;
}

.opt:active:not([disabled]) {
  transform: scale(0.985);
}

.opt[disabled] {
  cursor: default;
}

.opt.is-picked {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.opt.is-correct {
  background: var(--input-tint);
  border-color: transparent;
  box-shadow: none;
  color: var(--input-ink);
  font-weight: 600;
}

.opt.is-wrong {
  background: var(--output-tint);
  border-color: transparent;
  box-shadow: none;
  color: var(--output-ink);
}

.opt .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}

.opt .key {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--warm-2);
  font: 650 12px/1 "Google Sans", system-ui, sans-serif;
  flex: none;
}

.fb {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--warm);
  font-size: 15px;
  line-height: 1.65;
  animation: rise 0.4s var(--ease-out) both;
}

.fb b {
  margin-right: 4px;
}

.fb--ok b {
  color: var(--input-ink);
}

.fb--no b {
  color: var(--output-ink);
}

.seg {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--warm-2);
}

.seg button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}

.seg button[aria-pressed="true"] {
  background: var(--white);
  color: var(--ink);
  font-weight: 650;
  box-shadow: var(--shadow-1);
}

.seg button[disabled] {
  cursor: default;
}

.miss-task {
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--warm);
  font-size: 15px;
  line-height: 1.75;
}

.miss-rows {
  display: grid;
  margin-top: 6px;
}

.miss-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.miss-row:first-child {
  border-top: 0;
}

.miss-row .name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.miss-row .fb {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.round-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.order-zone {
  display: grid;
  gap: 10px;
}

.order-zone h4 {
  font-size: 14px;
  color: var(--muted);
  font-weight: 650;
}

.order-list,
.order-pool {
  display: grid;
  gap: 8px;
  min-height: 52px;
  padding: 8px;
  border-radius: var(--r-md);
  background: var(--warm);
}

.order-list:empty::before {
  content: attr(data-empty);
  display: grid;
  place-items: center;
  min-height: 36px;
  color: var(--muted);
  font-size: 14px;
}

.order-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--white);
  text-align: left;
  font-size: 15px;
  line-height: 1.5;
  transition: transform 0.2s var(--ease-out), background-color 0.2s, border-color 0.2s;
}

.order-item:hover:not([disabled]) {
  border-color: #b4b8bc;
}

.order-item .pos {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--warm-2);
  font: 650 12px/1 "Google Sans", system-ui, sans-serif;
}

.order-list .order-item .pos {
  background: var(--ink);
  color: #fff;
}

.order-item .stage {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}

.order-item.is-correct {
  background: var(--input-tint);
  border-color: transparent;
}

.order-item.is-wrong {
  background: var(--output-tint);
  border-color: transparent;
}

.order-item.is-correct .pos {
  background: var(--input);
}

.order-item.is-wrong .pos {
  background: var(--output);
}

.pick-list {
  display: grid;
  gap: 8px;
}

.pick {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: var(--white);
  text-align: left;
  font-size: 15px;
  line-height: 1.55;
  transition: background-color 0.2s, border-color 0.2s;
}

.pick .box {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 6px;
  border: 1.5px solid var(--line-2);
  font: 650 11px/1 "Google Sans", system-ui, sans-serif;
}

.pick[aria-pressed="true"] {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.pick[aria-pressed="true"] .box {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.pick.is-best {
  background: var(--input-tint);
}

.grade {
  margin-top: 16px;
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--warm);
  animation: rise 0.45s var(--ease-out) both;
}

.grade-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.grade-score {
  font: 700 1.6rem/1 "Google Sans", system-ui, sans-serif;
  letter-spacing: -0.02em;
}

.grade-score small {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.grade h5 {
  margin: 12px 0 4px;
  font-size: 14px;
  color: var(--muted);
}

.grade .better {
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--white);
  font-size: 15px;
}

.grade .hint-line {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.ref {
  margin-top: 12px;
}

.ref summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.ref .ref-body {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--warm);
  font-size: 15px;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}

.quiz-q + .quiz-q {
  margin-top: 4px;
}

.takeaway {
  position: relative;
  padding: 30px 22px 28px;
  border-radius: var(--r-xl);
  background: var(--warm);
  color: var(--ink);
}

@media (min-width: 720px) {
  .takeaway {
    padding: 44px 48px 40px;
  }
}

.takeaway p {
  font-size: clamp(1.35rem, 5.2vw, 2.1rem);
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.takeaway .btn-row {
  margin-top: 24px;
}

.done-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--input-ink);
  font-size: 15px;
}

.takeaway .done-note {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
}

/* capstone */
.canvas-form {
  display: grid;
  gap: 16px;
}

.cq {
  display: grid;
  gap: 8px;
}

.cq label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 650;
  line-height: 1.5;
}

.cq label .dot {
  margin-top: 0.55em;
}

/* ------------------------------------------------------------------ canvas page */
.canvas-head {
  padding-top: clamp(36px, 8vw, 72px);
  padding-bottom: 24px;
}

.canvas-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.sheet-wrap {
  padding: 8px 0 72px;
}

.sheet {
  max-width: 860px;
  margin-inline: auto;
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-3);
  border: 1px solid rgba(32, 33, 36, 0.06);
  padding: 22px 18px;
}

@media (min-width: 720px) {
  .sheet {
    padding: 44px 48px;
  }
}

.sheet-head {
  display: grid;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid var(--ink);
}

.sheet-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sheet-title h1,
.sheet-title h2 {
  font-size: clamp(1.3rem, 4.6vw, 1.85rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sheet-brand-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.print-brand-url {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.sheet-mark {
  width: 64px;
  height: 14px;
  flex: none;
}

.sheet-sub {
  font-size: 14px;
  color: var(--muted);
}

.sheet-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 720px) {
  .sheet-meta {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.meta-field {
  display: grid;
  gap: 2px;
}

.meta-field span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.meta-field input {
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  padding: 6px 0;
  font-size: 15px;
  background: transparent;
  width: 100%;
}

.meta-field input:focus {
  outline: none;
  border-bottom-color: var(--value);
}

.cv-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.cv-box {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
}

.cv-q {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 650;
  font-size: 15.5px;
  line-height: 1.5;
}

.cv-q .qn {
  font: 700 15px/1.5 "Google Sans", system-ui, sans-serif;
  min-width: 1.1em;
}

.cv-q .dot {
  margin-top: 0.5em;
}

.cv-q .tagline {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.cv-hint {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.cv-area {
  width: 100%;
  min-height: 92px;
  border: 0;
  border-radius: 8px;
  background: var(--warm);
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.65;
  resize: vertical;
}

.cv-area:focus {
  outline: none;
  box-shadow: inset 0 0 0 1.5px var(--value);
  background: var(--white);
}

.cv-fill {
  display: none;
  white-space: pre-wrap;
  font-size: 10.5pt;
  line-height: 1.5;
}

.cv-tradeoff {
  display: grid;
  gap: 12px;
}

.cv-tradeoff .cols {
  display: grid;
  gap: 12px;
}

@media (min-width: 720px) {
  .cv-tradeoff .cols {
    grid-template-columns: 1fr 1fr;
  }
}

.cv-col-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-2);
  margin-bottom: 4px;
}

.sheet-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

/* ------------------------------------------------------------------ misc */
.notfound {
  padding: 120px 0;
  text-align: left;
}

.reveal {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  }

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

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

/* ------------------------------------------------------------------ print (canvas) */
@page {
  size: A4;
  margin: 10mm 12mm;
}

@media print {
  :root {
    --shadow-1: none;
    --shadow-2: none;
    --shadow-3: none;
  }

  html,
  body {
    background: #fff !important;
    font-size: 10.5pt;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .topbar,
  .footer,
  .no-print,
  .skip,
  .toast {
    display: none !important;
  }

  .canvas-head {
    display: none;
  }

  .sheet-wrap {
    padding: 0;
  }

  .sheet-wrap .container {
    padding: 0;
    max-width: none;
  }

  .sheet {
    max-width: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  .sheet-head {
    gap: 4px;
    padding-bottom: 3mm;
  }

  .sheet-title h1,
  .sheet-title h2 {
    font-size: 16pt;
  }

  .print-brand-url {
    font-size: 8.5pt;
  }

  .sheet-sub {
    font-size: 9pt;
  }

  .sheet-meta {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4mm;
  }

  .meta-field input {
    display: none;
  }

  .meta-field .cv-fill {
    display: block;
    min-height: 6mm;
    border-bottom: 0.6pt solid #9aa0a6;
    font-size: 10pt;
  }

  .cv-grid {
    gap: 2.6mm;
    margin-top: 3mm;
  }

  .cv-box {
    height: 37mm;
    padding: 2.2mm 3mm;
    border: 0.7pt solid #9aa0a6;
    border-radius: 2.5mm;
    break-inside: avoid;
    overflow: hidden;
    gap: 0.6mm;
  }

  .cv-box.cv-tradeoff {
    height: 34mm;
  }

  .cv-q {
    font-size: 10.5pt;
  }

  .cv-q .qn {
    font-size: 10.5pt;
  }

  .cv-hint {
    font-size: 8pt;
  }

  .cv-area {
    display: none;
  }

  .cv-fill {
    display: block;
    overflow: hidden;
  }

  body.print-blank .cv-fill {
    visibility: hidden;
  }

  .cv-tradeoff .cols {
    grid-template-columns: 1fr 1fr;
    gap: 4mm;
  }

  .sheet-foot {
    margin-top: 2.5mm;
    font-size: 7.5pt;
  }
}

.ex-score .btn-row {
  margin-left: auto;
  gap: 8px;
}
