/* Inter, the recon dashboard's font: bundled since macOS does not ship it. Latin subset only. */
@font-face { font-family: "Inter"; src: url("inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --gray-0: #fff; --gray-25: #fafbfc; --gray-40: #f8f9fb; --gray-50: #f7f8fa; --gray-60: #f4f6f9; --gray-70: #f4f5f7; --gray-100: #f2f4f7;
  --gray-150: #eef0f4; --gray-160: #eef0f3; --gray-200: #eceff3; --gray-250: #e6e9ed; --gray-300: #e4e7ec; --gray-400: #d0d5dd; --gray-450: #c5cbd3; --gray-460: #c4cad4;
  --ink: #101828; --ink-2: #1c2127; --glass: rgb(220 224 229);
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #e4e7ec;
  --text: #101828;
  --muted: #667085;
  --accent: #2563eb;
  --accent-soft: #e8efff;
  --sim: #7c3aed;
  --car: #0f9f6e;
  --radius: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: 260ms;
  /* Apple's snappy spring (SwiftUI .snappy: response 0.35 s, bounce 0.15), sampled over 500 ms */
  --spring: linear(0, 0.053, 0.172, 0.315, 0.459, 0.588, 0.698, 0.786, 0.855, 0.906, 0.943, 0.968, 0.985, 0.995, 1.002, 1.005, 1.006, 1.006, 1.006, 1.005, 1.004, 1.003, 1.002, 1.002, 1.001, 1.001);
  font: 13px/1.4 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { display: flex; background: var(--bg); overflow: hidden; -webkit-user-select: none; user-select: none; }
/* Only what is typed can be selected: the app's own words are not text to copy. */
:is(input, textarea, [contenteditable]) { -webkit-user-select: text; user-select: text; }
button, input, select { font: inherit; color: inherit; }

/* Left menu, fixed width: a tinted panel floating inside the window's edges, as One Text's sidebar. */
:root { --side-open: 216px; --float: 8px; --float-bg: #eceef2; --float-line: #dfe2e7;
  --float-shadow: 0 1px 3px rgb(16 24 40 / .08), 0 10px 28px -6px rgb(16 24 40 / .22); }
.side { position: relative; z-index: 40; flex: none; width: calc(var(--side-open) + var(--float)); }
.side-panel { position: absolute; inset: var(--float) 0 var(--float) var(--float); display: flex; flex-direction: column; gap: 14px; padding: 14px 10px; overflow: hidden;
  background: var(--float-bg); border: 1px solid var(--float-line); border-radius: 12px; box-shadow: var(--float-shadow); }
.side-head { display: flex; align-items: center; gap: 8px; height: 32px; }
.brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding-left: 10px; white-space: nowrap; font-size: 15px; letter-spacing: -.01em; }
.brand .ico { width: 20px; height: 20px; margin-left: -1px; color: var(--accent); }

/* The chosen tab's pill stretches to the next one (templates/web "Line stretches to the chosen tab", turned vertical). */
.mtabs { position: relative; display: flex; flex-direction: column; gap: 2px; }
.mtabs a { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 10px; border-radius: 8px; font-size: 14px; font-weight: 500; white-space: nowrap;
  color: var(--muted); text-decoration: none; outline: none; transition: color 300ms var(--ease), background 150ms var(--ease); }
.mtabs a .ico { width: 18px; height: 18px; }
.mtabs a:hover { color: var(--text); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.mtabs a:focus-visible { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.mtabs a[aria-current=page] { color: #fff; background: none; }
.mtabs .line { position: absolute; top: 0; left: 0; right: 0; z-index: 0; border-radius: 8px; background: var(--accent); pointer-events: none; }

.page { flex: 1; min-width: 0; min-height: 0; animation: swap-in 300ms ease both; }
.page[hidden] { display: none; }
#page-planning:not([hidden]) { display: grid; grid-template-columns: 1fr; }
@keyframes swap-in { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }

.sheet { display: flex; flex-direction: column; gap: 14px; padding: 18px 22px; overflow: auto; }
.page-head { display: flex; align-items: baseline; gap: 12px; }
.page-head h3 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.page-head span { color: var(--muted); }

/* Filter bar (templates/web filter-lists), light inks. */
.filter-bar { display: flex; align-items: center; gap: 8px; }
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.find { display: flex; align-items: center; width: 260px; height: 32px; padding-left: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--gray-0); cursor: text;
  transition: border-color 150ms cubic-bezier(.4, 0, .2, 1), box-shadow 150ms cubic-bezier(.4, 0, .2, 1); }
.find:has(input:focus-visible) { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.find .ico { color: var(--muted); }
.find input { flex: 1; min-width: 0; height: 100%; padding: 4px 10px 4px 6px; border: 0; outline: none; background: none; }
.find input::placeholder { color: var(--muted); }
.find input::-webkit-search-cancel-button { display: none; }
.tbtn { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: 10px; font-size: 12.8px; font-weight: 500;
  border: 1px solid var(--line); background: var(--gray-0); cursor: pointer; transition: all .3s cubic-bezier(.4, 0, .2, 1); }
.tbtn:hover, .tbtn[aria-expanded="true"] { background: var(--gray-100); }
.tbtn:disabled { opacity: .5; pointer-events: none; }
.tbtn.chosen { background: var(--accent); border-color: transparent; color: #fff; }
.tbtn.chosen:hover, .tbtn.chosen[aria-expanded="true"] { background: color-mix(in srgb, var(--accent) 80%, transparent); }
.count { display: grid; grid-template-columns: 0fr; margin-left: -4px; opacity: 0;
  transition: grid-template-columns .3s cubic-bezier(0, 0, .2, 1), margin .3s cubic-bezier(0, 0, .2, 1), opacity .3s cubic-bezier(0, 0, .2, 1); }
.tbtn.chosen .count { grid-template-columns: 1fr; margin-left: 0; opacity: 1; }
.count span { min-width: 0; overflow: hidden; font-variant-numeric: tabular-nums; }
.lists-at { position: relative; }
.lists { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; display: grid; grid-template-rows: auto auto; grid-auto-flow: column dense; align-items: start; gap: 8px;
  width: max-content; max-width: min(860px, calc(100vw - 420px)); max-height: calc(100vh - 140px); overflow: auto; padding: 8px; border-radius: 10px;
  font-size: 13px; line-height: 20px; background: color-mix(in srgb, var(--gray-200) 90%, transparent); border: 1px solid color-mix(in srgb, var(--gray-0) 40%, transparent);
  backdrop-filter: blur(40px) saturate(200%) brightness(1.15);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink-2) 10%, transparent), 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
  transform-origin: top left; animation: lists-in .1s ease-out; }
.lists[hidden] { display: none; }
@keyframes lists-in { from { opacity: 0; scale: .95; translate: 0 -8px; } }
.list { flex: none; max-width: 256px; overflow: hidden; border: 1px solid var(--gray-450); border-radius: 10px; background: var(--gray-0); }
.list p { margin: 0; padding: 6px 10px; border-bottom: 1px solid var(--gray-450); background: lab(96.52 0 0); font-size: 12px; line-height: 16px; font-weight: 500; }
.list div { display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; padding: 4px; }
/* two rows of blocks, filled column by column; a long list takes a whole column and scrolls in the height
   the short ones give it, instead of setting the popup's height */
.list.long { grid-row: span 2; align-self: stretch; display: flex; flex-direction: column; }
.list.long div { flex: 1 1 0; min-height: 160px; max-height: none; }
.list label { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; cursor: pointer; }
.list label:hover { background: lab(96.52 0 0); }
.list input { width: 14px; height: 14px; margin: 0; flex: none; accent-color: var(--text); }
.list label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list label small { margin-left: auto; padding-left: 8px; font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .find { transition-duration: 1ms; } .tbtn, .count { transition: none; } .lists { animation: none; } }

.table-wrap { position: relative; min-height: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; }
#page-students th { position: sticky; top: 0; z-index: 1; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 10px 14px; background: var(--gray-25); border-bottom: 1px solid var(--line); }
td { padding: 10px 14px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 200ms var(--ease); }
tbody tr:nth-child(even of :not([hidden])) { background: var(--gray-50); }
tbody tr:hover { background: var(--gray-150); }
th:has(> .sort) { padding: 0; }
.sort { display: block; width: 100%; padding: 10px 14px; border: 0; background: none; text-align: inherit; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; outline: none; cursor: pointer; }
.sort:focus-visible { text-decoration: underline; }
.sort > span { position: relative; }
.sort svg { position: absolute; top: 50%; left: 100%; margin-left: 1px; width: 10px; height: 10px; translate: 0 -50%; opacity: 0;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: opacity 150ms ease-out; }
.sort:hover svg, .sort:focus-visible svg { opacity: .6; }
th[aria-sort] .sort svg { opacity: .9; }
.who { display: flex; align-items: center; gap: 8px; font-weight: 600; }
#students-rows tr { cursor: pointer; }
/* A ring in the pill's own colour shows its whole size on any background. */
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--gray-100); color: var(--muted);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 28%, transparent); }
.tag.urgent, .tag.warn { background: #fef3e2; color: #b45309; }
.tag.ok { background: #e7f6ef; color: var(--car); }
.tag.bad { background: #fde8e8; color: #c0262d; }
.tag.info { background: var(--accent-soft); color: var(--accent); }
.tag.live { background: var(--car); color: #fff; animation: live 1.6s ease-in-out infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--car) 20%, transparent); } }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.dlg-head .flag-menu { top: calc(100% + 6px); left: 0; right: auto; transform-origin: top left; font-size: 13px; font-weight: 400; }
.flag-menu {
  position: absolute; z-index: 5; top: calc(100% - 4px); right: 14px;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: color-mix(in srgb, var(--gray-0) 88%, transparent); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(16, 24, 40, .14);
  animation: pop 150ms var(--ease);
  transform-origin: top right;
  cursor: default;
}
.flag-menu label { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.flag-menu label:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.plan-preview { position: fixed; top: 0; left: 0; z-index: 100; width: max-content; max-width: calc(100vw - 24px); padding: 2px 7px; border: 1px solid color-mix(in srgb, var(--gray-0) 40%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--glass) 40%, transparent); color: var(--ink-2); -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.15); backdrop-filter: blur(40px) saturate(200%) brightness(1.15); font-size: 11px; font-weight: 500; line-height: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity var(--dur) var(--ease), visibility var(--dur); }
.plan-preview.show { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .plan-preview { transition-duration: 80ms; } }

.res-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.res-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.res-card .card-top { font-size: 15px; font-weight: 600; }
.res-card .kind { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--muted); }
.figures { display: flex; gap: 22px; }
.figures div { display: flex; flex-direction: column; }
.figures b { font-size: 18px; font-variant-numeric: tabular-nums; }
.figures span { font-size: 12px; color: var(--muted); }
.res-card .card-top { align-items: flex-start; }
.res-card .card-top .dot { margin-top: 5px; }
.res-card .card-top :is(.tag, .kind) { white-space: nowrap; }
.res-card .who { flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; }
.res-card .who .role { font-size: 12px; font-weight: 500; color: var(--muted); }
.res-card .card-top .tag { margin-left: auto; }
.res-card .card-top .tag + .kind { margin-left: 0; }
.res-card .note { margin: 0; font-size: 13px; color: var(--muted); }
.sheet-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.sheet-fields label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sheet-fields span { font-size: 11px; font-weight: 600; color: var(--muted); }
.sheet-fields :is(input, select) { height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); font-size: 13px; min-width: 0; }
.sheet-fields :is(input, select):focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.office.off { background: none; border-style: dashed; }
.office.off p { margin: 0; font-size: 13px; color: var(--muted); }
.staff { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.staff li { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; border-bottom: 1px solid var(--line); }
.staff li:last-child { border-bottom: none; padding-bottom: 0; }
.staff li span:last-child { color: var(--muted); }
.bar { height: 6px; border-radius: 3px; background: var(--gray-160); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--c); }
.week { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 44px 1fr; row-gap: 4px; font-size: 12px; font-variant-numeric: tabular-nums; }
.week span:nth-child(odd) { color: var(--muted); font-weight: 600; }

.empty { margin: 60px auto; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); }
.empty b { color: var(--text); font-size: 15px; }

