/* ==========================================================================
   oops. 设计系统（docs/design-system.md）
   暖纸色 + 墨色正文，夜色区块放愿景，灯笼橙只做一个“亮点”。
   字体自托管：css/fonts.css 只放拉丁（首屏），css/fonts-cjk.css 在 load 后加载。
   切片来自 scripts/fetch-fonts.py；页面用的子集由 scripts/subset-site-fonts.py 生成。正文用系统字体。
   ========================================================================== */

/* 1. Tokens */
:root {
  /* base: warm paper & ink (Chiang Mai dusk) */
  --paper: oklch(0.972 0.012 80);
  --paper-2: oklch(0.945 0.018 78);
  --sand: oklch(0.905 0.024 76);
  --line: oklch(0.88 0.015 75);
  --line-strong: oklch(0.72 0.02 70);   /* input/control borders, >= 3:1 on surface */
  --ink: oklch(0.21 0.02 55);
  --ink-2: oklch(0.42 0.02 60);
  --ink-3: oklch(0.5 0.015 65);          /* darkened from the kit's 0.56 to pass 4.5:1 */
  --night: oklch(0.22 0.035 265);
  --night-2: oklch(0.29 0.035 265);
  --on-night: oklch(0.95 0.012 80);
  --on-night-2: oklch(0.78 0.02 265);

  /* accents: equal L/C, hue varies */
  --lantern: oklch(0.72 0.16 52);
  --lantern-hover: oklch(0.76 0.15 55);
  --jungle: oklch(0.72 0.16 150);
  --lantern-ink: oklch(0.52 0.15 45);
  --jungle-ink: oklch(0.48 0.12 150);
  --lantern-soft: oklch(0.93 0.05 60);
  --jungle-soft: oklch(0.93 0.05 150);
  --danger: oklch(0.5 0.17 28);
  --danger-soft: oklch(0.94 0.04 28);

  /* semantic (re-declared inside night surfaces) */
  --bg: var(--paper);
  --surface: oklch(0.99 0.006 80);
  --surface-sunk: var(--paper-2);
  --text: var(--ink);
  --text-muted: var(--ink-2);
  --text-subtle: var(--ink-3);
  --border: var(--line);
  --accent: var(--lantern);
  --accent-text: var(--lantern-ink);
  --positive: var(--jungle-ink);
  --primary-bg: var(--ink);
  --primary-fg: var(--paper);
  --primary-hover: oklch(0.3 0.02 55);
  --focus-ring: var(--ink);
  --focus-halo: oklch(0.72 0.16 52 / 0.45);

  /* type */
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", "oops CJK Display", var(--font-body);
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, var(--font-body);
  --font-quote: "oops CJK Quote", "Songti SC", "Noto Serif SC", serif;
  --tracking-display: -0.035em;
  --tracking-cjk: 0.02em;
  --tracking-eyebrow: 0.14em;

  /* layout */
  --max-w: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(64px, 9vw, 96px);
  --header-h: 68px;
  --r-lg: 28px;
  --r-md: 16px;
  --r-sm: 10px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px oklch(0.21 0.02 55 / 0.06);
  --shadow-2: 0 18px 48px oklch(0.21 0.02 55 / 0.14);
  --dur: 240ms;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* Night surfaces: components inside adapt via the same semantic tokens */
.card-night,
.kp-band-night,
.kp-footer {
  --bg: var(--night);
  --surface: var(--night-2);
  --surface-sunk: var(--night-2);
  --text: var(--on-night);
  --text-muted: var(--on-night-2);
  --text-subtle: var(--on-night-2);
  --border: oklch(0.4 0.03 265);
  --accent-text: var(--lantern);
  --primary-bg: var(--on-night);
  --primary-fg: var(--night);
  --primary-hover: oklch(1 0 0);
  --focus-ring: var(--on-night);
  background-color: var(--night);
  color: var(--on-night);
}

/* 2. Reset & base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1px); /* header + 1px bottom border: section top sits flush */
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

:lang(zh-CN) body,
html:lang(zh-CN) {
  line-height: 1.85;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

::placeholder {
  color: var(--text-subtle);
  opacity: 1;
}

/* Focus: ink ring + lantern halo */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--focus-halo);
}

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

