/* Dream Factory · design-loop ACTIVE house system (cycle-01)
   Provenance: Notion calm + Linear card precision + Stripe soft atmosphere
   Source: ~/.grok/skills/design-loop/references/tokens/ACTIVE.md
*/
:root {
  color-scheme: light;

  --ink: #0f172a;
  --ink-muted: #64748b;
  --ink-faint: #94a3b8;
  --muted: var(--ink-muted);
  --canvas: #f4f1ea;
  --paper: var(--canvas);
  --surface: #ffffff;
  --card: var(--surface);
  --surface-soft: #faf8f4;
  --line: rgba(15, 23, 42, 0.1);
  --line-strong: rgba(15, 23, 42, 0.16);

  --navy: #1e3a5f;
  --navy-deep: #152a45;
  --teal: #0f766e;
  --teal-soft: rgba(15, 118, 110, 0.12);
  --gold: #b8860b;
  --gold-soft: rgba(184, 134, 11, 0.16);
  --coral: #c2410c;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;
  --radius: var(--r-lg);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
  --shadow: var(--shadow-md);

  --font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", Inter, ui-sans-serif, system-ui,
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur: 150ms;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1100px 560px at 8% -8%, rgba(15, 118, 110, 0.11), transparent 55%),
    radial-gradient(900px 480px at 92% 0%, rgba(184, 134, 11, 0.1), transparent 48%),
    radial-gradient(700px 400px at 50% 100%, rgba(30, 58, 95, 0.05), transparent 50%),
    var(--canvas);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 8px 12px;
  z-index: 100;
  border-radius: var(--r-sm);
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* Top bar — glass */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--canvas) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--navy) 0%, #2a5080 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 6px 16px rgba(30, 58, 95, 0.28);
}

.brand strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand small {
  color: var(--ink-muted);
  font-size: 0.72rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 4px;
  flex: 1;
  justify-content: center;
}

.nav a {
  text-decoration: none;
  font-size: 0.86rem;
  color: var(--ink-muted);
  font-weight: 650;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.nav a:hover {
  color: var(--navy);
  background: rgba(30, 58, 95, 0.06);
}

.top-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.language-toggle button {
  min-width: 42px;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.language-toggle button:hover {
  color: var(--navy);
}

.language-toggle button.active {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 5px 14px rgba(30, 58, 95, 0.22);
}

.language-toggle button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.button,
.primary,
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.button:hover,
.primary:hover,
.ghost:hover {
  transform: translateY(-1px);
}

.button:focus-visible,
.primary:focus-visible,
.ghost:focus-visible,
.chip:focus-visible,
.program-card:focus-visible,
.icon-btn:focus-visible,
.search-field input:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.primary,
.button.primary {
  background: linear-gradient(135deg, var(--navy) 0%, #2a5080 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(30, 58, 95, 0.28);
}

.primary:hover,
.button.primary:hover {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 100%);
}

.button:not(.primary),
.ghost {
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 28px;
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 40px) 20px;
  align-items: stretch;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.85rem, 3.8vw, 2.7rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  font-weight: 800;
  word-break: keep-all;
}

.lead {
  margin: 0 0 22px;
  color: var(--ink-muted);
  font-size: 1.02rem;
  max-width: 48ch;
  word-break: keep-all;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.slogan-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slogan-row li {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--ink-muted);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(500px 280px at 90% 0%, rgba(15, 118, 110, 0.22), transparent 55%),
    radial-gradient(400px 240px at 10% 100%, rgba(184, 134, 11, 0.14), transparent 50%),
    linear-gradient(160deg, #1e3a5f 0%, #16324f 52%, #0f2438 100%);
  color: #f5f1e8;
  border-radius: calc(var(--r-lg) + 4px);
  padding: 28px 26px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-panel .panel-label {
  margin: 0 0 8px;
  color: #e8c547;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-panel h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.hero-panel > p {
  margin: 0 0 20px;
  color: rgba(245, 241, 232, 0.82);
  font-size: 0.92rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-grid div {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-md);
  padding: 12px 14px;
  backdrop-filter: blur(6px);
}

.stat-grid strong {
  display: block;
  font-size: 1.55rem;
  color: #fff;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.stat-grid span {
  font-size: 0.76rem;
  color: rgba(245, 241, 232, 0.68);
  font-weight: 600;
}

/* Sections */
.section {
  padding: 40px clamp(16px, 4vw, 40px);
}

.section.muted {
  background: rgba(255, 255, 255, 0.42);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 720px;
  margin-bottom: 24px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  letter-spacing: -0.025em;
  font-weight: 800;
  word-break: keep-all;
}

.section-head p {
  margin: 0;
  color: var(--ink-muted);
}

/* Growth model */
.model-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.model-track li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 16px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.model-track li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.model-track .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.model-track h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}

.model-track .en {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin-bottom: 8px;
  font-weight: 650;
}

.model-track p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

/* Toolbar */
.toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.search-field input {
  width: 100%;
  max-width: 420px;
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.search-field input:focus {
  border-color: color-mix(in srgb, var(--teal) 55%, var(--line));
  box-shadow: 0 0 0 3px var(--teal-soft);
}

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

.chip {
  min-height: 34px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.82rem;
  font-weight: 650;
  box-shadow: var(--shadow-sm);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  box-shadow: 0 6px 16px rgba(30, 58, 95, 0.22);
}

.view-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.check-fav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* Program cards */
.program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.program-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  min-height: 248px;
}

.program-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent, var(--teal));
}