h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 2px 6px 4px; }
#students-count { font-weight: 500; }
ul { list-style: none; margin: 0; padding: 0; }

.item {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.card-top { display: flex; align-items: center; gap: 8px; }
.num { min-width: 22px; color: var(--muted); font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; text-align: right; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--c); }
.name { flex: 1; min-width: 0; padding: 2px 0; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

button.primary {
  border: 0; border-radius: 9px; padding: 8px 16px; cursor: pointer; font-weight: 600;
  background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .12);
  transition: background var(--dur) var(--ease), transform 120ms var(--ease);
}
button.primary:hover { background: #1d4ed8; }
button.primary:active { transform: scale(.97); }
button.primary.stale { background: #d97706; }
button.primary[disabled] { opacity: .7; cursor: progress; }

main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 24px 32px 0 18px; }
/* The planning is 95% of the height it had when it filled the page under a 12 px gap and above 30 px of padding
   (82 px with the 40 px header); the room that frees goes twice above it, under the buttons, as below it. */
header { flex: 2 0 auto; align-content: start; }
main::after { content: ""; flex: 1 0 0; }
header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.week-nav { grid-column: 2; display: flex; align-items: center; gap: 2px; background: var(--gray-200); border-radius: 9px; padding: 3px; }
.week-label { display: grid; justify-items: center; padding: 0 10px; }
.week-label b { grid-area: 1 / 1; font-size: 20px; font-weight: 600; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
/* The hidden widest labels hold the width so the arrows never move between weeks. */
.week-label b[aria-hidden] { visibility: hidden; }
.week-nav { position: relative; }
#week-ab { position: absolute; top: 100%; left: 0; right: 0; margin-top: 3px; text-align: center; font-size: 11px; color: var(--muted); }
.week-nav button { border: 0; background: none; width: 30px; height: 30px; border-radius: 7px; font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer; transition: background var(--dur) var(--ease), color var(--dur) var(--ease), scale 500ms var(--spring); }
.week-nav button:hover { background: var(--gray-0); color: var(--text); }
.week-nav button:is(:active, .press) { scale: .86; background: var(--gray-0); color: var(--text); transition-duration: 80ms; }
@media (prefers-reduced-motion: reduce) { .week-nav button:is(:active, .press) { scale: 1; } }
.stats { grid-column: 1; grid-row: 1; justify-self: start; display: grid; gap: 4px; }
.stats .fact { justify-content: space-between; margin: 0; padding: 2px 3px 2px 10px; --block-line: var(--gray-450); font-variant-numeric: tabular-nums; }
.stats :is(dt, dd) { font-size: 13px; white-space: nowrap; color: var(--text); }
.stats dd { margin: 0; white-space: nowrap; padding: 0 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink-2) 8%, transparent); line-height: 18px; }
.actions { grid-column: 3; justify-self: end; display: flex; gap: 8px; }
#clear-week { border: 1px solid var(--line); background: var(--gray-0); border-radius: 9px; padding: 8px 14px; font-weight: 600; color: var(--text); cursor: pointer; }
#clear-week:hover { background: var(--gray-40); }
/* Under Vider and Remplir: beside them it widened the right column and pushed the week title off centre. */
.actions { position: relative; }
#plan-ask { position: absolute; top: calc(100% + 8px); right: 0; z-index: 5; box-shadow: 0 4px 14px rgb(0 0 0 / .08); display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 4px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--gray-0); font-size: 14px; white-space: nowrap; }
#plan-ask[hidden] { display: none; }
#plan-ask button { height: 30px; padding: 0 12px; border-radius: 7px; font: inherit; font-weight: 600; cursor: pointer; }
#plan-ask button:not(.primary) { border: 1px solid var(--line); background: var(--gray-0); color: var(--text); }
#plan-ask button:not(.primary):hover { background: var(--gray-40); }
/* The week bar, Vider and Remplir share one 40 px row. */
.actions > button { height: 40px; padding: 0 22px; border-radius: 10px; font-size: 15px; }
/* Whether the student confirmed they are coming: an orange dot until they do, then a green tick. */
:root { --wait: #f79009; }
/* One SVG per mark, so the tick or the dots cannot snap to a different pixel than their circle. */
.mark { flex: none; display: grid; width: 14px; height: 14px; }
.mark .bg { fill: var(--car); }
.mark.wait .bg { fill: var(--wait); }
.chip:has(.mark) { padding-right: 20px; }
.chip > .mark { position: absolute; right: 3px; bottom: 3px; cursor: pointer; transition: scale var(--dur) var(--ease); }
.chip > .mark:hover { scale: 1.25; }
.past .chip > .mark { cursor: default; scale: 1; }
.week-nav button { width: 34px; height: 34px; font-size: 22px; }
.tabs { position: relative; display: flex; background: var(--gray-200); border-radius: 9px; padding: 3px; }
.tabs button { position: relative; z-index: 1; border: 0; background: none; padding: 6px 14px; border-radius: 7px; cursor: pointer; color: var(--muted); font-weight: 600; transition: color var(--dur) var(--ease); }
.tabs button.on { color: var(--text); }
.tab-pill {
  position: absolute; top: 3px; bottom: 3px; left: 0; border-radius: 7px; background: var(--gray-0);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .1);
  transition: transform var(--dur) var(--ease), width var(--dur) var(--ease);
}

