:root {
  --bg: #0a0c10;
  --bg-elev: #12161d;
  --bg-card: #161b24;
  --border: #232a36;
  --border-strong: #303a4a;
  --text: #e8ecf3;
  --text-dim: #9aa4b4;
  --text-mute: #6b7484;
  --accent: #ffb547;        /* warm amber - photographic */
  --accent-soft: #ffb54722;
  --good: #5cd28a;
  --warn: #ffa844;
  --bad: #ff6961;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --radius: 10px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding: 20px;
}

/* ============ TOPBAR ============ */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--accent);
}
.brand h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand .sub {
  font-size: 12px;
  color: var(--text-mute);
  font-weight: 400;
  margin-top: 2px;
}

.ev-readout {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
}
.ev-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
}
.ev-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
  margin: 2px 0;
}
.ev-state {
  font-size: 11px;
  color: var(--text-dim);
}
.ev-state.under { color: var(--bad); }
.ev-state.over { color: var(--warn); }
.ev-state.ok { color: var(--good); }

/* ============ LAYOUT ============ */
.layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
}

/* ============ VIEWFINDER ============ */
.viewfinder {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.canvas-wrap {
  position: relative;
  background: #000;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3 / 2;
}
.canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.overlay-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255,255,255,0.55);
}
.corner.tl { top: 14px; left: 14px; border-right: none; border-bottom: none; }
.corner.tr { top: 14px; right: 14px; border-left: none; border-bottom: none; }
.corner.bl { bottom: 14px; left: 14px; border-right: none; border-top: none; }
.corner.br { bottom: 14px; right: 14px; border-left: none; border-top: none; }

.hud-top, .hud-bottom {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
  background: rgba(0,0,0,0.35);
  padding: 6px 14px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}
.hud-top { top: 16px; }
.hud-bottom { bottom: 16px; align-items: center; }

.warn-pill {
  background: rgba(255, 105, 97, 0.85);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.warn-pill.hidden { display: none; }

/* ============ PRESETS ============ */
.presets {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.presets h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin-bottom: 14px;
}
.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.preset {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.15s ease;
  font-family: inherit;
  color: var(--text);
}
.preset:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}
.preset.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.p-name {
  font-size: 13px;
  font-weight: 500;
}
.p-spec {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-mute);
}

/* ============ CONTROLS ============ */
.controls {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.control-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.control label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.control .value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}

input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #2a3340, #2a3340);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 1px var(--accent);
  cursor: pointer;
  transition: transform 0.1s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 1px var(--accent);
  cursor: pointer;
}

.ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-mute);
}

