:root {
    --bg: #f8f8fc;
  --bg-subtle: #ffffff;
  --bg-muted: #eef0fa;
  --bg-elevated: rgba(255,255,255,.6);
  --border: #e3e3f0;
  --border-strong: #c9c9de;
  --text: #14141f;
  --text-muted: #55566b;
  --text-light: #9393a8;

    --accent: #5457e5;
  --accent-hover: #4143c9;
  --accent-light: #eef0ff;
  --accent-border: #cfd0fb;

    --accent-2: #0891a8;
  --accent-2-hover: #06748a;
  --accent-2-light: #e6fbff;
  --accent-2-border: #a6ecf7;

    --accent-3: #db2777;
  --accent-3-light: #fdf2f8;
  --accent-3-border: #fbcfe8;

  --green: #0e9f6e;
  --green-bg: #ecfdf5;
  --green-border: #a7f3d0;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --red-border: #fecaca;
  --amber: #b45309;
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;

  --radius: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(20,20,31,.05);
  --shadow: 0 4px 16px rgba(20,20,31,.06);
  --shadow-md: 0 12px 30px -10px rgba(84,87,229,.22);
  --shadow-glow: 0 0 0 1px rgba(84,87,229,.22), 0 10px 26px -6px rgba(84,87,229,.24);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  --font-display: 'Space Grotesk', var(--font);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --ease: 0.18s ease;
  --grad: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 45%, var(--accent-2) 100%);
}

:root[data-theme="dark"] {
  --bg: #08080d;
  --bg-subtle: #111119;
  --bg-muted: #191922;
  --bg-elevated: rgba(255,255,255,.035);
  --border: #22222e;
  --border-strong: #33333f;
  --text: #f5f5f7;
  --text-muted: #a3a3b2;
  --text-light: #6c6c7c;

  --accent: #7c7ff2;
  --accent-hover: #9698f5;
  --accent-light: rgba(124,127,242,.14);
  --accent-border: rgba(124,127,242,.4);

  --accent-2: #22d3ee;
  --accent-2-hover: #67e3f5;
  --accent-2-light: rgba(34,211,238,.13);
  --accent-2-border: rgba(34,211,238,.38);

  --accent-3: #f472b6;
  --accent-3-light: rgba(244,114,182,.13);
  --accent-3-border: rgba(244,114,182,.38);

  --green: #34d399;
  --green-bg: rgba(52,211,153,.14);
  --green-border: rgba(52,211,153,.38);
  --red: #f87171;
  --red-bg: rgba(248,113,113,.14);
  --red-border: rgba(248,113,113,.38);
  --amber: #fbbf24;
  --amber-bg: rgba(251,191,36,.14);
  --amber-border: rgba(251,191,36,.38);

  --shadow-md: 0 12px 32px -8px rgba(124,127,242,.35);
  --shadow-glow: 0 0 0 1px rgba(124,127,242,.4), 0 8px 28px -6px rgba(124,127,242,.45);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  transition: background var(--ease), color var(--ease);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(600px circle at 12% -5%, rgba(84,87,229,.10), transparent 60%),
    radial-gradient(560px circle at 100% 10%, rgba(8,145,168,.08), transparent 55%),
    radial-gradient(520px circle at 20% 100%, rgba(219,39,119,.06), transparent 55%);
  animation: drift 22s ease-in-out infinite alternate;
}
:root[data-theme="dark"] body::before {
  background:
    radial-gradient(600px circle at 12% -5%, rgba(124,127,242,.20), transparent 60%),
    radial-gradient(560px circle at 100% 10%, rgba(34,211,238,.14), transparent 55%),
    radial-gradient(520px circle at 20% 100%, rgba(244,114,182,.10), transparent 55%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .35;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(-18px,14px,0) scale(1.04); }
}

