:root {
  --blue-900: #0f1f4b;
  --blue-700: #1d44b8;
  --blue-600: #2453d4;
  --blue-100: #e3ecfd;
  --blue-50: #f0f5ff;
  --ink: #0f1f4b;
  --text: #45506a;
  --muted: #6b7591;
  --line: #dde3ef;
  --bg: #ffffff;
  --green: #16794a;
  --green-bg: #e3f6ec;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 31, 75, .06), 0 8px 24px rgba(15, 31, 75, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--blue-600); }
h1, h2, h3 { color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.section { padding: 72px 0; }
.section.tint { background: var(--blue-50); }
.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue-600); margin-bottom: 12px;
}
.lead { font-size: 1.12rem; max-width: 680px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-weight: 800; font-size: 1.25rem; color: var(--blue-700); text-decoration: none; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 6px; }
.nav-links a { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.nav-links a:hover { background: var(--blue-50); }
.nav-links a.active { color: var(--blue-600); background: var(--blue-50); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; color: var(--ink); cursor: pointer; padding: 8px; }
@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: #fff; padding: 10px 16px 16px; border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--blue-600); color: #fff; transition: background .15s, transform .15s;
}
.btn:hover { background: var(--blue-700); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: #fff; color: var(--blue-600); border-color: var(--line); }
.btn.ghost:hover { background: var(--blue-50); }
.btn.small { padding: 8px 14px; font-size: .9rem; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.center .btn-row { justify-content: center; }

/* Hero */
.hero { background: var(--blue-50); padding: 96px 0 88px; text-align: center; }
.hero .lead { margin: 0 auto 28px; }
.hero small { display: block; margin-top: 16px; color: var(--muted); }

/* Cards */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card p { flex: 1; }
.card .icon { font-size: 1.6rem; margin-bottom: 10px; }
a.card { text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; }
a.card:hover { transform: translateY(-2px); border-color: var(--blue-600); }
.card .more { color: var(--blue-600); font-weight: 600; font-size: .92rem; }
.progress { height: 6px; background: var(--blue-100); border-radius: 99px; overflow: hidden; margin: 6px 0 12px; }
.progress span { display: block; height: 100%; background: var(--blue-600); width: 0; transition: width .3s; }
.meta { font-size: .85rem; color: var(--muted); }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stat b { display: block; font-size: 2rem; color: var(--ink); line-height: 1.1; }

/* Pills / tabs */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.pill {
  border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 8px 14px; border-radius: 99px; font: inherit; font-size: .92rem; font-weight: 500; cursor: pointer;
  text-decoration: none;
}
.pill:hover { border-color: var(--blue-600); }
.pill.active { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }

/* Forms */
.panel { background: var(--blue-50); border-radius: var(--radius); padding: 24px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; color: var(--ink); font-size: .92rem; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue-100); border-color: var(--blue-600); }
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--text); }
.check input { width: auto; margin-top: 5px; }
.hint { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.hidden { display: none !important; }

/* Notes library */
.toolbar { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 20px; }
@media (max-width: 640px) { .toolbar { grid-template-columns: 1fr; } }
.empty { text-align: center; padding: 48px 20px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.tag { display: inline-block; background: var(--blue-100); color: var(--blue-700); font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; margin-right: 6px; }

/* Checklist */
.unit { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; background: #fff; overflow: hidden; }
.unit summary { list-style: none; cursor: pointer; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 700; color: var(--ink); }
.unit summary::-webkit-details-marker { display: none; }
.unit summary .meta { font-weight: 500; white-space: nowrap; }
.unit ul { list-style: none; margin: 0; padding: 0 20px 14px; }
.unit li label { display: flex; gap: 12px; align-items: center; font-weight: 400; color: var(--text); padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; margin: 0; }
.unit li input { width: 18px; height: 18px; accent-color: var(--blue-600); flex: none; }
.unit li input:checked + span { color: var(--muted); text-decoration: line-through; }
.hl { font-size: .72rem; font-weight: 700; color: var(--blue-700); background: var(--blue-100); padding: 1px 7px; border-radius: 6px; margin-left: 6px; }

/* Flashcards */
.flash-wrap { max-width: 620px; margin: 0 auto; }
.flashcard { perspective: 1200px; cursor: pointer; height: 280px; margin-bottom: 18px; }
.flashcard .inner { position: relative; width: 100%; height: 100%; transition: transform .5s; transform-style: preserve-3d; }
.flashcard.flipped .inner { transform: rotateY(180deg); }
.flashcard .face {
  position: absolute; inset: 0; backface-visibility: hidden; border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 28px; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff;
}
.flashcard .face.back { transform: rotateY(180deg); background: var(--blue-50); }
.flashcard .term { font-size: 1.7rem; font-weight: 800; color: var(--ink); }
.flashcard .def { font-size: 1.05rem; color: var(--ink); }
.flashcard .meta { position: absolute; bottom: 14px; }
.flash-controls { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Glossary */
.glossary dt { font-weight: 700; color: var(--ink); margin-top: 14px; }
.glossary dd { margin: 2px 0 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); }

/* Timer */
.tools-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .tools-2 { grid-template-columns: 1fr; } }
.clock { font-size: clamp(3.4rem, 10vw, 5rem); font-weight: 800; color: var(--ink); text-align: center; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; margin: 8px 0; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: center; margin: 12px 0; }
.countdown div { background: var(--blue-50); border-radius: 10px; padding: 12px 4px; }
.countdown b { display: block; font-size: 1.8rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.countdown span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* Requests */
.req-list { list-style: none; margin: 0; padding: 0; }
.req-list li { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }

/* Callout */
.callout { background: var(--green-bg); color: var(--green); border-radius: var(--radius); padding: 18px 22px; font-weight: 500; }

/* Footer */
footer { background: var(--blue-50); padding: 48px 0; margin-top: 0; }
footer .logo { display: inline-block; margin-bottom: 10px; }
footer p { font-size: .92rem; }
footer .links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }
footer .links a { color: var(--text); text-decoration: none; font-weight: 500; }

/* Study guides */
.guide-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 14px; background: #fff; }
.guide-block h3 { margin-bottom: 8px; }
.guide-block ul { margin: 0; padding-left: 20px; }
.guide-block li { margin-bottom: 6px; }
.guide-block details summary { cursor: pointer; color: var(--blue-600); font-weight: 600; margin-top: 4px; }
.guide-block details ul { margin-top: 10px; background: var(--blue-50); border-radius: 10px; padding: 14px 14px 14px 34px; }
#guide h2 { margin-top: 48px; scroll-margin-top: 90px; }
.table-wrap { overflow-x: auto; }
table.formulas { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.formulas th, table.formulas td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.formulas th { width: 38%; color: var(--ink); font-weight: 600; background: var(--blue-50); }
table.formulas td { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .92rem; color: var(--ink); }
.checklist-plain { padding-left: 20px; }
.checklist-plain li { margin-bottom: 6px; }
.callout.tips { background: #fff8e6; color: #7a5300; }
.callout.tips ul { margin: 0; padding-left: 20px; }
.callout.tips li { margin-bottom: 6px; }
.quiz { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 14px; }
.quiz .q { color: var(--ink); }
.opt { display: block; width: 100%; text-align: left; font: inherit; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; cursor: pointer; color: var(--text); }
.opt:hover { border-color: var(--blue-600); }
.answered .opt { cursor: default; }
.opt.right { background: var(--green-bg); border-color: var(--green); color: var(--green); font-weight: 600; }
.opt.wrong { background: #fdecec; border-color: #c53030; color: #9b2c2c; }
.why { background: var(--blue-50); border-radius: 10px; padding: 10px 14px; margin: 6px 0 0; font-size: .95rem; }

@media print {
  .nav, footer, .no-print { display: none !important; }
  .guide-block details { display: block; }
  .guide-block details > * { display: block; }
  .section { padding: 0; }
  body { font-size: 11pt; }
}

/* Language */
.nav .wrap { gap: 10px; }
.logo { margin-right: auto; }
.nav-links { order: 1; }
.lang-switch { order: 2; background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--line); border-radius: 99px; padding: 7px 12px; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.lang-switch:hover { border-color: var(--blue-600); }
.nav-toggle { order: 3; }
.lang-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(15, 31, 75, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.lang-box { background: #fff; border-radius: 18px; padding: 36px 28px; max-width: 420px; width: 100%; text-align: center; box-shadow: var(--shadow); }
.lang-box .logo { display: block; margin: 0 0 14px; }
.lang-box h2 { font-size: 1.6rem; margin-bottom: 24px; }
.lang-box h2 span { display: block; color: var(--muted); font-weight: 600; font-size: 1.2rem; margin-top: 6px; }
.lang-box .btn { min-width: 140px; }
@media print { .lang-switch, .lang-overlay { display: none !important; } }

/* =========================================================
   Colour refresh
   ========================================================= */
:root { --c: #2453d4; --tint: color-mix(in srgb, var(--c) 10%, white); --tint2: color-mix(in srgb, var(--c) 22%, white); }
body { background: #fbfcff; }
.hero {
  background:
    radial-gradient(600px 300px at 10% 10%, #e0e7ff 0%, transparent 70%),
    radial-gradient(500px 300px at 90% 20%, #fce7f3 0%, transparent 70%),
    radial-gradient(600px 300px at 50% 100%, #dcfce7 0%, transparent 70%),
    #f8faff;
}
.hero h1 { background: linear-gradient(90deg, #1d44b8, #7c3aed 60%, #db2777); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section.tint { background: linear-gradient(180deg, #f0f5ff, #faf5ff); }
.btn { background: linear-gradient(135deg, #2453d4, #6d28d9); box-shadow: 0 4px 14px rgba(79, 70, 229, .25); }
.btn:hover { background: linear-gradient(135deg, #1d44b8, #5b21b6); }
.btn.ghost { background: #fff; box-shadow: none; }

/* Subject-coloured cards */
.card.subject-card, .card.tool { border-top: 5px solid var(--c); }
.card .icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: color-mix(in srgb, var(--c, #2453d4) 12%, white); }
.subject-card .progress span, .tool .progress span { background: var(--c); }
.subject-card .more, .tool .more { color: var(--c); }
.subject-card:hover, .tool:hover { border-color: var(--c); box-shadow: 0 10px 30px color-mix(in srgb, var(--c) 20%, transparent); }
.tools-grid .card:nth-child(1) { --c: #4f46e5; } .tools-grid .card:nth-child(2) { --c: #0891b2; }
.tools-grid .card:nth-child(3) { --c: #16a34a; } .tools-grid .card:nth-child(4) { --c: #e11d48; } .tools-grid .card:nth-child(5) { --c: #ea580c; }
.pill[style*="--c"].active { background: var(--c); border-color: var(--c); }
.pill[style*="--c"]:hover { border-color: var(--c); }
.unit-badge { align-self: flex-start; background: color-mix(in srgb, var(--c) 12%, white); color: var(--c); font-weight: 700; font-size: .78rem; padding: 4px 10px; border-radius: 99px; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.chip { background: #f1f4fa; color: var(--text); font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; }
.chip.hot { background: color-mix(in srgb, var(--c) 14%, white); color: var(--c); }

/* =========================================================
   Guide page
   ========================================================= */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 50; }
.read-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--c), #db2777); }
.guide-hero { background: linear-gradient(135deg, color-mix(in srgb, var(--c) 92%, black), color-mix(in srgb, var(--c) 70%, #db2777)); color: #fff; padding: 40px 0 36px; }
.guide-hero h1, .guide-hero .eyebrow, .guide-hero .back { color: #fff; }
.guide-hero .eyebrow { opacity: .85; margin-bottom: 4px; }
.guide-hero .lead { color: rgba(255,255,255,.9); }
.guide-hero .back { opacity: .85; font-size: .9rem; text-decoration: none; }
.guide-hero .back:hover { opacity: 1; text-decoration: underline; }
.hero-row { display: flex; gap: 16px; align-items: center; margin: 18px 0 10px; }
.hero-icon { font-size: 2.2rem; width: 68px; height: 68px; flex: none; display: grid; place-items: center; background: rgba(255,255,255,.18); border-radius: 18px; }
.guide-hero h1 { margin: 0; }
.guide-hero .chip { background: rgba(255,255,255,.18); color: #fff; }
.hero-progress { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: .92rem; }
.hero-progress .progress { flex: 1; max-width: 320px; margin: 0; background: rgba(255,255,255,.25); height: 8px; }
.hero-progress .progress span { background: #fff; }
.guide-nav { position: sticky; top: 68px; z-index: 15; background: rgba(251,252,255,.96); border-bottom: 1px solid var(--line); padding: 10px 0; }
.guide-nav .wrap { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.guide-nav .pill { white-space: nowrap; flex: none; }
.guide-body section { padding-top: 12px; }
#guide h2 { margin-top: 44px; scroll-margin-top: 140px; }
section[id] { scroll-margin-top: 130px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.section-head h2 { margin-bottom: .5em; }

.topic-card { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 14px; box-shadow: var(--shadow); transition: background .2s; }
.topic-card.done { background: color-mix(in srgb, var(--c) 6%, white); }
.topic-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.topic-head h3 { margin: 0; }
.num { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; font-weight: 700; font-size: .9rem; flex: none; }
.topic-card ul { margin: 0 0 12px; padding-left: 20px; }
.topic-card li { margin-bottom: 6px; }
.topic-card li::marker { color: var(--c); }
.got-it { font: inherit; font-weight: 600; font-size: .88rem; border: 1px solid var(--c); color: var(--c); background: #fff; border-radius: 99px; padding: 6px 14px; cursor: pointer; }
.topic-card.done .got-it { background: var(--c); color: #fff; }

.term-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.term-card { position: relative; min-height: 130px; border: 0; padding: 0; background: none; cursor: pointer; perspective: 900px; font: inherit; text-align: left; }
.term-card span { position: absolute; inset: 0; border-radius: var(--radius); padding: 16px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .45s; display: flex; flex-direction: column; justify-content: center; }
.term-card .front { background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 60%, #db2777)); color: #fff; font-weight: 700; font-size: 1.05rem; text-align: center; align-items: center; }
.term-card .back { background: #fff; border: 2px solid var(--c); color: var(--ink); font-size: .9rem; transform: rotateY(180deg); overflow: auto; }
.term-card .back b { color: var(--c); margin-bottom: 4px; }
.term-card.flipped .front { transform: rotateY(-180deg); }
.term-card.flipped .back { transform: rotateY(0); }

.formula-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.formula-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.formula-card span { font-weight: 600; color: var(--ink); font-size: .92rem; }
.formula-card code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .95rem; background: color-mix(in srgb, var(--c) 8%, white); color: color-mix(in srgb, var(--c) 80%, black); padding: 8px 10px; border-radius: 8px; overflow-wrap: anywhere; }

.tip-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tip-card { display: flex; gap: 12px; background: #fff8e6; border: 1px solid #fde7a7; border-radius: var(--radius); padding: 16px; }
.tip-card span { font-size: 1.4rem; }
.tip-card p { margin: 0; color: #6b4a00; }

.draw-list { background: #fff; border: 1px dashed var(--c); border-radius: var(--radius); padding: 16px 20px; margin-top: 18px; }
.draw-list h3 { margin-bottom: 6px; }
.draw-list ul { margin: 0; padding-left: 20px; }

.score-pill { background: var(--c); color: #fff; font-weight: 700; padding: 6px 14px; border-radius: 99px; }
#quiz .progress { margin-bottom: 18px; }
#quiz .progress span { background: var(--c); }
.quiz { background: #fff; box-shadow: var(--shadow); }
.quiz .q { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.opts { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .opts { grid-template-columns: 1fr; } }
.opt { display: flex; gap: 10px; align-items: center; margin: 0; transition: transform .1s, border-color .15s; }
.opt:hover { transform: translateY(-1px); border-color: var(--c); }
.opt .letter { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #f1f4fa; font-weight: 700; font-size: .85rem; flex: none; }
.opt.right .letter { background: var(--green); color: #fff; }
.opt.wrong .letter { background: #c53030; color: #fff; }
.why { margin-top: 10px; }
.quiz-result { text-align: center; background: color-mix(in srgb, var(--c) 8%, white); border: 2px solid var(--c); border-radius: var(--radius); padding: 20px; font-size: 1.1rem; font-weight: 600; color: var(--ink); }

.exam-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 14px; box-shadow: var(--shadow); }
.exam-q { display: flex; gap: 12px; align-items: flex-start; }
.exam-q p { margin: 0 0 12px; color: var(--ink); }
.marks { background: var(--c); color: #fff; font-weight: 700; font-size: .82rem; padding: 4px 10px; border-radius: 8px; flex: none; }
.draft { min-height: 90px; margin-bottom: 10px; background: #fbfcff; }
.exam-card details summary { cursor: pointer; color: var(--c); font-weight: 700; }
.exam-card details ul { margin-top: 10px; background: color-mix(in srgb, var(--c) 7%, white); border-radius: 10px; padding: 14px 14px 14px 34px; }
.past-papers { border-left: 5px solid var(--c); }

.unit-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 40px 0 60px; }
.nav-card { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: var(--ink); }
.nav-card:last-child { text-align: right; }
.nav-card:hover { border-color: var(--c); }

/* =========================================================
   Interactive diagrams
   ========================================================= */
.diagram { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin: 16px 0 22px; box-shadow: var(--shadow); }
.dg-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.dg-head h3 { margin: 0; }
.dg-body { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 760px) { .dg-body { grid-template-columns: 1fr; } }
.dg-plot { background: #fbfcff; border-radius: 12px; border: 1px solid #eef1f7; }
.dg-svg { width: 100%; height: auto; display: block; font-family: "Inter", system-ui, sans-serif; }
.dg-controls { display: grid; gap: 12px; }
.dg-controls label { font-size: .88rem; display: flex; flex-direction: column; gap: 6px; margin: 0; }
.dg-controls label.check { flex-direction: row; align-items: center; }
.dg-controls output { color: var(--c); font-weight: 700; margin-left: 4px; }
.dg-controls label:not(.check) { position: relative; }
.dg-controls input[type=range] { padding: 0; border: 0; accent-color: var(--c); height: 22px; }
.dg-controls select { padding: 8px 10px; }
.dg-explain { margin: 14px 0 0; background: color-mix(in srgb, var(--c) 7%, white); border-radius: 12px; padding: 12px 14px; font-size: .93rem; color: var(--ink); }
.dg-note { margin: 12px 0 0; font-size: .88rem; color: var(--muted); }
.graph-list .diagram { margin-top: 0; }

.dg-svg .ax { stroke: #334155; stroke-width: 1.6; }
.dg-svg .grid { stroke: #eef1f7; stroke-width: 1; }
.dg-svg .axl { fill: #334155; font-size: 12px; font-weight: 600; }
.dg-svg .tick { fill: #64748b; font-size: 11px; }
.dg-svg .tick.strong { fill: #0f1f4b; font-weight: 700; }
.dg-svg .lbl { font-size: 12.5px; font-weight: 700; fill: #0f1f4b; }
.dg-svg .lbl.small { font-size: 11px; font-weight: 600; fill: #64748b; }
.dg-svg line, .dg-svg path { fill: none; stroke-linecap: round; }
.dg-svg .c-d { stroke: #2563eb; stroke-width: 3; } .dg-svg text.c-d { fill: #2563eb; stroke: none; }
.dg-svg .c-s { stroke: #ea580c; stroke-width: 3; } .dg-svg text.c-s { fill: #ea580c; stroke: none; }
.dg-svg .c-x { stroke: #16a34a; stroke-width: 2.5; } .dg-svg text.c-x { fill: #16a34a; stroke: none; }
.dg-svg .c-y { stroke: #9333ea; stroke-width: 3; } .dg-svg text.c-y { fill: #9333ea; stroke: none; }
.dg-svg text.c-loss { fill: #dc2626; }
.dg-svg .thick { stroke-width: 3.5; }
.dg-svg .dashed { stroke-dasharray: 6 5; }
.dg-svg .faded { opacity: .35; }
.dg-svg .guide { stroke: #94a3b8; stroke-width: 1.2; stroke-dasharray: 4 4; }
.dg-svg .guide.asym { stroke: #9333ea; }
.dg-svg .strongguide { stroke: #0f1f4b; }
.dg-svg .dot { fill: #0f1f4b; stroke: #fff; stroke-width: 2; }
.dg-svg .dot.alt { fill: #9333ea; }
.dg-svg .sh-a { fill: #2563eb; fill-opacity: .16; stroke: none; }
.dg-svg .sh-b { fill: #ea580c; fill-opacity: .18; stroke: none; }
.dg-svg .sh-c { fill: #16a34a; fill-opacity: .2; stroke: none; }
.dg-svg .sh-loss { fill: #dc2626; fill-opacity: .25; stroke: none; }
.dg-svg .gap { stroke: #dc2626; stroke-width: 7; opacity: .7; }
.dg-svg .mos { stroke: #16a34a; stroke-width: 4; }
.dg-svg .bar-profit { stroke: #16a34a; stroke-width: 8; opacity: .7; }
.dg-svg .bar-loss { stroke: #dc2626; stroke-width: 8; opacity: .7; }
.dg-svg .lvl0 { fill: #86efac; } .dg-svg .lvl1 { fill: #fde68a; } .dg-svg .lvl2 { fill: #fdba74; } .dg-svg .lvl3 { fill: #fca5a5; }
.dg-svg .lbl.center { fill: #0f1f4b; }

@media print {
  .guide-hero { background: none !important; color: var(--ink); }
  .guide-hero h1, .guide-hero .eyebrow, .guide-hero .lead, .guide-hero .chip { color: var(--ink) !important; }
  .read-progress, .guide-nav, .got-it, .dg-controls, .dg-reset, .draft, .unit-nav { display: none !important; }
  .term-card span { position: static; transform: none !important; }
  .term-card .front { display: none; }
  .term-card { min-height: 0; }
  .exam-card details > * { display: block; }
}

/* =========================================================
   Written answers, feedback & practice tests
   ========================================================= */
.written .draft { min-height: 170px; font-size: .97rem; line-height: 1.55; }
.written-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.fb { border: 2px solid var(--c); border-radius: var(--radius); padding: 18px 20px; margin: 10px 0 12px; background: color-mix(in srgb, var(--c) 5%, white); animation: pop .25s ease; }
@keyframes pop { from { transform: scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.fb-score { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; font-weight: 600; color: var(--ink); }
.fb-score .big { font-size: 2.4rem; font-weight: 800; color: var(--c); line-height: 1; }
.fb-score .big small { font-size: 1.1rem; color: var(--muted); }
.fb h4 { margin: 14px 0 6px; color: var(--ink); }
.fb ul { margin: 0; padding-left: 20px; }
.fb li { margin-bottom: 4px; }
.fb-warn { background: #fff4e5; color: #8a4b00; border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.fb-trend { background: #fff; border-radius: 10px; padding: 8px 12px; display: inline-block; margin: 0 0 4px; }
.w-model summary { cursor: pointer; color: var(--c); font-weight: 700; }
.w-model ul { margin-top: 10px; background: color-mix(in srgb, var(--c) 7%, white); border-radius: 10px; padding: 14px 14px 14px 34px; }

.setup-panel { margin-top: 8px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.test-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.test-q { margin-bottom: 16px; }
.test-q .tag { margin-left: auto; white-space: nowrap; }
.written-q > .q { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.opt.chosen { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, white); font-weight: 600; }
.opt.chosen .letter { background: var(--c); color: #fff; }
.finished .opt.chosen.right .letter, .finished .opt.right .letter { background: var(--green); }
.test-result { display: flex; gap: 24px; align-items: center; background: #fff; border: 2px solid var(--c); border-radius: 18px; padding: 22px; margin-bottom: 24px; box-shadow: var(--shadow); }
.test-result h3 { font-size: 1.6rem; margin-bottom: 4px; }
.ring { --p: 0; width: 110px; height: 110px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), #e8ecf5 0); }
.ring span { width: 84px; height: 84px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.4rem; color: var(--ink); }
@media (max-width: 560px) { .test-result { flex-direction: column; text-align: center; } }

/* Guide extras: examples, case studies, mistakes, worked examples */
.example-box { background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 12px; padding: 12px 14px; margin: 4px 0 12px; color: #065f46; font-size: .95rem; }
.example-box b { color: #047857; }
.case-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.case-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid #0891b2; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.case-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.case-card p { margin: 0; font-size: .95rem; }
.mistake-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.mistake-list li { background: #fef2f2; border: 1px solid #fecaca; border-radius: 12px; padding: 12px 14px; color: #7f1d1d; }
.worked { background: #fff; border: 1px solid var(--line); border-left: 5px solid #9333ea; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 14px; }
.worked h3 { font-size: 1.05rem; }
.worked ol { margin: 0; padding-left: 22px; }
.worked li { margin-bottom: 6px; }
.worked li code { background: #f5f3ff; color: #6b21a8; padding: 1px 6px; border-radius: 6px; }

/* Flow diagrams & static figures */
.dg-svg .fbox { stroke-width: 1.5; }
.dg-svg .fbox.b { fill: #dbeafe; stroke: #2563eb; } .dg-svg .fbox.g { fill: #dcfce7; stroke: #16a34a; }
.dg-svg .fbox.o { fill: #ffedd5; stroke: #ea580c; } .dg-svg .fbox.p { fill: #f3e8ff; stroke: #9333ea; }
.dg-svg .fbox.y { fill: #fef9c3; stroke: #ca8a04; } .dg-svg .fbox.r { fill: #fee2e2; stroke: #dc2626; }
.dg-svg .ftext { font-size: 11.5px; font-weight: 700; fill: #0f1f4b; }
.dg-svg .ftext.white { fill: #fff; } .dg-svg .ftext.small { font-size: 10px; font-weight: 500; }
.dg-svg .farrow { stroke: #475569; stroke-width: 1.6; fill: none; }
.dg-svg .fhead { fill: #475569; }
.dg-svg .farrow.human { stroke: #dc2626; stroke-width: 2.4; } .dg-svg .fhead.human { fill: #dc2626; }
.dg-svg .flabel { font-size: 10px; font-weight: 600; fill: #334155; paint-order: stroke; stroke: #fbfcff; stroke-width: 3px; }
.dg-svg .loop-sign { font-size: 34px; font-weight: 800; }
.dg-svg .loop-sign.pos { fill: #dc2626; } .dg-svg .loop-sign.neg { fill: #16a34a; }
.dg-svg .grid.strong { stroke: #cbd5e1; }
.dg-svg .band1 { fill: #fef9c3; } .dg-svg .band2 { fill: #dcfce7; } .dg-svg .band3 { fill: #bbf7d0; }
.dg-svg .band-hl { fill: #9333ea; fill-opacity: .1; }
.dg-svg .res { fill: #86efac; stroke: #16a34a; stroke-width: 2; } .dg-svg .res-buf { fill: #fef3c7; stroke: #ca8a04; stroke-dasharray: 4 3; }
.dg-svg .corr { fill: #bbf7d0; stroke: #16a34a; } .dg-svg .road { stroke: #475569; stroke-width: 6; }
.dg-svg .ray-in { stroke: #f59e0b; stroke-width: 4; } .dg-svg .ray-ref { stroke: #fbbf24; stroke-width: 3; stroke-dasharray: 6 4; }
.dg-svg .ray-out, .dg-svg .ray-back { stroke: #dc2626; stroke-width: 3.5; } .dg-svg .ray-back { stroke-dasharray: 6 4; }
.dg-svg .py-m { fill: #60a5fa; } .dg-svg .py-f { fill: #f472b6; }
.static-tag { display: inline-block; background: #f1f4fa; color: var(--muted); font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; }
.class-tag { display: inline-block; background: #fef3c7; color: #92400e; font-weight: 700; font-size: .8rem; padding: 3px 10px; border-radius: 99px; margin-bottom: 10px; }
.w-ctx { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: .93rem; }
.w-ctx summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.w-ctx div { margin-top: 8px; }
.w-ctx table { border-collapse: collapse; margin-top: 6px; font-size: .88rem; }
.w-ctx td, .w-ctx th { border: 1px solid var(--line); padding: 4px 8px; text-align: left; }

/* =========================================================
   Admin panel
   ========================================================= */
.login-card { max-width: 400px; margin: 30px auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px; box-shadow: var(--shadow); }
.login-card .logo { display: block; margin-bottom: 8px; }
.login-card h1 { font-size: 1.8rem; }
.admin-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-top h1 { margin: 0; }
.stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 18px; }
.stat-grid .stat { position: relative; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); }
.stat-grid .stat b { font-size: 2.2rem; }
.stat-grid .stat span { color: var(--muted); font-size: .9rem; font-weight: 600; }
.stat-grid .stat small { color: var(--muted); }
.stat.live { border: 2px solid #16a34a; }
.stat.live b { color: #16a34a; }
.pulse { position: absolute; top: 16px; right: 16px; width: 12px; height: 12px; border-radius: 50%; background: #16a34a; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.5); } 70% { box-shadow: 0 0 0 12px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.admin-two { display: grid; gap: 14px; grid-template-columns: 1.4fr 1fr; margin-bottom: 26px; }
@media (max-width: 760px) { .admin-two { grid-template-columns: 1fr; } }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bar span { width: 100%; min-height: 2px; background: linear-gradient(180deg, #6d28d9, #2453d4); border-radius: 6px 6px 2px 2px; }
.bar small { font-size: .7rem; color: var(--muted); }
.top-pages { list-style: none; margin: 8px 0 0; padding: 0; }
.top-pages li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.admin-tabs { margin-top: 10px; }
.a-tab h2 { font-size: 1.5rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table select { padding: 6px 8px; }
.m-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.note-thumb { width: 100%; max-height: 180px; object-fit: cover; border-radius: 10px; margin: 8px 0; border: 1px solid var(--line); }
.update-card { border-top: 5px solid #6d28d9; }
.update-card img { width: 100%; max-height: 200px; object-fit: cover; border-radius: 10px; margin-bottom: 12px; }
.update-card h3 { margin-top: 6px; }
footer .admin-link { color: var(--muted); text-decoration: none; }

/* Student accounts */
.account-btn { order: 2; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 99px; padding: 7px 12px; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.account-btn:hover { border-color: var(--blue-600); }
.acc-overlay { position: fixed; inset: 0; z-index: 110; background: rgba(15, 31, 75, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.acc-box { position: relative; background: #fff; border-radius: 18px; padding: 30px 26px; max-width: 420px; width: 100%; box-shadow: var(--shadow); }
.acc-box.small h2 { font-size: 1.15rem; word-break: break-all; padding-right: 24px; }
.acc-box .logo { display: block; margin-bottom: 6px; }
.acc-box h2 { font-size: 1.6rem; margin-bottom: 6px; }
.acc-x { position: absolute; top: 12px; right: 12px; background: none; border: 0; font-size: 1.1rem; cursor: pointer; color: var(--muted); }
.acc-tabs { margin: 14px 0 6px; }
.acc-msg { background: #fff4e5; color: #8a4b00; border-radius: 10px; padding: 10px 12px; margin: 12px 0 0; font-size: .92rem; }
.acc-msg.ok { background: var(--green-bg); color: var(--green); }
.link-btn { background: none; border: 0; color: var(--blue-600); font: inherit; font-size: .9rem; cursor: pointer; margin-top: 12px; padding: 0; }
@media (max-width: 520px) { .account-btn { max-width: 110px; } .lang-switch { padding: 7px 9px; } }

/* =========================================================
   Cheat sheets
   ========================================================= */
.cs-unit { margin-bottom: 28px; }
.cs-unit h2 { font-size: 1.3rem; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cs-tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cs-tile { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--c); border-radius: 12px; padding: 12px 14px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .93rem; transition: transform .12s, box-shadow .12s; }
.cs-tile b { background: var(--c); color: #fff; border-radius: 8px; padding: 2px 8px; font-size: .82rem; }
.cs-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cs-bar { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

.cheatsheet { background: #fffdf7; border-radius: 16px; overflow: hidden; box-shadow: 0 6px 24px rgba(15,31,75,.12); margin: 0 auto 28px; max-width: 1050px; border: 1px solid #ece4cf; }
.cs-head { background: linear-gradient(135deg, #1f2d3d, color-mix(in srgb, var(--c) 55%, #1f2d3d)); color: #fff; padding: 14px 22px 16px; position: relative; border-bottom: 5px solid var(--c); }
.cs-head span { font-size: .72rem; letter-spacing: .14em; opacity: .8; font-weight: 700; }
.cs-head h2 { color: #fff; margin: 2px 0 0; font-size: 1.55rem; }
.cs-head em { position: absolute; right: 18px; top: 14px; font-style: normal; font-size: .75rem; opacity: .75; }
.cs-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; padding: 16px; }
@media (max-width: 760px) { .cs-cols { grid-template-columns: 1fr; } }
.cs-col { display: flex; flex-direction: column; gap: 14px; }
.cs-card { background: #fff; border-radius: 12px; border: 1px solid #f1e6cf; overflow: hidden; }
.cs-card h3 { margin: 0; padding: 7px 12px; font-size: .9rem; background: color-mix(in srgb, var(--c) 16%, #fff3dd); color: var(--ink); border-bottom: 1px solid #f1e6cf; }
.cs-card ul { margin: 0; padding: 10px 14px 10px 30px; font-size: .9rem; line-height: 1.5; }
.cs-card li { margin-bottom: 5px; }
.cs-card li::marker { color: var(--c); }
.cs-card p { margin: 0; padding: 10px 14px; font-size: .9rem; }
.cs-defs dl { margin: 0; padding: 8px 14px 10px; font-size: .88rem; }
.cs-defs dt { margin-top: 6px; font-weight: 700; }
.cs-defs dd { margin: 2px 0 0; color: var(--text); }
.cs-f { padding: 8px 12px; border-bottom: 1px dashed #f1e6cf; font-size: .86rem; }
.cs-f:last-child { border-bottom: 0; }
.cs-f span { display: block; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.cs-f code { display: block; background: #fffbe6; border: 1px solid #fde68a; border-radius: 8px; padding: 6px 9px; font-family: ui-monospace, Menlo, monospace; font-size: .86rem; color: #713f12; }
.cs-diagram { padding: 8px 10px; }
.cs-dtitle { display: block; font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.cs-ex { border-color: #bbf7d0; } .cs-ex h3 { background: #dcfce7; }
.cs-tip { border-color: #fde68a; } .cs-tip h3 { background: #fef3c7; }
.cs-mis { color: #9f1239; border-top: 1px dashed #fecdd3; }
.cs-qs { margin: 0 16px 16px; background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 12px; }
.cs-qs h3 { margin: 0; padding: 8px 14px 0; font-size: .92rem; color: #5b21b6; }
.cs-qs ul { margin: 6px 0 10px; padding-left: 30px; font-size: .88rem; }
mark.hl-y { background: linear-gradient(transparent 35%, #fde047 35%); color: inherit; padding: 0 2px; }
mark.hl-g { background: linear-gradient(transparent 35%, #86efac 35%); color: inherit; padding: 0 2px; }
mark.hl-b { background: linear-gradient(transparent 35%, #93c5fd 35%); color: inherit; padding: 0 2px; }
mark.hl-p { background: linear-gradient(transparent 35%, #f9a8d4 35%); color: inherit; padding: 0 2px; }
mark.hl-o { background: linear-gradient(transparent 35%, #fdba74 35%); color: inherit; padding: 0 2px; }
@media print {
  .cheatsheet { box-shadow: none; page-break-after: always; break-after: page; margin: 0; max-width: none; border: 0; }
  .cs-head, .cs-card h3, mark, .cs-f code { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cs-cols { grid-template-columns: 1.15fr 1fr; }
  #cs-intro { display: none; }
}

/* Nav on one line: no wrapping words; hamburger below 1100px */
.nav .wrap { max-width: 1320px; }
.logo, .nav-links a { white-space: nowrap; }
.nav-links { gap: 2px; }
.nav-links a { padding: 8px 10px; }

/* ---------- Beige theme: stone background, forest green accent, no purple ---------- */
:root {
  --blue-900: #1c2421; --blue-700: #17543f; --blue-600: #1f6f54; --blue-100: #dceae2; --blue-50: #ecf3ee;
  --ink: #1c2421; --text: #3e4844; --muted: #6b736f; --line: #e2ded4; --bg: #f5f3ee;
  --green: #1f6f54; --green-bg: #e3eee8;
  --shadow: 0 1px 2px rgba(28, 36, 33, .05);
  --c: #1f6f54;
}
body { background: #f5f3ee; }
.nav { background: #fbfaf6; border-bottom-color: #e2ded4; }
.logo { color: var(--ink); }
.logo-accent { color: #1f6f54; }
.card { background: #fff; border-color: #e7e2d7; }
.hero { background: #f5f3ee; }
.hero h1 { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--ink); }
.hero h1 .accent { color: #1f6f54; }
.section.tint { background: #efebe2; }
.btn { background: #1f6f54; box-shadow: none; }
.btn:hover { background: #17543f; }
.btn.ghost { background: #fff; border: 1px solid #cfc9bc; color: var(--ink); }
.tools-grid .card:nth-child(1) { --c: #2f6690; }
.read-progress span { background: var(--c); }
.guide-hero { background: color-mix(in srgb, var(--c) 88%, #1c2421); }
.term-card .front { background: color-mix(in srgb, var(--c) 90%, #1c2421); }
.bar span { background: #1f6f54; }
.update-card { border-top-color: #1f6f54; }
.worked { border-left-color: #b45309; }
.dg-svg .c-y { stroke: #b45309; } .dg-svg text.c-y { fill: #b45309; }
.dg-svg .guide.asym { stroke: #b45309; }
.dg-svg .dot.alt { fill: #b45309; }
.dg-svg .fbox.p { fill: #faeeda; stroke: #b45309; }
.dg-svg .band-hl { fill: #b45309; }
.cs-head { background: color-mix(in srgb, var(--c) 45%, #1c2421); }
footer { background: #1c2421; color: #c9cfcb; }
footer a { color: #e7ece9; }
footer .logo, footer .logo-accent { color: #fff; }
footer .logo-accent { color: #7cc6a4; }
.lang-switch { background: #fff; color: var(--ink); border-color: #d6d1c6; }
.nav-links a.active { color: #1f6f54; background: #e3eee8; }
.nav-links a:hover { background: #ece8df; }
.hl, span.hl { background: #1c2421 !important; color: #f5f3ee !important; }
footer h2, footer h3, footer h4, footer b, footer strong { color: #fff; }
footer p, footer li, footer span { color: #c9cfcb; }
footer a, footer .nav-links a, footer nav a { color: #d5dbd7 !important; }
footer a:hover { color: #fff !important; }
footer small, footer .meta, footer .disclaimer { color: #aab3ae; }