.control-hint {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-mute);
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.dot-light { background: var(--accent); }
.dot-noise { background: #c87df0; }
.dot-blur { background: #5fb3ff; }

/* ============ EXPOSURE METER ============ */
.exposure-meter {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 4px;
}
.meter-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin-bottom: 10px;
}
.meter-bar {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  height: 22px;
  border-radius: 4px;
  overflow: hidden;
}
.meter-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
}
.meter-zone.underexp { background: #2a3340; }
.meter-zone.correct { background: #3d5a8a; color: #fff; }
.meter-zone.overexp { background: #5a4030; }
.meter-needle {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  left: 50%;
  transform: translateX(-50%);
  transition: left 0.25s ease;
  box-shadow: 0 0 8px var(--accent);
}

/* ============ EDUCATION ============ */
.education {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 900px) {
  .education { grid-template-columns: 1fr; }
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.edu-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.edu-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.edu-card p {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 14px;
  min-height: 60px;
}

.visual-bar {
  margin-top: 12px;
}
.bar-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  margin-bottom: 6px;
}
.bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--accent);
  width: 50%;
  border-radius: 3px;
  transition: width 0.3s ease, background 0.3s ease;
}
.noise-bar { background: linear-gradient(90deg, #5cd28a, #ffa844, #ff6961); }
.blur-bar { background: linear-gradient(90deg, #5fb3ff, #ffa844, #ff6961); }

/* ============ TIP BOX ============ */
.tip-box {
  background: linear-gradient(135deg, rgba(255,181,71,0.08), rgba(255,181,71,0.02));
  border: 1px solid rgba(255,181,71,0.25);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.tip-icon {
  font-size: 20px;
  line-height: 1;
}
.tip-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--accent);
}
.tip-text {
  font-size: 13px;
  color: var(--text-dim);
}

.foot {
  text-align: center;
  font-size: 11px;
  color: var(--text-mute);
  padding: 16px;
}
.foot .copyright {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-dim);
}
.foot .copyright a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s ease;
}
.foot .copyright a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ================= COURS : ADDITIONS ================= */
body { max-width: 1320px; margin: 0 auto; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
strong { color: var(--text); font-weight: 600; }
.mono { font-family: 'JetBrains Mono', monospace; }
.accent { color: var(--accent); }
.ev-of { font-size: 14px; color: var(--text-mute); margin-left: 2px; }
.ev-state.done { color: var(--good); }

/* TOC */
.toc {
  position: sticky; top: 10px; z-index: 20;
  display: flex; gap: 6px; overflow-x: auto;
  padding: 8px; margin-bottom: 20px;
  background: rgba(18,22,29,.88); backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  scrollbar-width: none;
}
.toc::-webkit-scrollbar { display: none; }
.toc a {
  flex: 0 0 auto; text-decoration: none; color: var(--text-dim);
  font-size: 13px; padding: 7px 12px; border-radius: 8px; border: 1px solid transparent;
  transition: all .15s ease; white-space: nowrap;
}
.toc a b { font-family: 'JetBrains Mono', monospace; color: var(--text-mute); font-weight: 500; margin-right: 6px; font-size: 11px; }
.toc a:hover, .toc a.active { color: var(--text); border-color: var(--border-strong); background: var(--bg-card); }
.toc a.active b { color: var(--accent); }
.toc a.toc-exo { color: var(--accent); }

/* HERO */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 0;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: 48px;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.hero-text { padding: 36px 36px 32px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 600; }
.hero-text h2 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; letter-spacing: -.02em; font-weight: 600; }
.hero-text p { color: var(--text-dim); font-size: 15px; }
.learn { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.learn li { font-size: 13px; color: var(--text-dim); padding-left: 18px; position: relative; }
.learn li::before { content: ""; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--accent); }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } .hero-media img { min-height: 200px; max-height: 260px; } .hero-text { padding: 24px; } }
@media (max-width: 520px) { .learn { grid-template-columns: 1fr; } }

