/* ==========================================================================
   True Tradez — Meme Coin Bootcamp
   A dark, terminal-inspired learning interface. No framework, no build step.
   ========================================================================== */

:root {
  --bg: #080a09;
  --bg-2: #0b0e0c;
  --panel: #101411;
  --panel-2: #141a15;
  --panel-3: #192019;
  --line: #232c24;
  --line-2: #2f3b2f;
  --text: #eef2e6;
  --text-2: #c3cdbd;
  --muted: #94a292;
  --dim: #6b796b;
  --lime: #c8ff4d;
  --lime-2: #a8e62f;
  --lime-soft: rgba(200, 255, 77, 0.1);
  --amber: #ffc247;
  --amber-soft: rgba(255, 194, 71, 0.1);
  --coral: #ff6a56;
  --coral-soft: rgba(255, 106, 86, 0.1);
  --sky: #7dc7ff;
  --sky-soft: rgba(125, 199, 255, 0.1);
  --violet: #c9a7ff;
  --font: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Inter", ui-sans-serif, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  --sidebar-w: 288px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 520px at 78% -10%, rgba(200, 255, 77, 0.055), transparent 65%),
    radial-gradient(700px 500px at 8% 100%, rgba(125, 199, 255, 0.04), transparent 65%),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: auto, auto, 64px 64px, 64px 64px;
}

::selection { background: var(--lime); color: #060806; }

a { color: inherit; }

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

button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--lime);
  color: #060806;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* --------------------------------------------------------------------------
   Shell / sidebar
   -------------------------------------------------------------------------- */

.shell { display: flex; min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  z-index: 50;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(200, 255, 77, 0.035), transparent 220px),
    #0a0d0b;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

.sidebar-inner { display: flex; flex-direction: column; min-height: 100%; padding: 24px 18px 20px; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 4px 6px 0;
  margin-bottom: 26px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 11px;
  background: var(--lime);
  color: #060806;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.04em;
  box-shadow: 0 0 30px rgba(200, 255, 77, 0.18);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.18; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; }
.brand-sub { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

.side-progress {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  border-radius: var(--radius-sm);
  padding: 13px 14px 12px;
  margin-bottom: 24px;
}
.side-progress-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; }
.side-progress-top span { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.side-progress-top b { font-family: var(--display); font-size: 15px; color: var(--lime); }
.bar { display: block; width: 100%; height: 5px; border-radius: 999px; background: #1c231c; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0%; border-radius: inherit; background: linear-gradient(90deg, #8ec62d, var(--lime)); transition: width 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
.side-count { margin: 8px 0 0; font-size: 11px; color: var(--dim); }

.nav-label {
  margin: 22px 10px 7px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.nav-label:first-child { margin-top: 0; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin: 1px 0;
  border-radius: 7px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 13.5px;
  line-height: 1.35;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.nav-link.active { background: var(--lime-soft); color: var(--text); }
.nav-link.active .nav-ico { color: var(--lime); border-color: rgba(200, 255, 77, 0.4); }
.nav-link.done .nav-ico { color: var(--lime); }
.nav-ico {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 22px;
  flex: 0 0 26px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.2);
}
.nav-count { font-style: normal; font-family: var(--mono); font-size: 9px; color: var(--dim); margin-left: 4px; }
.nav-lock { font-style: normal; font-family: var(--mono); font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); margin-left: auto; }
.nav-lock.open { color: var(--lime); }

.side-foot { margin-top: auto; padding: 22px 8px 0; border-top: 1px solid var(--line); }
.side-foot p { margin: 0 0 8px; font-size: 10.5px; line-height: 1.55; color: var(--dim); }
.side-foot strong { color: var(--muted); font-weight: 600; }
.side-foot a { font-size: 11px; color: var(--lime); text-decoration: none; }
.side-foot a:hover { text-decoration: underline; }

.sidebar-scrim { display: none; }

/* --------------------------------------------------------------------------
   Main / topbar
   -------------------------------------------------------------------------- */

.main { position: relative; margin-left: var(--sidebar-w); width: calc(100% - var(--sidebar-w)); min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 62px;
  padding: 0 40px;
  border-bottom: 1px solid rgba(35, 44, 36, 0.75);
  background: rgba(8, 10, 9, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.crumbs { display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--dim); min-width: 0; }
.crumbs a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.crumbs a:hover { color: var(--lime); }
.crumbs span:last-child { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.topbar-right { margin-left: auto; }
.save-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  white-space: nowrap;
}
.save-pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }

.menu-btn {
  display: none;
  width: 38px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 7px;
  padding: 8px;
  flex-direction: column;
  justify-content: space-between;
}
.menu-btn span { display: block; height: 1.5px; background: var(--text-2); border-radius: 2px; }
.mobile-brand { display: none; font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }

#view { width: 100%; max-width: 1180px; margin: 0 auto; padding: 42px 40px 80px; flex: 1; outline: none; }

.site-foot {
  border-top: 1px solid var(--line);
  margin-top: auto;
  padding: 30px 40px 38px;
  display: grid;
  grid-template-columns: 1.2fr auto;
  gap: 12px 40px;
  max-width: 1180px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  font-size: 11.5px;
  color: var(--dim);
}
.brand-mini { font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em; color: var(--muted); }
.site-foot p { margin: 6px 0 0; max-width: 620px; line-height: 1.6; }
.foot-links { display: flex; gap: 18px; align-items: flex-start; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--lime); }
.foot-disclaimer { grid-column: 1 / -1; border-top: 1px solid rgba(35, 44, 36, 0.6); padding-top: 14px; max-width: none !important; }

/* --------------------------------------------------------------------------
   Typography & shared blocks
   -------------------------------------------------------------------------- */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
  margin: 0 0 16px;
}
.kicker::before { content: ""; width: 18px; height: 1px; background: var(--lime); opacity: 0.6; }
.kicker.plain::before { display: none; }

h1, h2, h3, h4 { font-family: var(--display); color: var(--text); letter-spacing: -0.025em; margin: 0; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); line-height: 1.03; font-weight: 700; }
h2 { font-size: clamp(1.45rem, 2.3vw, 1.9rem); line-height: 1.15; font-weight: 600; }
h3 { font-size: 1.12rem; line-height: 1.3; font-weight: 600; }
h4 { font-size: 0.95rem; line-height: 1.35; font-weight: 600; }

p { margin: 0 0 16px; }
.lead { font-size: 1.08rem; line-height: 1.65; color: var(--text-2); max-width: 66ch; }
.muted { color: var(--muted); }
.small { font-size: 0.83rem; }
.tiny { font-size: 0.74rem; }
.mono { font-family: var(--mono); }
.lime { color: var(--lime); }
.coral { color: var(--coral); }
.amber { color: var(--amber); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.page-head { max-width: 800px; margin-bottom: 34px; }
.page-head h1 { margin-bottom: 14px; }
.page-head .lead { margin-bottom: 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 52px 0 20px;
}
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; max-width: 58ch; }
.section-head a { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); text-decoration: none; white-space: nowrap; }
.section-head a:hover { color: var(--lime); }