a { color: var(--accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
canvas { display: block; }

h1, h2, h3, .card-title, .logo, .hero-title, .section-title { font-family: var(--font-display); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.site-main { flex: 1 0 auto; display: flex; flex-direction: column; }
.site-footer { flex-shrink: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
}
.logo-mark { flex-shrink: 0; display: block; filter: drop-shadow(0 2px 10px rgba(84,87,229,.35)); }
.logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer-brand .logo { margin-bottom: 4px; }

.site-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.site-nav a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 7px 13px;
  border-radius: 999px;
  transition: color var(--ease), background var(--ease);
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: var(--bg-elevated);
  text-decoration: none;
}
.site-nav a.active { color: var(--accent-hover); background: var(--accent-light); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  transition: color var(--ease), border-color var(--ease), transform .15s;
}
.theme-toggle:hover { color: var(--accent-hover); border-color: var(--accent-border); transform: rotate(12deg); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  transition: background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease), transform .15s;
  white-space: nowrap;
  cursor: pointer;
  min-height: 32px;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 18px -4px rgba(84,87,229,.4); }
.btn-primary:hover { filter: brightness(1.06); box-shadow: var(--shadow-glow); }
.btn-secondary { background: var(--bg-elevated); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--bg-muted); border-color: var(--accent-border); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text); }
.btn-sm { padding: 6px 14px; font-size: .8125rem; min-height: 28px; }

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.btn-row .btn { flex: 0 0 auto; }
.btn-group { display: flex; gap: 8px; }

#hero { padding: 108px 0 84px; text-align: center; position: relative; }
#hero.hero-compact { padding: 72px 0 64px; }
#hero.hero-lg { padding: 140px 0 128px; }
.hero-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-hover);
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  padding: 5px 14px;
  border-radius: 999px;
  margin: 24px auto 0;
  animation: fade-up .6s ease both;
}
.hero-title {
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.18;
  padding: .02em .06em .12em;
  margin-bottom: 6px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fade-up .6s .05s ease both;
}
.hero-sub {
  font-size: clamp(1.125rem, 2.5vw, 1.35rem);
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  animation: fade-up .6s .1s ease both;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fade-up .6s .15s ease both;
}
.hero-actions .btn { padding: 13px 28px; font-size: .9375rem; }

.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 36px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  animation: fade-up .6s .2s ease both;
}
.hero-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hero-stat-num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--text); }
.hero-stat-label { font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-light); }
.hero-stat.is-live .hero-stat-num { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.progress-panel {
  display: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  max-width: 620px;
  margin: 40px auto 0;
  backdrop-filter: blur(10px);
  text-align: left;
}
.progress-panel.has-data { display: block; }
.progress-title {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 12px;
}
.progress-grid { display: flex; flex-wrap: wrap; gap: 24px; }
.progress-item { display: flex; flex-direction: column; gap: 2px; }
.progress-item-label { font-size: .75rem; color: var(--text-muted); }
.progress-item-value { font-size: 1rem; font-weight: 700; font-family: var(--mono); color: var(--text); }

.section { padding: 80px 0; border-top: 1px solid var(--border); }
.section-first { border-top: none; padding-top: 52px; }
.section-header { margin-bottom: 40px; }
.section-header.with-action { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section-label {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-hover);
  margin-bottom: 8px;
}
.section-label.label-teal { color: var(--accent-2-hover); }
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--text);
  margin-bottom: 8px;
}
.section-desc { font-size: .9375rem; color: var(--text-muted); max-width: 560px; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
  transition: box-shadow var(--ease), border-color var(--ease), transform var(--ease), background var(--ease);
}
.card:hover { box-shadow: var(--shadow-glow); border-color: var(--accent-border); transform: translateY(-3px); background: var(--bg-subtle); }
.card-link { text-decoration: none; color: inherit; }
.card-title { font-size: 1.0625rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -.01em; }
.card-desc { font-size: .875rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 16px; flex: 1; }
.card-tool .card-desc { flex: none; min-height: 2.75em; }
.card-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.tag {
  display: inline-flex;
  align-items: center;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--mono);
}
.tag-easy { background: var(--green-bg); color: var(--green); }
.tag-medium { background: var(--amber-bg); color: var(--amber); }
.tag-muted { background: var(--bg-muted); color: var(--text-muted); }
.tag-accent { background: var(--accent-light); color: var(--accent-hover); }
.tag-teal { background: var(--accent-2-light); color: var(--accent-2-hover); }