/* CHAPTER */
.chapter { margin-bottom: 56px; scroll-margin-top: 80px; }
.ch-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 20px; max-width: 900px; }
.ch-num {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 10px;
  display: grid; place-items: center; font-family: 'JetBrains Mono', monospace; font-weight: 600;
  color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(255,181,71,.3); font-size: 16px;
}
.ch-num.accent-bg { background: var(--accent); color: #1a1205; }
.ch-head h2 { font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; letter-spacing: -.02em; line-height: 1.25; margin-bottom: 8px; }
.ch-lead { color: var(--text-dim); font-size: 15px; max-width: 75ch; }

.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; }
.card-title { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-mute); margin-bottom: 16px; font-weight: 600; }
.card .body { font-size: 14px; color: var(--text-dim); }
.small { font-size: 12.5px; color: var(--text-mute); margin-top: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.control.compact { margin-top: 14px; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.mono-note { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-mute); }

.btn {
  font-family: inherit; font-size: 13px; font-weight: 500; color: var(--text);
  background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: 8px;
  padding: 9px 14px; cursor: pointer; text-decoration: none; transition: all .15s ease; display: inline-flex; align-items: center;
}
.btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn.primary { background: var(--accent); color: #1a1205; border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn:focus-visible, .preset:focus-visible, .seg button:focus-visible, .token:focus-visible, .choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* segmented */
.seg { display: flex; flex-wrap: wrap; gap: 4px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; padding: 3px; }
.seg button {
  flex: 1 1 auto; font-family: inherit; font-size: 12px; color: var(--text-dim); background: transparent;
  border: 0; border-radius: 6px; padding: 7px 8px; cursor: pointer; transition: all .15s ease; white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(255,181,71,.5); }

/* shutter animation */
.shutter-stage { background: #000; border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 14px; }
.shutter-stage svg { width: 100%; height: auto; display: block; border-radius: 6px; }
.shutter-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 11px; color: var(--text-mute); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.sw-c1, .sw-c2 { background: #2e3642; border: 1px solid #4a5566; }
.sw-light { background: var(--accent); }

.read-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.read-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-mute); padding: 0 0 8px; font-weight: 500; }
.read-table td { padding: 8px 0; border-top: 1px solid var(--border); color: var(--text-dim); vertical-align: top; }
.read-table td.mono { color: var(--accent); width: 96px; font-weight: 600; }
.tip-box.inline { margin-bottom: 0; }
.tip-icon { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--accent); width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(255,181,71,.4); display: grid; place-items: center; font-size: 13px; flex: 0 0 auto; }

/* ladder */
.ladder { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; align-items: end; margin-bottom: 20px; }
.rung {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-dim);
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; padding: 0 0 8px; cursor: pointer;
  display: flex; flex-direction: column; align-items: stretch; gap: 8px; overflow: hidden; transition: all .15s ease;
}
.rung .lvl { background: linear-gradient(180deg, rgba(255,181,71,.9), rgba(255,181,71,.25)); border-radius: 0; }
.rung:hover { border-color: var(--border-strong); color: var(--text); }
.rung.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.rung span { text-align: center; }
.ladder-out { align-items: center; }
.ladder-preview { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-strong); aspect-ratio: 16/10; background: #000; }
.ladder-preview img { width: 100%; height: 100%; object-fit: cover; transition: filter .35s ease; }
.hud-chip { position: absolute; top: 10px; left: 10px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #fff; background: rgba(0,0,0,.55); padding: 4px 10px; border-radius: 4px; }
.big-stat { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.big-stat span { font-family: 'JetBrains Mono', monospace; font-size: 36px; color: var(--accent); font-weight: 600; }
.big-stat small { color: var(--text-mute); font-size: 13px; }
.ladder-info p { color: var(--text-dim); font-size: 14px; margin-bottom: 14px; }
.ladder-info p.small { color: var(--text-mute); font-size: 12.5px; }
@media (max-width: 720px) { .ladder { grid-template-columns: repeat(6, 1fr); } }

/* simulator tweaks */
.layout { margin-bottom: 20px; }
.ref-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.ref { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.ref .mono { color: var(--accent); font-size: 14px; font-weight: 600; }
.ref span:last-child { font-size: 12.5px; color: var(--text-dim); }
@media (max-width: 900px) { .ref-grid { grid-template-columns: 1fr 1fr; } }
.figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--bg-elev); }
.figure img { width: 100%; aspect-ratio: 16/8; object-fit: cover; }
.figure.tall img { aspect-ratio: 4/3; }
.figure figcaption { font-size: 12.5px; color: var(--text-mute); padding: 12px 14px; }

/* calc */
.formula { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--text); background: var(--bg-elev); border: 1px dashed var(--border-strong); border-radius: 8px; padding: 12px 14px; }
.calc-out { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.calc-out > div { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.big { font-size: 24px; font-weight: 600; }

/* creative */
.creative-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 1000px) { .creative-grid { grid-template-columns: 1fr; } }
.creative { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.creative img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.creative-body { padding: 18px 20px 20px; }
.tag { display: inline-block; font-size: 11px; color: var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 3px 8px; margin-bottom: 10px; }
.creative h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.creative p { font-size: 13.5px; color: var(--text-dim); margin-bottom: 12px; }
.steps { padding-left: 18px; font-size: 13px; color: var(--text-dim); display: flex; flex-direction: column; gap: 4px; }
.steps li::marker { color: var(--accent); font-family: 'JetBrains Mono', monospace; }

/* reciprocity */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.trio-cell { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.trio-cell .big { font-size: 20px; }
.trio-cell.changed { border-color: var(--accent); }
.trio-cell.changed .big { color: var(--accent); }

/* exercises */
.exo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
@media (max-width: 900px) { .exo-grid { grid-template-columns: 1fr; } }
.exo { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; transition: border-color .3s ease; }
.exo.solved { border-color: rgba(92,210,138,.55); }
.exo-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.exo-num { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .1em; }
.badge { font-size: 11px; padding: 3px 9px; border-radius: 99px; background: var(--bg-elev); border: 1px solid var(--border); color: var(--text-mute); }
.badge.ok { background: rgba(92,210,138,.12); border-color: rgba(92,210,138,.5); color: var(--good); }
.exo h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; letter-spacing: -.01em; }
.exo-q { font-size: 14px; color: var(--text-dim); margin-bottom: 14px; }
.tokens { display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; }
.token, .choice {
  font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--text); background: var(--bg-elev);
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 8px 12px; cursor: pointer; transition: all .15s ease;
}
.token:hover, .choice:hover { border-color: var(--accent); }
.token.used { opacity: .25; pointer-events: none; }
.answer-line { display: flex; flex-wrap: wrap; gap: 6px; min-height: 38px; margin-top: 12px; padding: 8px; border: 1px dashed var(--border-strong); border-radius: 8px; align-items: center; }
.answer-line:empty::before { content: "Votre ordre apparaîtra ici"; font-size: 12px; color: var(--text-mute); }
.answer-line .pill { font-family: 'JetBrains Mono', monospace; font-size: 12px; padding: 4px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.answer-line .pill.bad { background: rgba(255,105,97,.15); color: var(--bad); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice.right { border-color: var(--good); background: rgba(92,210,138,.12); color: var(--good); }
.choice.wrong { border-color: var(--bad); background: rgba(255,105,97,.12); color: var(--bad); }
.choice[disabled] { cursor: default; }
.feedback { font-size: 13px; color: var(--text-dim); margin-top: 14px; min-height: 0; }
.feedback:empty { display: none; }
.feedback.ok, .feedback.ko { padding: 10px 12px; border-radius: 8px; }
.feedback.ok { background: rgba(92,210,138,.08); border: 1px solid rgba(92,210,138,.35); }
.feedback.ko { background: rgba(255,168,68,.07); border: 1px solid rgba(255,168,68,.35); }
.feedback b { color: var(--text); }

.quiz-item { padding: 12px 0; border-top: 1px solid var(--border); }
.quiz-item:first-child { border-top: 0; padding-top: 0; }
.quiz-item .qtext { font-size: 14px; color: var(--text); margin-bottom: 8px; }
.quiz-item .qtext span { color: var(--text-mute); font-family: 'JetBrains Mono', monospace; font-size: 11px; margin-right: 6px; }
.quiz-item .choice { font-size: 12px; padding: 6px 10px; }
.quiz-item .why { font-size: 12.5px; color: var(--text-mute); margin-top: 8px; }

.bilan {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center;
  background: linear-gradient(135deg, rgba(255,181,71,0.1), rgba(255,181,71,0.02));
  border: 1px solid rgba(255,181,71,0.3); border-radius: var(--radius-lg); padding: 28px;
}
.bilan h3 { font-size: 20px; margin: 8px 0; letter-spacing: -.01em; }
.bilan p { color: var(--text-dim); font-size: 14px; }
.memo { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.memo li { font-size: 13.5px; color: var(--text-dim); background: rgba(10,12,16,.5); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; }
.memo b { color: var(--accent); font-weight: 600; margin-right: 6px; }
@media (max-width: 900px) { .bilan { grid-template-columns: 1fr; padding: 20px; } }

.foot p + p { margin-top: 6px; }
.foot a { color: var(--accent); text-decoration: none; }

@media (max-width: 600px) {
  body { padding: 12px; }
  .topbar { padding: 14px 16px; gap: 12px; }
  .brand h1 { font-size: 15px; }
  .brand .sub { display: none; }
  .ev-value { font-size: 18px; }
  .ch-head { gap: 12px; }
  .ch-num { width: 40px; height: 40px; font-size: 14px; }
  .card, .exo { padding: 16px; }
  .hud-top, .hud-bottom { font-size: 10px; gap: 8px; padding: 4px 8px; white-space: nowrap; }
  .calc-out, .trio { grid-template-columns: 1fr; }
  .controls { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
html { scroll-behavior: smooth; }

/* crédits photo */
.credit { display: block; font-size: 11px; color: var(--text-mute); margin-top: 8px; }
.credit a { color: var(--text-dim); text-decoration: underline; text-decoration-color: var(--border-strong); }
.credit a:hover { color: var(--accent); }
.hero-media { position: relative; }
.hero-media .credit, .credit.overlay { position: absolute; right: 8px; bottom: 8px; margin: 0; background: rgba(0,0,0,.6); color: #cfd5de; padding: 3px 8px; border-radius: 4px; }
.hero-media .credit a { color: #e8ecf3; }
.creative-body .credit { margin-top: 14px; }
