/* =========================================================
   The Prompt Pack — Vertical Institute
   Mobile-first. One accent. Nothing decorative that costs a
   participant a scroll.
   ========================================================= */

:root {
  --blue: #0055FF;
  --blue-deep: #002A80;
  --blue-mid: #0047D4;
  --blue-25: #EDF5FF;
  --blue-50: #D0E2FF;
  --pink: #F4CCCC;
  --pink-deep: #B3453F;
  --ink: #232323;
  --charcoal: #454545;
  --muted: #767676;
  --line: #DFE8F7;
  --paper: #FBFCFE;
  --white: #fff;

  --display: 'Space Grotesk', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Menlo', 'Consolas', monospace;

  --radius: 16px;
  --pad: 20px;
  --maxw: 760px;
}

* { box-sizing: border-box; }

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

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

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: var(--blue);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 252, 254, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand__mark { display: flex; }

.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand__text strong {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--blue-deep);
  line-height: 1.2;
}

.brand__text small {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-btn {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--blue-deep);
  background: var(--blue-25);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}
.menu-btn:active { background: var(--blue-50); }
.menu-btn__icon { display: block; }

.menu-btn .bar {
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .2s ease, opacity .16s ease;
}
.menu-btn[aria-expanded="true"] .bar--top { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bar--mid { opacity: 0; }
.menu-btn[aria-expanded="true"] .bar--bot { transform: translateY(-6px) rotate(-45deg); }

/* the drawer is locked behind the toggle so the page never scrolls under it */
html.nav-open,
html.nav-open body { overflow: hidden; }

.nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 10px var(--pad) 18px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(0, 42, 128, 0.14);
  max-height: calc(100vh - 66px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav.is-open { display: flex; animation: drawer-in .18s ease-out; }

@keyframes drawer-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* dims the page behind the drawer; tapping it closes the menu */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(12, 27, 58, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.scrim.is-on {
  opacity: 1;
  pointer-events: auto;
}

.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 0 14px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-radius: 12px;
  background: transparent;
  border: 0;
  white-space: nowrap;
}
.nav a::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-right: 2px solid #B9CFF2;
  border-bottom: 2px solid #B9CFF2;
  transform: rotate(-45deg);
}
.nav a:active { background: var(--blue-25); }

@media (min-width: 860px) {
  .menu-btn { display: none; }
  /* the header runs wider than the reading column so all ten sections
     fit on one line without a hidden scrollbar */
  .topbar__inner,
  .nav {
    max-width: 1000px;
  }
  .nav {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 4px 6px;
    margin: 0 auto;
    padding: 0 var(--pad) 10px;
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
    max-height: none;
    overflow: visible;
  }
  .nav a {
    min-height: 0;
    padding: 6px 10px;
    font-size: 13px;
    color: var(--charcoal);
    border-radius: 999px;
  }
  .nav a::after { content: none; }
  .nav a:hover { background: var(--blue-25); }
  .topbar__inner { padding-bottom: 6px; }
}

/* ---------- hero ---------- */

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px var(--pad) 24px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 10px;
}
.eyebrow--light { color: var(--blue-50); }

.hero h1 {
  font-family: var(--display);
  font-size: 44px;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--blue);
  margin: 0 0 14px;
}

.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--charcoal);
  margin: 0 0 24px;
  max-width: 34em;
}

.hero__chips {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0;
  margin: 0;
}
.hero__chips li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--charcoal);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.hero__chips span {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-25);
  border-radius: 6px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: none;
}

/* ---------- sections ---------- */

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px var(--pad);
  border-top: 1px solid var(--line);
  /* clears the sticky header (65px on phones) plus a little air */
  scroll-margin-top: 76px;
}

.section__head { margin-bottom: 22px; }

.section h2 {
  font-family: var(--display);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--blue-deep);
  margin: 0 0 10px;
}

.section__sub {
  font-size: 16px;
  color: var(--charcoal);
  margin: 0;
  max-width: 36em;
}

/* Full-bleed colour bands. The horizontal inset lives on the SECTION, not on
   its children — a child that sets its own padding (a list, for example)
   would otherwise cancel the inset and bleed off the phone edge. */