/* Display type: Latin tight, CJK never negative */
.kp-hero-title,
.kp-sec-title,
.kp-card-title,
.kp-mentor-name,
.kp-stat-val,
.kp-tuition-price,
.kp-h3 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text);
  text-wrap: balance;
}

html:lang(zh-CN) .kp-hero-title,
html:lang(zh-CN) .kp-sec-title,
html:lang(zh-CN) .kp-card-title,
html:lang(zh-CN) .kp-mentor-name,
html:lang(zh-CN) .kp-h3 {
  letter-spacing: var(--tracking-cjk);
  line-height: 1.22;
}

/* 中文标题只在标点处换行；单段太长时仍可断开，不溢出 */
html:lang(zh-CN) .kp-hero-title,
html:lang(zh-CN) .kp-sec-title,
html:lang(zh-CN) .kp-hero-sub,
html:lang(zh-CN) .kp-quote {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

html:lang(en) .kp-hero-title,
html:lang(en) .kp-sec-title,
html:lang(en) .kp-card-title,
html:lang(en) .kp-mentor-name,
html:lang(en) .kp-h3 {
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.kp-h3 {
  font-size: 22px;
  margin-bottom: 20px;
}

/* Mono eyebrow */
.kp-sec-tag,
.kp-card-eyebrow,
.kp-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 14px;
}

/* 3. Layout */
.kp-container {
  max-width: calc(var(--max-w) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}

.kp-container-narrow {
  max-width: calc(820px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}

.kp-section {
  padding: var(--section-y) 0;
}

.kp-section-alt {
  background-color: var(--paper-2);
  --surface-sunk: var(--paper);
}

.kp-grid-2,
.kp-grid-3,
.kp-grid-4 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
@media (min-width: 768px) {
  .kp-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 640px) {
  .kp-grid-3,
  .kp-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .kp-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1080px) {
  .kp-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.kp-grid-2 > .kp-form-group {
  margin-bottom: 0;
}
.kp-grid-2 + .kp-grid-2,
.kp-grid-2 + .kp-form-group {
  margin-top: 22px;
}

/* 4. Header (paper, sticky, blur over content) */
.kp-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: oklch(0.972 0.012 80 / 0.85);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}

.kp-header-inner {
  max-width: calc(var(--max-w) + 2 * var(--gutter));
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.kp-brand {
  order: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
}

/* Wordmark: lowercase "oops", second o is a lit lantern disc */
.kp-wordmark {
  font-family: "Bricolage Grotesque", var(--font-body);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 0;
  line-height: 1;
  color: var(--text);
}

.kp-wordmark-lit {
  color: var(--lantern);
  background: radial-gradient(circle at 50% 56%, var(--lantern) 0 0.18em, transparent 0.185em);
}

.kp-brand-tag {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  padding-left: 14px;
  border-left: 1px solid var(--border);
}

html:lang(en) .kp-brand-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.kp-nav {
  order: 2;
  margin-left: auto;
  display: flex;
  align-items: center;
}

.kp-nav-list {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 22px;
  list-style: none;
}

.kp-nav-list > li {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.kp-nav-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 0;
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
}

.kp-nav-link:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

.kp-nav-link.is-current {
  color: var(--text);
  font-weight: 600;
}

.kp-header-right {
  order: 3;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle-btn {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  height: 32px;
  padding: 0 12px;
  cursor: pointer;
  border-radius: var(--r-pill);
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease);
}

.lang-toggle-btn:hover {
  background: var(--paper-2);
}

.kp-btn-nav-apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  background-color: var(--primary-bg);
  color: var(--primary-fg);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.kp-btn-nav-apply:hover {
  background-color: var(--primary-hover);
}

.kp-btn-nav-apply:active {
  transform: scale(.97);
}

.kp-hamburger-btn {
  display: none;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

@media (min-width: 1001px) and (max-width: 1240px) {
  .kp-nav-list { gap: 16px; }
  .kp-nav-link { font-size: 13.5px; }
  .kp-brand-tag { display: none; }
}

@media (max-width: 1000px) {
  .kp-hamburger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .kp-nav {
    margin-left: 0;
  }
  .kp-nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--paper);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px var(--gutter) 24px;
    gap: 0;
    align-items: stretch;
    box-shadow: var(--shadow-2);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .kp-nav-list.open {
    display: flex;
  }
  .kp-nav-list > li {
    width: 100%;
  }
  .kp-nav-list .kp-nav-link {
    font-size: 16px;
    color: var(--text);
    width: 100%;
    text-align: left;
    padding: 14px 2px;
    border-bottom: 1px solid var(--border);
  }
  .kp-nav-list #nav-auth-area {
    width: 100%;
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px !important;
    margin-top: 4px;
  }
  .kp-nav-list .kp-btn-nav-apply {
    width: 100%;
    height: 48px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .kp-brand-tag { display: none; }
}

/* 5. Hero: degree first, documentary photo on the right */
.kp-hero {
  padding: clamp(32px, 6vw, 72px) 0 clamp(40px, 6vw, 64px);
}

.kp-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

@media (min-width: 900px) {
  .kp-hero-inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }
}

.kp-hero .kp-stats-row {
  margin-top: clamp(40px, 5vw, 64px);
}

.kp-hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.kp-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
}

.kp-tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lantern);
  flex-shrink: 0;
}

