/* SSOT app kit 1.0.0 (sources sha256 e770e105204b1776). Built by scripts/ssot-guide/kit/build.sh; do not edit, override tokens in the app. */

/* kit/tokens: every colour, size and radius the components use. An app overrides these on :root, nothing else. */
:root {
  --ground: #eceff2; --surface: #ffffff; --ink: #14212e; --muted: #5b6875; --line: #d3d9df;
  --accent: #0b4f9c; --accent-ink: #ffffff;              /* the app's one signature colour */
  --go: #1e7a46; --warn: #f0b400; --warn-ink: #1b1300; --stop: #b3261e;
  --focus: #f0b400; --radius: 8px; --radius-lg: 14px;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --tap: 44px; --tap-small: 36px; --tap-big: 56px;       /* touch targets: never below 24px (WCAG 2.5.8), 44 for the field */
  --gap: 8px; --pad: 12px;
  --backdrop: rgba(10, 18, 26, .55);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --ground: #0e151c; --surface: #17212b; --ink: #e8edf2; --muted: #9aa7b4; --line: #2a3744; --go: #2f9a5d;
} }
:root[data-theme="dark"] { --ground: #0e151c; --surface: #17212b; --ink: #e8edf2; --muted: #9aa7b4; --line: #2a3744; --go: #2f9a5d; }

/* kit/base: resets and the rules every app needs (lessons.yaml w5: [hidden] must win over display rules). */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--ground); color: var(--ink); font: 16px/1.4 var(--font); font-variant-numeric: tabular-nums; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
h2 { font-size: 15px; font-weight: 800; margin-top: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hint, .text { color: var(--muted); font-size: 14px; margin: 0; }
.count { color: var(--muted); font-weight: 400; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* kit/shell: one screen = top bar + scrolling body + footer actions, full viewport height (phone first). */
.screen { display: flex; flex-direction: column; height: 100dvh; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); padding: var(--gap) var(--pad); flex: none; background: var(--surface); border-bottom: 1px solid var(--line); }
.bar-left, .bar-right { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bar-left { overflow-x: auto; }
.bar .title { font-weight: 800; font-size: 18px; }
.body { flex: 1; overflow: auto; padding: 0 var(--pad) var(--pad); display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.actions { flex: none; display: flex; flex-wrap: wrap; gap: var(--gap); padding: var(--gap) var(--pad) calc(var(--gap) + env(safe-area-inset-bottom)); }

/* kit/button: .btn + one of primary | secondary | ghost | danger, size small | big, optional .icon .icon-<name>.
   Every variant sets background AND colour, so no state falls back to white on white (lessons.yaml w3). */
.btn { min-height: var(--tap); padding: 0 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius); font: inherit; font-weight: 600; cursor: pointer; }
.btn.small { min-height: var(--tap-small); padding: 0 10px; font-size: 14px; }
.btn.big { min-height: var(--tap-big); font-size: 18px; flex: 1; }
.btn.primary { background: var(--go); border-color: var(--go); color: #fff; }
.btn.secondary { background: var(--surface); border-color: var(--ink); color: var(--ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.danger { background: transparent; border-color: transparent; color: var(--stop); }
.btn:disabled { opacity: .45; cursor: default; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.icon { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.icon::before { content: ""; width: 1.1em; height: 1.1em; flex: none; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }

/* kit/icons: masks that take the text colour. Use with .btn.icon (or set --ico on any element with the mask rule). */
.icon-tick { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.icon-gps { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='6.5'/%3E%3Ccircle cx='12' cy='12' r='2' fill='%23000'/%3E%3Cpath d='M12 1.5v3.5M12 19v3.5M1.5 12H5M19 12h3.5'/%3E%3C/svg%3E"); }
.icon-sheet { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3.5' y='3.5' width='17' height='17' rx='2'/%3E%3Cpath d='M3.5 9h17M3.5 14.5h17M9.5 3.5v17'/%3E%3C/svg%3E"); }
.icon-text { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M5 6h14M5 10.5h14M5 15h9M5 19.5h11'/%3E%3C/svg%3E"); }
.icon-drag { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 8h12M6 12h12M6 16h12' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* kit/pill: a compact status button. data-state = ready | waiting | weak | denied | off sets the dot. */
.pill { min-height: var(--tap-small); padding: 0 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.pill::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--muted); vertical-align: 1px; }
.pill[data-state="ready"]::before { background: var(--go); }
.pill[data-state="weak"]::before, .pill[data-state="waiting"]::before { background: var(--warn); }
.pill[data-state="denied"]::before { background: var(--stop); }

/* kit/chips: a row of radio-like choices. Each .chip may set --c (its colour bar); aria-checked="true" = chosen. */
.chips { display: flex; gap: 6px; }
.chip { min-height: var(--tap); padding: 0 14px; white-space: nowrap; border: 1px solid var(--line); border-bottom: 4px solid var(--c, var(--line)); background: var(--surface); color: var(--ink); border-radius: var(--radius); font: inherit; font-weight: 600; cursor: pointer; }
.chip[aria-checked="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); border-bottom-color: var(--c, var(--ink)); }

/* kit/list: tappable rows. li[data-status] dims visited/skipped; aria-current="step" marks the active row;
   .num (coloured badge), .row (text, grows), .dot (status colour), .handle (drag, finger-sized, never scrolls). */
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.list li { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.list li:last-child { border-bottom: 0; }
.list li[aria-current="step"] { box-shadow: inset 4px 0 0 var(--accent); }
.list .row { flex: 1; min-width: 0; }
.list small { display: block; color: var(--muted); font-size: 13px; }
.list li[data-status="visited"] .row { color: var(--muted); }
.list li[data-status="visited"] .row b { text-decoration: line-through; }
.list li[data-status="skipped"] .row { color: var(--muted); font-style: italic; }
.num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; background: var(--accent); }
.dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); }
.handle { flex: none; width: 40px; height: 40px; margin: -4px -6px -4px 0; border: 0; cursor: grab; touch-action: none; background: var(--muted); opacity: .55; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 8h12M6 12h12M6 16h12' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); -webkit-mask: var(--ico) center / 22px no-repeat; mask: var(--ico) center / 22px no-repeat; }
.handle:focus-visible { opacity: 1; }
.dragging { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); box-shadow: 0 6px 18px rgba(10, 18, 26, .25); position: relative; z-index: 2; }

/* kit/field: label above input/textarea; .toggle = checkbox with its label, both full touch height. */
.field { display: flex; flex-direction: column; gap: 4px; }
.field span, .toggle span { font-weight: 600; font-size: 14px; }
.field input, .field textarea, .field select { font: inherit; padding: 10px; min-height: var(--tap); width: 100%; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); }
.toggle { display: flex; align-items: center; gap: 10px; min-height: var(--tap); }
.toggle input { width: 24px; height: 24px; accent-color: var(--go); }

/* kit/table: data rows in a horizontally scrolling wrapper; tr[data-id] rows are tappable, tr[data-flag] flags its last cell. */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; background: var(--surface); }
td, th { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
tr[data-id] { cursor: pointer; }
tr[data-flag] td:last-child b { color: var(--stop); }
td .handle { margin: 0; display: block; }

/* kit/dialog: .backdrop > .dialog; a bottom sheet on phones, centred on wide screens. Modal: covering the screen is its job. */
.backdrop { position: fixed; inset: 0; background: var(--backdrop); display: grid; place-items: end center; z-index: 1000; }
.dialog { width: min(520px, 100%); max-height: 90dvh; overflow: auto; padding: 16px; background: var(--surface); color: var(--ink); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.dialog h2 { font-size: 22px; margin: 0 0 6px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: var(--gap); margin-top: 12px; }
@media (min-width: 900px) { .backdrop { place-items: center; } .dialog { border-radius: var(--radius-lg); } }

/* kit/toast: one transient message above the footer, with an optional action (Undo). */
.toast { position: fixed; left: var(--pad); right: var(--pad); bottom: calc(80px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; background: var(--ink); color: var(--ground); border-radius: var(--radius); z-index: 1100; }
.toast .btn { background: transparent; color: var(--warn); border-color: var(--warn); }

/* kit/links: a row of plain links, each a full touch target. */
.links { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.links a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--accent); font-weight: 600; }

/* kit/group: controls stacked as one block; .group.choice = side-by-side options, the chosen one aria-pressed="true". */
.group { display: flex; flex-direction: column; gap: 10px; }
.group > .btn.big { flex: none; }
.group.choice { flex-direction: row; }
.group.choice .btn { flex: 1; }
.choice .btn[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