#grid, #grid-current, #grid-other {
  --hour-line: var(--gray-450);
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 52px repeat(var(--days), minmax(0, 1fr));
  grid-template-rows: 42px repeat(var(--hours), minmax(0, 1fr));
  gap: 0 3px;
  user-select: none;
  -webkit-user-select: none;
}
.day { align-self: end; padding-bottom: 6px; text-align: center; font-weight: 600; color: var(--muted); }
.hour { display: flex; align-items: center; justify-content: flex-end; font-size: 22px; font-weight: 600; color: var(--muted); padding-right: 6px; font-variant-numeric: tabular-nums; transition: color var(--dur) var(--ease), background var(--dur) var(--ease); }
.hour:not(:empty) { height: 200%; box-shadow: inset 0 -1px var(--hour-line); }
.hour.hovered { color: var(--accent); background: var(--accent-soft); }
.cell {
  position: relative;
  background: var(--gray-0);
  border: 1px solid var(--line);
  border-top-width: 0;
  overflow: hidden;
  cursor: crosshair;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.cell.first { border-top-width: 1px; border-radius: 7px 7px 0 0; }
.cell.last { border-radius: 0 0 7px 7px; }
.cell.closed { background: repeating-linear-gradient(-45deg, var(--gray-100) 0 6px, var(--gray-25) 6px 12px); }
.cell.upper { border-bottom-color: var(--gray-100); }
.cell:not(.upper) { border-bottom-color: var(--hour-line); }
.cell::before { content: ''; position: absolute; inset: 0 3px; background: var(--accent); opacity: 0; transition: opacity var(--dur) var(--ease); }
.mode-availability .cell.on::before { opacity: 1; }
/* A cell under the pointer shows a hint of the blue a click paints, or a paler blue where a click clears it. */
.mode-availability .cell { cursor: pointer; }
.mode-availability .cell:hover::before { opacity: .15; }
.mode-availability .cell.on:hover::before { opacity: .75; }
.cell.run-top::before, .cell.first::before { top: 3px; border-top-left-radius: 6px; border-top-right-radius: 6px; }
.cell.run-end::before, .cell.last::before { bottom: 3px; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; }

/* ponytail: one instructor and no simulator for now, so the car lane takes the whole cell; bring back `1fr 1fr` and the sim lane with a second resource. */
.lane[data-res="sim"] { display: none; }
.lanes { position: absolute; inset: 3px; display: grid; grid-template-columns: 1fr; gap: 3px; opacity: 0; transition: opacity var(--dur) var(--ease); pointer-events: none; }
.mode-dispatch .lanes { opacity: 1; pointer-events: auto; }
.mode-dispatch .cell { cursor: pointer; background: var(--gray-0); overflow: visible; }
.mode-dispatch .cell.closed { background: repeating-linear-gradient(-45deg, var(--gray-100) 0 6px, var(--gray-25) 6px 12px); }
.mode-dispatch .cell.past { cursor: default; }
.mode-dispatch .cell:not(.past, .closed):hover { background: var(--gray-60); }
.mode-dispatch .cell:not(.past) .chip:hover { filter: brightness(.95); }
/* What took place: a grayer cell, and the lesson's colour mixed into that gray rather than faded. */
.mode-dispatch .cell.past:not(.closed) { background: var(--gray-160); }
.mode-dispatch .cell.past .chip { background: color-mix(in srgb, var(--c) 14%, var(--gray-250)); }
/* Today's column and its name in a soft light. */
/* Today: its name in blue and one blue shadow around its whole column (out of flow, over the column's grid area). */
.day.today { color: var(--accent); }
#grid-wrap { position: relative; flex: none; height: calc(.95 * (100% - 82px)); }
#grid-wrap.zoomed { overflow: auto; overscroll-behavior: contain; }
#grid { position: relative; width: calc(var(--zoom, 1) * 100%); height: calc(var(--zoom, 1) * 100%); }
/* A zoomed week keeps its day names and hours in view while it scrolls. */
#grid-wrap.zoomed .day { position: sticky; top: 0; z-index: 4; background: var(--bg); }
#grid-wrap.zoomed .hour { position: sticky; left: 0; z-index: 4; }
#grid-wrap.zoomed .hour:not(:empty) { background: var(--bg); }
.today-col { position: absolute; inset: 0; z-index: 0; border-radius: 7px; pointer-events: none; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 0 22px color-mix(in srgb, var(--accent) 35%, transparent); }
.lane { position: relative; border-radius: 5px; min-width: 0; }
.lane.shut { background: repeating-linear-gradient(-45deg, var(--gray-160) 0 4px, transparent 4px 8px); }
.chip {
  /* --grow-left and --grow-right: the neighbouring lanes (3 px apart) a lesson alone at its time spreads over. */
  position: absolute; top: 0; left: calc(var(--grow-left, 0) * -1 * (100% + 3px)); right: calc(var(--grow-right, 0) * -1 * (100% + 3px)); z-index: 1;
  height: calc(var(--len, 2) * (100% + 7px) - 7px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 6px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--c) 14%, var(--gray-0));
  border-left: 3px solid var(--c);
  font-size: 12px; font-weight: 600; line-height: 1.2;
  overflow: hidden;
  animation: pop var(--dur) var(--ease) backwards;
  transition: opacity var(--dur) var(--ease), left var(--spread, 300ms) ease-out, right var(--spread, 300ms) ease-out;
}
@media (prefers-reduced-motion: reduce) { .chip { --spread: 1ms; } }
.chip span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.chip:has(svg) { padding-right: 20px; }
.chip > svg { position: absolute; right: 3px; top: 3px; }
/* The lesson's length in the top right corner, left of the lock when there is one. */
.chip > .len { position: absolute; right: 3px; top: 3px; padding: 1px 5px; border-radius: 999px; font-size: 10px; font-weight: 600; line-height: 12px;
  background: color-mix(in srgb, var(--c) 22%, var(--gray-0)); color: color-mix(in srgb, var(--c) 60%, var(--text)); pointer-events: none; }
