/* Otun tokens, from docs/design.md. Light is the default; theme.js sets data-theme before first paint. */
:root {
  --ink: #15211D; --paper: #F2F3EF; --surface: #FBFBF8; --muted: #5B6661; --line: #D8DCD4; --brass: #9C7A35; --on-ink: #F2F3EF;
  --free: #27704A; --free-wash: #E4F0E8; --held: #935700; --held-wash: #F6ECDA; --paying: #2457A6; --paying-wash: #E3EAF6;
  --manual: #B4530A; --urgent: #B42318; --urgent-wash: #F8E4E1;
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 6px; --r-md: 10px; --r-pill: 999px; --r-tag: 30px 10px 10px 30px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s12: 48px; --s18: 72px;
  --float: 0 1px 0 var(--line), 0 18px 40px -28px rgba(10, 20, 16, .35);
  --booked: #15211D; --on-booked: #F2F3EF;
  --band: #15211D; --on-band: #F2F3EF; --band-muted: #B4B8B4; --band-line: #34403B;
  --logo-plate: #15211D; --logo-letter: #F2F3EF; --logo-inlay: #9C7A35;
  --field-line: #7F8A84;
  --product-stays: #1D877C; --product-tabs: #C6537D; --product-sessions: #786FC8;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #E7EBE5; --paper: #0E1412; --surface: #151D1A; --muted: #9BA6A0; --line: #2A3531; --brass: #C9A15A; --on-ink: #0E1412;
  --free: #5DBB83; --free-wash: #17291F; --held: #E0A04A; --held-wash: #2D2314; --paying: #7FA6E8; --paying-wash: #172236;
  --manual: #E8894A; --urgent: #F07A6A; --urgent-wash: #33191A;
  --float: 0 0 0 1px var(--line), 0 24px 48px -28px rgba(0, 0, 0, .8);
  /* Band and booked stay dark in both themes, so a big light block never glares at night. */
  --booked: #27332E; --on-booked: #E7EBE5;
  --band: #1B2521; --on-band: #E7EBE5; --band-muted: #AEB4AE; --band-line: #34403B;
  --logo-plate: #E7EBE5; --logo-letter: #0E1412; --logo-inlay: #9C7A35;
  --field-line: #5F6B65;
  --product-stays: #1C8278; --product-tabs: #C34B77; --product-sessions: #746BC7;
  color-scheme: dark;
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 400 15px/1.55 var(--ui); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 4px; text-decoration-color: var(--brass); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.eyebrow { font: 600 12px/1.3 var(--ui); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ic { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; vertical-align: -0.2em; }

.btn { font: 500 15px/1 var(--ui); display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: 44px; padding: 0 18px; border-radius: var(--r-sm); border: 1.5px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color .12s ease-out, transform .06s ease-out; }
.btn .ic { width: 18px; height: 18px; }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: color-mix(in oklab, var(--ink) 86%, var(--paper)); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: color-mix(in oklab, var(--ink) 6%, var(--surface)); }
.btn-quiet { background: transparent; color: var(--ink); padding: 0 10px; text-decoration: underline; text-decoration-color: var(--brass); }
.btn-quiet:hover { background: color-mix(in oklab, var(--ink) 6%, transparent); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }

.tag { --c: var(--ink); position: relative; display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 9px; padding: 11px 14px 13px 12px; border-radius: var(--r-tag); border: 1.5px solid var(--c); background: var(--surface); overflow: hidden; }
.tag::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--brass); background: var(--paper); justify-self: center; }
.tag .n { font: 700 30px/1 var(--ui); letter-spacing: -0.02em; }
.tag .s { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--c); margin-top: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tag .s i { display: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.tag.free { --c: var(--free); }
.tag.held { --c: var(--held); background: var(--held-wash); }
.tag.paying { --c: var(--paying); background: var(--paying-wash); }
.tag.paying .s i { display: block; animation: pulse 1.4s ease-in-out infinite; }
.tag.booked { background: var(--booked); border-color: var(--booked); }
.tag.booked .n, .tag.booked .s { color: var(--on-booked); }
.tag.booked .s i { background: var(--on-booked); }
.tag.booked::before { background: var(--booked); }
.tag.unconfirmed { --c: var(--manual); border-style: dashed; }
.tag.ready { --c: var(--free); background: var(--free-wash); }
.tag.blocked { --c: var(--muted); background: repeating-linear-gradient(135deg, var(--surface) 0 7px, var(--paper) 7px 14px); }
.tag .drain { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--held); width: var(--left, 70%); transition: width 1s linear; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

.chip { font-size: 13px; padding: 6px 10px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
.chip.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: var(--r-pill); white-space: nowrap; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.free { color: var(--free); background: var(--free-wash); }
.status.held { color: var(--held); background: var(--held-wash); }
.status.paying { color: var(--paying); background: var(--paying-wash); }
.status.booked { color: var(--on-booked); background: var(--booked); }
.status.manual { color: var(--manual); border: 1px dashed var(--manual); }
.status.ready { color: var(--free); background: var(--free-wash); }
.status.urgent { color: var(--urgent); background: var(--urgent-wash); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo svg { display: block; height: 100%; width: auto; }
.theme { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; transition: background-color .12s ease-out; }
.theme:hover { background: color-mix(in oklab, var(--ink) 6%, transparent); }
.theme .ic { width: 18px; height: 18px; }
.theme .sun { display: none; }
:root[data-theme="dark"] .theme .sun { display: block; }
:root[data-theme="dark"] .theme .moon { display: none; }