.section--blue,
.section--tint,
.section--ink {
  max-width: none;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.section--blue > *,
.section--tint > *,
.section--ink > * {
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
}

.section--blue { background: var(--blue); border-top: 0; }
.section--blue h2 { color: #fff; }

.section--tint { background: var(--white); }

.section--ink { background: #0C1B3A; border-top: 0; }
.section--ink h2 { color: #fff; }

.on-blue { color: #fff; }

/* ---------- steps ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0 0 22px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 14px 0 14px 44px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  color: var(--charcoal);
}
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 14px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--blue-25);
  color: var(--blue);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.steps strong { color: var(--ink); }

.rule {
  background: var(--pink);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0;
}
.rule__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 6px;
}
.rule p:last-child {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.5;
  color: #3B2626;
}

/* ---------- prompt blocks ---------- */

.prompt {
  position: relative;
  display: block;
  background: var(--blue-25);
  border-radius: 14px;
  padding: 16px 18px 58px;
  margin: 0 0 4px;
  border: 1px solid #DCEAFB;
}

.prompt__text {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
  color: #12244A;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.copy {
  position: absolute;
  right: 12px;
  bottom: 12px;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  height: 40px;
  min-width: 84px;
  cursor: pointer;
  transition: background .16s ease, transform .12s ease;
}
.copy:hover { background: var(--blue-mid); }
.copy:active { transform: scale(0.97); }
.copy.is-done { background: #0B7A4B; }
.copy.is-fail { background: var(--pink-deep); }

.copy:focus-visible,
.menu-btn:focus-visible,
.nav a:focus-visible,
.score__chips button:focus-visible,
.score__reset:focus-visible {
  outline: 3px solid #FFB800;
  outline-offset: 2px;
}

.prompt--onblue {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}
.prompt--onblue .prompt__text { color: #fff; }
.prompt--onblue .copy { background: #fff; color: var(--blue); }
.prompt--onblue .copy.is-done { background: #0B7A4B; color: #fff; }

/* ---------- blanks ---------- */

.blanks {
  margin: 18px 0 0;
  display: grid;
  gap: 2px;
}
.blanks > div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.blanks > div:last-child { border-bottom: 0; }
.blanks dt {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
}
.blanks dd {
  margin: 0;
  font-size: 15.5px;
  color: var(--charcoal);
  line-height: 1.5;
}

/* ---------- cards ---------- */

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 0 0 16px;
}
.card--tight { padding: 18px 20px; }

.card__tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}

.card h3 {
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 14px;
}

.lookfor {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--charcoal);
  margin: 10px 0 0;
}
.lookfor strong { color: var(--blue-deep); }
.lookfor--light { color: #D8E5FF; }
.lookfor--light strong { color: #fff; }

/* ---------- moves ---------- */

.move {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  padding: 20px;
  margin: 0 0 16px;
}
.move__num {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--blue-50);
  margin: 0 0 8px;
}
.move h3 {
  font-family: var(--display);
  font-size: 22px;
  color: #fff;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.move > p {
  color: #DCE8FF;
  font-size: 15.5px;
  line-height: 1.55;
  margin: 0 0 14px;
}

/* ---------- ladder ---------- */

.ladder {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.ladder li {
  position: relative;
  padding: 0 0 22px 0;
}
.ladder li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 34px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.ladder__num {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-25);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin: 0 0 10px;
  position: relative;
  z-index: 1;
}
.ladder__note {
  font-size: 14px;
  color: var(--muted);
  margin: 8px 0 0;
  line-height: 1.5;
}
.ladder__note--key { color: var(--blue); font-weight: 500; }
.ladder .is-key .ladder__num { background: var(--blue); color: #fff; }
.ladder .is-key .prompt { border-color: var(--blue-50); background: #E6F0FF; }

.afterword {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 16px;
  line-height: 1.5;
  margin: 6px 0 0;
}

/* ---------- scorecard ---------- */

.score {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.score__row {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.score__label h3 {
  font-family: var(--display);
  font-size: 17px;
  margin: 0 0 2px;
  color: var(--ink);
}
.score__label p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.score__chips {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.score__chips button {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-deep);
  background: var(--blue-25);
  border: 1px solid transparent;
  border-radius: 10px;
  height: 46px;
  cursor: pointer;
  transition: background .12s ease, color .12s ease, transform .1s ease;
}
.score__chips button:active { transform: scale(0.96); }
.score__chips button[aria-pressed="true"] {
  background: var(--blue);
  color: #fff;
}

.score__total {
  padding: 20px 18px;
  background: var(--blue-25);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "figure verdict" "reset reset";
  gap: 6px 16px;
  align-items: center;
  transition: background .2s ease;
}

.score__figure {
  grid-area: figure;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1;
  color: var(--blue);
  display: flex;
  align-items: baseline;
  gap: 4px;
}
#scoreNum { font-size: 44px; letter-spacing: -0.03em; }
.score__of { font-size: 16px; color: var(--muted); }

.score__verdict {
  grid-area: verdict;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--charcoal);
}

.score__reset {
  grid-area: reset;
  justify-self: start;
  margin-top: 8px;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  background: transparent;
  border: 1px solid var(--blue-50);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  display: none;
}
.score__reset.is-shown { display: inline-block; }

.score__total[data-state="fail"] { background: var(--pink); }
.score__total[data-state="fail"] #scoreNum { color: var(--pink-deep); }
.score__total[data-state="fail"] .score__verdict { color: #4A2A28; }
.score__total[data-state="pass"] { background: #DDF3E7; }
.score__total[data-state="pass"] #scoreNum { color: #0B7A4B; }
.score__total[data-state="pass"] .score__verdict { color: #14432F; }

/* ---------- failures ---------- */

.failures {
  display: grid;
  gap: 14px;
  counter-reset: none;
}
.failures article {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 0 14px 14px 0;
  padding: 16px 18px;
}
.failures h3 {
  font-family: var(--display);
  font-size: 17px;
  margin: 0 0 8px;
  color: var(--blue-deep);
  display: flex;
  align-items: center;
  gap: 8px;
}
.failures h3 span {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--blue);
  background: var(--blue-25);
  border-radius: 5px;
  padding: 3px 6px;
}
.failures__what {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.5;
}
.failures__why {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- limits ---------- */

.limits {
  list-style: none;
  padding: 0;
  margin: 0;
}
.limits li {
  padding: 14px 0 14px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  font-size: 15.5px;
  line-height: 1.55;
  color: #D6E2F8;
}
.limits li:last-child { border-bottom: 0; }
.limits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--blue-50);
}
.limits strong { color: #fff; }

/* ---------- next ---------- */

.next {
  display: grid;
  gap: 12px;
  margin-bottom: 26px;
}
.next article {
  background: var(--blue-25);
  border-radius: 14px;
  padding: 16px 18px;
}
.next h3 {
  font-family: var(--display);
  font-size: 16px;
  margin: 0 0 6px;
  color: var(--blue-deep);
}
.next p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--charcoal);
}

.courses {
  border-top: 2px solid var(--blue);
  padding-top: 18px;
}
.courses__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.courses p {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--ink);
}
.courses span {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.courses__note {
  font-size: 13px !important;
  color: var(--muted) !important;
  margin-top: 14px !important;
}

/* ---------- footer ---------- */

.footer {
  background: var(--blue-deep);
  color: #fff;
  padding: 36px var(--pad) 44px;
  text-align: left;
}
.footer > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }

.footer__rule {
  font-family: var(--display);
  font-size: 19px;
  line-height: 1.35;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.footer__meta {
  font-size: 12.5px;
  color: #B9CCEB;
  margin: 0 0 6px;
  line-height: 1.5;
}
.footer__meta--dim { color: #7E96BC; margin-bottom: 0; }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 80;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.is-shown {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- wider screens ---------- */

@media (min-width: 860px) {
  body { font-size: 17px; }
  .hero { padding-top: 64px; }
  .hero h1 { font-size: 62px; }
  .lede { font-size: 20px; }
  .hero__chips { grid-template-columns: repeat(4, 1fr); }
  .section { padding: 64px var(--pad); scroll-margin-top: 106px; }
  .section h2 { font-size: 38px; }

  .prompt { padding: 20px 22px; }
  .copy {
    position: static;
    display: block;
    margin-top: 14px;
    width: max-content;
  }
  .prompt { padding-bottom: 20px; }

  .blanks > div { grid-template-columns: 120px 1fr; }

  .failures { grid-template-columns: 1fr 1fr; }
  .next { grid-template-columns: 1fr 1fr; }

  .score__row {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: center;
    padding: 18px 22px;
  }
  .score__label p { margin-bottom: 0; }
  .score__total { padding: 22px; grid-template-areas: "figure verdict" "reset reset"; }
  #scoreNum { font-size: 54px; }

  .card { padding: 24px; }
}

/* ---------- full-bleed band alignment ----------
   Components further up this file set a `margin` shorthand (.card, .move,
   .afterword, .limits). A shorthand also resets margin-left/right, which
   silently cancelled the auto-centring on children of the colour bands and
   left them hugging the left edge while their headings stayed centred.
   Restated last so it wins the cascade without !important. */
.section--blue > *,
.section--tint > *,
.section--ink > * {
  margin-left: auto;
  margin-right: auto;
}