.chip:has(> svg) > .len { right: 20px; }
/* A half-hour tile has no room above the name: the length sits on its line. */
.chip.short { flex-direction: row; align-items: center; gap: 4px; }
.chip.short > span { flex: 1; min-width: 0; -webkit-line-clamp: 1; }
.chip.short > .len { position: static; flex: none; }
.lane .flag-menu { top: calc(100% + 4px); left: 0; right: auto; z-index: 6; min-width: 190px; transform-origin: top left; }
.lane .flag-menu.to-left { left: auto; right: 0; transform-origin: top right; }
.lesson-menu b { padding: 4px 6px; font-size: 12px; }
.lesson-menu label { display: flex; align-items: center; gap: 8px; padding: 4px 6px; font-size: 13px; cursor: pointer; }
.lesson-menu .del { margin-top: 4px; border: 0; border-radius: 7px; padding: 6px; background: #fdecec; color: #b42318; font-weight: 600; cursor: pointer; }
.lesson-menu .pick { margin: 2px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; outline: none; }
.picks { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; }
.picks button { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 6px; border-radius: 6px; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.picks button:hover { background: var(--gray-100); }
@keyframes pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }


#notice {
  position: fixed; top: 64px; right: 18px; z-index: 20; max-width: 340px;
  padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--gray-0) 88%, transparent); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(16, 24, 40, .12); font-size: 13px; line-height: 1.4;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
#notice.show { opacity: 1; transform: none; pointer-events: auto; }
#notice p { margin: 0; }
#notice { padding-right: 34px; }
#notice .x { position: absolute; top: 6px; right: 6px; }
#notice .step-actions { margin-right: -20px; }
#notice .x, #step .x { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 13px; line-height: 24px; cursor: pointer; }
#notice .x:hover, #step .x:hover { background: var(--bg); color: var(--text); }
#step .step-head .x { margin-left: 6px; }
#notice p + p { margin-top: 4px; }
#notice .warn { color: #b42318; }
#step {
  position: fixed; top: 64px; right: 18px; z-index: 20; width: 360px; max-height: calc(100vh - 90px); overflow: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--gray-0) 88%, transparent); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(16, 24, 40, .12); font-size: 13px; line-height: 1.4;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
#step.show { opacity: 1; transform: none; pointer-events: auto; }
#step p { margin: 0; }
#step .step-head { display: flex; align-items: center; font-weight: 600; font-size: 14px; }
#step .step-head span { margin-left: auto; }
#step .step-head span { font-weight: 400; color: var(--muted); font-size: 12px; }
.unplaced { margin: 0; padding: 0; list-style: none; }
.unplaced li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 0; }
.unplaced b { font-weight: 500; color: #b42318; }
.unplaced small { color: var(--muted); }
#notice .unplaced { margin-top: 4px; }
.step-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  #notice { transform: none; }
  :root { --dur: 120ms; }
  .tag.live { animation: none; }
  .item { transition: opacity var(--dur) linear; }
  .tab-pill { transition: opacity var(--dur) linear; }
  .mtabs a { transition: none; }
  @keyframes swap-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes pop { from { opacity: 0; } to { opacity: 1; } }
}

/* As far from the window's sides as from its top and bottom. Glass, blocks and veil are recon-v3's popups', read off its live page. */
#student-dialog { --gap: 24px; --gap-wide: calc(var(--gap) * 1.5); --block: color-mix(in srgb, var(--gray-0) 60%, transparent); --block-line: var(--gray-450); --text: var(--ink-2);
  outline: none; width: calc(100vw - 100vh + min(860px, 92vh)); max-width: none; height: min(860px, 92vh); padding: 0; border: 1px solid color-mix(in srgb, var(--gray-0) 40%, transparent); border-radius: 14px;
  background: color-mix(in srgb, var(--glass) 40%, transparent); -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.15); backdrop-filter: blur(40px) saturate(200%) brightness(1.15); color: var(--text); box-shadow: 0 24px 60px rgba(16, 24, 40, .25); }
#student-dialog[open] { display: flex; }
#student-dialog::backdrop { background: rgb(0 0 0 / .3); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
#student-dialog.closing::backdrop { animation: veil-out 250ms var(--ease) both; }
@keyframes veil-in { from { opacity: 0; } }
@keyframes veil-out { to { opacity: 0; } }
.dlg { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--gap-wide); padding: 18px 22px; }
/* Two equal side columns keep the name and its pills on the dialog's centre line. */
.dlg-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.who-side { display: flex; align-items: center; gap: 14px; }
.who-mid { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dlg-head .who { font-size: 24px; padding: 6px 18px; background: var(--gray-0); border: 1px solid var(--block-line); border-radius: 12px; }
.who-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; justify-content: center; }
/* Each pill group of Règles is a box as recon-v3's mail rows (mail.tsx rowBlock):
   its name, its pills (recon's pill, a round minus on hover), a white round plus that offers the rest on recon's glass. */
.pill-box { display: flex; align-items: center; min-height: 38px; padding: 0 12px; background: var(--block); border: 1px solid var(--block-line); border-radius: 10px;
  transition: background 150ms var(--ease), border-color 150ms var(--ease); }
