/* Kvanta Prep page chrome and content blocks (server-rendered by prepPages.js).
   Monochrome "Terminal Pure": no hue anywhere. Meaning is never carried by colour alone. */

.kpp-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 var(--gutter, 20px) 64px;
  color: var(--ink);
  font-family: var(--font-body, system-ui, sans-serif);
  line-height: 1.6;
}
.kpp-wrap *, .kpp-wrap *::before, .kpp-wrap *::after { box-sizing: border-box; }
.kpp-wrap p, .kpp-wrap li, .kpp-wrap summary, .kpp-wrap td, .kpp-wrap th { font-family: var(--font-body, system-ui, sans-serif); }
.kpp-wrap .kpp-meta, .kpp-wrap .kpp-know__src, .kpp-wrap .kpp-badge__t, .kpp-wrap .kpp-pre, .kpp-wrap thead th { font-family: var(--font-mono, monospace); }
.kpp-wrap a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.kpp-wrap a:hover { text-decoration-thickness: 2px; }
.kpp-wrap a:focus-visible,
.kpp-wrap button:focus-visible,
.kpp-wrap summary:focus-visible,
.kpp-wrap pre:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* sub navigation */
.kpp-subnav { margin: 20px 0 8px; border-bottom: 1px solid var(--ru); overflow-x: auto; }
.kpp-subnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; white-space: nowrap; }
.kpp-subnav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-family: var(--font-mono, monospace); font-size: 12px; text-decoration: none; color: var(--ink2);
  border-bottom: 2px solid transparent;
}
.kpp-subnav a:hover { color: var(--ink); }
.kpp-subnav a.is-active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 700; }

/* breadcrumbs */
.kpp-crumbs { margin: 14px 0 0; font-size: 13px; }
.kpp-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; color: var(--ink2); }
.kpp-crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--mute); }
.kpp-crumbs a { color: var(--ink2); }

/* headings */
.kpp-head { padding: 24px 0 8px; }
.kpp-kicker { font-family: var(--font-mono, monospace); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); margin: 0 0 8px; }
.kpp-head h1 { font-family: var(--font-display, sans-serif); font-size: clamp(30px, 6vw, 46px); line-height: 1.1; margin: 0 0 12px; letter-spacing: -0.01em; }
.kpp-tagline { font-size: clamp(16px, 2.2vw, 19px); color: var(--ink2); margin: 0 0 8px; max-width: 62ch; }
.kpp-meta { font-size: 13px; color: var(--ink2); }
.kpp-sec { margin: 40px 0 0; }
.kpp-sec h2 { font-family: var(--font-display, sans-serif); font-size: clamp(22px, 3.4vw, 28px); line-height: 1.2; margin: 0 0 14px; }
.kpp-sec h3 { font-family: var(--font-display, sans-serif); font-size: 17px; margin: 18px 0 8px; }
.kpp-sec p { margin: 0 0 14px; max-width: 70ch; }
.kpp-intro p { font-size: 17px; }
.kpp-lead { color: var(--ink2); }
.kpp-aside { font-size: 14px; color: var(--ink2); }
.kpp-bullets { padding-left: 20px; margin: 0 0 14px; max-width: 70ch; }
.kpp-bullets li { margin-bottom: 6px; }

/* notes and callouts: inverted rule, not colour */
.kpp-note { border: 1px solid var(--ru2); border-left: 4px solid var(--ink); background: var(--pa2); padding: 14px 16px; margin: 28px 0 0; border-radius: var(--radius-sm, 4px); }
.kpp-note p { margin: 0; font-size: 15px; max-width: 70ch; }
.kpp-note + .kpp-note { margin-top: 12px; }
.kpp-callout { border: 1px solid var(--ink); padding: 14px 16px; border-radius: var(--radius-sm, 4px); }
.kpp-callout p { margin: 8px 0 0; }
.kpp-disclaimer { margin: 36px 0 0; font-size: 13px; color: var(--ink2); border-top: 1px solid var(--ru); padding-top: 12px; }
.kpp-integrity { margin-top: 20px; }

