/* =========================================================
   MonPCIdéal — styles
   Two themes share the same layout. Only the variables change:
   .theme-a = friendly (default) · .theme-b = techy dark (expert / extreme)
   ========================================================= */

.theme-a {
  --bg: #FFF8F1;
  --surface: #FFFFFF;
  --surface-2: #FBF1E7;
  --text: #2B2118;
  --muted: #7A5D47;
  --border: #EAD7C4;
  --accent: #E8743B;
  --accent-text: #B4501F;
  --accent-soft: #FDEBDD;
  --on-accent: #FFFFFF;
  --ok: #2F7D32;
  --warn: #A15C00;
  --radius: 16px;
  --font-head: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "Inter", system-ui, sans-serif;
  --lv0: #3B6D11; --lv0-bg: #EAF3DE;
  --lv1: #185FA5; --lv1-bg: #E6F1FB;
  --lv2: #854F0B; --lv2-bg: #FAEEDA;
  --lv3: #A32D2D; --lv3-bg: #FCEBEB;
}

.theme-b {
  --bg: #0E1116;
  --surface: #141A22;
  --surface-2: #1A212B;
  --text: #E6EDF3;
  --muted: #8B96A3;
  --border: #2A3340;
  --accent: #3FE0A5;
  --accent-text: #3FE0A5;
  --accent-soft: rgba(63, 224, 165, 0.10);
  --on-accent: #0E1116;
  --ok: #3FE0A5;
  --warn: #F2B84B;
  --radius: 6px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --lv0: #97C459; --lv0-bg: transparent;
  --lv1: #5BA4EE; --lv1-bg: transparent;
  --lv2: #EF9F27; --lv2-bg: transparent;
  --lv3: #F07070; --lv3-bg: transparent;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  transition: background-color .35s ease, color .35s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.8rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--accent-text); }
button { font: inherit; color: inherit; }

.container { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 16px 48px; flex: 1; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  max-width: 920px; width: 100%; margin: 0 auto; padding: 18px 16px;
}
.brand { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; text-decoration: none; color: var(--text); }
.brand span { color: var(--accent-text); }
.brand-mark { color: var(--accent); }
.expert-toggle { display: flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; color: var(--muted); }
.expert-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- Landing ---------- */
.hero { padding: 40px 0 24px; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 640px; }
.promises { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 28px 0; }
.promise { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.promise strong { display: block; font-family: var(--font-head); margin-bottom: 4px; }
.promise span { color: var(--muted); font-size: .95rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  font-weight: 600; text-decoration: none; color: var(--text);
  transition: transform .1s ease, border-color .2s ease;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-ghost { background: transparent; }
.btn-small { min-height: 40px; padding: 0 14px; font-size: .9rem; }
.btn:focus-visible, .card:focus-visible, .chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Quiz ---------- */
.progress-wrap { margin: 12px 0 24px; }
.progress-label { font-size: .85rem; color: var(--muted); margin-bottom: 6px; font-family: var(--font-mono); }
.progress { height: 8px; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); border-radius: 8px; transition: width .3s ease; }
.theme-b .progress, .theme-b .progress > div { border-radius: 2px; }

.question .subtitle { color: var(--muted); margin-top: -.25rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 18px 0; }
.card {
  display: flex; align-items: flex-start; gap: 12px; text-align: left; width: 100%;
  padding: 16px; background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); cursor: pointer; transition: border-color .15s ease, background-color .15s ease;
}
.card:hover { border-color: var(--accent); }
.card.selected { border: 2px solid var(--accent); background: var(--accent-soft); padding: 15.5px; }
.card .icon { font-size: 1.6rem; line-height: 1; }
.card .label { display: block; font-weight: 600; }
.card .hint { display: block; font-size: .88rem; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.card .tech { display: block; font-family: var(--font-mono); font-size: .78rem; color: var(--accent-text); margin-top: 4px; }

.nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.error { color: #D0452B; font-size: .95rem; min-height: 1.4em; margin: 6px 0 0; }
.theme-b .error { color: #F07070; }

/* Activities grouped by load level */
.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 18px 0 8px; }
.level-title {
  display: inline-block; font-size: .85rem; font-weight: 600; padding: 3px 10px; border-radius: 8px; margin-bottom: 8px;
  font-family: var(--font-mono);
}
.theme-b .level-title { border: 1px solid currentColor; }
.lv-0 { color: var(--lv0); background: var(--lv0-bg); }
.lv-1 { color: var(--lv1); background: var(--lv1-bg); }
.lv-2 { color: var(--lv2); background: var(--lv2-bg); }
.lv-3 { color: var(--lv3); background: var(--lv3-bg); }
.chip {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px; margin-bottom: 8px; font-size: .95rem;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: calc(var(--radius) - 4px); cursor: pointer;
}
.chip:hover { border-color: var(--accent); }
.chip.selected { border: 2px solid var(--accent); background: var(--accent-soft); padding: 9.5px 11.5px; }
.chip small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.3; }

.meter { display: flex; gap: 6px; margin: 16px 0 6px; }
.meter div { flex: 1; height: 10px; border-radius: 5px; background: var(--surface-2); transition: background-color .25s ease; }
.meter-label { font-size: .95rem; }

/* Beginner guide under the levels */
.guide { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-top: 16px; }
.guide h3 { margin-bottom: 8px; }
.guide-row { display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 8px; border-radius: 10px; font-size: .95rem; }
.guide-row.active { background: var(--accent-soft); }
.guide-row em { display: block; color: var(--muted); font-size: .88rem; }
.guide-focus { margin-top: 10px; font-size: .95rem; color: var(--muted); min-height: 1.5em; }

/* Grouped sub-questions */
.field { margin-bottom: 20px; }
.field > p { font-weight: 600; margin-bottom: 0; }

/* Sliders */
.slider-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 18px 0; }
.slider-value { font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 32px; }
.slider-scale { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.bracket { margin-top: 10px; color: var(--muted); }
.vram-result { font-family: var(--font-mono); font-size: 1.1rem; margin-top: 10px; }
.vram-result strong { color: var(--accent-text); font-size: 1.5rem; }
.formula { font-family: var(--font-mono); font-size: .82rem; color: var(--muted); margin-top: 6px; }
select, input[type=number] {
  font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; min-height: 44px;
}

/* ---------- Results ---------- */
.result-hero { background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); padding: 24px; margin: 18px 0; }
.badge { display: inline-block; font-size: .8rem; font-weight: 600; padding: 4px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 10px; font-family: var(--font-mono); }
.price-big { font-family: var(--font-head); font-size: 2rem; font-weight: 800; }
.price-note { color: var(--muted); font-size: .9rem; }
.why { padding-left: 1.2rem; }
.why li { margin-bottom: 6px; }
.section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.callout { border-left: 4px solid var(--warn); background: var(--surface-2); border-radius: 0; padding: 14px 16px; margin: 14px 0; }
.callout.good { border-left-color: var(--ok); }

.parts { width: 100%; border-collapse: collapse; font-size: .95rem; }
.parts th { text-align: left; font-size: .8rem; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.parts td { padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.parts td.role { color: var(--muted); white-space: nowrap; }
.parts td.price { text-align: right; white-space: nowrap; font-weight: 600; }
.parts tr.total td { font-weight: 800; border-bottom: none; font-size: 1.05rem; }
.links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.links a { font-size: .78rem; padding: 2px 8px; border: 1px solid var(--border); border-radius: 99px; text-decoration: none; }
.links a:hover { border-color: var(--accent); }

.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding: 4px 0; }
.checks li::before { content: "✓ "; color: var(--ok); font-weight: 800; }
.checks li.bad::before { content: "✗ "; color: #D0452B; }

.alts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.alt { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.alt .price { font-weight: 800; font-family: var(--font-head); font-size: 1.3rem; }
.not-needed li::marker { content: "✗  "; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.profile-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.profile-chips span { font-size: .8rem; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-family: var(--font-mono); }

/* Legal page */
.legal h2 { font-size: 1.2rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: 8px; }
.todo { background: #FFF1B8; color: #6B4E00; padding: 1px 6px; border-radius: 4px; font-weight: 600; }

.footer { text-align: center; font-size: .82rem; color: var(--muted); padding: 24px 16px; }
.footer p { margin: 0; }

/* Mobile */
@media (max-width: 560px) {
  body { font-size: 17px; }
  .parts td.role { white-space: normal; font-size: .8rem; width: 28%; }
  .guide-row { grid-template-columns: 1fr; gap: 2px; }
  .nav .btn { flex: 1; }
}

@media print {
  .topbar, .actions, .footer, .links { display: none !important; }
  body { background: #fff; color: #000; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