.card { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-family: var(--display);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--lime); color: #070907; box-shadow: 0 0 0 rgba(200, 255, 77, 0); }
.btn-primary:hover { background: #d5ff73; box-shadow: 0 8px 30px -10px rgba(200, 255, 77, 0.5); }
.btn-ghost { border-color: var(--line-2); color: var(--text-2); background: rgba(255, 255, 255, 0.015); }
.btn-ghost:hover { border-color: var(--muted); color: var(--text); background: rgba(255, 255, 255, 0.04); }
.btn-quiet { padding: 8px 12px; border-color: var(--line); color: var(--muted); background: transparent; font-size: 12px; font-weight: 500; }
.btn-quiet:hover { color: var(--text); border-color: var(--line-2); }
.btn-danger { border-color: rgba(255, 106, 86, 0.4); color: var(--coral); background: transparent; }
.btn-danger:hover { background: var(--coral-soft); }
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-sm { padding: 7px 12px; font-size: 11.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-arrow { font-family: var(--mono); font-size: 13px; }

/* pills & tags */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.pill.lime { border-color: rgba(200, 255, 77, 0.3); color: var(--lime); background: var(--lime-soft); }
.pill.amber { border-color: rgba(255, 194, 71, 0.3); color: var(--amber); background: var(--amber-soft); }
.pill.coral { border-color: rgba(255, 106, 86, 0.3); color: var(--coral); background: var(--coral-soft); }
.pill.sky { border-color: rgba(125, 199, 255, 0.3); color: var(--sky); background: var(--sky-soft); }
.pill.solid { background: var(--lime); color: #060806; border-color: var(--lime); font-weight: 500; }

/* --------------------------------------------------------------------------
   Home
   -------------------------------------------------------------------------- */

.hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 48px; align-items: center; padding: 18px 0 8px; }
.hero h1 { margin-bottom: 20px; }
.hero h1 .outline { color: transparent; -webkit-text-stroke: 1px var(--lime); }
.hero .lead { margin-bottom: 26px; max-width: 54ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 24px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta i { width: 4px; height: 4px; border-radius: 50%; background: var(--lime); opacity: 0.7; }
.resume-line { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 12px; color: var(--muted); }
.resume-line strong { color: var(--text-2); font-weight: 500; }

/* terminal illustration */
.terminal {
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: linear-gradient(165deg, #121813, #0b0f0c 70%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  position: relative;
}
.terminal::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(200, 255, 77, 0.045) 50%, transparent 62%);
}
.terminal-head { display: flex; align-items: center; gap: 10px; padding: 11px 15px; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, 0.22); }
.term-dots { display: flex; gap: 5px; }
.term-dots i { width: 7px; height: 7px; border-radius: 50%; background: #2b342c; }
.term-dots i:first-child { background: rgba(255, 106, 86, 0.7); }
.term-dots i:nth-child(2) { background: rgba(255, 194, 71, 0.6); }
.term-dots i:nth-child(3) { background: rgba(200, 255, 77, 0.6); }
.terminal-title { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.terminal-live { margin-left: auto; font-family: var(--mono); font-size: 8px; letter-spacing: 0.12em; color: var(--lime); display: flex; align-items: center; gap: 5px; }
.terminal-live i { width: 4px; height: 4px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 6px var(--lime); }
.pulse-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.pulse-col { padding: 12px; border-right: 1px solid var(--line); }
.pulse-col:last-child { border-right: 0; }
.pulse-col h5 { margin: 0 0 10px; font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; display: flex; justify-content: space-between; font-weight: 500; }
.pulse-col h5 span { color: var(--dim); }
.pulse-row { padding: 8px; border: 1px solid transparent; border-radius: 7px; margin-bottom: 4px; background: rgba(255, 255, 255, 0.02); }
.pulse-row.warn { border-color: rgba(255, 106, 86, 0.22); background: rgba(255, 106, 86, 0.035); }
.pulse-ticker { display: flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 9px; color: var(--text-2); margin-bottom: 5px; }
.dot-coin { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); opacity: 0.7; flex: 0 0 8px; }
.dot-coin.b { background: var(--sky); }
.dot-coin.c { background: var(--violet); }
.dot-coin.d { background: var(--amber); }
.pulse-stats { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 7.5px; color: var(--dim); }
.pulse-stats b { color: var(--muted); font-weight: 400; }
.pulse-stats .bad { color: var(--coral); }
.spark { display: block; width: 100%; height: 16px; margin-top: 5px; opacity: 0.75; }
.terminal-foot { display: flex; justify-content: space-between; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.06em; color: var(--dim); }
.terminal-note { margin: 10px 4px 0; font-family: var(--mono); font-size: 8px; letter-spacing: 0.05em; color: var(--dim); text-transform: uppercase; text-align: right; }

/* home stats strip */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 40px 0 0; background: var(--panel); }
.strip-cell { padding: 18px 20px; border-right: 1px solid var(--line); }
.strip-cell:last-child { border-right: 0; }
.strip-num { display: block; font-family: var(--display); font-size: 1.45rem; font-weight: 600; letter-spacing: -0.03em; color: var(--text); margin-bottom: 2px; }
.strip-num.lime { color: var(--lime); }
.strip-label { font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }

/* module cards */
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.module-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.005));
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: border-color 0.18s, transform 0.18s, background 0.18s;
}
.module-card:hover { border-color: var(--line-2); transform: translateY(-2px); background: rgba(255, 255, 255, 0.03); }
.module-card::before { content: ""; position: absolute; inset: 0 auto auto 0; width: 100%; height: 1px; background: linear-gradient(90deg, transparent, rgba(200, 255, 77, 0.28), transparent); opacity: 0; transition: opacity 0.2s; }
.module-card:hover::before { opacity: 1; }
.module-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.module-num { font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; color: var(--dim); }
.module-card h3 { margin: 0; font-size: 1.02rem; }
.module-card p { margin: 0; font-size: 0.8rem; line-height: 1.55; color: var(--muted); flex: 1; }
.module-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.04em; color: var(--dim); border-top: 1px solid var(--line); padding-top: 11px; }
.module-meta .status { color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.module-meta .status i { width: 4px; height: 4px; border-radius: 50%; background: var(--dim); }
.module-meta .status.done { color: var(--lime); }
.module-meta .status.done i { background: var(--lime); }
.module-meta .status.active { color: var(--text-2); }
.module-meta .status.active i { background: var(--sky); }

/* rules */
.rules-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rule-cell { display: flex; gap: 14px; padding: 18px 20px; background: var(--panel); }
.rule-cell .n { font-family: var(--mono); font-size: 9px; color: var(--lime); padding-top: 3px; }
.rule-cell h4 { margin-bottom: 3px; font-size: 0.9rem; }
.rule-cell p { margin: 0; font-size: 0.78rem; color: var(--muted); line-height: 1.5; }

/* how it works */
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.how-cell { border-top: 1px solid var(--line-2); padding-top: 16px; }
.how-cell .step { font-family: var(--mono); font-size: 9px; color: var(--dim); letter-spacing: 0.1em; }
.how-cell h4 { margin: 8px 0 6px; font-size: 0.92rem; }
.how-cell p { margin: 0; font-size: 0.8rem; color: var(--muted); line-height: 1.55; }

.risk-banner {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid rgba(255, 194, 71, 0.22);
  background: linear-gradient(100deg, rgba(255, 194, 71, 0.06), transparent 70%);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 44px;
}
.risk-banner .ico { font-family: var(--mono); font-size: 13px; color: var(--amber); line-height: 1.5; }
.risk-banner p { margin: 0; font-size: 0.82rem; color: var(--muted); line-height: 1.6; }
.risk-banner strong { color: var(--text-2); font-weight: 600; }

/* --------------------------------------------------------------------------
   Module overview
   -------------------------------------------------------------------------- */

.crumbs-inline { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin-bottom: 18px; }
.crumbs-inline a { color: var(--muted); text-decoration: none; }
.crumbs-inline a:hover { color: var(--lime); }

.module-hero { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 30px; align-items: start; margin-bottom: 36px; }
.module-big-num { font-family: var(--display); font-size: 5.4rem; line-height: 0.8; font-weight: 700; letter-spacing: -0.06em; color: transparent; -webkit-text-stroke: 1px var(--line-2); }
.module-hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); margin-bottom: 12px; }
.module-hero .lead { margin: 0; }
.module-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.lesson-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.lesson-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto 22px;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background 0.15s;
}
.lesson-row:last-child { border-bottom: 0; }
.lesson-row:hover { background: rgba(255, 255, 255, 0.022); }
.lesson-check {
  width: 26px;
  height: 26px;
  margin-left: 8px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--dim);
  background: rgba(0, 0, 0, 0.2);
}
.lesson-check.done { background: var(--lime); border-color: var(--lime); color: #060806; }
.lesson-info h3 { margin: 0 0 3px; font-size: 0.98rem; font-weight: 500; }
.lesson-info p { margin: 0; font-size: 0.78rem; color: var(--muted); line-height: 1.45; }
.lesson-mins { font-family: var(--mono); font-size: 8.5px; color: var(--dim); letter-spacing: 0.05em; white-space: nowrap; }
.lesson-row .chev { color: var(--dim); font-family: var(--mono); font-size: 11px; }

.quiz-cta {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(110deg, rgba(200, 255, 77, 0.045), transparent 55%);
}
.quiz-cta h3 { margin: 0 0 4px; font-size: 1rem; }
.quiz-cta p { margin: 0; font-size: 0.8rem; color: var(--muted); }
.quiz-cta-right { display: flex; align-items: center; gap: 16px; }
.quiz-score { font-family: var(--mono); font-size: 9px; color: var(--muted); letter-spacing: 0.04em; }

/* --------------------------------------------------------------------------
   Lesson
   -------------------------------------------------------------------------- */

.lesson-head { max-width: 820px; margin-bottom: 34px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.lesson-meta-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin-bottom: 16px; }
.lesson-meta-top a { color: var(--muted); text-decoration: none; }
.lesson-meta-top a:hover { color: var(--lime); }
.lesson-head h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 14px; }
.lesson-head .lead { margin: 0; font-size: 1rem; }