.code-box {
  background: #0c0c14;
  color: #e4e4e7;
  font-family: var(--mono);
  font-size: .8125rem;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow-x: auto;
  margin-bottom: 16px;
  line-height: 1.55;
  max-height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.code-box .comment { color: #71717a; }
.code-box .keyword { color: var(--accent-2); font-weight: 600; }
.code-box .ok { color: var(--green); }
.code-box .warn { color: var(--amber); }

.form-group { margin-bottom: 12px; }
.form-label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: .8125rem;
  background: var(--bg-subtle);
  color: var(--text);
}
.form-textarea { font-family: var(--font); resize: vertical; }
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
  background: var(--bg);
}
.form-input-inline { flex: 1; min-width: 0; }
.status-text { font-size: .8125rem; color: var(--text-muted); }
.status-text.mono { font-family: var(--mono); }

.swatch-row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.color-swatch {
  width: 48px; height: 48px;
  border-radius: 10px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.game-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
  backdrop-filter: blur(10px);
}
.game-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.game-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 1px; }
.stat-label {
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-light);
}
.stat-value { font-size: 1.0625rem; font-weight: 700; font-family: var(--mono); color: var(--text); }

.canvas-wrap {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-subtle);
  line-height: 0;
  max-width: 400px;
  margin: 0 auto;
}
.canvas-wrap canvas { width: 100%; height: auto; display: block; }

.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--bg-subtle);
  background: color-mix(in srgb, var(--bg-subtle) 92%, transparent);
  backdrop-filter: blur(6px);
  text-align: center;
  padding: 20px;
}
.game-overlay.hidden { display: none; }
.overlay-title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}
.overlay-sub {
  font-size: .8125rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0 0 12px;
}

.dpad {
  display: grid;
  grid-template-columns: repeat(3, 44px);
  grid-template-rows: repeat(2, 44px);
  gap: 4px;
  justify-content: center;
  margin-top: 16px;
}
.dpad-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--text-muted);
  transition: background var(--ease), transform .1s;
  user-select: none;
  -webkit-user-select: none;
}
.dpad-btn:hover { background: var(--bg-muted); color: var(--text); }
.dpad-btn:active { transform: scale(.93); }

.memory-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 400px;
  margin: 0 auto;
}
.m-card {
  aspect-ratio: 1;
  cursor: pointer;
  perspective: 600px;
  border-radius: var(--radius);
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  width: 100%;
}
.m-card-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .32s ease;
  border-radius: var(--radius);
}
.m-card.flipped .m-card-inner { transform: rotateY(180deg); }
.m-card-front, .m-card-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
}
.m-card-front {
  background: var(--grad);
  color: rgba(255,255,255,.85);
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(.875rem, 2.5vw, 1.1rem);
}
.m-card-back {
  background: var(--bg-elevated);
  transform: rotateY(180deg);
  font-size: clamp(1.25rem, 4vw, 1.75rem);
}
.m-card.matched .m-card-front,
.m-card.matched .m-card-back { background: var(--green-bg); border-color: var(--green-border); }
.m-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.memory-win {
  display: none;
  text-align: center;
  padding: 20px 0 4px;
}

.memory-win:not([hidden]) { display: block; }

.reaction-zone {
  min-height: 180px;
  max-width: 400px;
  margin: 0 auto;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  padding: 48px 24px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  text-align: center;
  transition: background .1s, border-color .1s;
}
.reaction-zone[data-state="idle"],
.reaction-zone[data-state="waiting"] { background: var(--bg-subtle); border-color: var(--border); }
.reaction-zone[data-state="go"] { background: var(--green-bg); border-color: var(--green); }
.reaction-zone[data-state="too-early"] { background: var(--red-bg); border-color: var(--red-border); }
.reaction-zone[data-state="result"] { background: var(--accent-light); border-color: var(--accent-border); }
.reaction-main { font-size: 1.5rem; font-weight: 700; }
.reaction-hint { font-size: .875rem; color: var(--text-muted); }
.reaction-hist-label {
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: 16px;
  margin-bottom: 6px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
.reaction-bars {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 48px;
  max-width: 400px;
  margin: 0 auto;
}
.r-bar {
  flex: 1;
  min-height: 4px;
  background: var(--grad);
  opacity: .55;
  border-radius: 2px 2px 0 0;
  transition: height .25s ease;
}
.r-bar:last-child { opacity: 1; }

.help-panel {
  display: none;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-top: 12px;
  font-size: .8125rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.help-panel.open { display: block; }
.help-panel p + p { margin-top: 4px; }
kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: .7rem;
  background: var(--bg-elevated);
  color: var(--text);
}

.article-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.article-card:hover { transform: translateY(-3px); border-color: var(--accent-border); box-shadow: var(--shadow-md); }
.article-date { font-size: .75rem; color: var(--text-light); font-family: var(--mono); margin-bottom: 8px; }
.article-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.article-snippet { font-size: .875rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 14px; flex: 1; }
.article-meta { display: flex; align-items: center; gap: 8px; font-size: .75rem; color: var(--text-light); margin-top: auto; }
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-light); flex-shrink: 0; }