.program-card:hover,
.program-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(30, 58, 95, 0.18);
  outline: none;
}

.program-card.in-kit {
  border-color: color-mix(in srgb, var(--teal) 40%, var(--line));
  background: linear-gradient(180deg, #fff 0%, rgba(15, 118, 110, 0.04) 100%);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.card-icon {
  font-size: 1.55rem;
  line-height: 1;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.badge {
  font-size: 0.66rem;
  font-weight: 750;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: rgba(15, 23, 42, 0.05);
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.badge.flag {
  background: var(--gold-soft);
  color: #8a6508;
}

.badge.internal {
  background: rgba(77, 124, 15, 0.14);
  color: #3f6212;
}

.program-card h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
  word-break: keep-all;
}

.program-card .en-title {
  margin: 0 0 10px;
  font-size: 0.76rem;
  color: var(--ink-faint);
  font-weight: 650;
}

.program-card .overview {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--ink-muted);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.card-foot .num {
  font-size: 0.76rem;
  font-weight: 750;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.card-foot .kit-btn {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--teal-soft);
  color: var(--teal);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.card-foot .kit-btn:hover {
  background: color-mix(in srgb, var(--teal) 22%, white);
}

.card-foot .kit-btn.on {
  background: var(--teal);
  color: #fff;
}

.program-card.hidden {
  display: none;
}

/* Audience / modes / metrics */
.audience-grid,
.mode-grid,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.audience-card,
.mode-card,
.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.audience-card:hover,
.mode-card:hover,
.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.audience-card h3,
.mode-card h3,
.metric-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}

.audience-card .focus {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.86rem;
  font-weight: 700;
}

.audience-card p,
.mode-card p,
.metric-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.audience-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.audience-card .tags span {
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(30, 58, 95, 0.06);
  color: var(--navy);
  font-weight: 650;
}

/* Preset kits */
.preset-block {
  margin-bottom: 20px;
}

.preset-block > h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}

.preset-kit-list {
  display: grid;
  gap: 14px;
}

.preset-card {
  background: linear-gradient(165deg, #ffffff 0%, #f4f8f7 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.preset-card.featured {
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 10px 30px rgba(15, 118, 110, 0.08);
}

.preset-card.space {
  background: linear-gradient(165deg, #0b1224 0%, #152238 55%, #1e3a5f 100%);
  color: #e8eef8;
  border-color: rgba(125, 211, 252, 0.22);
}

.preset-card.space .preset-sub {
  color: #7dd3fc;
}

.preset-card.space .preset-mission,
.preset-card.space .preset-meta,
.preset-card.space .preset-phases {
  color: rgba(232, 238, 248, 0.88);
}

.preset-card.space .preset-head h4,
.preset-card.space .preset-phases strong {
  color: #f8fafc;
}

.preset-card.space .preset-chip {
  background: rgba(125, 211, 252, 0.14);
  color: #bae6fd;
}

.preset-card.space .preset-chip.soft {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.preset-card.space .preset-chip.honor {
  background: rgba(250, 204, 21, 0.16);
  color: #fde68a;
}

.preset-card.space .ghost {
  color: #e2e8f0;
  border-color: rgba(226, 232, 240, 0.28);
}

.preset-chip.honor {
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
}

/* EduSpace path */
.eduspace-section {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(56, 189, 248, 0.12), transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(124, 58, 237, 0.1), transparent 45%),
    var(--surface-soft, #f6f4ef);
}

.eduspace-mission {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.6;
  word-break: keep-all;
  color: var(--ink);
}

.eduspace-note {
  margin: 0 0 20px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.eduspace-h3 {
  margin: 22px 0 12px;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  color: var(--navy);
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.rank-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--rank-color, #0369a1);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 10px;
}

.rank-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.rank-icon {
  font-size: 1.7rem;
  line-height: 1;
}

.rank-order {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--rank-color, #0369a1);
}

.rank-card h4 {
  margin: 2px 0 2px;
  font-size: 1.05rem;
  color: var(--navy);
}

.rank-stage {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ink-muted);
}

.rank-xp {
  margin: 0;
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(30, 58, 95, 0.07);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 750;
}

.rank-body,
.rank-unlock {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-muted);
  word-break: keep-all;
}

.rank-unlock strong {
  color: var(--navy);
}

.button.small,
.ghost.small {
  justify-self: start;
  font-size: 0.8rem;
  padding: 6px 12px;
}

.mark-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.mark-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.mark-icon {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 6px;
}

.mark-card h4 {
  margin: 0 0 6px;
  font-size: 0.9rem;
  color: var(--navy);
  line-height: 1.35;
}

.mark-xp {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 750;
  color: #7c3aed;
}

.mark-card p:last-child {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
  line-height: 1.45;
  word-break: keep-all;
}

.xp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.xp-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.9rem;
}

.xp-list strong {
  color: #0f766e;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .rank-grid {
    grid-template-columns: 1fr;
  }
  .mark-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .xp-list {
    grid-template-columns: 1fr;
  }
}

.preset-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.preset-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.preset-badges {
  min-height: 1.2rem;
  margin-bottom: 4px;
}

.preset-head h4 {
  margin: 0 0 4px;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.preset-sub {
  margin: 0;
  color: var(--teal, #0f766e);
  font-weight: 650;
  font-size: 0.88rem;
}

.preset-mission {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.55;
  word-break: keep-all;
}

.preset-meta {
  margin: 0 0 12px;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 650;
}

.preset-chip.soft {
  background: rgba(30, 58, 95, 0.06);
  color: var(--navy);
  font-weight: 600;
}

.preset-phases {
  margin: 0 0 16px;
  padding-left: 1.15rem;
  color: var(--ink-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.preset-phases li {
  margin-bottom: 6px;
}

.preset-phases strong {
  color: var(--navy);
}

.preset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Kit */
.kit-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}

.kit-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

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

.kit-head h3,
.kit-panel > h3 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.015em;
}

.kit-actions {
  display: flex;
  gap: 8px;
}

.kit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.kit-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.kit-list strong {
  display: block;
  font-size: 0.92rem;
}

.kit-list small {
  color: var(--ink-muted);
  font-size: 0.75rem;
}

.kit-list button {
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
}

.kit-list button:hover {
  color: var(--coral);
  background: rgba(194, 65, 12, 0.08);
}

.kit-empty {
  margin: 8px 0 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.kit-empty.hidden {
  display: none;
}

.priority-list {
  margin: 12px 0 20px;
  padding-left: 1.2rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.priority-list li {
  margin-bottom: 6px;
}

.definition {
  margin: 0;
  padding: 16px 18px;
  border-left: 4px solid var(--gold);
  background: var(--gold-soft);
  border-radius: 0 12px 12px 0;
  font-size: 0.9rem;
  color: var(--ink);
  word-break: keep-all;
}

/* Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 32, 0.48);
  z-index: 50;
  backdrop-filter: blur(2px);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(480px, 100vw);
  background: #fff;
  z-index: 60;
  display: flex;
  flex-direction: column;
  box-shadow: -16px 0 48px rgba(15, 23, 42, 0.18);
}

.drawer[hidden],
.drawer-backdrop[hidden] {
  display: none;
}

.drawer-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.drawer-head h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  word-break: keep-all;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink);
  flex-shrink: 0;
}

.icon-btn:hover {
  background: rgba(15, 23, 42, 0.1);
}

.drawer-body {
  flex: 1;
  overflow: auto;
  padding: 18px;
}

.drawer-body h3 {
  margin: 18px 0 8px;
  font-size: 0.9rem;
  color: var(--navy);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 800;
}

.drawer-body h3:first-child {
  margin-top: 0;
}

.drawer-body p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.drawer-body ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.drawer-body li {
  margin-bottom: 4px;
}

.level-box {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.level-box div {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 0.86rem;
}

.level-box strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
}

.drawer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.drawer-tags span {
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 650;
}

.drawer-foot {
  display: flex;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--canvas) 70%, white);
}

.drawer-foot .primary,
.drawer-foot .ghost {
  flex: 1;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 650;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.toast[hidden] {
  display: none;
}

/* Footer */
.footer {
  padding: 36px clamp(16px, 4vw, 40px) 52px;
  text-align: center;
  border-top: 1px solid var(--line);
}

.footer p {
  margin: 0 0 6px;
}

.muted-text {
  color: var(--ink-muted);
  font-size: 0.88rem;
}

/* Responsive */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .model-track {
    grid-template-columns: 1fr 1fr;
  }

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

  .nav {
    display: none;
  }

  .language-toggle {
    margin-left: auto;
  }
}

@media (max-width: 560px) {
  .model-track {
    grid-template-columns: 1fr;
  }

  .top-actions .ghost {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
  }

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

/* Kids-app bridge + related programs (p15 ↔ ICAN Kids English) */
.bridge-apps { list-style: none; padding: 0; display: grid; gap: 10px; }
.bridge-app { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.bridge-head { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.bridge-head a, .bridge-hub a { color: var(--teal); text-decoration: underline; }
.bridge-app p { margin: 4px 0; font-size: 0.9rem; }
.bridge-phase { color: var(--teal); font-weight: 650; }
.drawer-related { display: flex; flex-wrap: wrap; gap: 8px; }
.related-btn { border: 1px solid var(--line); background: var(--teal-soft); color: var(--teal); border-radius: var(--r-pill); padding: 6px 12px; font-weight: 650; cursor: pointer; }

/* Core app link (Articulation 5) */
.core-app-link { display: inline-flex; gap: 8px; align-items: center; margin: 8px 0; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--teal); background: var(--teal-soft); color: var(--teal); font-weight: 700; text-decoration: none; font-size: 0.88rem; }
.core-app-link small { display: block; font-size: 0.7rem; font-weight: 650; opacity: 0.8; }
.core-app-link:hover { text-decoration: underline; }
.core-app-link.on-card { position: relative; z-index: 1; }
.core-app-link.big { font-size: 1rem; padding: 10px 14px; }