.kp-hero-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.14em;
  font-size: clamp(56px, 12vw, 108px);
  line-height: 0.9;
  letter-spacing: -0.035em;
}

.kp-hero-line {
  display: block;
}

.kp-hero-line-2 {
  font-size: clamp(20px, 3.6vw, 36px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  max-width: 16em;
}

html:lang(zh-CN) .kp-hero-title,
html:lang(en) .kp-hero-title {
  font-size: clamp(56px, 12vw, 108px);
  letter-spacing: -0.035em;
  line-height: 0.9;
  word-break: normal;
  overflow-wrap: normal;
}

html:lang(zh-CN) .kp-hero-line-2,
html:lang(en) .kp-hero-line-2 {
  letter-spacing: -0.025em;
  line-height: 1.2;
}

html:lang(zh-CN) .kp-hero-title::after,
html:lang(en) .kp-hero-title::after {
  content: none;
}

.kp-hero-sub {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.4;
  color: var(--text);
  text-wrap: balance;
}

html:lang(zh-CN) .kp-hero-sub {
  letter-spacing: var(--tracking-cjk);
}

.kp-hero-desc {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 34em;
}

html:lang(zh-CN) .kp-hero-desc {
  letter-spacing: var(--tracking-cjk);
}

.kp-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 4px;
}

.kp-hero-media {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--sand);
  box-shadow: var(--shadow-2);
  aspect-ratio: 4 / 5;
}

@media (max-width: 899px) {
  .kp-hero-media { aspect-ratio: 4 / 3; }
}

.kp-hero-media picture,
.kp-hero-media img {
  width: 100%;
  height: 100%;
}

.kp-hero-media img {
  object-position: center 40%;
}

/* Stats row */
.kp-stats-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 24px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}