.pill-box:has(> .flag-menu) { border-color: #c7d7fe; box-shadow: 0 0 0 3px var(--accent-soft); }
.pill-box { position: relative; flex-wrap: wrap; gap: 4px; padding: 6px 12px; line-height: 24px; }
.pill-cat { flex: none; margin-right: 8px; font-size: 14px; color: var(--text); }
.pill-box .tag, .pill-offers .tag { position: relative; padding: 2px 10px; font-size: 14px; line-height: 20px; font-weight: 400; }
#student-dialog .tag:not(.urgent, .warn, .ok, .bad, .info, .live), #page-rules .tag:not(.urgent, .warn, .ok, .bad, .info, .live) { background: color-mix(in srgb, var(--ink-2) 8%, transparent); color: var(--text); }
.pill-out { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 16px; height: 16px; padding: 0; border: 1px solid var(--block-line); border-radius: 50%;
  background: var(--gray-0); color: var(--text); cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 150ms var(--ease); }
.tag:has(> .pill-out) { cursor: pointer; }
.tag.armed > .pill-out, .pill-out:focus-visible { opacity: 1; pointer-events: auto; }
.pill-out:hover { background: #fde8e8; color: #c0262d; border-color: #f4b4b4; }
.pill-add { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-left: 4px; padding: 0; border: 1px solid var(--block-line); border-radius: 50%;
  background: var(--gray-0); color: var(--text); cursor: pointer; transition: background 150ms var(--ease); }
.pill-add:hover, .pill-box:has(> .flag-menu) .pill-add { background: var(--gray-70); }
.pill-add svg, .pill-out svg { pointer-events: none; }
/* Opaque and lifted, so it reads over the blocks under it; as wide as the group block it opens from, edge to edge. */
.dlg-head .pill-offers { top: calc(100% + 6px); left: -1px; right: auto; width: max-content; min-width: calc(100% + 2px); gap: 6px; padding: 6px; border: 1px solid var(--block-line); border-radius: 12px;
  background: var(--gray-70); box-shadow: 0 12px 32px rgba(16, 24, 40, .22), 0 2px 6px rgba(16, 24, 40, .08); transform-origin: top center; }
.dlg-head .pill-offers .offer-block { background: var(--gray-0); }
/* Under the name, a group shows its pills alone, without its box or its name. */
.who-tags .pill-box { min-height: 0; padding: 0; background: none; border: 0; border-radius: 999px; }
.who-tags .pill-box[data-g] { cursor: pointer; }
.who-tags .pill-box .tag { transition: filter 150ms var(--ease); }
.who-tags .pill-box[data-g]:hover .tag { filter: brightness(.95); }
.who-tags .tag.none { background: none; color: var(--muted); box-shadow: inset 0 0 0 1px var(--block-line); }
.pick-head { padding: 2px 6px 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.pill-check label { align-self: stretch; display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 8px; cursor: pointer; }
.pill-check label:hover { background: var(--gray-70); }
.pill-check input { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--text); cursor: pointer; }
.offer-block { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px; background: var(--block); border: 1px solid var(--block-line); border-radius: 10px; }
.offer-block button.tag { border: 0; font-family: inherit; cursor: pointer; transition: filter 150ms var(--ease); }
.offer-block button.tag:hover { filter: brightness(.95); }
/* The popups' close cross, as recon-v3's: an outlined rounded square. */
.dlg-head .x, .help-head .x { flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin: -4px 0; padding: 0; border: 1px solid var(--line); border-radius: 8px;
  background: var(--gray-0); color: var(--text); cursor: pointer; transition: background var(--dur) var(--ease); }
.dlg-head .x:hover, .help-head .x:hover { background: var(--bg); }
.dlg-head .x svg, .help-head .x svg { pointer-events: none; }
/* The sheet's close button sits in its corner, as far from the top edge as from the left. */
#student-dialog .dlg { position: relative; }
#student-dialog .dlg-head .x { position: absolute; top: 18px; left: 18px; margin: 0; }
/* One scrolling column: the four info blocks on one line, the lessons, then both weeks full width, each in its own gray block. */
/* The dialog fits its content, so every block is one --gap from the next, across and down. */
.dlg-body { flex: 1; min-height: 0; overflow-y: auto; margin: -6px -22px -18px; padding: 6px 22px 18px; display: flex; flex-direction: column; gap: var(--gap-wide); }
#student-avail { order: 1; display: flex; justify-content: center; gap: var(--gap); }
/* An unused B week: its cells under gray and white stripes; a click on them brings B back. */
#week-b > [id^=grid] { position: relative; }
/* Positioned on the grid's lines, it covers the cells without taking a place among them. */
#week-veil { position: absolute; inset: 0; grid-area: 2 / 2 / -1 / -1; z-index: 2; border-radius: 8px; cursor: pointer;
  background: repeating-linear-gradient(-45deg, var(--gray-100) 0 6px, var(--gray-25) 6px 12px); }
#week-veil[hidden] { display: none; }
#student-avail .cell:not(.closed) { background: var(--gray-0); border-color: var(--block-line); }
#student-avail .cell.upper { border-bottom-color: var(--gray-300); }
/* The hour column is as wide as its labels, and the room below holds the last hour's label, so the padding reads the same on every side. */
/* Cells at 0.75 of the width they had filling half the line: the hour column and 32 px of padding stay as they were. */
.week-col { flex: none; width: calc(72px + (50% - var(--gap) / 2 - 72px) * .75); min-width: 0; display: flex; flex-direction: column; padding: 16px 16px 24px; background: var(--block); border: 1px solid var(--block-line); border-radius: var(--radius); }
#student-dialog #grid-current, #student-dialog #grid-other { flex: none; grid-template-columns: 40px repeat(var(--days), minmax(0, 1fr)); grid-template-rows: 32px repeat(var(--hours), 18px); }
#student-dialog .day .date { display: none; }
.week-col h3 { position: relative; margin: 0 0 0 43px; text-align: center; font-size: 13px; font-weight: 700; white-space: nowrap; }
.week-col h3 button { position: absolute; right: 0; top: 50%; translate: 0 -50%; height: 24px; padding: 0 10px; border: 1px solid var(--block-line); border-radius: 7px; background: var(--gray-0); font: inherit; font-size: 12px; font-weight: 600; color: var(--text); cursor: pointer; }
.week-col h3 button:hover { background: var(--gray-70); }
.save-ask { position: absolute; inset: auto 50% 24px auto; translate: 50% 0; display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 18px;
  background: var(--gray-0); border: 1px solid var(--block-line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, .22); z-index: 5;
  transition: opacity var(--dur) var(--ease), translate var(--dur) var(--ease), scale var(--dur) var(--ease), display var(--dur) allow-discrete; }
.save-ask[hidden] { display: none; opacity: 0; translate: 50% 16px; scale: .96; }
@starting-style { .save-ask:not([hidden]) { opacity: 0; translate: 50% 16px; scale: .96; } }
@media (prefers-reduced-motion: reduce) {
  .save-ask[hidden] { translate: 50% 0; scale: 1; }
  @starting-style { .save-ask:not([hidden]) { translate: 50% 0; scale: 1; } }
}
.save-ask div { display: flex; gap: 6px; }
.save-ask button { height: 30px; padding: 0 12px; border: 1px solid var(--block-line); border-radius: 8px; background: var(--gray-0); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; }
.save-ask button:hover { background: var(--gray-70); }
.save-ask button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.facts .none { margin: 0; color: var(--muted); }
.facts { margin: 0; padding: 10px 14px; background: var(--block); border: 1px solid var(--block-line); border-radius: var(--radius);
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease); }
.facts h3 { margin: 0 0 4px; font-size: 13px; font-weight: 700; }
/* Each fact is a label over its value, all on one row. */
/* Each fact a row block, its label then its value as a pill, as recon's fields. */
.facts dl { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.fact { display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 12px; background: color-mix(in srgb, var(--gray-0) 70%, transparent); border: 1px solid var(--block-line); border-radius: 10px; }
.facts dt { white-space: nowrap; font-size: 14px; color: var(--text); }
.facts dd { margin: 0; white-space: nowrap; padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink-2) 8%, transparent); font-size: 14px; line-height: 20px; }