/* cards */
.kpp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.kpp-cards--small { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.kpp-wrap a.kpp-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px; min-height: 44px;
  border: 1px solid var(--ru2); border-radius: var(--radius-md, 6px); background: var(--card);
  text-decoration: none; color: var(--ink);
}
.kpp-wrap a.kpp-card:hover { border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.kpp-card__t { font-family: var(--font-display, sans-serif); font-weight: 600; font-size: 16px; }
.kpp-card__d { font-size: 14px; color: var(--ink2); }
.kpp-tag { align-self: flex-start; margin-top: auto; font-family: var(--font-mono, monospace); font-size: 11px; border: 1px solid var(--ink2); padding: 1px 6px; border-radius: 2px; }
.kpp-tag--soon { border-style: dashed; color: var(--ink2); }

/* chips and link lists */
.kpp-chips { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kpp-chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--ru2); border-radius: 999px; text-decoration: none; }
.kpp-chips a:hover { border-color: var(--ink); }
.kpp-linklist { list-style: none; margin: 0 0 14px; padding: 0; }
.kpp-linklist li { padding: 10px 0; border-bottom: 1px solid var(--ru); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* badges: letter in a box plus the label in words */
.kpp-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1; vertical-align: middle; white-space: nowrap; }
.kpp-badge__k { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 1px solid var(--ink); font-family: var(--font-mono, monospace); font-weight: 700; font-size: 11px; border-radius: 2px; }
.kpp-badge[data-c="V"] .kpp-badge__k, .kpp-badge[data-c="O"] .kpp-badge__k { background: var(--ink); color: var(--pa); }
.kpp-badge[data-c="A"] .kpp-badge__k, .kpp-badge[data-c="N"] .kpp-badge__k { background: var(--pa); color: var(--ink); border-width: 2px; }
.kpp-badge[data-c="C"] .kpp-badge__k, .kpp-badge[data-c="T"] .kpp-badge__k { background: var(--pa); color: var(--ink2); border-style: dashed; border-color: var(--ink2); }
.kpp-badge__t { color: var(--ink2); }
.kpp-legend { margin: 0 0 16px; border: 1px solid var(--ru2); border-radius: var(--radius-sm, 4px); padding: 4px 14px; }
.kpp-legend summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-size: 14px; font-weight: 600; }
.kpp-legend ul { list-style: none; padding: 0 0 8px; margin: 0; }
.kpp-legend li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 6px 0; font-size: 14px; }

/* what we know */
.kpp-know { list-style: none; margin: 0 0 14px; padding: 0; }
.kpp-know li { padding: 14px 0; border-top: 1px solid var(--ru); }
.kpp-know li:last-child { border-bottom: 1px solid var(--ru); }
.kpp-know__claim { margin: 8px 0 4px; }
.kpp-know__src { margin: 0; font-size: 13px; color: var(--ink2); }
.kpp-presetsrc { margin-top: 24px; }

/* FAQ */
.kpp-faq { border-top: 1px solid var(--ru); }
.kpp-faq:last-of-type { border-bottom: 1px solid var(--ru); }
.kpp-faq summary { cursor: pointer; min-height: 44px; padding: 12px 28px 12px 0; font-weight: 600; list-style: none; position: relative; }
.kpp-faq summary::-webkit-details-marker { display: none; }
.kpp-faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-family: var(--font-mono, monospace); font-size: 20px; }
.kpp-faq[open] summary::after { content: "-"; }
.kpp-faq p { margin: 0 0 14px; max-width: 70ch; }

/* practice area */
.kpp-practice { scroll-margin-top: 16px; }
.kpp-mount { margin-top: 12px; min-height: 120px; }
.kpp-formats ul { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.kpp-format { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--ru2); border-radius: var(--radius-sm, 4px); min-height: 44px; }
.kpp-format span { font-size: 13px; color: var(--ink2); }
.kpp-wrap a.kpp-format { text-decoration: none; }
.kpp-wrap a.kpp-format:hover { border-color: var(--ink); }
.kpp-format.is-on { border: 2px solid var(--ink); }
.kpp-format.is-on strong::after { content: " (selected)"; font-weight: 400; font-size: 13px; }
.kpp-soon { border: 2px dashed var(--ink2); padding: 20px; border-radius: var(--radius-sm, 4px); }
.kpp-soon h3 { margin: 0 0 6px; }
.kpp-soon p { margin: 0; }