@media (min-width: 860px) {
  .kp-stats-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.kp-stat-val {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: var(--tracking-display);
  margin-bottom: 8px;
}

html:lang(zh-CN) .kp-stat-val {
  letter-spacing: 0;
}

.kp-stat-lbl {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* 6. Buttons */
.kp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 24px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.kp-btn:active:not(:disabled) {
  transform: scale(.97);
}

.kp-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.kp-btn-primary {
  background-color: var(--primary-bg);
  color: var(--primary-fg);
}

.kp-btn-primary:hover:not(:disabled) {
  background-color: var(--primary-hover);
}

.kp-btn-accent {
  background-color: var(--lantern);
  color: var(--ink);
}

.kp-btn-accent:hover:not(:disabled) {
  background-color: var(--lantern-hover);
}

.kp-btn-ghost {
  background-color: transparent;
  color: var(--text);
  border-color: var(--text);
}

.kp-btn-ghost:hover:not(:disabled) {
  background-color: var(--surface-sunk);
}

.kp-btn-link {
  background: none;
  border: none;
  min-height: 40px;
  padding: 8px 2px;
  border-radius: 0;
  color: var(--accent-text);
}

.kp-btn-link:hover:not(:disabled) {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.kp-btn-block {
  width: 100%;
}

.kp-btn-sm {
  min-height: 40px;
  padding: 6px 16px;
  font-size: 14px;
}

.kp-link {
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 7. Cards */
.kp-solid-card {
  padding: clamp(24px, 3vw, 32px);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  color: var(--text);
}

.card-surface {
  background-color: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
}

.card-sunk {
  background-color: var(--surface-sunk);
}

.kp-card-title {
  font-size: clamp(21px, 2.2vw, 25px);
  margin-bottom: 14px;
}

.kp-card-title.is-sm {
  font-size: 19px;
}

.kp-card-desc {
  font-size: 15px;
  line-height: inherit;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.kp-card-desc:last-child {
  margin-bottom: 0;
}

.kp-card-desc.is-sm {
  font-size: 14px;
}

/* Footnote strip at the bottom of a card */
.kp-card-note {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-muted);
}

.kp-card-rule {
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: var(--surface-sunk);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text);
}

.card-night .kp-card-rule,
.card-sunk .kp-card-rule {
  background: var(--surface);
}

/* Mono index ("01") replaces emoji icons */
.kp-index {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent-text);
  margin-bottom: 14px;
}

/* Photos */
.kp-photo-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.kp-photo-card picture {
  display: block;
  flex: 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--sand);
}

.kp-photo-card img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  max-height: 420px;
  object-fit: cover;
}

.kp-photo-caption {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  padding: 0 4px;
}

/* Night band with one serif vision quote */
.kp-band-night {
  border-radius: var(--r-lg);
  padding: clamp(36px, 6vw, 72px) clamp(24px, 5vw, 64px);
  margin-top: 40px;
}

.kp-quote {
  font-family: var(--font-quote);
  font-weight: 900;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--on-night);
  text-wrap: balance;
  margin-bottom: 20px;
}

html:lang(en) .kp-quote {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.kp-quote-note {
  font-size: 15px;
  color: var(--on-night-2);
  max-width: 44em;
}

/* Section header */
.kp-sec-header {
  margin-bottom: clamp(32px, 4vw, 48px);
  max-width: 820px;
}

.kp-sec-header.is-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.kp-sec-title {
  font-size: clamp(30px, 4.2vw, 52px);
  margin-bottom: 16px;
}

.kp-sec-lead {
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--text-muted);
  max-width: 40em;
}

.kp-sec-header.is-center .kp-sec-lead {
  margin: 0 auto;
}

/* 8. Stepper */
.kp-stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  position: relative;
  margin: 8px 0 40px;
  list-style: none;
}

.kp-stepper::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 10%;
  right: 10%;
  height: 1px;
  background-color: var(--line-strong);
}

.kp-stepper.is-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kp-step-node {
  position: relative;
  text-align: center;
  min-width: 0;
}

.kp-step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background-color: var(--bg);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  position: relative;
}

