:root {
  --ink: #12182b;
  --muted: #5a6378;
  --line: #e3e6ee;
  --bg: #fbfaf7;
  --card: #ffffff;
  --navy: #14224f;
  --navy-2: #1d2f6b;
  --saffron: #f2a516;
  --saffron-dark: #b97800;
  --good: #14804a;
  --good-bg: #e6f5ec;
  --bad: #b3261e;
  --bad-bg: #fcebe9;
  --warn-bg: #fff4d9;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(18, 24, 43, .06), 0 6px 20px rgba(18, 24, 43, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef0f7; --muted: #a2a9bf; --line: #2a3350; --bg: #0d1226; --card: #151c36;
    --navy: #0a1030; --navy-2: #26397f; --good-bg: #12301f; --bad-bg: #371714; --warn-bg: #3a2f10;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
a { color: var(--navy-2); }
@media (prefers-color-scheme: dark) { a { color: #9db4ff; } }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.btn { display: inline-block; border: 0; cursor: pointer; border-radius: 999px; padding: .7em 1.4em; font: inherit; font-weight: 600; text-decoration: none; background: var(--saffron); color: #1a1200; }
.btn:hover { filter: brightness(.95); }
.btn.secondary { background: transparent; color: inherit; border: 1.5px solid var(--line); }
.btn.dark { background: var(--navy); color: #fff; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.small { padding: .4em .9em; font-size: .9rem; }

/* header */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { font-family: Georgia, serif; font-weight: 700; font-size: 1.2rem; color: #fff; text-decoration: none; }
.brand span { color: var(--saffron); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: #cdd5f2; text-decoration: none; padding: .4em .8em; border-radius: 999px; font-size: .95rem; }
.nav a:hover, .nav a.active { background: rgba(255,255,255,.14); color: #fff; }

/* landing */
.hero { background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: #fff; padding: 72px 0 80px; }
.hero p.lead { font-size: 1.2rem; max-width: 640px; color: #d6dcf5; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero .btn.secondary { color: #fff; border-color: rgba(255,255,255,.4); }
section.block { padding: 64px 0; }
section.alt { background: var(--card); border-block: 1px solid var(--line); }
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h3 { font-size: 1.1rem; font-family: system-ui, sans-serif; font-weight: 700; }
.step-num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--saffron); color: #1a1200; font-weight: 700; margin-bottom: 10px; }
.stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 8px; }
.stat b { display: block; font-size: 2rem; font-family: Georgia, serif; }
.stat span { color: var(--muted); font-size: .9rem; }
.price-card { display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--saffron); position: relative; }
.price-card .tag { position: absolute; top: -12px; right: 16px; background: var(--saffron); color: #1a1200; font-size: .75rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.price { font-family: Georgia, serif; font-size: 2.2rem; font-weight: 700; margin: 4px 0; }
.price small { font: 400 .9rem system-ui; color: var(--muted); display: block; }
.hero .stat span { color: #c3cbee; }
.price-card ul { padding-left: 1.1em; color: var(--muted); flex: 1; margin: 12px 0 16px; }
.price-card li { margin-bottom: 4px; }
.soon { font-size: .75rem; background: var(--warn-bg); padding: 1px 8px; border-radius: 999px; }
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 600; }
footer.site-footer { padding: 36px 0; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }

/* app */
main.app { max-width: 860px; margin: 0 auto; padding: 28px 20px 80px; }
.muted { color: var(--muted); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
label.field { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; min-width: 180px; flex: 1; }
select, input[type="search"] { font: inherit; padding: .55em .7em; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.chip { display: inline-block; font-size: .8rem; padding: 2px 10px; border-radius: 999px; background: var(--warn-bg); color: var(--ink); }
.chip.phy { background: #e3ecff; } .chip.che { background: #e6f5ec; } .chip.bio { background: #fde9f0; }
@media (prefers-color-scheme: dark) { .chip.phy { background: #1c2a55; } .chip.che { background: #12301f; } .chip.bio { background: #3b1a28; } }
.progressbar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progressbar > div { height: 100%; background: var(--saffron); }
.qtext { font-size: 1.2rem; font-weight: 600; margin: 14px 0 18px; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.opt:hover:not([disabled]) { border-color: var(--navy-2); }
.opt .key { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.opt.sel { border-color: var(--navy-2); background: #eef2ff; }
@media (prefers-color-scheme: dark) { .opt.sel { background: #1c2a55; } }
.opt.right { border-color: var(--good); background: var(--good-bg); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt[disabled] { cursor: default; }
.conf { margin: 20px 0 6px; }
.conf .seg { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.seg button { flex: 1; min-width: 100px; padding: .6em; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.seg button[disabled] { cursor: default; opacity: .7; }
.panel { border-radius: 12px; padding: 14px 16px; margin-top: 16px; border: 1px solid var(--line); background: var(--card); }
.panel.mastered { background: var(--good-bg); border-color: var(--good); }
.panel.fragile { background: var(--warn-bg); border-color: var(--saffron); }
.panel.gap, .panel.misconception { background: var(--bad-bg); border-color: var(--bad); }
.panel h4 { margin: 0 0 4px; font-size: 1rem; }
.reasons { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.reasons button { padding: .45em .9em; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.reasons button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.mn { border-left: 4px solid var(--saffron); padding: 4px 12px; margin: 8px 0; }
.mn b { display: block; }
.bars { display: grid; gap: 10px; margin-top: 10px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 110px; gap: 10px; align-items: center; font-size: .95rem; }
.bar { height: 14px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar > div { height: 100%; background: var(--navy-2); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.flash { min-height: 190px; display: grid; place-items: center; text-align: center; padding: 24px; font-size: 1.25rem; cursor: pointer; user-select: none; }
.flash small { display: block; color: var(--muted); font-size: .85rem; margin-top: 12px; }
.slide { min-height: 320px; }
.slide ul { font-size: 1.1rem; padding-left: 1.2em; }
.slide li { margin-bottom: .6em; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.kbd { font-size: .8rem; color: var(--muted); }
@media (max-width: 560px) { .bar-row { grid-template-columns: 70px 1fr 90px; } .hero { padding: 48px 0 56px; } }