.lesson-body { max-width: 780px; }
.lesson-body > p, .lesson-body > ul, .lesson-body > ol { color: var(--text-2); font-size: 0.95rem; }
.lesson-body h2 { margin: 42px 0 14px; padding-top: 4px; font-size: 1.35rem; }
.lesson-body h3 { margin: 30px 0 10px; color: var(--text); }
.lesson-body p { color: var(--text-2); font-size: 0.94rem; line-height: 1.72; }
.lesson-body strong { color: var(--text); font-weight: 600; }
.lesson-body a.inline-link { color: var(--lime); text-decoration: none; border-bottom: 1px solid rgba(200, 255, 77, 0.35); }
.lesson-body a.inline-link:hover { border-bottom-color: var(--lime); }
.lesson-body ul, .lesson-body ol { padding-left: 20px; margin: 0 0 18px; }
.lesson-body li { margin-bottom: 8px; line-height: 1.65; }
.lesson-body li::marker { color: var(--lime); }
.lesson-body hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }

.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(255, 255, 255, 0.02);
  padding: 16px 18px;
  margin: 24px 0;
}
.callout .label { display: block; font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.callout p { margin: 0; font-size: 0.87rem; line-height: 1.65; }
.callout p + p { margin-top: 8px; }
.callout.tip { border-left-color: var(--lime); background: rgba(200, 255, 77, 0.035); }
.callout.tip .label { color: var(--lime); }
.callout.warn { border-left-color: var(--amber); background: rgba(255, 194, 71, 0.04); }
.callout.warn .label { color: var(--amber); }
.callout.danger { border-left-color: var(--coral); background: rgba(255, 106, 86, 0.035); }
.callout.danger .label { color: var(--coral); }
.callout.info { border-left-color: var(--sky); background: rgba(125, 199, 255, 0.035); }
.callout.info .label { color: var(--sky); }

.term-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 6px; }
.term-chip {
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text-2);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.03em;
  text-decoration: none;
}
.term-chip:hover { border-color: var(--lime); color: var(--lime); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 10px; margin: 24px 0; }
.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  padding: 16px;
}
.stat-num { display: block; font-family: var(--display); font-size: 1.65rem; font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; color: var(--text); margin-bottom: 5px; }
.stat-num.lime { color: var(--lime); }
.stat-num.coral { color: var(--coral); }
.stat-num.amber { color: var(--amber); }
.stat-num.sky { color: var(--sky); }
.stat-label { font-family: var(--mono); font-size: 8px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); line-height: 1.5; display: block; }
.stat-note { display: block; font-size: 0.7rem; color: var(--dim); margin-top: 6px; line-height: 1.45; }