.kp-step-lbl {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.kp-step-node.active .kp-step-circle {
  background-color: var(--lantern);
  border-color: var(--lantern);
}

.kp-step-node.active .kp-step-lbl {
  color: var(--text);
  font-weight: 600;
}

.kp-step-node.done .kp-step-circle {
  background-color: var(--ink);
  color: var(--paper);
}

.kp-step-node.done .kp-step-lbl {
  color: var(--text);
}

/* Narrow screens: vertical list instead of squeezed columns */
@media (max-width: 640px) {
  .kp-stepper,
  .kp-stepper.is-4 {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .kp-stepper::before {
    top: 20px;
    bottom: 20px;
    left: 19px;
    right: auto;
    width: 1px;
    height: auto;
  }
  .kp-step-node {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
  }
  .kp-step-circle {
    margin: 0;
    flex-shrink: 0;
  }
  .kp-step-lbl {
    font-size: 15px;
  }
}

/* 9. Mentors */
.kp-mentor-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Real photos can be added later at public/img/mentors/<slug>.jpg when available. */
.kp-mentor-name {
  font-size: 19px;
  margin-bottom: 10px;
}

.kp-mentor-tag {
  display: inline-flex;
  align-self: flex-start;
  max-width: 100%;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  white-space: normal;
  border-radius: var(--r-pill);
  background-color: var(--lantern-soft);
  color: var(--ink);
  padding: 4px 12px;
  margin-bottom: 14px;
}

.kp-mentor-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

/* Reserve mentors sit under the 8 unlocked cards, not in that numbered grid. */
.kp-reserve {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.kp-reserve-list,
.kp-team-list,
.kp-course-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kp-reserve-list,
.kp-team-list {
  display: grid;
  gap: 12px;
}

.kp-reserve-card,
.kp-team-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 18px;
}

.kp-reserve-card {
  background: var(--surface-sunk);
}

.kp-reserve-name,
.kp-team-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: var(--tracking-cjk);
  margin: 0;
}

html:lang(en) .kp-reserve-name,
html:lang(en) .kp-team-name {
  letter-spacing: -0.02em;
}

.kp-reserve-bio,
.kp-team-role,
.kp-team-bio {
  font-size: 14.5px;
  line-height: 1.7;
}

.kp-team-role {
  margin-top: 4px;
}

.kp-reserve-bio,
.kp-team-bio {
  color: var(--text-muted);
  margin-top: 6px;
  white-space: pre-line;
}

.kp-team-note {
  margin-top: 20px;
  color: var(--text-muted);
}

.kp-course-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kp-course-list strong {
  font-weight: 700;
}

.kp-en-only {
  display: none;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

@media (min-width: 800px) {
  .kp-team-list {
    grid-template-columns: 1fr 1fr;
  }
}

/* 10. Tuition */
.kp-tuition-container {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(28px, 4vw, 48px);
  box-shadow: var(--shadow-1);
}

.kp-tuition-header {
  text-align: center;
  margin-bottom: 28px;
}

.kp-tuition-split {
  margin-top: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.kp-tuition-header .kp-eyebrow {
  margin-bottom: 12px;
}

.kp-tuition-price {
  font-size: clamp(44px, 7vw, 72px);
  line-height: 1;
  letter-spacing: var(--tracking-display);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px 14px;
  flex-wrap: wrap;
}

.kp-tuition-period {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text-muted);
}

.kp-tuition-orig {
  flex-basis: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text-subtle);
  text-decoration: line-through;
}

.kp-kickback-banner {
  border-radius: var(--r-md);
  background-color: var(--lantern-soft);
  padding: 20px 24px;
  margin: 24px 0;
  color: var(--ink);
}

.kp-kickback-title {
  font-weight: 700;
  font-size: 16px;
}

.kp-kickback-desc {
  font-size: 14.5px;
  margin-top: 6px;
  color: var(--ink-2);
}

.kp-list-card {
  background: var(--surface-sunk);
  border-radius: var(--r-md);
  padding: 22px 24px;
  font-size: 14.5px;
}

.kp-list-card-title {
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 15px;
  color: var(--text);
}

.kp-list-card-title.is-positive {
  color: var(--positive);
}

.kp-list-card ul {
  padding-left: 18px;
  color: var(--text-muted);
}

.kp-note-center {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 22px;
}

.kp-prep-benefits {
  list-style: none;
  margin: 18px 0 24px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface-sunk);
  border-radius: var(--r-md);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text);
}

.kp-prep-benefits li {
  margin: 0;
}

/* 11. FAQ */
.kp-faq-list {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border);
}

.kp-faq-item {
  border-top: 1px solid var(--border);
}

.kp-faq-item summary {
  padding: 22px 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  color: var(--text);
}

.kp-faq-item summary::-webkit-details-marker {
  display: none;
}

.kp-faq-item summary:hover {
  color: var(--accent-text);
}