.roadmap-list {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--border);
  margin-left: 7px;
}
.roadmap-item { position: relative; padding: 0 0 28px 28px; }
.roadmap-item:last-child { padding-bottom: 0; }
.roadmap-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--grad);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.roadmap-item.is-planned::before { background: var(--border-strong); box-shadow: none; }
.roadmap-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.roadmap-title { font-size: .9375rem; font-weight: 700; color: var(--text); }
.roadmap-desc { font-size: .875rem; color: var(--text-muted); line-height: 1.55; max-width: 560px; }

.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.about-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform var(--ease), border-color var(--ease);
}
.about-card:hover { transform: translateY(-3px); border-color: var(--accent-border); }
.about-icon {
  width: 42px; height: 42px;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem;
  margin-bottom: 14px;
}
.about-card:nth-child(2n) .about-icon { background: var(--accent-2-light); border-color: var(--accent-2-border); }
.about-card-title { font-size: .9375rem; font-weight: 700; margin-bottom: 6px; }
.about-card-desc { font-size: .875rem; color: var(--text-muted); line-height: 1.55; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 0;
  background: var(--bg-subtle);
  margin-top: auto;
}
.footer-container { display: flex; flex-direction: column; gap: 24px; }
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand { max-width: 300px; }
.footer-brand p { font-size: .8125rem; color: var(--text-muted); margin-top: 8px; }
.footer-links-group { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col h4 {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 12px;
  color: var(--text);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: .875rem; color: var(--text-muted); }
.footer-col a:hover { color: var(--accent-hover); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .8125rem;
  color: var(--text-light);
}
.footer-bottom a { color: var(--text-muted); }

.breadcrumb {
  font-size: .8125rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb span { color: var(--text-light); margin: 0 6px; }

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad);
  color: #fff;
  border: none;
  font-size: 1.05rem;
  box-shadow: 0 6px 22px -6px rgba(84,87,229,.45);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 150;
}
.back-to-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { filter: brightness(1.06); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  body::before { animation: none; }
}