/* firm stages */
.kpp-stages { list-style: none; margin: 16px 0 0; padding: 0; counter-reset: none; }
.kpp-stage { border: 1px solid var(--ru2); border-radius: var(--radius-md, 6px); padding: 16px; margin-bottom: 12px; background: var(--card); }
.kpp-stage__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.kpp-stage__head h3 { margin: 0; flex: 1 1 200px; }
.kpp-stage__n { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 2px solid var(--ink); border-radius: 50%; font-family: var(--font-mono, monospace); font-weight: 700; font-size: 13px; flex: none; }
.kpp-stage p { margin: 10px 0 0; max-width: 70ch; }
.kpp-stage__vendor { font-size: 14px; color: var(--ink2); }
.kpp-stage__practice { font-size: 14px; }
.kpp-stage__refs { font-size: 13px; color: var(--ink2); }
.kpp-sources { padding-left: 22px; }
.kpp-sources li { margin-bottom: 10px; scroll-margin-top: 16px; overflow-wrap: anywhere; }
.kpp-sources li:target { outline: 2px solid var(--ink); outline-offset: 4px; }

/* tables */
.kpp-tablewrap { overflow-x: auto; border: 1px solid var(--ru2); border-radius: var(--radius-sm, 4px); }
.kpp-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.kpp-table th, .kpp-table td { text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid var(--ru); }
.kpp-table thead th { font-family: var(--font-mono, monospace); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); border-bottom: 2px solid var(--ink); }
.kpp-table tbody tr:last-child th, .kpp-table tbody tr:last-child td { border-bottom: 0; }

/* templates */
.kpp-template { margin: 18px 0; }
.kpp-pre { white-space: pre-wrap; word-wrap: break-word; font-family: var(--font-mono, monospace); font-size: 13px; line-height: 1.55; border: 1px solid var(--ru2); background: var(--pa2); padding: 14px; border-radius: var(--radius-sm, 4px); margin: 0 0 10px; }
.kpp-btn { min-height: 44px; padding: 0 18px; border: 1px solid var(--ink); background: var(--ink); color: var(--pa); font-family: var(--font-mono, monospace); font-size: 13px; border-radius: var(--radius-sm, 4px); cursor: pointer; }
.kpp-btn:hover { background: var(--pa); color: var(--ink); }
.kpp-copied { font-size: 13px; color: var(--ink2); margin-left: 8px; }

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

