@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #090c12;
  --bg-elev: #10141d;
  --bg-elev-2: #161b26;
  --bg-elev-3: #1d2330;
  --border: #232a3a;
  --border-soft: #1a202c;
  --text: #edf0f5;
  --text-dim: #8991a4;
  --text-faint: #5c6479;
  --accent: #5b8def;
  --accent-2: #6fceb8;
  --gold: #cd9a52;
  --gold-bright: #e6b972;
  --gold-dim: #8a6a3c;
  --green: #5cbf8d;
  --red: #e0696e;
  --purple: #9a8bef;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 12px 28px -8px rgba(0,0,0,0.55);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --hero-art: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MjAgMzAwIj48Y2lyY2xlIGN4PSIzNDAiIGN5PSI2MCIgcj0iMjAwIiBzdHJva2U9IiNjZDlhNTIiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgb3BhY2l0eT0iMC4zNSIvPjxjaXJjbGUgY3g9IjM0MCIgY3k9IjYwIiByPSIxNDAiIHN0cm9rZT0iI2NkOWE1MiIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBvcGFjaXR5PSIwLjM1Ii8+PGNpcmNsZSBjeD0iMzQwIiBjeT0iNjAiIHI9IjgwIiBzdHJva2U9IiNjZDlhNTIiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgb3BhY2l0eT0iMC4zNSIvPjxwYXRoIGQ9Ik0yMCwyNzAgTDEyMCwyMDUgTDIxMCwxNTAgTDMwMCw5MCBMMzQ1LDYyIiBzdHJva2U9IiNlNmI5NzIiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWRhc2hhcnJheT0iNSA3IiBmaWxsPSJub25lIiBvcGFjaXR5PSIwLjU1Ii8+PGNpcmNsZSBjeD0iMTIwIiBjeT0iMjA1IiByPSIzIiBmaWxsPSIjZTZiOTcyIiBvcGFjaXR5PSIwLjYiLz48Y2lyY2xlIGN4PSIyMTAiIGN5PSIxNTAiIHI9IjMiIGZpbGw9IiNlNmI5NzIiIG9wYWNpdHk9IjAuNiIvPjxjaXJjbGUgY3g9IjMwMCIgY3k9IjkwIiByPSIzIiBmaWxsPSIjZTZiOTcyIiBvcGFjaXR5PSIwLjYiLz48cGF0aCBkPSJNMzQ1LDUwIEwzNjMsNjggTDM0NSw2MiBMMzMyLDcyIFoiIGZpbGw9IiNlNmI5NzIiIG9wYWNpdHk9IjAuOCIvPjwvc3ZnPg==");
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(900px 480px at 85% -8%, rgba(205,154,82,0.07) 0%, transparent 60%),
    radial-gradient(700px 500px at -5% 15%, rgba(91,141,239,0.05) 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand, .nav-btn, .btn, .stat-value, .result-score, .cat-name, .rank-name {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

button { font-family: inherit; cursor: pointer; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 30px;
  background: rgba(9,12,18,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand-icon { width: 30px; height: 30px; flex-shrink: 0; }

.topnav {
  display: flex;
  gap: 4px;
  flex: 1;
  flex-wrap: wrap;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  transition: color .15s ease, background .15s ease;
}
.nav-btn:hover { color: var(--text); background: var(--bg-elev-2); }
.nav-btn.active { color: var(--gold-bright); background: var(--bg-elev-2); box-shadow: inset 0 0 0 1px var(--gold-dim); }

.topbar-stats { display: flex; gap: 8px; }
.pill {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-dim);
  white-space: nowrap;
}
#streak-pill, #level-pill { color: var(--text); }

main#app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px 90px;
}

.app-footer {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.78rem;
  padding: 22px 20px;
  border-top: 1px solid var(--border-soft);
  margin-top: 20px;
}
.app-footer a { color: var(--text-dim); }
.app-footer .footer-links { margin-top: 8px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Cards / layout ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.card h2, .card h3 { margin-top: 0; font-weight: 600; }

.section-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 34px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.section-title:first-child { margin-top: 0; }

/* ---------- Dashboard ---------- */
.hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 30px 32px;
  flex-wrap: wrap;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-art);
  background-repeat: no-repeat;
  background-position: right -40px top -20px;
  background-size: 420px;
  opacity: 0.5;
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.hero-sub { color: var(--text-dim); margin: 0; max-width: 42ch; }
.rank-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-elev-2);
  padding: 12px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.rank-badge .rank-icon {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--gold-bright), var(--gold-dim));
  flex-shrink: 0;
}
.rank-badge .rank-name { font-weight: 600; color: var(--gold-bright); font-size: 0.98rem; }
.rank-badge .rank-xp { font-size: 0.78rem; color: var(--text-dim); font-family: var(--font-body); }