.figure { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 20px; margin: 26px 0; }
.figure-head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin-bottom: 16px; }
.figure-head h4 { margin: 0; font-size: 0.86rem; font-weight: 500; }
.figure-head span { font-family: var(--mono); font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.figure-note { margin: 14px 0 0; font-size: 0.72rem; color: var(--dim); line-height: 1.5; }

.bars { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: minmax(88px, 130px) minmax(0, 1fr) 54px; gap: 10px; align-items: center; }
.bar-name { font-family: var(--mono); font-size: 8.5px; color: var(--muted); letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 8px; background: #1b221c; border-radius: 999px; overflow: hidden; position: relative; }
.bar-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #79a92b, var(--lime)); min-width: 2px; }
.bar-fill.amber { background: linear-gradient(90deg, #b37f1d, var(--amber)); }
.bar-fill.coral { background: linear-gradient(90deg, #b34a3b, var(--coral)); }
.bar-fill.sky { background: linear-gradient(90deg, #4682a8, var(--sky)); }
.bar-fill.violet { background: linear-gradient(90deg, #8468a8, var(--violet)); }
.bar-val { font-family: var(--mono); font-size: 8.5px; color: var(--text-2); text-align: right; }
.bar-row.sub .bar-name { color: var(--dim); }

.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 0.82rem; min-width: 540px; }
thead th { text-align: left; padding: 11px 14px; font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); font-weight: 500; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, 0.18); white-space: nowrap; }
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: top; line-height: 1.5; }
tbody tr:last-child td { border-bottom: 0; }
tbody td:first-child { color: var(--text); }
tbody strong { color: var(--text); font-weight: 600; }
td .mini-tag { font-family: var(--mono); font-size: 8px; padding: 2px 6px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--muted); }

.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0; }
.compare-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; background: var(--panel); }
.compare-card h4 { margin: 0 0 4px; font-size: 0.9rem; }
.compare-card .sub { font-family: var(--mono); font-size: 8px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--dim); display: block; margin-bottom: 10px; }
.compare-card ul { margin: 0; padding-left: 16px; }
.compare-card li { font-size: 0.79rem; color: var(--muted); margin-bottom: 6px; line-height: 1.5; }
.compare-card.healthy { border-top: 2px solid var(--lime); }
.compare-card.rigged { border-top: 2px solid var(--coral); }

.rule-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 24px 0; }
.rule-item { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; background: var(--panel); }
.rule-item .num { font-family: var(--mono); font-size: 9px; color: var(--lime); padding-top: 2px; }
.rule-item h4 { margin: 0 0 2px; font-size: 0.85rem; }
.rule-item p { margin: 0; font-size: 0.75rem; color: var(--muted); line-height: 1.5; }

.flag-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 22px 0; }
.flag { border: 1px solid var(--line); border-left: 2px solid rgba(255, 106, 86, 0.55); border-radius: 0 8px 8px 0; padding: 12px 14px; background: rgba(255, 106, 86, 0.025); }
.flag strong { display: block; font-size: 0.81rem; margin-bottom: 2px; color: var(--text); font-weight: 500; }
.flag span { font-size: 0.74rem; color: var(--muted); line-height: 1.5; }

.takeaway { margin: 38px 0 0; padding: 22px; border: 1px solid rgba(200, 255, 77, 0.24); border-radius: var(--radius); background: linear-gradient(120deg, rgba(200, 255, 77, 0.06), transparent 70%); }
.takeaway .label { display: block; font-family: var(--mono); font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--lime); margin-bottom: 8px; }
.takeaway p { margin: 0; font-family: var(--display); font-size: 1rem; line-height: 1.5; color: var(--text); }

.complete-bar {
  max-width: 780px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.complete-hint { font-size: 0.78rem; color: var(--dim); max-width: 40ch; margin: 0; }
.complete-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.completed-stamp { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lime); }
.completed-stamp .tick { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: #060806; font-size: 10px; }

.pager { max-width: 780px; display: flex; justify-content: space-between; gap: 14px; margin-top: 26px; }
.pager a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; border: 1px solid var(--line); border-radius: 9px; padding: 12px 15px; min-width: 190px; }
.pager a:hover { border-color: var(--line-2); background: rgba(255, 255, 255, 0.02); }
.pager .dir { font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.pager .t { font-size: 0.82rem; color: var(--text-2); }
.pager a.next { text-align: right; margin-left: auto; }

/* --------------------------------------------------------------------------
   Interactive labs
   -------------------------------------------------------------------------- */

.lab {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background:
    radial-gradient(600px 200px at 100% 0%, rgba(200, 255, 77, 0.05), transparent 70%),
    var(--panel);
  margin: 28px 0;
  overflow: hidden;
}
.lab-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.lab-kicker { font-family: var(--mono); font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--lime); display: block; margin-bottom: 6px; }
.lab-title { font-family: var(--display); font-size: 1.05rem; font-weight: 600; margin: 0; letter-spacing: -0.02em; }
.lab-sub { margin: 4px 0 0; font-size: 0.77rem; color: var(--muted); line-height: 1.5; max-width: 58ch; }
.lab-body { padding: 20px; }
.lab-foot { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 0.7rem; color: var(--dim); line-height: 1.5; }

.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  background: #0a0e0b;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  color: var(--text);
  padding: 9px 11px;
  font-family: var(--mono);
  font-size: 12px;
  width: 100%;
  transition: border-color 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--lime); outline: none; }
.field textarea { font-family: var(--font); font-size: 0.82rem; line-height: 1.55; resize: vertical; min-height: 76px; }
.field .suffix { position: relative; }
.field .suffix input { padding-right: 32px; }
.field .suffix span { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 9px; color: var(--dim); }
.field-note { font-size: 0.68rem; color: var(--dim); line-height: 1.45; }

.out-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 8px; }
.out { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: rgba(0, 0, 0, 0.18); }
.out-label { display: block; font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); line-height: 1.4; margin-bottom: 5px; min-height: 19px; }
.out-val { display: block; font-family: var(--display); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; color: var(--text); line-height: 1.15; }
.out-val.lime { color: var(--lime); }
.out-val.coral { color: var(--coral); }
.out-val.amber { color: var(--amber); }
.out-val small { font-family: var(--mono); font-size: 8px; color: var(--dim); font-weight: 400; letter-spacing: 0; margin-left: 2px; }

.verdict { margin-top: 12px; padding: 10px 13px; border-radius: 7px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); font-size: 0.77rem; line-height: 1.5; color: var(--muted); }
.verdict.good { border-color: rgba(200, 255, 77, 0.3); background: var(--lime-soft); color: #d9f5a3; }
.verdict.warn { border-color: rgba(255, 194, 71, 0.3); background: var(--amber-soft); color: #ffe0a3; }
.verdict.bad { border-color: rgba(255, 106, 86, 0.3); background: var(--coral-soft); color: #ffb7ad; }
.verdict strong { color: var(--text); font-weight: 600; }

.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--lime); height: 4px; }
.range-val { font-family: var(--mono); font-size: 11px; color: var(--lime); min-width: 52px; text-align: right; }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: #0a0e0b; }
.seg button { border: 0; background: transparent; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.04em; padding: 7px 11px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--lime); color: #060806; }
.seg button:not(.on):hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }

/* style picker */
.style-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.style-card {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.16);
  padding: 15px;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.style-card:hover { border-color: var(--line-2); background: rgba(255, 255, 255, 0.025); }
.style-card.on { border-color: rgba(200, 255, 77, 0.55); background: var(--lime-soft); }
.style-card .horizon { font-family: var(--mono); font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lime); display: block; margin-bottom: 5px; }
.style-card h4 { margin: 0 0 4px; font-size: 0.92rem; }
.style-card p { margin: 0; font-size: 0.75rem; color: var(--muted); line-height: 1.5; }
.style-detail { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 0.8rem; color: var(--text-2); display: none; }
.style-detail.show { display: block; }
.style-detail strong { color: var(--lime); }
.style-detail .kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; margin-top: 10px; }
.style-detail .kv span { font-family: var(--mono); font-size: 8.5px; color: var(--muted); display: block; }
.style-detail .kv b { font-weight: 500; color: var(--text); font-size: 0.8rem; }