@media (max-width: 600px) {
  .kpp-wrap { padding-bottom: 40px; }
  .kpp-cards, .kpp-cards--small { grid-template-columns: 1fr; }
  .kpp-sec { margin-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .kpp-wrap a.kpp-card:hover { box-shadow: none; }
  .kpp-wrap * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------------------ D1 (pilot: numerical reasoning)
   Question first, stacked. Used only when prepPages.js renders the D1 layout (PREP_PAGE_DESIGN=d1).
   The answer reveal is native radio inputs plus :has(): no script. Option feedback is text, not colour. */
.d1 { max-width: 820px; }
.d1-head { padding: 20px 0 0; }
.d1-head .kpp-kicker { margin: 0 0 6px; }
.d1-head h1 { font-family: var(--font-display, sans-serif); font-size: 32px; line-height: 1.15; margin: 0 0 8px; letter-spacing: -0.01em; }
.d1-tag { font-size: 17px; color: var(--ink2); margin: 0 0 24px; max-width: 62ch; }

.d1-q { border: 2px solid var(--ink); padding: 22px; background: var(--card); }
.d1-q__k { font-family: var(--font-mono, monospace); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); margin: 0 0 10px; }
.d1-tablewrap { overflow-x: auto; margin: 0 0 16px; }
.d1-table { border-collapse: collapse; width: 100%; font-size: 15px; }
.d1-table th, .d1-table td { border: 1px solid var(--ink); padding: 8px 10px; text-align: right; font-weight: 400; }
.d1-table thead th { font-weight: 700; background: var(--pa2); font-family: var(--font-mono, monospace); font-size: 13px; }
.d1-table th:first-child, .d1-table td:first-child { text-align: left; }
.d1-table tbody th { font-weight: 600; }
.d1-stem { font-size: 18px; font-weight: 600; margin: 0 0 14px; max-width: none; }

.d1-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.d1-opt { position: relative; min-height: 56px; border: 1px solid var(--ink); display: flex; flex-direction: column; justify-content: center; padding: 8px 14px; cursor: pointer; font-size: 17px; background: var(--card); }
.d1-opt input { position: absolute; opacity: 0; pointer-events: none; }
.d1-opt:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.d1-opt:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
.d1-fb { display: none; font-family: var(--font-mono, monospace); font-size: 13px; margin-top: 2px; }
.d1-opt:has(input:checked) { background: var(--ink); color: var(--pa); }
.d1-opt:has(input:checked) .d1-fb--pick { display: block; }
/* once any option is chosen, the right one says so in words, even if it was not the one picked */
.d1-q:has(input:checked) .d1-opt--key:not(:has(input:checked)) { box-shadow: inset 0 0 0 2px var(--ink); }
.d1-q:has(input:checked) .d1-opt--key:not(:has(input:checked)) .d1-fb--key { display: block; }

.d1-expl { display: none; border-top: 1px solid var(--ink); margin: 18px 0 0; padding-top: 14px; font-size: 15px; }
.d1-expl p { margin: 0 0 10px; max-width: 70ch; }
.d1-expl p:last-child { margin-bottom: 0; }
.d1-q:has(input:checked) .d1-expl { display: block; }

.kpp-wrap a.d1-next { display: flex; align-items: center; justify-content: center; min-height: 54px; margin: 26px 0 0; background: var(--ink); color: var(--pa); text-decoration: none; font-weight: 700; font-size: 17px; padding: 0 16px; text-align: center; border: 1px solid var(--ink); }
.kpp-wrap a.d1-next:hover { background: var(--pa); color: var(--ink); }
.d1-tp { font-size: 14px; color: var(--ink2); margin: 10px 0 0; text-align: center; }

/* the test itself stays in the page but is shown only when the button (#start), an old #practice link or a ?format= link is used */
.d1-start { display: none; margin: 32px 0 0; scroll-margin-top: 16px; }
.d1-start.is-open, .d1-start:target, .d1-start:has(:target) { display: block; }
.d1-start h2 { font-family: var(--font-display, sans-serif); font-size: clamp(22px, 3.4vw, 28px); line-height: 1.2; margin: 0 0 14px; }
.d1-start h3 { font-family: var(--font-display, sans-serif); font-size: 17px; margin: 18px 0 8px; }
.d1-start .kpp-mount { margin-top: 12px; min-height: 120px; }

.d1-sec { border-top: 1px solid var(--ru2); margin-top: 0; }
.d1-sec:first-of-type { margin-top: 26px; }
.d1-sec:last-of-type { border-bottom: 1px solid var(--ru2); }
.d1-sec summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; padding: 4px 0; }
.d1-sec summary::-webkit-details-marker { display: none; }
.d1-sec summary::after { content: "+"; font-family: var(--font-mono, monospace); font-size: 20px; flex: none; }
.d1-sec[open] > summary::after { content: "-"; }
.d1-sec summary h2 { margin: 0; font-family: var(--font-body, system-ui, sans-serif); font-size: 15px; font-weight: 600; line-height: 1.3; }
.d1-sec__body { padding: 4px 0 18px; }
.d1-sec__body > p { margin: 0 0 14px; max-width: 70ch; font-size: 15px; }
.d1-sec__body .kpp-legend { margin-top: 10px; }
.d1-sec__body .kpp-faq:first-child { border-top: 0; }
.d1-sec__body .kpp-faq:last-of-type { border-bottom: 0; }
.d1-summary { margin: 0 0 10px; }
.d1-methods { margin: 14px 0 0; }

.d1-disc { font-size: 13px; color: var(--ink2); margin: 22px 0 0; }
.d1-honest { font-size: 13px; color: var(--ink2); margin: 10px 0 0; max-width: 70ch; }