.kp-faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--accent-text);
  flex-shrink: 0;
}

.kp-faq-item[open] summary::after {
  content: "–";
}

.kp-faq-body {
  padding: 0 0 24px;
  font-size: 15.5px;
  color: var(--text-muted);
  max-width: 62em;
}

/* 12. Forms */
.kp-form-group {
  margin-bottom: 22px;
}

.kp-form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text);
}

.kp-input,
.kp-select,
.kp-textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 18px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.kp-textarea {
  min-height: 120px;
}

.kp-input:focus,
.kp-select:focus,
.kp-textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px var(--focus-halo);
  outline: none;
}

.kp-input:disabled {
  background-color: var(--paper-2);
  color: var(--text-muted);
  cursor: not-allowed;
}

.kp-field-hint {
  font-size: 13px;
  color: var(--text-subtle);
  margin-top: 6px;
  line-height: 1.55;
}

.kp-inline-input-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.kp-inline-input-row .kp-input {
  flex: 1 1 180px;
  min-width: 0;
}

.kp-inline-input-row .kp-btn {
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .kp-inline-input-row .kp-btn {
    width: 100%;
  }
}

.kp-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14.5px;
  line-height: 1.6;
}

.kp-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--ink);
}

/* 13. Alerts */
.kp-alert {
  padding: 14px 18px;
  border-radius: var(--r-md);
  font-size: 14.5px;
  line-height: 1.65;
  margin-bottom: 20px;
  color: var(--ink);
}

.kp-alert-info {
  background-color: var(--paper-2);
}

.kp-alert-warning {
  background-color: var(--lantern-soft);
}

.kp-alert-danger {
  background-color: var(--danger-soft);
  color: var(--danger);
}

.kp-alert-success {
  background-color: var(--jungle-soft);
  color: var(--jungle-ink);
}

.en-questions-note {
  display: none;
  background-color: var(--lantern-soft);
  color: var(--ink);
  border-radius: var(--r-md);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 18px;
}

/* 14. DEV banner */
.kp-dev-banner {
  display: none;
  background-color: var(--lantern-soft);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  font-size: 13px;
  position: sticky;
  top: 0;
  z-index: 1100;
  text-align: center;
}

.kp-dev-banner.active {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.kp-dev-banner code {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  background: var(--surface);
  border-radius: 6px;
  padding: 2px 6px;
}

/* 15. Toast */
.kp-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--ink);
  color: var(--paper);
  border-radius: var(--r-pill);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  z-index: 2000;
  display: none;
  pointer-events: none;
  box-shadow: var(--shadow-2);
  max-width: calc(100vw - 32px);
  text-align: center;
}

.kp-toast.show {
  display: block;
}

/* 16. Modal */
.kp-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: oklch(0.22 0.035 265 / 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1500;
}

.kp-modal-backdrop.open {
  display: flex;
}

.kp-modal-box {
  background-color: var(--surface);
  border-radius: var(--r-lg);
  padding: 36px 32px 32px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-2);
}

.kp-modal-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 8px;
}

.kp-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.kp-modal-close:hover {
  background: var(--paper-2);
  color: var(--text);
}

/* WeCom QR: white quiet zone, ~184px so a phone can scan it */
.kp-wecom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0;
}

.kp-wecom-qr-link {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
}

.kp-wecom-qr-link:hover .kp-wecom-caption {
  color: var(--accent-text);
}

.kp-wecom-qr-frame {
  display: block;
  background: #fff;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-1);
  line-height: 0;
}

.kp-wecom-qr-frame img {
  width: 184px;
  height: 184px;
  max-width: 100%;
  object-fit: contain;
  background: #fff;
}

.kp-wecom-caption {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent-text);
  text-underline-offset: 3px;
}

.kp-wecom-hint {
  margin: 0;
  max-width: 36em;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-muted);
}

.kp-modal-box .kp-wecom {
  align-items: center;
  text-align: center;
  margin-top: 0;
}

.kp-modal-box .kp-wecom-qr-link {
  align-items: center;
}