.xp-bar-wrap { width: 220px; }
.xp-bar-track {
  background: var(--bg);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.xp-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
  transition: width .4s ease;
}
.xp-bar-label { font-size: 0.74rem; color: var(--text-faint); margin-top: 5px; text-align: right; font-family: var(--font-body); }

.stat-tile { text-align: center; padding: 20px 10px; }
.stat-tile .stat-value { font-size: 1.9rem; font-weight: 600; letter-spacing: -0.02em; }
.stat-tile .stat-label { color: var(--text-dim); font-size: 0.8rem; margin-top: 5px; font-family: var(--font-body); }

.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: -0.005em;
  transition: transform .08s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--gold); color: #1c1206; }
.btn-primary:hover:not(:disabled) { background: var(--gold-bright); }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-elev-2); border-color: var(--text-faint); }
.btn-gold { background: var(--gold-bright); color: #1c1206; }
.btn-danger { background: transparent; color: var(--red); border: 1px solid rgba(224,105,110,0.4); }
.btn-danger:hover:not(:disabled) { background: rgba(224,105,110,0.1); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 0.8rem; border-radius: 7px; }

/* ---------- Category cards ---------- */
.cat-card {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.cat-card:hover { border-color: var(--gold-dim); transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-head { display: flex; align-items: center; gap: 10px; }
.cat-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  font-family: var(--font-display);
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--gold-bright);
  flex-shrink: 0;
}
.cat-name { font-weight: 600; }
.cat-desc { color: var(--text-dim); font-size: 0.82rem; line-height: 1.45; flex: 1; font-family: var(--font-body); }
.mastery-row { display: flex; align-items: center; gap: 8px; font-size: 0.76rem; color: var(--text-faint); font-family: var(--font-body); }
.mastery-bar { flex: 1; height: 5px; background: var(--bg); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.mastery-fill { height: 100%; background: var(--accent-2); }
.due-badge {
  font-size: 0.7rem;
  font-family: var(--font-body);
  background: rgba(205,154,82,0.13);
  color: var(--gold-bright);
  border: 1px solid rgba(205,154,82,0.3);
  padding: 2px 9px;
  border-radius: 999px;
  align-self: flex-start;
  font-weight: 600;
}

/* ---------- Quiz ---------- */
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-weight: 600;
}
.progress-track {
  flex: 1;
  height: 6px;
  background: var(--bg-elev-2);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  min-width: 120px;
}
.progress-fill { height: 100%; background: var(--gold); }
.timer-chip {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
}
.timer-chip.low { color: var(--red); border-color: rgba(224,105,110,0.5); }

.question-card {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 28px;
  min-height: 260px;
  box-shadow: var(--shadow-sm);
}
.question-prompt { font-size: 1.1rem; font-weight: 600; margin-bottom: 20px; white-space: pre-line; font-family: var(--font-body); letter-spacing: 0; }
.question-meta { color: var(--text-faint); font-size: 0.76rem; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.option-btn {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  text-align: left;
  font-weight: 500;
  font-family: var(--font-body);
  transition: all .12s ease;
}
.option-btn:hover:not(:disabled) { border-color: var(--gold-dim); background: var(--bg-elev-3); }
.option-btn.correct { background: rgba(92,191,141,0.13); border-color: var(--green); color: var(--green); }
.option-btn.incorrect { background: rgba(224,105,110,0.13); border-color: var(--red); color: var(--red); }
.option-btn:disabled { opacity: 0.75; }

.input-row { display: flex; gap: 10px; align-items: center; }
.text-input {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-body);
  flex: 1;
}
.text-input:focus { outline: 2px solid var(--gold-dim); outline-offset: 1px; }

.feedback-box {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.89rem;
  line-height: 1.5;
  font-family: var(--font-body);
}
.feedback-box.correct { background: rgba(92,191,141,0.1); border: 1px solid rgba(92,191,141,0.35); color: var(--green); }
.feedback-box.incorrect { background: rgba(224,105,110,0.1); border: 1px solid rgba(224,105,110,0.35); color: #f0a4a7; }

.quiz-footer { display: flex; justify-content: space-between; margin-top: 20px; }

/* memory / attention / spatial widgets */
.seq-grid { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 20px 0; }
.seq-cell {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.letter-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  font-family: "SF Mono", Consolas, monospace;
  font-size: 1.02rem;
  margin: 16px 0;
  user-select: none;
}
.letter-grid span { text-align: center; padding: 4px 0; border-radius: 4px; cursor: pointer; }
.letter-grid span.picked { background: var(--gold); color: #1c1206; }
.shape-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 16px 0; }
.shape-box {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
}

/* reaction game */
.reaction-zone {
  height: 260px;
  position: relative;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.reaction-target {
  position: absolute;
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  cursor: pointer;
  transition: transform .1s ease;
}
.reaction-target:active { transform: scale(0.9); }

/* ---------- Results ---------- */
.result-hero { text-align: center; padding: 44px 20px; }
.result-score { font-family: var(--font-display); font-size: 3rem; font-weight: 700; letter-spacing: -0.03em; }
.result-score .unit { font-size: 1.3rem; color: var(--text-dim); font-weight: 500; }
.badge-toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(205,154,82,0.13);
  border: 1px solid rgba(205,154,82,0.35);
  color: var(--gold-bright);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.84rem;
  margin: 6px 4px;
  font-family: var(--font-body);
}

/* ---------- Learning ---------- */
.learn-card { padding: 0; overflow: hidden; }
.learn-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  user-select: none;
}
.learn-summary::-webkit-details-marker { display: none; }
.learn-summary::before {
  content: "▸";
  color: var(--text-faint);
  font-size: 0.75rem;
  margin-right: 2px;
  transition: transform .15s ease;
}
.learn-card[open] .learn-summary::before { transform: rotate(90deg); }
.learn-card[open] .learn-summary { border-bottom: 1px solid var(--border-soft); }
.learn-body { padding: 4px 20px 22px; font-family: var(--font-body); }
.learn-body h4 { margin: 16px 0 8px; font-size: 0.88rem; font-family: var(--font-display); font-weight: 600; color: var(--gold-bright); }
.learn-body h4:first-child { margin-top: 4px; }
.learn-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; line-height: 1.55; color: var(--text); }
.learn-tips li::marker { color: var(--green); }
.learn-pitfalls li::marker { color: var(--red); }
.learn-body .btn { margin-top: 18px; }