@media (max-width: 640px) {
  #hero { padding: 72px 0 60px; }
  #hero.hero-compact { padding: 48px 0 40px; }
  #hero.hero-lg { padding: 80px 0 72px; }
  .section { padding: 56px 0; }
  .section-first { padding-top: 36px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .memory-board { gap: 6px; }
  .site-nav a { padding: 6px 10px; font-size: .8125rem; }
  .footer-links-group { gap: 32px; }
  .hero-stats { gap: 24px; }
  .back-to-top { right: 14px; bottom: 14px; }
}

.site-nav a.nav-cta { background: var(--grad); color: #fff; margin-left: 6px; box-shadow: 0 4px 16px -6px rgba(84,87,229,.5); }
.site-nav a.nav-cta:hover, .site-nav a.nav-cta.active { color: #fff; background: var(--grad); filter: brightness(1.06); }
@media (max-width: 860px) {
  .header-inner { height: auto; min-height: 64px; flex-wrap: wrap; padding: 10px 0; }
  .site-nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 2px; }
  .theme-toggle { margin-left: auto; }
}

.lead { font-size: 1.0625rem; color: var(--text-muted); max-width: 640px; line-height: 1.65; }
.center { text-align: center; }
.mt-24 { margin-top: 24px; }
.steps { counter-reset: step; }
.step-num { display: inline-flex; width: 28px; height: 28px; border-radius: 999px; align-items: center; justify-content: center; background: var(--accent-light); color: var(--accent-hover); font-weight: 700; font-size: .8125rem; margin-bottom: 12px; }
.cta-band { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h3 { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 6px; }
.cta-band p { color: var(--text-muted); font-size: .9375rem; max-width: 520px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.chip { font: inherit; font-size: .8125rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg-elevated); color: var(--text-muted); cursor: pointer; transition: all var(--ease); }
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent-light); color: var(--accent-hover); border-color: var(--accent-border); }
.course[hidden] { display: none; }
.course-meta { display: flex; gap: 14px; font-size: .75rem; color: var(--text-light); font-family: var(--mono); margin-bottom: 14px; flex-wrap: wrap; }
.note { font-size: .8125rem; color: var(--text-muted); margin-top: 20px; }

.prose { max-width: 720px; }
.prose h1 { font-family: var(--font-display); font-size: 2rem; letter-spacing: -.025em; margin-bottom: 10px; line-height: 1.2; }
.prose h2 { font-family: var(--font-display); font-size: 1.25rem; margin: 32px 0 10px; letter-spacing: -.015em; }
.prose p { color: var(--text-muted); line-height: 1.75; margin-bottom: 16px; font-size: 1rem; }
.prose ul { margin: 0 0 16px 20px; color: var(--text-muted); line-height: 1.75; }
.prose a { color: var(--accent-hover); text-decoration: underline; }
.prose pre { background: #0c0c14; color: #e4e4e7; border-radius: var(--radius); border: 1px solid var(--border); padding: 16px; overflow-x: auto; font-family: var(--mono); font-size: .8125rem; line-height: 1.6; margin: 0 0 20px; }
.prose code { font-family: var(--mono); font-size: .875em; }
.post-meta { font-size: .8125rem; color: var(--text-light); font-family: var(--mono); margin-bottom: 28px; display: flex; gap: 10px; flex-wrap: wrap; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border); font-size: .9375rem; flex-wrap: wrap; }
.article-card a.stretch { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }

.faq { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-subtle); padding: 0 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; font-size: .9375rem; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--text-light); font-weight: 400; }
.faq[open] summary::after { content: "\2212"; }
.faq p { color: var(--text-muted); font-size: .9rem; line-height: 1.65; padding-bottom: 16px; }

.auth-wrap { max-width: 440px; margin: 0 auto; }
.auth-card { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); }
.auth-card h1 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 6px; }
.auth-card .sub { color: var(--text-muted); font-size: .9rem; margin-bottom: 22px; line-height: 1.55; }
.banner { border-radius: var(--radius); padding: 10px 14px; font-size: .875rem; margin-bottom: 14px; border: 1px solid; }
.banner-error { background: var(--red-bg); border-color: var(--red-border); color: var(--red); }
.banner-info { background: var(--accent-light); border-color: var(--accent-border); color: var(--accent-hover); }
.banner[hidden] { display: none; }
.auth-foot { text-align: center; font-size: .8125rem; color: var(--text-muted); margin-top: 18px; }
.btn-block { width: 100%; justify-content: center; }

.contact-card .mail { font-family: var(--mono); font-size: .875rem; color: var(--accent-hover); }

/* ── article extras (generated from Markdown by tools/build.py) ── */
.prose h3 { font-family: var(--font-display); font-size: 1.0625rem; margin: 26px 0 8px; letter-spacing: -.01em; }
.prose h4 { font-size: .9375rem; margin: 20px 0 6px; }
.prose ol { margin: 0 0 16px 22px; color: var(--text-muted); line-height: 1.75; }
.prose li { margin-bottom: 4px; }
.prose strong { color: var(--text); }
.prose blockquote { margin: 0 0 18px; padding: 4px 0 4px 16px; border-left: 3px solid var(--accent-border); color: var(--text-muted); }
.prose blockquote p { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); margin: 4px 0 18px; }
.prose :not(pre) > code { background: var(--bg-muted); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }
.table-wrap { overflow-x: auto; margin: 0 0 20px; }
.prose table { border-collapse: collapse; width: 100%; font-size: .9375rem; }
.prose th, .prose td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.prose th { color: var(--text); font-weight: 600; }
.prose td { color: var(--text-muted); }
.post-nav a[rel="next"] { margin-left: auto; text-align: right; }
@media (max-width: 640px) { .cta-band { padding: 24px; } }