/* Fiches de révision : même univers sombre que l'accueil, réglé pour la lecture longue.
   Layout : barre du haut ; en-tête de fiche ; sommaire collant à gauche + contenu en colonne de ~70 caractères. */
:root {
  color-scheme: dark;
  --page: #050505;
  --panel: #0d0e0e;
  --panel-2: #141615;
  --ink: #f4f5f2;
  --soft: #cfd2cd;
  --muted: #8b8f8b;
  --dim: #565a56;
  --line: rgba(255,255,255,.08);
  --sage: #b9d0bf;
  --sage-bg: rgba(185,208,191,.08);
  --amber: #e2c98f;
  --amber-bg: rgba(226,201,143,.08);
  --coral: #e8a593;
  --coral-bg: rgba(232,165,147,.08);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--page); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--page);
  color: var(--soft);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
a { color: var(--sage); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; border-radius: 6px; }
strong, b { color: var(--ink); font-weight: 600; }
img { max-width: 100%; height: auto; display: block; }

/* ---------- Barre du haut ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1240px; margin: 0 auto;
  padding-block: 14px;
  background: linear-gradient(var(--page) 75%, transparent);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--page); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.brand svg { width: 30px; height: 30px; }
.back {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: #161717; border: 1px solid rgba(255,255,255,.06);
  color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 500;
}
.back:hover { background: #222423; }
.back svg { width: 14px; height: 14px; }

/* ---------- En-tête de fiche ---------- */
.head {
  max-width: 1240px; margin: 8px auto 0;
  padding: clamp(28px, 4vw, 52px) clamp(20px, 4vw, 52px);
  border-radius: 28px;
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(185,208,191,.22), transparent 60%),
    radial-gradient(40% 90% at 0% 100%, rgba(119,136,142,.18), transparent 70%),
    var(--panel);
  border: 1px solid var(--line);
}
.eyebrow { margin: 0 0 12px; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.head h1 {
  margin: 0; color: var(--ink);
  font-size: clamp(32px, 5vw, 56px); font-weight: 500; letter-spacing: -.03em; line-height: 1.05;
  text-wrap: balance;
}
.head .intro { margin: 16px 0 0; max-width: 62ch; font-size: 17px; color: var(--soft); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.06);
  color: var(--soft); font-size: 13px; text-decoration: none;
  font-variant-numeric: tabular-nums;
}
a.chip { color: var(--ink); }
a.chip:hover { background: rgba(255,255,255,.11); }
.chip svg { width: 14px; height: 14px; flex: none; }
.chip.solid { background: #fff; color: #000; border-color: #fff; font-weight: 500; }
.chip.solid:hover { background: #e3e7e3; }

/* ---------- Grille sommaire + contenu ---------- */
.layout {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  padding-block: 40px 96px;
}
.toc { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow: auto; }
.toc p { margin: 0 0 10px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.progress { height: 4px; border-radius: 4px; background: #1d1f1e; overflow: hidden; margin-bottom: 6px; }
.progress i { display: block; height: 100%; width: 0; background: var(--sage); transition: width .3s; }
.progress-label { font-size: 12px; color: var(--muted); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc li { display: flex; align-items: center; gap: 8px; }
.toc a {
  flex: 1; min-width: 0;
  padding: 6px 10px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-size: 14px; line-height: 1.35;
}
.toc a:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.toc a.active { color: var(--ink); background: rgba(255,255,255,.06); }
.toc input { accent-color: var(--sage); width: 15px; height: 15px; flex: none; cursor: pointer; }

.content { min-width: 0; max-width: 760px; }
.content section { scroll-margin-top: 84px; padding-bottom: 12px; }
.content section + section { margin-top: 44px; padding-top: 44px; border-top: 1px solid var(--line); }
.content h2 {
  display: flex; align-items: baseline; gap: 14px;
  margin: 0 0 18px; color: var(--ink);
  font-size: clamp(23px, 2.6vw, 30px); font-weight: 500; letter-spacing: -.02em; line-height: 1.2;
}
.content h2 .n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .04em; flex: none; }
.content h3 { margin: 28px 0 10px; color: var(--ink); font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.content p { margin: 0 0 14px; max-width: 70ch; }
.content ul, .content ol { margin: 0 0 16px; padding-left: 1.25em; max-width: 70ch; }
.content li { margin-bottom: 6px; }
.content li::marker { color: var(--dim); }

/* Bloc « l'essentiel » */
.essentiel {
  margin-bottom: 48px; padding: 24px 26px;
  border-radius: 20px; background: var(--sage-bg); border: 1px solid rgba(185,208,191,.22);
}
.essentiel h2 { font-size: 20px; margin-bottom: 14px; }
.essentiel ul { margin: 0; }
.essentiel li { margin-bottom: 8px; }

/* Définitions */
.defs { display: grid; gap: 10px; margin: 0 0 18px; }
.defs > div { padding: 14px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.defs dt { color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.defs dd { margin: 0; }

/* Encadrés */
.callout { margin: 0 0 18px; padding: 16px 20px; border-radius: 16px; border: 1px solid; max-width: 70ch; }
.callout > :last-child { margin-bottom: 0; }
.callout .label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.callout.retenir { background: var(--sage-bg); border-color: rgba(185,208,191,.25); }
.callout.retenir .label { color: var(--sage); }
.callout.piege { background: var(--amber-bg); border-color: rgba(226,201,143,.25); }
.callout.piege .label { color: var(--amber); }
.callout.verif { background: var(--coral-bg); border-color: rgba(232,165,147,.25); }
.callout.verif .label { color: var(--coral); }
blockquote { margin: 0 0 16px; padding: 4px 0 4px 18px; border-left: 2px solid var(--sage); color: var(--ink); font-style: italic; max-width: 66ch; }
blockquote cite { display: block; margin-top: 4px; font-style: normal; font-size: 13px; color: var(--muted); }

/* Tableaux */
.table { overflow-x: auto; margin: 0 0 18px; border-radius: 14px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { color: var(--ink); font-weight: 600; background: var(--panel-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--ink); font-weight: 500; }
.num { font-variant-numeric: tabular-nums; }

/* Frise chronologique */
.timeline { list-style: none; margin: 0 0 18px; padding: 0; border-left: 1px solid rgba(255,255,255,.12); max-width: 70ch; }
.timeline li { position: relative; padding: 0 0 12px 22px; margin: 0; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }
.timeline time { display: inline-block; min-width: 4.5em; margin-right: 6px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Schémas */
figure { margin: 0 0 20px; }
figure img { border-radius: 14px; background: #fff; }
figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.diagram { padding: 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); overflow-x: auto; }
.diagram svg { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; }
.diagram text { fill: var(--ink); font-family: var(--font); }

/* Quiz */
.quiz { display: grid; gap: 10px; }
.q { border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.q summary {
  list-style: none; cursor: pointer;
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px 18px; color: var(--ink); font-weight: 500;
}
.q summary::-webkit-details-marker { display: none; }
.q summary::before {
  content: "?"; flex: none;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: var(--muted); font-size: 13px; font-weight: 600;
}
.q[open] summary::before { content: "✓"; background: var(--sage); color: #000; }
.q .a { padding: 0 18px 16px 54px; }
.q .a > :last-child { margin-bottom: 0; }
.q ul.opts { list-style: none; padding: 0; margin: 0 0 10px; }
.q ul.opts li { padding: 6px 12px; border-radius: 10px; margin-bottom: 4px; background: rgba(255,255,255,.03); }
.q ul.opts li.ok { background: var(--sage-bg); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(185,208,191,.35); }
.q ul.opts li.ok::after { content: "  ← bonne réponse"; color: var(--sage); font-size: 13px; }
.quiz-tools { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.quiz-tools button {
  font: inherit; font-size: 13px; color: var(--ink);
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: #161717; border: 1px solid rgba(255,255,255,.08);
}
.quiz-tools button:hover { background: #222423; }

/* ---------- Bouton et panneau « Source » ---------- */
.src-btn {
  margin-left: auto; align-self: center; flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: #161717; border: 1px solid rgba(255,255,255,.1);
  color: var(--soft); font: 500 12.5px/1.2 var(--font); letter-spacing: 0;
  cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.src-btn:hover { background: #fff35c; color: #000; border-color: #fff35c; }
.src-btn svg { width: 14px; height: 14px; }
.src-lock, .src-lock body { overflow: hidden; }
.src-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.6); backdrop-filter: blur(2px); }
.src-panel {
  position: fixed; z-index: 50; top: 0; right: 0; bottom: 0;
  width: min(620px, 100%);
  display: flex; flex-direction: column;
  background: #f4f2ec; color: #1d1d1b;
  box-shadow: -20px 0 60px rgba(0,0,0,.5);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
.src-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; padding: 22px 24px 12px; border-bottom: 1px solid #ddd9cf; background: #faf9f5; }
.src-eyebrow { margin: 0 0 4px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #77756d; }
.src-head h2 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -.01em; color: #111; line-height: 1.25; }
.src-count { margin: 6px 0 0; font-size: 13px; color: #5d5b54; }
.src-close { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid #d6d2c7; background: #fff; color: #222; display: grid; place-items: center; cursor: pointer; }
.src-close svg { width: 14px; height: 14px; }
.src-close:hover { background: #ece9e1; }
.src-tools { display: flex; align-items: center; gap: 8px; padding: 10px 24px; border-bottom: 1px solid #ddd9cf; background: #faf9f5; font-size: 13px; color: #5d5b54; font-variant-numeric: tabular-nums; }
.src-nav { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #d6d2c7; background: #fff; color: #222; font-size: 18px; line-height: 1; cursor: pointer; }
.src-nav:hover { background: #fff35c; border-color: #e6d900; }
.src-pos { min-width: 4.5em; text-align: center; }
.src-open { margin-left: auto; color: #1d1d1b; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.src-body {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 26px 32px 60px;
  font-family: Calibri, Carlito, "Segoe UI", Arial, sans-serif;
  font-size: 15.5px; line-height: 1.6;
}
.src-body p, .src-body li { margin: 0 0 10px; color: #1d1d1b; max-width: none; }
.src-body ul { margin: 0 0 10px; padding-left: 1.2em; }
.src-body h4 { margin: 18px 0 8px; font-size: 16px; color: #000; }
.src-body .src-gap { color: #8a877e; text-align: center; letter-spacing: .2em; }
.src-body .src-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0; border: 1px solid #d6d2c7; background: #fff; font-size: 14px; }
.src-body .src-row span { padding: 6px 8px; border-right: 1px solid #e3dfd5; }
.src-body mark { background: #fff35c; color: #000; padding: 0 2px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(214,200,0,.35); }
.src-body mark.current { background: #ffd400; box-shadow: 0 0 0 2px #ff9f1c; }
@media (max-width: 640px) {
  .src-head { padding: 16px 16px 10px; }
  .src-tools { padding: 8px 16px; }
  .src-body { padding: 18px 18px 48px; }
  .src-btn { padding: 6px 10px; }
  .content h2 { flex-wrap: wrap; row-gap: 8px; overflow-wrap: anywhere; }
}

/* Schémas à légendes masquables */
figure.schema img { background: #000; }
figure.schema figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.schema-btn, .schemas-all {
  font: 500 12.5px/1 var(--font); color: var(--ink); cursor: pointer;
  padding: 7px 12px; border-radius: 999px; background: #161717; border: 1px solid rgba(255,255,255,.1);
}
.schema-btn[aria-pressed="true"] { background: var(--sage); color: #000; border-color: var(--sage); }
.schema-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; margin-bottom: 18px; }
.schema-grid figure { margin: 0; }

.foot { max-width: 1240px; margin: 0 auto; padding-block: 28px 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
  .toc { position: static; max-height: none; padding: 18px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
}
@media print {
  .topbar, .toc, .quiz-tools { display: none; }
}

/* ---------- Frise chronologique ---------- */
button.chip { cursor: pointer; font: inherit; color: var(--ink); }
.frise-open:hover { background: rgba(255,255,255,.11); }
.frise-panel { position: fixed; z-index: 41; inset: 4vh max(16px, calc(50vw - 380px)); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.frise-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px 8px; }
.frise-eyebrow { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.frise-head h2 { margin: 2px 0 0; font-size: 21px; color: var(--ink); font-weight: 600; letter-spacing: -.01em; }
.frise-x { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.frise-x svg { width: 14px; height: 14px; }
.frise-tools { padding: 4px 22px 12px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.frise-seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; width: max-content; }
.frise-seg button { font: inherit; font-size: 14px; border: 0; background: none; color: var(--muted); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.frise-seg button[aria-pressed="true"] { background: var(--ink); color: #000; font-weight: 600; }
.frise-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.frise-chips button { flex: none; font: inherit; font-size: 13px; border: 1px solid var(--line); background: none; color: var(--soft); padding: 5px 11px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.frise-chips button small { color: var(--dim); margin-left: 3px; }
.frise-chips button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); background: rgba(255,255,255,.06); }
.frise-body { overflow-y: auto; padding: 16px 22px 0; flex: 1; }
.frise-help { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.frise-line { list-style: none; margin: 0; padding: 0 0 18px 6px; position: relative; }
.frise-line::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 18px; width: 2px; background: var(--line); }
.frise-line li { position: relative; padding: 0 0 18px 30px; display: grid; gap: 4px; }
.frise-dot { position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--ink); }
.frise-d { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.frise-t { color: var(--soft); font-size: 15px; line-height: 1.45; }
.frise-s { color: var(--dim); font-size: 12px; }
.frise-slot { font: inherit; font-size: 14px; text-align: left; min-height: 40px; padding: 8px 12px; border-radius: 10px; border: 1.5px dashed rgba(255,255,255,.18); background: none; color: var(--dim); cursor: pointer; line-height: 1.4; }
.frise-slot.wait { border-color: var(--ink); color: var(--muted); }
.frise-slot.full { border-style: solid; border-color: rgba(255,255,255,.22); background: var(--panel-2); color: var(--ink); }
.frise-slot.good { border-color: var(--ink); background: rgba(255,255,255,.1); color: var(--ink); }
.frise-slot.bad { border-color: rgba(255,255,255,.18); color: var(--muted); text-decoration: line-through; }
.frise-fix { color: var(--ink); font-size: 13px; }
.frise-tray { position: sticky; bottom: 0; margin: 0 -22px; padding: 12px 22px max(14px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--panel) 14px); display: flex; flex-wrap: wrap; gap: 8px; max-height: 42vh; overflow-y: auto; }
.frise-tag { font: inherit; font-size: 13.5px; line-height: 1.35; text-align: left; padding: 7px 11px; border-radius: 10px; border: 1px solid rgba(255,255,255,.16); background: var(--panel-2); color: var(--ink); cursor: pointer; }
.frise-tag.on { background: var(--ink); color: #000; border-color: var(--ink); }
.frise-actions { width: 100%; display: flex; gap: 8px; margin-top: 4px; }
.frise-btn { flex: 1; font: inherit; font-size: 15px; font-weight: 600; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.16); background: none; color: var(--ink); cursor: pointer; }
.frise-btn.primary { background: var(--ink); color: #000; border-color: var(--ink); }
.frise-btn:disabled { opacity: .4; cursor: default; }
@media (max-width: 640px) {
  .frise-panel { inset: 0; border-radius: 0; border: 0; }
  .frise-head { padding: 16px 16px 6px; }
  .frise-tools, .frise-body { padding-left: 16px; padding-right: 16px; }
  .frise-tray { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
}

/* Frise : en-tête sur une ligne (titre · mode · fermer) */
.frise-head { align-items: center; flex-wrap: wrap; }
.frise-head > div:first-child { flex: 1; min-width: 0; }
.frise-head .frise-x { order: 3; }
.frise-tools:empty { display: none; }
@media (max-width: 899px), (max-height: 539px) {
  .frise-head > div:first-child { flex: 1 1 calc(100% - 64px); }
  .frise-head .frise-seg { order: 4; }
}

/* Frise sur PC : plein écran, horizontale, en pages (flèches ← →) */
.frise-panel.desk { inset: 0; border-radius: 0; border: 0; background: var(--page); box-shadow: none; }
.frise-panel.desk .frise-head { padding: 22px 40px 10px; }
.frise-panel.desk .frise-head h2 { font-size: 24px; }
.frise-panel.desk .frise-tools { padding: 4px 40px 14px; }
.frise-panel.desk .frise-chips { flex-wrap: wrap; }
.frise-panel.desk .frise-body { display: flex; flex-direction: column; overflow: hidden; padding: 18px 40px 18px; }
.frise-panel.desk .frise-help { text-align: center; }
.frise-stage { flex: 1; min-height: 0; display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; gap: 18px; align-items: center; }
.frise-arrow { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: var(--panel-2); color: var(--ink); border: 1px solid rgba(255,255,255,.14); transition: background .15s, transform .15s; }
.frise-arrow svg { width: 24px; height: 24px; }
.frise-arrow:hover:not(:disabled) { background: var(--ink); color: #000; }
.frise-arrow:active:not(:disabled) { transform: scale(.94); }
.frise-arrow:disabled { opacity: .25; cursor: default; }
.frise-hline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 18px; align-self: center; }
.frise-hline::before { content: ""; position: absolute; left: -18px; right: -18px; top: 75px; height: 2px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.28) 6%, rgba(255,255,255,.28) 94%, transparent); }
.frise-hline li { position: relative; display: grid; grid-template-rows: 64px 24px auto; justify-items: center; text-align: center; min-width: 0; }
.frise-hline .frise-d { align-self: end; padding-bottom: 8px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; color: var(--ink); }
.frise-hline .frise-dot { position: static; align-self: center; width: 16px; height: 16px; border-radius: 50%; background: var(--page); border: 3px solid var(--ink); z-index: 1; }
.frise-card { position: relative; margin-top: 18px; width: 100%; display: grid; gap: 8px; align-content: start; padding: 16px 16px 14px; min-height: 110px; border-radius: 16px; background: var(--panel); border: 1px solid rgba(255,255,255,.1); }
.frise-card::before { content: ""; position: absolute; left: 50%; top: -19px; width: 2px; height: 18px; margin-left: -1px; background: rgba(255,255,255,.22); }
.frise-card .frise-t { color: var(--ink); font-size: 16px; line-height: 1.45; }
.frise-card .frise-s { color: var(--muted); font-size: 12.5px; }
.frise-card.slot { padding: 0; background: none; border: 0; min-height: 0; }
.frise-card.slot .frise-slot { width: 100%; min-height: 96px; text-align: center; border-radius: 16px; font-size: 15px; }
.frise-card.slot .frise-fix { display: block; margin-top: 8px; }
.frise-hline.fwd li { animation: frise-in-r .32s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 28ms); }
.frise-hline.bwd li { animation: frise-in-l .32s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 28ms); }
@keyframes frise-in-r { from { opacity: 0; transform: translateX(28px); } }
@keyframes frise-in-l { from { opacity: 0; transform: translateX(-28px); } }
@media (prefers-reduced-motion: reduce) { .frise-hline li { animation: none !important; } }
.frise-map { flex: none; margin: 18px 74px 0; }
.frise-rail { position: relative; height: 22px; }
.frise-rail::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: rgba(255,255,255,.1); border-radius: 2px; }
.frise-tick { position: absolute; top: 6px; width: 10px; height: 10px; margin-left: -5px; padding: 0; border-radius: 50%; border: 0; background: rgba(255,255,255,.22); cursor: pointer; }
.frise-tick.on { background: var(--ink); box-shadow: 0 0 0 3px rgba(255,255,255,.12); }
.frise-map p { margin: 6px 0 0; text-align: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.frise-map p b { color: var(--soft); font-weight: 600; }
.frise-panel.desk .frise-tray { position: static; margin: 16px 74px 0; padding: 14px 0 0; background: none; border-top: 1px solid var(--line); justify-content: center; max-height: 30vh; }
.frise-panel.desk .frise-actions { justify-content: center; }
.frise-panel.desk .frise-btn { flex: 0 1 220px; }