/* ---------- Badges ---------- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.badge-item {
  text-align: center;
  padding: 16px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
}
.badge-item.locked { opacity: 0.32; filter: grayscale(1); }
.badge-icon { font-size: 1.7rem; }
.badge-name { font-size: 0.78rem; font-weight: 600; margin-top: 6px; font-family: var(--font-display); }
.badge-desc { font-size: 0.7rem; color: var(--text-faint); margin-top: 2px; font-family: var(--font-body); }

/* ---------- Exam setup ---------- */
.exam-option {
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.exam-option.selected { border-color: var(--gold-dim); box-shadow: 0 0 0 1px var(--gold-dim); }
.exam-option h4 { margin: 0 0 6px; font-weight: 600; }
.exam-option p { margin: 0; color: var(--text-dim); font-size: 0.82rem; font-family: var(--font-body); }

.section-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; font-family: var(--font-body); }
.section-list li { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--bg-elev-2); font-size: 0.85rem; }
.section-list li.done { color: var(--green); }
.section-list li.current { color: var(--gold-bright); font-weight: 600; }

/* charts */
.chart-wrap { width: 100%; overflow-x: auto; }
.heatmap-cell { transition: fill .15s; }

/* misc */
.muted { color: var(--text-dim); }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.space-between { display: flex; justify-content: space-between; align-items: center; }
.flex-wrap { flex-wrap: wrap; }