@media (max-width: 560px) {
  .d1-head h1 { font-size: 26px; }
  .d1-opts { grid-template-columns: 1fr; }
  .d1-q { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .d1-opt:hover { box-shadow: none; } }
.d1-sec .kpp-linklist a, .d1-sec .kpp-aside a, .d1-methods a { display: inline-flex; align-items: center; min-height: 44px; }
.d1-sec__body > p a { display: inline-flex; align-items: center; min-height: 44px; }
.d1-table th, .d1-table td { text-transform: none; letter-spacing: 0; font-family: var(--font-body, system-ui, sans-serif); }
.d1-table thead th { font-size: 13px; }
@media (max-width: 560px) {
  .d1-head { padding-top: 8px; }
  .d1-head .kpp-kicker { display: none; }
  .d1-tag { font-size: 15px; margin-bottom: 14px; }
  .d1-q { padding: 14px; }
  .d1-q__k { margin-bottom: 8px; }
  .d1-table { font-size: 14px; }
  .d1-table th, .d1-table td { padding: 5px 8px; }
  .d1-tablewrap { margin-bottom: 12px; }
  .d1-stem { font-size: 17px; margin-bottom: 10px; }
  .d1-opt { min-height: 48px; padding: 6px 12px; }
  .d1-opts { gap: 8px; }
}
.d1-table { margin: 0; }
@media (max-width: 560px) {
  .d1-table th, .d1-table td { padding: 5px 6px; }
  .d1-table th:first-child, .d1-table td:first-child { white-space: nowrap; }
  .d1-q__k { margin-bottom: 6px; }
}
.d1-sec .kpp-linklist a { min-width: 44px; justify-content: flex-start; }

/* ------------------------------------------------------------------ D1 hub (PREP_HUB_DESIGN=d1)
   Test first: daily question card, then tiles grouped by type. Everything else collapsed or on /prep/about.
   Reuses .d1, .d1-head, .d1-tag, .d1-sec, .d1-disc from the page D1 block above. */
.d1-daily { border: 2px solid var(--ink); background: var(--card); padding: 16px 20px; margin: 0 0 8px; }
.d1-daily h2 { font-family: var(--font-mono, monospace); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); margin: 0 0 6px; font-weight: 500; }
.d1-daily p { margin: 0; max-width: 70ch; font-size: 16px; }
.d1-daily a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.d1-start-row { margin: 28px 0 0; }
.d1-start-row h2 { font-family: var(--font-display, sans-serif); font-size: clamp(22px, 3.4vw, 28px); line-height: 1.2; margin: 0 0 6px; }
.d1-grp h3 { font-family: var(--font-mono, monospace); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); font-weight: 500; margin: 22px 0 8px; }
.d1-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.kpp-wrap a.d1-tile { display: flex; flex-direction: column; gap: 2px; min-height: 64px; padding: 10px 14px; border: 1px solid var(--ru2); background: var(--card); text-decoration: none; color: var(--ink); }
.kpp-wrap a.d1-tile:hover { border-color: var(--ink); }
.d1-tile__t { font-weight: 600; font-size: 15px; line-height: 1.3; }
.d1-tile__d { font-size: 13px; line-height: 1.4; color: var(--ink2); }
.d1-tile .kpp-tag { align-self: flex-start; margin-top: 2px; }
.d1-aboutlink { margin: 26px 0 0; font-size: 15px; }
.d1-aboutlink a { display: inline-flex; align-items: center; min-height: 44px; }
.d1-fair { margin: 8px 0 0; }
.d1-fair h2 { font-family: var(--font-display, sans-serif); font-size: 18px; line-height: 1.25; margin: 0 0 6px; }
.d1-fair .kpp-linklist { margin: 0 0 18px; }
.d1-fair .kpp-linklist a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.d1-sec__body .kpp-cards { margin-bottom: 4px; }
.d1-sec__body .kpp-chips { margin-bottom: 4px; }
.d1-sec__body > .kpp-lead { max-width: 70ch; }
.d1-sec__body .kpp-faq p { font-size: 15px; }
@media (max-width: 600px) {
  .d1-tiles { grid-template-columns: 1fr; }
  .d1-daily { padding: 12px 14px; }
  .d1-grp h3 { margin-top: 18px; }
}
/* /prep/about (PREP_HUB_DESIGN=d1): 44px targets for the in-page links */
.d1-about .kpp-crumbs a, .d1-about .kpp-crumbs span { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.d1-about .kpp-linklist a, .d1-about .kpp-integrity a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.d1-about .kpp-crumbs { margin-top: 4px; }

/* "Plan my prep" panel on the D1 hub (server-rendered entry; core/onboarding.js mounts the flow into [data-plan-mount]).
   Closed: a compact card like the daily card. Open (.is-open): the flow owns the space, so the card chrome is dropped. */
.d1-plan { border: 2px solid var(--ink); background: var(--card); padding: 16px 20px; margin: 0 0 8px; }
.d1-plan [hidden] { display: none; }
.d1-plan [data-plan-entry] h2 { font-family: var(--font-mono, monospace); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); margin: 0 0 6px; font-weight: 500; }
.d1-plan p { margin: 0 0 12px; max-width: 70ch; font-size: 16px; }
.kpp-wrap a.d1-plan__go { display: flex; align-items: center; justify-content: center; min-height: 48px; width: 100%; max-width: 320px; padding: 0 20px; background: var(--ink); color: var(--pa); border: 1px solid var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; cursor: pointer; }
.kpp-wrap a.d1-plan__go:hover { background: var(--pa); color: var(--ink); }
.kpp-wrap a.d1-plan__go:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.d1-plan .d1-plan__nojs { margin: 10px 0 0; font-size: 14px; color: var(--ink2); }
.d1-plan.is-open { border: 0; background: none; padding: 0; margin: 0 0 14px; }
.d1-plan .kpp-mount { margin-top: 0; min-height: 0; }
@media (max-width: 600px) {
  .d1-plan { padding: 12px 14px; }
  .kpp-wrap a.d1-plan__go { max-width: none; }
}