/* bubble map */
.map-shell { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(220px, 0.75fr); gap: 16px; align-items: start; }
.map-stage { border: 1px solid var(--line); border-radius: 10px; background: radial-gradient(circle at 50% 45%, #131a14, #0a0e0b 75%); overflow: hidden; position: relative; }
.map-svg { display: block; width: 100%; height: auto; }
.map-bubble { cursor: pointer; transition: opacity 0.2s, stroke-width 0.15s; }
.map-bubble circle { transition: stroke 0.15s, fill-opacity 0.15s; }
.map-bubble:hover circle { stroke: #fff; stroke-opacity: 0.55; }
.map-bubble text { pointer-events: none; font-family: var(--mono); }
.map-line { stroke: #ffffff; stroke-opacity: 0.14; stroke-width: 1; }
.map-line.on { stroke-opacity: 0.5; stroke: var(--lime); }
.map-panel { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 15px; min-height: 250px; }
.map-panel h4 { margin: 0 0 4px; font-size: 0.88rem; }
.map-panel .hint { font-size: 0.72rem; color: var(--dim); margin: 0; line-height: 1.55; }
.map-panel .clicked-label { font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.map-panel .share { font-family: var(--display); font-size: 2.1rem; font-weight: 600; letter-spacing: -0.04em; color: var(--lime); line-height: 1.1; margin: 6px 0 2px; }
.map-panel .share small { font-family: var(--mono); font-size: 9px; color: var(--dim); letter-spacing: 0; }
.map-panel .band { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 8px; }
.map-panel .verdict { margin-top: 10px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; }
.map-legend button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: 0.03em; padding: 2px; }
.map-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.map-legend button:hover { color: var(--text); }
.map-legend .lbl { color: var(--dim); }
.map-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.map-toggle { display: inline-flex; gap: 6px; align-items: center; font-family: var(--mono); font-size: 8.5px; color: var(--muted); cursor: pointer; user-select: none; }
.map-toggle input { accent-color: var(--lime); }
.map-axis { font-family: var(--mono); font-size: 8px; color: var(--dim); fill: var(--dim); }

/* checklist */
.check-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.check-item { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; background: rgba(0, 0, 0, 0.14); transition: border-color 0.15s, background 0.15s; }
.check-item:hover { border-color: var(--line-2); }
.check-item input { margin: 3px 0 0; accent-color: var(--lime); width: 14px; height: 14px; flex: 0 0 14px; }
.check-item label { font-size: 0.79rem; color: var(--text-2); line-height: 1.5; cursor: pointer; }
.check-item.done { border-color: rgba(200, 255, 77, 0.28); background: rgba(200, 255, 77, 0.04); }
.check-item.done label { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(200, 255, 77, 0.4); }
.check-item b { color: var(--text); font-weight: 500; }
.timer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.timer { font-family: var(--mono); font-size: 1.8rem; color: var(--lime); letter-spacing: -0.03em; line-height: 1; }
.timer.urgent { color: var(--coral); }
.timer-actions { display: flex; gap: 8px; }

/* pre-trade questions */
.question-list { display: grid; gap: 7px; }
.yn { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; }
.yn p { margin: 0; font-size: 0.79rem; color: var(--text-2); line-height: 1.45; }
.yn .yn-btns { display: flex; gap: 5px; flex: 0 0 auto; }
.yn .yn-btns button { border: 1px solid var(--line); background: transparent; color: var(--muted); font-family: var(--mono); font-size: 8px; padding: 4px 9px; border-radius: 5px; }
.yn .yn-btns button.on-yes { background: var(--lime); color: #060806; border-color: var(--lime); }
.yn .yn-btns button.on-no { background: var(--coral); color: #0b0605; border-color: var(--coral); }

/* concentration gauge */
.gauge { margin: 18px 0 6px; }
.gauge-track { display: flex; height: 10px; border-radius: 999px; overflow: hidden; }
.gauge-track i { height: 100%; }
.gauge-track .g1 { background: #4b7a2a; width: 8.333%; }
.gauge-track .g2 { background: #a9c32f; width: 16.667%; }
.gauge-track .g3 { background: var(--amber); width: 25%; }
.gauge-track .g4 { background: var(--coral); width: 50%; }
.gauge-marker { position: relative; height: 18px; }
.gauge-marker span { position: absolute; top: 2px; transform: translateX(-50%); font-family: var(--mono); font-size: 8px; color: var(--text); }
.gauge-scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 7.5px; color: var(--dim); margin-top: 2px; }

/* --------------------------------------------------------------------------
   Quiz
   -------------------------------------------------------------------------- */

.quiz-shell { max-width: 780px; margin: 0 auto; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.quiz-top .label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.quiz-top .score-live { font-family: var(--mono); font-size: 9px; color: var(--muted); }
.q-progress { height: 4px; background: #1a211a; border-radius: 999px; overflow: hidden; margin-bottom: 26px; }
.q-progress i { display: block; height: 100%; background: var(--lime); border-radius: 999px; transition: width 0.3s; }
.q-card h1 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin-bottom: 8px; line-height: 1.2; }
.q-count { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; color: var(--lime); text-transform: uppercase; margin-bottom: 10px; display: block; }
.q-sub { color: var(--muted); font-size: 0.87rem; margin-bottom: 24px; }
.options { display: grid; gap: 8px; margin-bottom: 18px; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 9px;
  padding: 13px 15px;
  color: var(--text-2);
  font-size: 0.88rem;
  line-height: 1.5;
  transition: border-color 0.15s, background 0.15s;
}
.option:hover:not(.locked) { border-color: var(--line-2); background: rgba(255, 255, 255, 0.03); }
.option .letter { display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid var(--line-2); border-radius: 5px; font-family: var(--mono); font-size: 8.5px; color: var(--muted); flex: 0 0 21px; margin-top: 0; }
.option.correct { border-color: rgba(200, 255, 77, 0.5); background: var(--lime-soft); color: var(--text); }
.option.correct .letter { background: var(--lime); color: #060806; border-color: var(--lime); }
.option.wrong { border-color: rgba(255, 106, 86, 0.45); background: var(--coral-soft); color: #ffd0c9; }
.option.wrong .letter { background: var(--coral); color: #0b0605; border-color: var(--coral); }
.option.locked { cursor: default; }
.option.dimmed { opacity: 0.55; }
.explain { border: 1px solid var(--line); border-left: 3px solid var(--lime); border-radius: 0 8px 8px 0; padding: 13px 15px; background: rgba(255, 255, 255, 0.02); margin-bottom: 18px; }
.explain.wrong { border-left-color: var(--coral); }
.explain .xl { font-family: var(--mono); font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lime); display: block; margin-bottom: 4px; }
.explain.wrong .xl { color: var(--coral); }
.explain p { margin: 0; font-size: 0.82rem; color: var(--muted); line-height: 1.55; }
.quiz-actions { display: flex; justify-content: flex-end; gap: 10px; }

.quiz-result { text-align: center; padding: 18px 0 8px; }
.score-ring {
  width: 132px; height: 132px; border-radius: 50%; margin: 0 auto 20px;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--lime) calc(var(--p) * 1%), #1b221c 0);
}
.score-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--bg); }
.score-ring .ring-inner { position: relative; text-align: center; }
.score-ring .pct { font-family: var(--display); font-size: 1.9rem; font-weight: 700; letter-spacing: -0.04em; display: block; line-height: 1; }
.score-ring .sub { font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; color: var(--dim); text-transform: uppercase; }
.quiz-result h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 10px; }
.quiz-result p { max-width: 50ch; margin: 0 auto 20px; color: var(--muted); font-size: 0.88rem; }
.result-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.review-list { text-align: left; margin-top: 34px; border-top: 1px solid var(--line); padding-top: 20px; }
.review-list h3 { margin-bottom: 12px; }
.review-item { border: 1px solid var(--line); border-radius: 8px; padding: 13px 15px; margin-bottom: 8px; }
.review-item .rq { font-size: 0.84rem; color: var(--text-2); margin: 0 0 5px; }
.review-item .ra { font-family: var(--mono); font-size: 8.5px; line-height: 1.6; color: var(--dim); margin: 0; }
.review-item .ra b { color: var(--lime); font-weight: 500; }
.review-item .ra .no { color: var(--coral); }

/* --------------------------------------------------------------------------
   Glossary
   -------------------------------------------------------------------------- */

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 20px; }
.search-wrap { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.search-wrap input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 10px 12px 10px 34px;
  color: var(--text);
  font-size: 0.83rem;
}
.search-wrap input:focus { border-color: var(--lime); outline: none; }
.search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); opacity: 0.5; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 4px 10px; font-family: var(--mono); font-size: 8px; letter-spacing: 0.04em; }
.chip:hover { border-color: var(--line-2); color: var(--text-2); }
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.result-count { font-family: var(--mono); font-size: 8.5px; color: var(--dim); margin-left: auto; letter-spacing: 0.04em; }
.glossary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gloss-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: var(--panel); position: relative; }
.gloss-card:hover { border-color: var(--line-2); }
.gloss-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.gloss-card h3 { margin: 0; font-size: 0.95rem; font-weight: 600; }
.gloss-cat { font-family: var(--mono); font-size: 7px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); border: 1px solid var(--line); padding: 2px 6px; border-radius: 3px; margin-top: 3px; flex: 0 0 auto; }
.star-btn { border: 0; background: transparent; color: var(--dim); font-size: 13px; line-height: 1; padding: 0 0 0 4px; flex: 0 0 auto; }
.star-btn.on { color: var(--lime); }
.gloss-card p { margin: 0 0 8px; font-size: 0.8rem; color: var(--text-2); line-height: 1.55; }
.gloss-why { font-size: 0.74rem !important; color: var(--muted) !important; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px !important; }
.gloss-why b { font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); font-weight: 400; display: block; margin-bottom: 2px; }
.see { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.see button { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 4px; padding: 2px 6px; font-family: var(--mono); font-size: 7.5px; }
.see button:hover { color: var(--lime); border-color: rgba(200, 255, 77, 0.35); }
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty-state h3 { margin-bottom: 6px; }
.empty-state p { font-size: 0.84rem; margin: 0; }

.term-dialog {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: #101511;
  color: var(--text);
  padding: 26px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
}
.term-dialog::backdrop { background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(3px); }
.term-dialog h3 { font-size: 1.3rem; margin: 0 0 3px; }
.term-dialog .cat { font-family: var(--mono); font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lime); }
.term-dialog p { font-size: 0.87rem; color: var(--text-2); line-height: 1.65; margin: 14px 0 10px; }
.term-dialog .why { border-top: 1px solid var(--line); padding-top: 12px; font-size: 0.8rem; color: var(--muted); }
.term-dialog .why b { display: block; font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.1em; color: var(--amber); font-weight: 400; margin-bottom: 3px; text-transform: uppercase; }
.dialog-close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; }
.dialog-close:hover { color: var(--text); }