.toast-root {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-elev-2);
  border: 1px solid var(--gold-dim);
  color: var(--text);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  animation: slidein .2s ease;
}
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ---------- Auth screen ---------- */
.auth-card { max-width: 420px; margin: 60px auto; }
.auth-card h2 { font-weight: 600; }

/* ---------- Legal pages ---------- */
.legal-doc { max-width: 760px; margin: 0 auto; font-family: var(--font-body); line-height: 1.7; }
.legal-doc h1 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 4px; }
.legal-doc h2 { font-family: var(--font-display); font-size: 1.1rem; margin: 28px 0 8px; color: var(--gold-bright); }
.legal-doc p, .legal-doc li { color: var(--text-dim); font-size: 0.92rem; }
.legal-doc .legal-updated { color: var(--text-faint); font-size: 0.8rem; margin-bottom: 24px; }

/* ---------- Landing page ---------- */
.landing-hero {
  position: relative;
  text-align: center;
  padding: 56px 20px 36px;
  overflow: hidden;
}
.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-art);
  background-repeat: no-repeat;
  background-position: center -40px;
  background-size: 720px;
  opacity: 0.35;
  pointer-events: none;
}
.landing-hero-copy { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.landing-eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 14px;
}
.landing-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 18px;
}
.landing-sub { color: var(--text-dim); font-size: 1.05rem; line-height: 1.6; margin: 0 0 24px; }
.landing-hero .cta-row { justify-content: center; margin-top: 0; }

.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-top: 8px;
  box-shadow: var(--shadow-sm);
}
.stat-item { text-align: center; }
.stat-item .stat-value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--gold-bright); }
.stat-item .stat-label { color: var(--text-dim); font-size: 0.78rem; margin-top: 4px; }

.landing-section { margin-top: 40px; }

.cat-chip-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.cat-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 8px 16px 8px 8px;
  font-size: 0.86rem;
  font-weight: 500;
}
.cat-chip .cat-icon { width: 26px; height: 26px; font-size: 0.85rem; border-radius: 50%; }

.steps-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 18px; }
.step-card {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px;
}
.step-number {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: #1c1206;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 14px;
}
.feature-title { font-family: var(--font-display); font-weight: 600; margin: 0 0 6px; }
.feature-desc { color: var(--text-dim); font-size: 0.85rem; line-height: 1.5; }

.final-cta {
  text-align: center;
  margin-top: 40px;
  padding: 40px 20px;
  background: var(--bg-elev);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
}
.final-cta h2 { font-family: var(--font-display); font-size: 1.5rem; margin: 0 0 20px; }

@media (max-width: 640px) {
  .topbar { padding: 12px 14px; }
  main#app { padding: 20px 12px 70px; }
  .hero { padding: 22px; }
  .hero::before { display: none; }
  .landing-hero { padding: 48px 16px 40px; }
  .landing-title { font-size: 1.8rem; }
  .landing-hero::before { background-size: 600px; }
}