/* ------------------------------------------------------------------ D1 rollout (all test pages)
   Text questions (passage, clues, statement), the static "what you will do" / example-brief card, and the hub card block.
   Same rules as above: black and white, 44px targets, meaning in words, no script. */
.d1-lab { font-family: var(--font-mono, monospace); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); margin: 0 0 4px; }
.d1-pass { font-size: 16px; line-height: 1.55; margin: 0 0 14px; max-width: 70ch; padding: 10px 14px; border-left: 4px solid var(--ink); background: var(--pa2); }
.d1-lines { margin: 0 0 14px; padding-left: 22px; max-width: 70ch; font-size: 16px; }
.d1-lines li { margin: 0 0 4px; }
.d1-statement { font-size: 17px; font-weight: 600; margin: 0 0 12px; max-width: 70ch; padding: 8px 14px; border: 1px solid var(--ink); }
.d1-opts--stack { grid-template-columns: minmax(0, 1fr); }
.d1-opt__l { font-family: var(--font-mono, monospace); font-weight: 700; }

.d1-brief .d1-stem { font-weight: 500; font-size: 18px; max-width: 70ch; margin: 0 0 14px; }
.d1-excerpt { margin: 0 0 14px; padding: 10px 14px; border-left: 4px solid var(--ink); background: var(--pa2); max-width: 70ch; }
.d1-excerpt p { margin: 0 0 8px; font-size: 15px; }
.d1-excerpt p:last-child { margin-bottom: 0; }
.d1-excerpt .d1-lab { margin-bottom: 6px; font-size: 12px; }
.d1-excerpt .d1-meta { font-family: var(--font-mono, monospace); font-size: 13px; color: var(--ink2); }
.d1-brief .d1-q__k + .d1-facts { margin-top: 2px; }
.d1-scale { font-family: var(--font-mono, monospace); font-size: 13px; line-height: 1.5; color: var(--ink2); margin: 0 0 14px; max-width: 70ch; }
.d1-facts { margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--ink); }
.d1-facts > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 4px 14px; padding: 8px 0; border-bottom: 1px solid var(--ru2); }
.d1-facts dt { font-family: var(--font-mono, monospace); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); margin: 0; padding-top: 2px; }
.d1-facts dd { margin: 0; font-size: 15px; }
.d1-foot { font-size: 14px; color: var(--ink2); margin: 12px 0 0; max-width: 70ch; }

.d1-hubcards { margin: 8px 0 0; }
.d1-hubcards .kpp-sec { margin-top: 18px; }
@media (max-width: 560px) {
  .d1-pass { font-size: 14px; line-height: 1.5; padding: 6px 10px; margin-bottom: 10px; }
  .d1-lines, .d1-statement { font-size: 15px; }
  .d1-statement { margin-bottom: 10px; }
  .d1-brief .d1-stem { font-size: 16px; margin-bottom: 10px; }
  .d1-facts > div { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 6px 0; }
  .d1-facts dd { font-size: 14px; }
  .d1-excerpt { padding: 8px 12px; }
}
/* 44px targets for the in-page links on the converted pages (.d1--44 is emitted by the rollout code only). The breadcrumb links keep their place in the flow (negative margin). */
.kpp-wrap:has(> .d1--44) .kpp-crumbs a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; margin: -13px 0; }
.d1--44 .d1-honest a, .d1--44 .d1-disc a, .d1--44 .d1-start .kpp-aside a { display: inline-flex; align-items: center; min-height: 44px; }
.d1-table .d1-cap { caption-side: top; text-align: left; font-size: 13px; font-weight: 600; padding: 0 0 6px; }
.kpp-wrap:has(> .d1--44) .kpp-crumbs li:first-child a { margin-left: -7px; }