.kp-modal-box .kp-wecom-hint {
  max-width: 28em;
}

/* 17. Quiz & test */
.kp-quiz-header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.kp-quiz-prog-track {
  height: 6px;
  border-radius: var(--r-pill);
  background-color: var(--paper-2);
  width: 100%;
  margin-top: 8px;
  overflow: hidden;
}

.kp-quiz-prog-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background-color: var(--ink);
  width: 0%;
  transition: width var(--dur) var(--ease);
}

.kp-timer-pill {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.kp-quiz-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: clamp(22px, 4vw, 36px);
  margin-top: 24px;
}

.kp-quiz-stem {
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 600;
  line-height: 1.65;
  margin-bottom: 24px;
  color: var(--text);
}

.kp-quiz-opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-opt-btn {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background-color: var(--surface);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  width: 100%;
}

.quiz-opt-btn:hover {
  background-color: var(--paper);
  border-color: var(--ink-3);
}

.quiz-opt-btn.selected {
  border-color: var(--ink);
  background-color: var(--lantern-soft);
  box-shadow: inset 0 0 0 1px var(--ink);
  font-weight: 600;
}

.quiz-opt-key {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background-color: var(--paper);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}

.quiz-opt-btn.selected .quiz-opt-key {
  background-color: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.quiz-unsure-opt {
  border-style: dashed;
  color: var(--text-muted);
}

/* Critical safety items missed */
.kp-critical-box {
  background-color: var(--danger-soft);
  border-radius: var(--r-lg);
  padding: 24px 26px;
  margin: 24px 0;
  color: var(--ink);
}

.kp-critical-box h3 {
  color: var(--danger);
  font-size: 18px;
  margin-bottom: 10px;
}

.kp-critical-box ul {
  padding-left: 20px;
  font-size: 14.5px;
}

/* Dimension bars */
.kp-dim-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 24px;
}

.kp-dim-row {
  margin-bottom: 18px;
}

.kp-dim-row:last-child {
  margin-bottom: 0;
}

.kp-dim-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 6px;
}

.kp-dim-track {
  height: 10px;
  border-radius: var(--r-pill);
  background-color: var(--paper-2);
  overflow: hidden;
}

.kp-dim-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background-color: var(--lantern);
  transition: width 0.4s var(--ease);
}

.kp-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.kp-chip {
  background-color: var(--paper-2);
  border-radius: var(--r-pill);
  color: var(--text);
  font-size: 13px;
  padding: 5px 12px;
  font-weight: 500;
}

/* Claim banner & per-question review */
.kp-claim-banner {
  background: var(--lantern-soft);
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 14.5px;
  color: var(--ink);
}

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

.kp-review-item:first-child {
  border-top: none;
}

.kp-review-item summary {
  cursor: pointer;
  font-size: 15px;
  line-height: 1.6;
  list-style: none;
}

.kp-review-item summary::-webkit-details-marker {
  display: none;
}

.kp-review-item summary:hover {
  color: var(--accent-text);
}

.kp-review-body {
  font-size: 14.5px;
  line-height: 1.75;
  margin-top: 12px;
  background: var(--paper-2);
  border-radius: var(--r-md);
  padding: 14px 18px;
}

/* 18. Footer (night) */
.kp-footer {
  padding: 64px 0 32px;
  margin-top: auto;
}

.kp-footer-compact {
  padding: 36px 0 28px;
}

.kp-footer .kp-wordmark {
  font-size: 40px;
  display: inline-block;
  margin-bottom: 18px;
}

.kp-footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1.2fr;
  gap: 36px;
  margin-bottom: 40px;
}

@media (max-width: 860px) {
  .kp-footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}

.kp-footer-col h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--on-night-2);
  margin-bottom: 14px;
}

.kp-footer-col p,
.kp-footer-col ul {
  font-size: 14px;
  line-height: 1.8;
  color: var(--on-night);
}

.kp-footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kp-footer-col a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.kp-footer-bottom {
  padding-top: 22px;
  font-size: 12.5px;
  color: var(--on-night-2);
  line-height: 1.6;
}