/* --------------------------------------------------------------------------
   Tools
   -------------------------------------------------------------------------- */

.core-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tool-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.tool-card:hover { border-color: var(--line-2); }
.tool-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tool-idx { font-family: var(--mono); font-size: 8px; color: var(--dim); letter-spacing: 0.1em; }
.tool-card h3 { margin: 0; font-size: 1.05rem; }
.tool-role { font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lime); }
.tool-desc { font-size: 0.81rem; color: var(--text-2); line-height: 1.6; margin: 0; }
.tool-line { border-top: 1px solid var(--line); padding-top: 9px; font-size: 0.76rem; line-height: 1.55; color: var(--muted); }
.tool-line b { display: block; font-family: var(--mono); font-size: 7px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); font-weight: 400; margin-bottom: 2px; }
.tool-line.watch b { color: var(--amber); }
.tool-card .tool-desc { flex: 1; }
.tool-group { margin-top: 30px; }
.tool-group-head { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 4px; }
.tool-group-head h3 { font-size: 0.98rem; margin: 0; }
.tool-group-head p { margin: 0; font-size: 0.73rem; color: var(--dim); }
.tool-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; padding: 11px 0; border-bottom: 1px solid rgba(35, 44, 36, 0.65); }
.tool-row:last-child { border-bottom: 0; }
.tool-row .tn { font-family: var(--mono); font-size: 9.5px; color: var(--text-2); }
.tool-row .tn span { display: block; font-size: 7px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); margin-top: 2px; }
.tool-row .td { font-size: 0.78rem; color: var(--muted); line-height: 1.55; }
.tool-note { border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, 0.02); padding: 14px 16px; margin: 20px 0; font-size: 0.78rem; color: var(--muted); line-height: 1.6; }
.tool-note strong { color: var(--text); }

/* --------------------------------------------------------------------------
   Journal
   -------------------------------------------------------------------------- */