/* ------------------------------------------------------------------ Web front door (hub /prep, PREP_HUB_DESIGN=d1)
   The onboarding question is the first thing under the heading; it is mounted by core/onboarding.js into #kp-plan on load.
   Everything else on the old page (daily question box, every test card) sits in the collapsed "Browse all practice" details.
   /js/prep-front.js sets <html data-kp-front> before first paint. States of #kp-plan[data-front]:
     pending  : JavaScript is on, the flow is still loading. Reserve its space, show a short status, no flash of the fallback card.
     ready    : the flow is mounted (class is-open drops the card chrome). The space stays reserved so the page below starts under the fold.
     fallback : the flow could not load. The server-rendered card shows again and Browse all practice is opened.
   Without JavaScript none of the html[data-kp-front] rules apply: the card shows and the details is open. */
html[data-kp-front] .d1-front:not([data-front="fallback"]) { min-height: 480px; min-height: min(calc(100vh - 170px), 760px); min-height: min(calc(100svh - 170px), 760px); }
html[data-kp-front] .d1-front[data-front="pending"] { border: 0; background: none; padding: 0; margin: 0 0 14px; }
html[data-kp-front] .d1-front[data-front="pending"] [data-plan-entry] { display: none; }
html[data-kp-front] .d1-front[data-front="pending"]::before { content: "Loading..."; display: block; padding: 14px 0; font-family: var(--font-mono, monospace); font-size: 13px; color: var(--ink2); }
.d1-plan .d1-plan__fail { margin: 10px 0 0; font-size: 14px; color: var(--ink2); }
.d1-browse .d1-daily { margin: 0 0 8px; }
.d1-browse .d1-start-row { margin: 18px 0 0; }
.d1-browse .d1-start-row h2 { font-size: 20px; }
@media (max-width: 600px) {
  html[data-kp-front] .d1-front:not([data-front="fallback"]) { min-height: 440px; min-height: min(calc(100vh - 150px), 760px); min-height: min(calc(100svh - 150px), 760px); }
}

/* ============================= G8 SKIN (Oct 2026) =============================
   The Prep pages in the G8 look: soft grey surfaces and hairlines instead of
   ink boxes, pill buttons, rounded panels and options, no thick left bars.
   Remove this section to go back; the backup is /home/opc/backups/g8-site-*/. */
.kpp-note, .d1-pass, .d1-excerpt { border: 0; border-radius: 20px; background: var(--pa2); }
.kpp-callout, .d1-statement { border: 1px solid var(--ru); border-radius: 20px; }
.kpp-badge__k, .kpp-stage__n { border-color: var(--ru); border-radius: 999px; }
.kpp-format.is-on { border: 2px solid var(--ink); border-radius: 20px; }
.kpp-format { border-radius: 20px; }
.kpp-btn, .kpp-wrap a.d1-next, .kpp-wrap a.d1-plan__go { border: 0; border-radius: 999px; font-family: var(--font-body); font-weight: 700; }
.d1-q, .d1-daily, .d1-plan { border: 0; border-radius: 28px; background: var(--pa2); }
.d1-table { border-collapse: separate; border-spacing: 0; border-radius: 16px; overflow: hidden; background: var(--pa); }
.d1-table th, .d1-table td { border: 0; border-bottom: 1px solid var(--ru); }
.d1-table tr:last-child td { border-bottom: 0; }
.d1-opt { border: 1px solid var(--ru); border-radius: 16px; background: var(--pa); }
.d1-opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.d1-expl { border-top-color: var(--ru); }
.d1-facts { border-top-color: var(--ru); }
.kpp-table { border-radius: 16px; }
.kpp-chips a, .kpp-chips button, .kpp-tag { border-radius: 999px; }