/* The sheet's tabs (Glitz's student sheet, laid out as the menu-underline template): the dialog keeps one height, so
   changing tab never resizes it. */
.stabs { position: relative; display: flex; justify-content: center; gap: 24px; margin-top: calc(var(--gap) - var(--gap-wide)); border-bottom: 1px solid var(--block-line); }
.stabs a { padding: 0 2px 10px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; transition: color 200ms var(--ease); }
.stabs a:hover, .stabs a[aria-current=page] { color: var(--text); }
.stabs a:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; border-radius: 4px; }
.stabs .line { position: absolute; left: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); pointer-events: none; }
.spanel { display: flex; flex-direction: column; gap: var(--gap-wide); }
.spanel[hidden] { display: none; }
.form-blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
/* Profil's and Dossier's blocks stretch to their row, so side by side they match with no gap under the shorter one; an odd last one takes the whole row. */
.form-blocks { align-items: stretch; }
.form-blocks > .facts:last-child:nth-child(odd) { grid-column: 1 / -1; }
.form-blocks > .facts:last-child:nth-child(odd) .fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts.form { padding: 12px 14px 16px; }
.facts .fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: 12px; color: var(--muted); }
.field :is(input, select, textarea) { height: 36px; padding: 0 10px; border: 1px solid var(--block-line); border-radius: 8px; background: color-mix(in srgb, var(--gray-0) 75%, transparent);
  font: inherit; font-size: 14px; color: var(--text); transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease); }