.journal-layout { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
.journal-form { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 20px; }
.journal-form h3 { margin: 0 0 4px; font-size: 1rem; }
.journal-form .sub { font-size: 0.74rem; color: var(--dim); margin: 0 0 14px; line-height: 1.5; }
.journal-form .field { margin-bottom: 10px; }
.journal-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.journal-form .two .field { margin-bottom: 0; }
.journal-form .check-row { display: flex; align-items: center; gap: 8px; margin: 10px 0 12px; }
.journal-form .check-row input { accent-color: var(--lime); width: 14px; height: 14px; }
.journal-form .check-row label { font-size: 0.76rem; color: var(--muted); }
.journal-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.journal-stats .js { border: 1px solid var(--line); border-radius: 8px; padding: 11px; background: rgba(0, 0, 0, 0.16); }
.js .n { display: block; font-family: var(--display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; }
.js .l { font-family: var(--mono); font-size: 7px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--dim); line-height: 1.4; display: block; }
.entries { display: grid; gap: 8px; }
.entry { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 14px 16px; }
.entry-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.entry-coin { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 0.9rem; }
.entry-date { font-family: var(--mono); font-size: 7.5px; color: var(--dim); letter-spacing: 0.04em; }
.entry-body { font-size: 0.79rem; color: var(--muted); line-height: 1.55; }
.entry-body b { color: var(--text-2); font-weight: 500; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.entry .del { border: 0; background: transparent; color: var(--dim); font-family: var(--mono); font-size: 8px; }
.entry .del:hover { color: var(--coral); }
.tag { font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.03em; border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; color: var(--muted); }
.tag.emotion { border-color: rgba(255, 194, 71, 0.28); color: var(--amber); }
.tag.followed { border-color: rgba(200, 255, 77, 0.28); color: var(--lime); }
.tag.broke { border-color: rgba(255, 106, 86, 0.28); color: var(--coral); }
.journal-empty { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 40px 24px; text-align: center; color: var(--muted); }
.journal-empty h3 { margin-bottom: 6px; }
.journal-empty p { font-size: 0.82rem; max-width: 36ch; margin: 0 auto; line-height: 1.6; }

/* --------------------------------------------------------------------------
   Progress page
   -------------------------------------------------------------------------- */

.progress-hero { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 30px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--panel); margin-bottom: 24px; }
.big-ring { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--lime) calc(var(--p) * 1%), #1b221c 0); position: relative; }
.big-ring::before { content: ""; position: absolute; inset: 7px; background: var(--panel); border-radius: 50%; }
.big-ring .inner { position: relative; text-align: center; }
.big-ring .pct { font-family: var(--display); font-size: 2.3rem; letter-spacing: -0.05em; font-weight: 700; display: block; line-height: 1; }
.big-ring .lbl { font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.progress-hero h2 { margin: 0 0 6px; }
.progress-hero p { margin: 0 0 12px; color: var(--muted); font-size: 0.85rem; max-width: 54ch; }
.progress-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--mono); font-size: 8px; letter-spacing: 0.04em; color: var(--dim); }
.progress-facts b { color: var(--text-2); font-weight: 500; }
.module-bars { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 20px; margin-bottom: 20px; }
.module-bars h3 { margin-bottom: 14px; font-size: 0.95rem; }
.mbar { display: grid; grid-template-columns: minmax(120px, 170px) minmax(0, 1fr) 60px; gap: 12px; align-items: center; margin-bottom: 9px; }
.mbar .name { font-size: 0.79rem; color: var(--text-2); }
.mbar .pct { font-family: var(--mono); font-size: 8px; color: var(--dim); text-align: right; }
.data-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 20px; margin-bottom: 20px; }
.data-panel h3 { margin: 0 0 4px; font-size: 0.95rem; }
.data-panel p { font-size: 0.79rem; color: var(--muted); margin: 0 0 14px; line-height: 1.55; }
.data-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.name-row { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 16px; max-width: 420px; }
.name-row .field { flex: 1; margin: 0; }
.quiz-results-list { display: grid; gap: 6px; margin-top: 12px; }
.qr-row { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 8px; font-size: 0.78rem; color: var(--muted); }
.qr-row:first-child { border-top: 0; padding-top: 0; }
.qr-row b { color: var(--text-2); font-weight: 500; }
.qr-row .pass { color: var(--lime); font-family: var(--mono); font-size: 8px; letter-spacing: 0.04em; }
.qr-row .fail { color: var(--amber); font-family: var(--mono); font-size: 8px; letter-spacing: 0.04em; }

/* --------------------------------------------------------------------------
   Certificate / exam
   -------------------------------------------------------------------------- */

.exam-gate { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 26px; max-width: 700px; }
.exam-gate h2 { margin-bottom: 8px; }
.exam-gate p { color: var(--muted); font-size: 0.87rem; }
.gate-list { display: grid; gap: 6px; margin: 18px 0; }
.gate-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 7px; padding: 9px 12px; font-size: 0.8rem; color: var(--text-2); text-decoration: none; }
.gate-row.done { border-color: rgba(200, 255, 77, 0.22); }
.gate-row .st { font-family: var(--mono); font-size: 8px; color: var(--dim); letter-spacing: 0.04em; }
.gate-row.done .st { color: var(--lime); }

.cert-wrap { max-width: 900px; margin: 0 auto; }
.certificate {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 52px 56px;
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(200, 255, 77, 0.06), transparent 60%),
    linear-gradient(160deg, #101511, #0b0f0c);
  overflow: hidden;
}
.certificate::before { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(200, 255, 77, 0.18); border-radius: 3px; pointer-events: none; }
.cert-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 46px; }
.cert-brand { display: flex; align-items: center; gap: 11px; }
.cert-brand .brand-mark { width: 34px; height: 34px; flex: 0 0 34px; font-size: 12px; border-radius: 9px; }
.cert-brand .brand-name { font-family: var(--display); font-size: 13px; font-weight: 700; }
.cert-brand .brand-sub { font-family: var(--mono); font-size: 7px; letter-spacing: 0.14em; color: var(--dim); text-transform: uppercase; }
.cert-label { font-family: var(--mono); font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--lime); display: block; margin-bottom: 10px; }
.cert-title { font-family: var(--display); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; letter-spacing: -0.04em; margin: 0 0 10px; }
.cert-sub { font-size: 0.88rem; color: var(--muted); max-width: 48ch; margin: 0 0 34px; }
.cert-name { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2.2rem); border-bottom: 1px solid var(--line-2); padding-bottom: 10px; margin-bottom: 6px; max-width: 480px; min-height: 48px; }
.cert-name-empty { color: var(--dim); font-size: 1.1rem; }
.cert-name-label { font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.cert-foot { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; margin-top: 50px; }
.cert-meta { display: flex; gap: 30px; flex-wrap: wrap; }
.cert-meta div span { display: block; font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--dim); margin-bottom: 3px; }
.cert-meta div b { font-family: var(--mono); font-size: 10px; color: var(--text-2); font-weight: 500; }
.cert-seal { width: 76px; height: 76px; border: 1px solid rgba(200, 255, 77, 0.4); border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 7px; letter-spacing: 0.08em; color: var(--lime); text-align: center; line-height: 1.4; flex: 0 0 76px; background: rgba(200, 255, 77, 0.05); }
.cert-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.cert-gate { text-align: center; border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 50px 24px; }
.cert-gate h2 { margin-bottom: 8px; }
.cert-gate p { color: var(--muted); font-size: 0.86rem; max-width: 46ch; margin: 0 auto 18px; }

/* --------------------------------------------------------------------------
   Toast / misc
   -------------------------------------------------------------------------- */