.field :is(input, select, textarea):focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field .hint { margin-left: 6px; padding: 0 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink-2) 8%, transparent); font-size: 12px; color: var(--text); }
.field .hint:empty { display: none; }
.field.notes textarea { height: auto; min-height: 320px; padding: 10px; line-height: 1.5; resize: vertical; }
/* Documents: one row per piece, its files as chips (the file-chip template's look: blue, radius 8); a click opens the file. */
.doc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 8px 12px; margin: 8px 0 0; padding: 0; list-style: none; }
.doc-list li { display: flex; flex-direction: column; gap: 8px; padding: 8px 8px 8px 12px; background: color-mix(in srgb, var(--gray-0) 70%, transparent); border: 1px solid var(--block-line); border-radius: 10px; }
.doc-head { display: flex; align-items: center; gap: 10px; }
.doc-head b { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; }
.doc-head .tag { padding: 2px 10px; font-size: 13px; font-weight: 400; }
.doc-files { display: flex; flex-wrap: wrap; gap: 6px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 3px 2px 8px; border-radius: 8px; background: var(--accent-soft); color: #1d4ed8; font-size: 13px; }
.file-chip small { flex: none; color: var(--muted); font-size: 12px; }
.file-chip button { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.doc-open { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-open:hover { text-decoration: underline; }
.file-chip .doc-del { flex: none; display: grid; place-items: center; min-width: 20px; height: 20px; border-radius: 6px; color: var(--muted); transition: background 150ms var(--ease), color 150ms var(--ease); }
.file-chip .doc-del:hover, .file-chip .doc-del.armed { background: #fde8e8; color: #c0262d; }
.file-chip .doc-del.armed { padding: 0 6px; font-size: 12px; }
.doc-status:empty { display: none; }
.doc-status { margin: 8px 0 0; color: #b42318; font-size: 13px; }
#student-sessions { display: flex; flex-direction: column; gap: var(--gap); }
/* The two fact blocks share one width; the general note fills the rest of their row, as tall as both. */
.sessions-top { display: grid; grid-template-columns: auto minmax(280px, 1fr); gap: var(--gap); }
.sessions-facts { display: grid; align-content: start; gap: var(--gap); }
.field.notes.main-note textarea { flex: 1; min-height: 90px; resize: none; }
.session-notes { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.session-notes li { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; align-items: start; padding: 8px 8px 8px 12px; background: var(--gray-0); border: 1px solid var(--block-line); border-radius: 10px; font-size: 13px; }
.session-notes li.new-month { margin-top: 6px; }
.session-notes .when { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.session-notes small { color: var(--muted); font-size: 12px; }
.session-notes li.bad small { color: #b42318; }
.session-notes li.ok small { color: #067647; }
.session-notes textarea { min-height: 36px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--gray-25); color: var(--text); font: inherit; line-height: 1.4; resize: vertical; outline: none; transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.session-notes textarea:focus { border-color: var(--accent); background: var(--gray-0); }

.rules-map { position: relative; flex: none; height: 210px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.rules-map svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rnode { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 104px; padding: 9px 14px; border-radius: 10px; background: var(--gray-0); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(16, 24, 40, .06); z-index: 1; }
.rnode b { font-size: 14px; }
.rnode span { font-size: 11px; color: var(--muted); }
.n-sim { border-color: color-mix(in srgb, var(--sim) 40%, var(--line)); }
.n-car { border-color: color-mix(in srgb, var(--car) 40%, var(--line)); }
.n-plan { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.rbadge { position: absolute; z-index: 1; padding: 2px 8px; border-radius: 999px; background: var(--gray-0); border: 1px solid var(--line); font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* ---- wire-chevrons template ---- */
.wire { transition: opacity 200ms; }
.wire .halo { fill: none; stroke: var(--w); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity 150ms cubic-bezier(.4, 0, .2, 1); }
.wire .line { fill: none; stroke: color-mix(in srgb, var(--w) 35%, transparent); stroke-width: 1.5; transition: stroke 150ms cubic-bezier(.4, 0, .2, 1); }
.wire .head { fill: var(--w); }
.wire.lit .halo { opacity: .1; }
.wire.lit .line { stroke: color-mix(in srgb, var(--w) 60%, transparent); }
.chosen .wire:not(.lit) { opacity: .25; }
.chevrons path { fill: none; stroke: var(--w); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; offset-rotate: auto; animation: along linear infinite; }
@keyframes along { from { offset-distance: var(--from); } to { offset-distance: var(--to); } }
@media (prefers-reduced-motion: reduce) { .chevrons path { animation: none; } }

#rules-list { display: flex; flex-direction: column; gap: 8px; }
.rule { display: flex; align-items: center; gap: 10px; padding: 10px 12px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--w); border-radius: var(--radius); transition: opacity var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.rule:hover { box-shadow: 0 2px 8px rgba(16, 24, 40, .08); }
.rule.off { opacity: .55; border-left-color: var(--line); }
.rule .when, .rule .then { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 6px; border-radius: 8px; }
.rule .when { background: #fff7e6; }
.rule .then { background: color-mix(in srgb, var(--w) 9%, var(--gray-0)); }
.rule .kw { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 2px; }
.rule select, .rule input[type=number], .rule input[type=text] { height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--gray-0); font-weight: 500; }
.rule input[type=number] { width: 64px; }
.rule input[type=text] { width: 120px; }
.rule .unit { color: var(--muted); margin-left: -2px; }
.then-arrow { color: var(--muted); font-size: 18px; }
.rule .count { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rule .x { width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; transition: background var(--dur) var(--ease); }
.rule .x:hover { background: var(--gray-100); color: var(--text); }
.switch { position: relative; flex: none; width: 32px; height: 18px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--gray-400); transition: background var(--dur) var(--ease); }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--gray-0); box-shadow: 0 1px 2px rgba(16, 24, 40, .2); transition: transform var(--dur) var(--ease); }
.switch input:checked + span { background: var(--w); }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.add-rule { align-self: flex-start; height: 32px; padding: 0 14px; border: 1px dashed var(--gray-460); border-radius: var(--radius); background: none; color: var(--muted); font-weight: 600; cursor: pointer; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.add-rule:hover { background: var(--gray-0); color: var(--text); }

.page-head .help-btn { margin-left: auto; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font-weight: 600; cursor: pointer; transition: background var(--dur) var(--ease); }
.page-head .help-btn::before { content: '?'; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 6px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11px; }
.page-head .help-btn:hover { background: var(--bg); }
.rules-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; align-items: start; }
.rules-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.rules-card h4, .rules-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; }
.rules-card p { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.step { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; }
.rules-card select, .group-head input { height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--gray-0); font-weight: 500; }
.rules-card .count { display: block; opacity: 1; margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rules-card .x { flex: none; width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; transition: background var(--dur) var(--ease); }
.rules-card .x:hover { background: var(--gray-100); color: var(--text); }

/* ---- rank-drag template, light theme ---- */
#prec-list { display: flex; flex-direction: column; gap: 4px; }
#prec-list:empty { display: none; }
#prec-list .place { display: flex; align-items: center; gap: 8px; }
#prec-list .num { display: grid; place-items: center; align-self: stretch; flex: none; width: 32px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
#prec-list .item { position: relative; display: flex; flex: 1; min-width: 0; align-items: center; gap: 8px; padding: 5px 6px 5px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--gray-0); cursor: grab; user-select: none; touch-action: none;
  transition: background-color 150ms cubic-bezier(.4, 0, .2, 1), box-shadow 150ms cubic-bezier(.4, 0, .2, 1); }
#prec-list .item:hover { background: var(--bg); }
#prec-list .item.held { z-index: 10; cursor: grabbing; background: var(--gray-0); box-shadow: 0 10px 15px -3px rgba(16, 24, 40, .12), 0 4px 6px -4px rgba(16, 24, 40, .1); }
#prec-list .item > svg { width: 14px; height: 14px; flex: none; fill: #98a2b3; }
#prec-list select[data-k="item"] { min-width: 0; flex: 0 1 auto; }

#groups-list { display: flex; flex-direction: column; gap: 8px; }
#groups-list:empty { display: none; }
.group { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.group-head { display: flex; align-items: center; gap: 8px; }
.group-head input { flex: 1; min-width: 0; font-weight: 600; outline: none; }
.group-head input:focus { border-color: #c7d7fe; box-shadow: 0 0 0 3px var(--accent-soft); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.chips .kw { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.chips .kw:not(:first-child) { margin-left: 8px; }
.chips button { height: 24px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--gray-0); color: var(--muted); font-size: 12px; font-weight: 500; cursor: pointer;
  transition: background 150ms var(--ease), color 150ms var(--ease), border-color 150ms var(--ease); }
.chips button:hover { color: var(--text); }
.chips button[aria-pressed="true"] { background: var(--accent-soft); border-color: #c7d7fe; color: var(--accent); }

.help-dialog { outline: none; width: min(620px, 94vw); max-height: 88vh; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 24px 60px rgba(16, 24, 40, .25); }
.help-dialog::backdrop { background: rgba(16, 24, 40, .25); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: veil-in 300ms var(--ease) both; }
.help-dialog.closing::backdrop { animation: veil-out 300ms var(--ease) both; }
#storage-error { opacity: 0; transition: opacity var(--dur) var(--ease); }
#storage-error[open] { opacity: 1; }
#storage-error.closing::backdrop { animation: veil-out var(--dur) var(--ease) both; }
@starting-style { #storage-error[open] { opacity: 0; } }
#storage-error .dlg { gap: 12px; }
#storage-error p { margin: 0; line-height: 1.5; }
#storage-error #storage-detail { color: var(--muted); }
#storage-error .step-actions { flex-wrap: wrap; }
#storage-error button[hidden] { display: none; }
.help { overflow: auto; }
.help-head { display: flex; align-items: center; gap: 14px; font-size: 17px; }
.help-steps { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.help-steps li { display: grid; grid-template-columns: 24px 1fr; gap: 2px 10px; counter-increment: s; }
.help-steps li::before { content: counter(s); grid-row: span 2; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.help-steps span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.help-example { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 10px; background: var(--bg); }
.help-example label { font-weight: 600; }
.help-example select { height: 28px; margin-left: 6px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--gray-0); font-weight: 500; }
.trace { display: flex; flex-direction: column; gap: 6px; margin: 0; padding-left: 18px; font-size: 13px; }
.trace .muted { color: var(--muted); }
.trace .result { font-weight: 600; color: var(--accent); }

/* Règles: the pill groups first, each a box as in the student dialog; then the parts of the app, read only for now. */
#pill-groups { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
#page-rules { --block: var(--gray-0); --block-line: var(--gray-450); }
.pill-group .pg-name { field-sizing: content; min-width: 8ch; max-width: 40ch; height: 26px; margin-right: 8px; padding: 0 8px; border: 1px solid var(--block-line); border-radius: 7px; font: inherit; font-weight: 600; }
.pill-group .pg-new { width: 16ch; height: 24px; margin-left: 4px; padding: 0 10px; border: 1px dashed var(--block-line); border-radius: 999px; background: none; font: inherit; font-size: 13px; }
.pill-group .pg-new:focus { outline: none; border-style: solid; border-color: #c7d7fe; box-shadow: 0 0 0 3px var(--accent-soft); }
.pill-group .lock { display: grid; place-items: center; margin-left: 6px; width: 24px; height: 24px; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.pill-group .lock:hover { background: var(--gray-100); color: var(--text); }
.pill-group .lock.open { color: #b54708; }
.lock-warn { display: flex; align-items: center; gap: 8px; margin: -2px 0 4px; padding: 8px 12px; border: 1px solid #fedf89; border-radius: 10px; background: #fffaeb; color: #93370d; font-size: 13px; }
.lock-warn button { height: 26px; padding: 0 10px; border: 1px solid #fedf89; border-radius: 7px; background: var(--gray-0); color: inherit; font: inherit; font-weight: 500; cursor: pointer; }
.lock-warn button[data-act=unlock] { border-color: #b54708; background: #b54708; color: #fff; }
.pill-group .x { margin-left: 6px; width: 24px; height: 24px; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.pill-group .x:hover { background: var(--gray-100); color: var(--text); }
.parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.part:has(#part-planning) { grid-column: 1 / -1; }
.part { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: box-shadow 200ms var(--ease); }
.part:hover { box-shadow: 0 4px 14px rgba(16, 24, 40, .08); }
.part summary { padding: 14px 16px; font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
.part summary::-webkit-details-marker { display: none; }
.part summary::after { content: '›'; float: right; color: var(--muted); transition: rotate 200ms var(--ease); }
.part[open] summary::after { rotate: 90deg; }
#part-planning { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 16px 14px; font-size: 13px; }
#part-planning p { margin: 4px 0 0; }
#part-planning .muted { color: var(--muted); font-size: 12px; }
.part summary .tag.ro { margin-left: 8px; font-size: 11px; font-weight: 500; vertical-align: 2px; }
/* Every rule is a block, its name on a grey band over what it says (templates/web text-in-block); the blocks fill
   the card with no hole: each column's last block grows to the column's foot. */
.rule-block { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--gray-40); }
.rule-block.inner { background: var(--panel); }
.rule-name { display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; border-bottom: 1px solid var(--line); background: var(--gray-100); font-size: 12px; font-weight: 500; }
.rule-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; line-height: 1.45; }
#part-planning .rule-body p { margin: 0; }
#part-planning .rule-body .muted { font-size: 12px; }
.rule-ties { margin: 0; padding-left: 20px; }
.rule-row, .rule-cols { align-self: stretch; display: grid; gap: 12px; }
.rule-row { grid-template-columns: 1fr 1.4fr 1.2fr; }
.rule-cols { grid-template-columns: 3fr 2fr; }
.rule-col { display: flex; flex-direction: column; gap: 12px; }
.rule-col > .rule-block:last-child { flex: 1; }
/* Narrow windows: one block under the other, in reading order. */
@media (max-width: 900px) { .rule-row, .rule-cols { grid-template-columns: 1fr; } }

/* Votre avis: the messages sent from this computer, newest first, and a button that opens the recording dialog. */
#page-feedback .page-head { align-items: center; }
#page-feedback .feedback-new { margin-left: auto; }
.feedback-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; margin: 0; padding: 0; list-style: none; }
.feedback-list li { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.feedback-list time { font-size: 12px; color: var(--muted); }
.feedback-list p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.feedback-list audio { width: 100%; max-width: 420px; height: 36px; }
#feedback-empty[hidden] { display: none; }

#feedback { width: min(520px, 94vw); opacity: 0; scale: .97; transition: opacity var(--dur) var(--ease), scale var(--dur) var(--ease); }
#feedback[open] { opacity: 1; scale: 1; }
@starting-style { #feedback[open] { opacity: 0; scale: .97; } }
#feedback .dlg { gap: 14px; }
#feedback .help-head b { flex: 1; }
.feedback-lead { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.recorder { --rec: #e11d48; box-sizing: border-box; min-height: 78px; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.recorder .rec { position: relative; flex: none; display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer;
  transition: background var(--dur) var(--ease), scale 150ms var(--ease); }
.recorder .rec:hover { background: #1d4ed8; }
.recorder .rec:active { scale: .94; }
.recorder .rec:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.recorder .rec .ico { width: 22px; height: 22px; transition: opacity 150ms var(--ease), scale var(--dur) var(--ease); }
.recorder .rec .stop { position: absolute; width: 16px; height: 16px; border-radius: 4px; background: var(--gray-0); opacity: 0; scale: .5; transition: opacity 150ms var(--ease), scale var(--dur) var(--ease); }
.recorder[data-state=recording] .rec { background: var(--rec); animation: rec-pulse 1.6s ease-out infinite; }
.recorder[data-state=recording] .rec .ico { opacity: 0; scale: .5; }
.recorder[data-state=recording] .rec .stop { opacity: 1; scale: 1; }
.recorder[data-state=recorded] .rec { display: none; }
.recorder .rec-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.recorder .rec-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.recorder[data-state=idle] .rec-time { visibility: hidden; }
.recorder[data-state=recorded] .rec-info { display: none; }
.recorder .rec-play { flex: 1; min-width: 0; height: 36px; }
.recorder .rec-again { flex: none; }
.recorder .rec-again[hidden] { display: none; }
@keyframes rec-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--rec) 45%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
#feedback-text { width: 100%; min-height: 96px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font: inherit; font-size: 14px; line-height: 1.45; resize: vertical;
  outline: none; transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease); }
#feedback-text:focus { border-color: #c7d7fe; box-shadow: 0 0 0 3px var(--accent-soft); }
.feedback-status { min-height: 18px; margin: 0; color: var(--muted); font-size: 13px; }
.feedback-status.error { color: #b42318; }
#feedback .step-actions button.primary { height: 32px; padding: 0 14px; }

.update-ready { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); box-shadow: 0 12px 32px rgba(16, 24, 40, .16); font-size: 13px; opacity: 1; translate: 0 0; transition: opacity var(--dur) var(--ease), translate var(--dur) var(--spring); }
@starting-style { .update-ready { opacity: 0; translate: 0 12px; } }
.update-ready[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  #feedback { scale: 1; transition-duration: 120ms; }
  @starting-style { #feedback[open] { scale: 1; } .update-ready { translate: 0 0; } }
  .recorder[data-state=recording] .rec { animation: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--rec) 30%, transparent); }
  .update-ready { transition-duration: 120ms; }
}
#feedback .step-actions button.primary[disabled] { opacity: .5; cursor: default; }

/* Paramètres: templates/web two-choice-switch, in the app's colours. */
.settings-list { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  box-shadow: 0 1px 2px rgb(16 24 40 / .05); cursor: pointer; }
.setting-text { display: flex; flex-direction: column; gap: 3px; }
.setting-text b { font-size: 16px; font-weight: 600; }
.setting-text small { font-size: 13px; color: var(--muted); }
.choice { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.choice button { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border: 0; border-radius: 9px; background: none; color: var(--muted);
  font: inherit; font-size: 14px; font-weight: 500; outline: none; cursor: pointer; transition: color 150ms var(--ease), background-color 150ms var(--ease), box-shadow 150ms var(--ease); }
.choice button:hover { color: var(--text); }
.choice button[aria-pressed=true] { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgb(16 24 40 / .14), 0 1px 2px rgb(16 24 40 / .08); }
.choice button[aria-pressed=true] svg { color: var(--accent); }
.choice button:focus-visible { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
@media (prefers-reduced-motion: reduce) { .setting, .choice button { transition-duration: 1ms; } }

/* Dark: the same greys, from the darkest up; coloured pills keep their hue on a faint fill. */
:root.dark {
  color-scheme: dark;
  --bg: #111316; --panel: #1b1e22; --line: #2c3036; --text: #e7e9ec; --muted: #98a1ad; --accent: #4c8dff; --accent-soft: #1d2b45;
  --gray-0: #1b1e22; --gray-25: #1d2024; --gray-40: #1e2125; --gray-50: #1f2226; --gray-60: #212428; --gray-70: #22262a; --gray-100: #25292e;
  --gray-150: #282c31; --gray-160: #282c31; --gray-200: #2b2f35; --gray-250: #30353b; --gray-300: #2c3036; --gray-400: #444a52; --gray-450: #3d434b; --gray-460: #4a5058;
  --ink: #fff; --ink-2: #e7e9ec; --glass: rgb(30 33 38); --float-bg: #181b1f; --float-line: #2a2e34;
  --float-shadow: 0 1px 2px rgb(0 0 0 / .4), 0 6px 18px -4px rgb(0 0 0 / .55);
}
:root.dark .tag.urgent, :root.dark .tag.warn { background: rgb(245 158 11 / .16); color: #fbbf24; }
:root.dark .tag.ok { background: rgb(16 185 129 / .16); color: #34d399; }
:root.dark .tag.bad { background: rgb(239 68 68 / .16); color: #f87171; }
.who-name:empty::before { content: 'Création en cours'; color: var(--muted); font-weight: 500; }
.field .opt, .facts h3 .opt { margin-left: 6px; font-size: 11px; font-weight: 500; color: var(--muted); opacity: .8; }
.field input.bad:not(:focus) { border-color: #d64545; box-shadow: 0 0 0 3px color-mix(in srgb, #d64545 14%, transparent); }