.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  background: #e9f7cf;
  color: #0a1205;
  font-size: 0.78rem;
  padding: 9px 16px;
  border-radius: 999px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.25s ease both;
  max-width: min(90vw, 460px);
  text-align: center;
  line-height: 1.4;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.fade-in { animation: fadeUp 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.delay-1 { animation-delay: 0.04s; }
.delay-2 { animation-delay: 0.09s; }
.delay-3 { animation-delay: 0.14s; }

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

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { gap: 32px; }
  .hero h1 { font-size: clamp(2rem, 4vw, 3rem); }
  .pulse-col { padding: 9px; }
  .pulse-stats { font-size: 7px; }
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .terminal-wrap { max-width: 560px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .strip-cell:nth-child(2) { border-right: 0; }
  .strip-cell:nth-child(1), .strip-cell:nth-child(2) { border-bottom: 1px solid var(--line); }
  .how-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
  .core-grid { grid-template-columns: 1fr; }
  .map-shell { grid-template-columns: 1fr; }
  .map-panel { min-height: 0; }
  .journal-layout { grid-template-columns: 1fr; }
  .journal-form { position: static; }
  .glossary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  :root { --sidebar-w: 0px; }
  .sidebar { width: 288px; transform: translateX(-102%); transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1); box-shadow: 30px 0 80px rgba(0, 0, 0, 0.6); }
  body.menu-open .sidebar { transform: translateX(0); }
  .sidebar-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.62); z-index: 45; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
  body.menu-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
  body.menu-open { overflow: hidden; }
  .main { margin-left: 0; width: 100%; }
  .menu-btn { display: flex; }
  .mobile-brand { display: inline-block; }
  .topbar { padding: 0 20px; height: 58px; }
  .crumbs { display: none; }
  #view { padding: 30px 22px 64px; }
  .site-foot { padding: 26px 22px 32px; grid-template-columns: 1fr; }
  .save-pill { font-size: 8px; }
  .module-hero { grid-template-columns: 1fr; gap: 12px; }
  .module-big-num { font-size: 3.6rem; }
  .rules-grid { grid-template-columns: 1fr; }
  .compare-grid { grid-template-columns: 1fr; }
  .flag-grid { grid-template-columns: 1fr; }
  .rule-grid { grid-template-columns: 1fr; }
  .style-grid { grid-template-columns: 1fr; }
  .progress-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .progress-hero p { margin-left: auto; margin-right: auto; }
  .progress-facts { justify-content: center; }
  .certificate { padding: 34px 26px; }
  .cert-head { margin-bottom: 32px; }
  .cert-foot { margin-top: 34px; }
  .tool-row { grid-template-columns: 1fr; gap: 3px; }
  .journal-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  #view { padding: 24px 16px 56px; }
  h1 { font-size: 2.05rem; }
  .hero { padding-top: 4px; }
  .hero h1 { font-size: 2.35rem; }
  .hero-meta { gap: 6px 12px; font-size: 8px; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .strip-cell { padding: 14px; }
  .strip-num { font-size: 1.2rem; }
  .module-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .rules-grid { grid-template-columns: 1fr; }
  .module-hero h1 { font-size: 1.9rem; }
  .lesson-row { grid-template-columns: 34px minmax(0, 1fr) 18px; gap: 10px; padding: 14px; }
  .lesson-mins { display: none; }
  .lesson-check { margin-left: 2px; }
  .lesson-head { margin-bottom: 26px; padding-bottom: 20px; }
  .lesson-body h2 { margin-top: 34px; }
  .lab-head { flex-direction: column; gap: 10px; }
  .lab-body { padding: 15px; }
  .field-grid { grid-template-columns: 1fr 1fr; }
  .out-grid { grid-template-columns: 1fr 1fr; }
  .compare-grid, .stat-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 90px minmax(0, 1fr) 44px; gap: 8px; }
  .toolbar { align-items: stretch; }
  .result-count { margin-left: 0; width: 100%; }
  .quiz-shell { margin: 0; }
  .option { padding: 12px; font-size: 0.83rem; }
  .complete-bar { flex-direction: column; align-items: stretch; }
  .complete-actions { justify-content: stretch; }
  .complete-actions .btn { flex: 1; }
  .quiz-actions .btn { flex: 1; }
  .pager { flex-direction: column; }
  .pager a, .pager a.next { min-width: 0; width: 100%; text-align: left; margin-left: 0; }
  .cert-head { flex-direction: column; gap: 16px; }
  .cert-foot { flex-direction: column; align-items: flex-start; }
  .cert-seal { align-self: flex-end; }
  .certificate { padding: 26px 18px; }
  .cert-label { margin-top: 10px; }
  .topbar-right { display: none; }
  .menu-btn { flex: 0 0 38px; }
  .site-foot { font-size: 10.5px; }
  .journal-stats { grid-template-columns: 1fr 1fr 1fr; }
  .js { padding: 9px; }
  .js .n { font-size: 1.05rem; }
  .entry { padding: 12px; }
  .map-toolbar { align-items: flex-start; flex-direction: column; }
  .map-stage { overflow-x: auto; }
  .map-svg { min-width: 460px; }
  .pulse-grid { grid-template-columns: 1fr 1fr 1fr; }
  .pulse-col { padding: 7px; }
  .pulse-ticker { font-size: 8px; }
  .pulse-row { padding: 6px; }
  .pulse-stats { font-size: 6.5px; gap: 3px; flex-wrap: wrap; }
  .spark { display: none; }
  .terminal-foot { font-size: 6.5px; }
  .terminal-note { text-align: left; }
  .q-card h1 { font-size: 1.4rem; }
  .score-ring { width: 112px; height: 112px; }
  .score-ring .pct { font-size: 1.6rem; }
  .cert-meta { gap: 18px; }
  .term-dialog { padding: 20px; }
  .name-row { flex-direction: column; align-items: stretch; }
}

/* --------------------------------------------------------------------------
   Print: certificate only
   -------------------------------------------------------------------------- */

@media print {
  .no-print { display: none !important; }
  :root { --bg: #fff; --panel: #fff; --text: #111; --text-2: #222; --muted: #555; --dim: #666; --line: #ccc; --line-2: #999; }
  body { background: #fff; color: #111; }
  body::before, .sidebar, .sidebar-scrim, .topbar, .site-foot, .cert-actions, .toast-wrap, .cert-name-label, .cert-name-empty { display: none !important; }
  .main { margin: 0; width: 100%; }
  #view { padding: 0; max-width: none; }
  .cert-wrap { max-width: none; }
  .certificate { background: #fff; color: #111; border: 2px solid #111; box-shadow: none; padding: 60px; }
  .certificate::before { border-color: #bbb; }
  .cert-title, .cert-name { color: #111; }
  .cert-label, .cert-brand .brand-name, .cert-meta div b { color: #111; }
  .cert-seal { color: #111; border-color: #111; background: none; }
  .brand-mark { background: #111; color: #fff; box-shadow: none; }
  .cert-sub, .cert-brand .brand-sub, .cert-meta div span { color: #444; }
}
