/* ==========================================================================
   Design system
   Light and dark are both first-class; every colour is a token so the whole
   surface can be rethened from this one block.
   ========================================================================== */

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef1f4;
  --surface-3: #e4e8ec;
  --border: #dfe4e9;
  --border-strong: #c8d0d8;

  --text: #10161c;
  --text-dim: #5d6b78;
  --text-faint: #8a97a3;

  --accent: #04a06a;
  --accent-hover: #038759;
  --accent-fg: #ffffff;
  --accent-soft: #e2f5ed;
  --accent-line: #9adcc3;

  --danger: #d1344b;
  --danger-soft: #fdeaed;
  --warn: #b4690e;
  --warn-soft: #fdf1de;

  /* Categorical series colours, for telling one *thing* from another rather
     than more from less. Assigned in this fixed order and never cycled, so a
     sport keeps its colour whatever it ranks. Deliberately not the accent:
     these carry identity, and the accent means "this is the club". The order
     is the colourblind-safety mechanism — adjacent pairs are the ones checked,
     so re-order only against the same check. */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-rest: #8a97a3;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 22, 28, 0.06);
  --shadow: 0 4px 16px -4px rgba(16, 22, 28, 0.12);
  --shadow-lg: 0 24px 60px -12px rgba(16, 22, 28, 0.28);

  --header-h: 60px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e11;
    --surface: #14191e;
    --surface-2: #1b2127;
    --surface-3: #232a31;
    --border: #262e36;
    --border-strong: #38424c;

    --text: #e9edf1;
    --text-dim: #98a5b1;
    --text-faint: #6d7a86;

    --accent: #12b880;
    --accent-hover: #2fcf98;
    --accent-fg: #04120c;
    --accent-soft: #10291f;
    --accent-line: #1c5a42;

    --danger: #f06a7e;
    --danger-soft: #2c1418;
    --warn: #dda43f;
    --warn-soft: #2b2013;

    /* The same six hues, re-stepped for the dark surface. Not an automatic
       flip of the light values: a colour that reads at 3:1 on white does not
       on near-black, so each step was chosen and checked against this surface. */
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #008300;
    --series-rest: #6d7a86;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, 0.7);

    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 640;
  letter-spacing: -0.018em;
  line-height: 1.25;
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.18rem; }
h3 { font-size: 1rem; }

p { margin: 0 0 0.75rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.tnum { font-variant-numeric: tabular-nums; }

.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.small { font-size: 0.82rem; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.shell--narrow { max-width: 460px; }
.shell--mid { max-width: 780px; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 28px 0 18px;
}

.page-head p { color: var(--text-dim); margin: 4px 0 0; font-size: 0.9rem; }

.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

/* ==========================================================================
   Header
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 660;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }

.brand__mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #0a7fb8));
  display: grid;
  place-items: center;
  color: var(--accent-fg);
  font-size: 15px;
  flex: none;
  box-shadow: var(--shadow-sm);
}

/* An uploaded logo, in place of .brand__mark. Same footprint so swapping one
   for the other never shifts the name beside it. `contain` rather than
   `cover`, because a club's logo is rarely square and cropping it is worse
   than letting it sit inside the box. */
.brand__logo {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  object-fit: contain;
  flex: none;
}

.brand__sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
}

.nav a {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.88rem;
  font-weight: 520;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); }

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  display: grid;
  place-items: center;
  font-size: 0.74rem;
  font-weight: 680;
  letter-spacing: 0.02em;
  flex: none;
}

.usermenu { position: relative; }

.usermenu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 208px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: none;
}
.usermenu__panel[data-open="true"] { display: block; }

.usermenu__head {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.usermenu__head strong { display: block; font-size: 0.9rem; }
.usermenu__head span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
}

.usermenu__panel button,
.usermenu__panel a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  background: none;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
}
.usermenu__panel button:hover,
.usermenu__panel a:hover { background: var(--surface-2); text-decoration: none; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.89rem;
  font-weight: 560;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease),
    transform 0.1s var(--ease), opacity 0.14s var(--ease);
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn--primary {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--accent-hover); }

.btn--ghost { background: transparent; border-color: var(--border); color: var(--text-dim); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }

.btn--danger { background: transparent; border-color: var(--border); color: var(--danger); }
.btn--danger:hover { background: var(--danger-soft); border-color: var(--danger); }

.btn--block { width: 100%; }
.btn--sm { padding: 6px 11px; font-size: 0.82rem; border-radius: 7px; }
.btn--lg { padding: 12px 22px; font-size: 0.95rem; }

/* ==========================================================================
   Cards, badges, notices
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card--flush { padding: 0; overflow: hidden; }

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.73rem;
  font-weight: 620;
  letter-spacing: 0.01em;
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.badge--accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.badge--danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge--warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

.notice {
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 0.87rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-dim);
}
.notice--error { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.notice--accent { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.notice--warn { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }

.empty {
  text-align: center;
  padding: 44px 20px;
  color: var(--text-faint);
}
.empty__icon { font-size: 1.9rem; opacity: 0.55; margin-bottom: 8px; }
.empty strong { display: block; color: var(--text-dim); font-weight: 560; margin-bottom: 3px; }

/* ==========================================================================
   Forms
   ========================================================================== */

.field { display: grid; gap: 6px; }

/* `display: grid` above outranks the browser's own [hidden] rule, so a field
   switched off by setFieldVisible needs this to actually disappear. */
.field[hidden] { display: none; }

.field > label {
  font-size: 0.82rem;
  font-weight: 560;
  color: var(--text-dim);
}

.input,
select.input,
textarea.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  transition: border-color 0.14s var(--ease), box-shadow 0.14s var(--ease);
}

.input::placeholder { color: var(--text-faint); }

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

textarea.input { resize: vertical; min-height: 66px; }

/* A figure the dialog reports rather than asks for. Reads as a value, not as
   an empty box waiting to be filled in. */
.input--readonly {
  background: transparent;
  border-style: dashed;
  color: var(--text-dim);
  cursor: default;
}

.input--readonly:focus { outline: none; box-shadow: none; border-color: var(--border-strong); }

select.input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-faint) 50%),
    linear-gradient(135deg, var(--text-faint) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.field__hint { font-size: 0.78rem; color: var(--text-faint); }

/* File picker — the native control, tidied to sit with the other inputs */

.file__input {
  padding: 7px 10px;
  font-size: 0.86rem;
  cursor: pointer;
}

.file__input::file-selector-button {
  margin-right: 10px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2, var(--surface));
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 560;
  cursor: pointer;
}

.file__input::file-selector-button:hover { border-color: var(--accent); }

/* Inline filter toggle — lighter than .check, sized to sit in a filter row */

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}

.toggle__box {
  width: 15px;
  height: 15px;
  flex: none;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Checkbox — label sits beside the box, so the whole row is the hit target */

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.92rem;
  cursor: pointer;
}

.check:hover { border-color: var(--accent); }

.check__box {
  width: 17px;
  height: 17px;
  flex: none;
  accent-color: var(--accent);
  cursor: pointer;
}

.check:has(.check__box:focus-visible) {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* Segmented control — duration and sport pickers */

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.segmented__opt {
  flex: 1 1 auto;
  min-width: 52px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  font: inherit;
  font-size: 0.87rem;
  font-weight: 570;
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}
.segmented__opt:hover:not(:disabled):not([aria-pressed="true"]) {
  background: var(--surface-3);
  color: var(--text);
}
.segmented__opt[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: var(--shadow-sm);
}
.segmented__opt:disabled {
  opacity: 0.34;
  cursor: not-allowed;
  text-decoration: line-through;
}

.auth-card { margin-top: 8vh; }
.auth-card h1 { margin-bottom: 4px; }

/* Google's branding guidelines ask for its own colours rather than ours, so
   this is the one control on the site that does not follow the theme: a white
   face and the four-colour mark in both light and dark, which is what the
   guidelines actually require. The G itself is inline SVG — the page loads
   nothing from Google, which is what lets script-src stay at 'self'. */
.btn--google {
  background: #ffffff;
  color: #1f1f1f;
  border-color: #747775;
}
.btn--google:hover { background: #f2f2f2; }
.btn--google svg { flex: none; }

/* "or" with a rule either side, for the seam between the two ways in. */
.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--text-faint);
  font-size: 0.8rem;
}
.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-card__foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.87rem;
  color: var(--text-dim);
  text-align: center;
}

/* ==========================================================================
   Date strip
   ========================================================================== */

.datestrip {
  position: relative;
  margin-bottom: 16px;
}

.datestrip__track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 3px 1px 12px;
  scrollbar-width: thin;
}
.datestrip__track::-webkit-scrollbar { height: 6px; }
.datestrip__track::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

.daypill {
  flex: none;
  scroll-snap-align: start;
  min-width: 74px;
  padding: 9px 12px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: border-color 0.14s var(--ease), background 0.14s var(--ease),
    transform 0.1s var(--ease);
}
.daypill:hover { border-color: var(--border-strong); transform: translateY(-1px); }

.daypill__dow {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.daypill__num {
  font-size: 1.16rem;
  font-weight: 650;
  color: var(--text);
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.daypill__free {
  font-size: 0.7rem;
  font-weight: 560;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.daypill[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
}
.daypill[aria-pressed="true"] .daypill__dow,
.daypill[aria-pressed="true"] .daypill__num,
.daypill[aria-pressed="true"] .daypill__free {
  color: var(--accent-fg);
}
.daypill[aria-pressed="true"] .daypill__dow,
.daypill[aria-pressed="true"] .daypill__free { opacity: 0.82; }

.daypill--full .daypill__free { color: var(--danger); }
.daypill[aria-pressed="true"].daypill--full .daypill__free { color: var(--accent-fg); }

.datestrip__edge {
  position: absolute;
  top: 0;
  bottom: 12px;
  width: 40px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s var(--ease);
}
.datestrip__edge--right {
  right: 0;
  background: linear-gradient(to right, transparent, var(--bg) 78%);
}
.datestrip__edge--left {
  left: 0;
  background: linear-gradient(to left, transparent, var(--bg) 78%);
}

/* The fades are claims about hidden content, so they only appear when there
   really is more strip in that direction — book.js sets these as it scrolls. */
.datestrip[data-more-left="true"] .datestrip__edge--left,
.datestrip[data-more-right="true"] .datestrip__edge--right { opacity: 1; }

/* A mouse has no way to flick a scroller, so a fine pointer gets buttons.
   Touch keeps the bare strip — a thumb already does this better. */
.datestrip__nav { display: none; }

@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  .datestrip__nav {
    position: absolute;
    top: 50%;
    /* Centre on the pills, not on the track's scrollbar gutter. */
    margin-top: -6px;
    transform: translateY(-50%);
    z-index: 2;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0 0 2px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-dim);
    font: inherit;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: color 0.14s var(--ease), border-color 0.14s var(--ease);
  }
  .datestrip__nav:hover { color: var(--text); border-color: var(--border-strong); }
  .datestrip__nav[hidden] { display: none; }
  .datestrip__nav--prev { left: -8px; }
  .datestrip__nav--next { right: -8px; }
}

/* ==========================================================================
   Booking grid
   ========================================================================== */

.gridwrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: auto;
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 220px);
}

.grid {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: max-content;
}

.grid th,
.grid td {
  padding: 0;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.grid tr > *:last-child { border-right: 0; }
.grid tr:last-child > * { border-bottom: 0; }

.grid thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface);
  padding: 12px 14px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 620;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  white-space: nowrap;
  box-shadow: inset 0 -1px 0 var(--border);
}

.grid thead th small {
  display: block;
  font-size: 0.68rem;
  font-weight: 520;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 1px;
}

.grid .timecol {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
  padding: 0 16px;
  width: 96px;
  min-width: 96px;
  text-align: right;
  font-size: 0.8rem;
  font-weight: 560;
  color: var(--text-dim);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  box-shadow: inset -1px 0 0 var(--border);
}

.grid thead .timecol { z-index: 4; }

.grid tbody tr.is-past .timecol { color: var(--text-faint); opacity: 0.6; }

.grid td { height: var(--row-h); }

/* Half-hour granularity doubles the row count, so rows get shorter and the
   :30 lines recede — the hours stay the readable rhythm. */
.grid { --row-h: 56px; }
.grid--dense { --row-h: 38px; }

.grid--dense tbody tr.is-half > * { border-bottom-style: dashed; }
.grid--dense tbody tr.is-half .timecol {
  color: var(--text-faint);
  font-size: 0.72rem;
  font-weight: 500;
}

.cell {
  position: relative;
  width: 100%;
  min-width: 118px;
  height: 100%;
  min-height: var(--row-h);
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-faint);
  font-size: 0.82rem;
  font-weight: 540;
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}

/* A booking spanning several slots is one tall block, not repeated squares. */
.td--spanned .cell { border-radius: var(--radius-sm); }

.cell__title { font-weight: 620; }
.cell__sub {
  font-size: 0.73rem;
  font-weight: 500;
  opacity: 0.78;
  text-transform: capitalize;
  font-variant-numeric: tabular-nums;
}

.cell--open {
  color: var(--text-faint);
  flex-direction: row;
  gap: 6px;
}
.cell--open::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
  transition: opacity 0.14s var(--ease), transform 0.14s var(--ease);
}
.cell--open:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.cell--open:hover::after { opacity: 1; transform: scale(1.25); }
.cell--open:focus-visible { outline-offset: -2px; }

.cell--booked,
.cell--past,
.cell--blocked {
  cursor: default;
}

.cell--booked {
  /* Named so the hover-less override at the bottom of the file can put it
     back without restating it. */
  --stripe: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 6px,
    color-mix(in srgb, var(--text-faint) 9%, transparent) 6px,
    color-mix(in srgb, var(--text-faint) 9%, transparent) 12px
  );
  background: var(--stripe);
  color: var(--text-faint);
  font-size: 0.76rem;
}

.cell--past { background: var(--surface-2); color: transparent; }
.cell--past::before { content: "·"; color: var(--text-faint); opacity: 0.5; font-size: 1.2rem; }

.cell--blocked {
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0 8px;
  text-align: center;
  line-height: 1.2;
}

.cell--mine {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 640;
  cursor: pointer;
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.cell--mine:hover { background: color-mix(in srgb, var(--accent-soft) 70%, var(--accent) 12%); }

.cell--admin-booked { cursor: pointer; }
.cell--admin-booked:hover { background: var(--surface-3); color: var(--text-dim); }

/* ---- drag to select a time range ---------------------------------------- */

body.is-dragging {
  cursor: ns-resize;
  user-select: none;
  -webkit-user-select: none;
}
body.is-dragging .cell { cursor: ns-resize; }

.cell--selected,
.cell--open.cell--selected:hover {
  background: var(--accent);
  color: var(--accent-fg);
}
.cell--selected::after { display: none; }

/* The run reads as one continuous block: only its ends are rounded, and the
   internal boundaries are softened rather than drawn as separate boxes. */
.cell--selected { border-radius: 0; box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--accent-fg) 22%, transparent); }
.cell--selected-head { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.cell--selected-tail { border-radius: 0 0 var(--radius-sm) var(--radius-sm); box-shadow: none; }
.cell--selected-head.cell--selected-tail { border-radius: var(--radius-sm); box-shadow: none; }

.dragpill {
  position: fixed;
  z-index: 90;
  transform: translate(-50%, 0);
  padding: 7px 13px;
  border-radius: var(--radius-full);
  background: var(--text);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
  font-variant-numeric: tabular-nums;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 2px 0;
  font-size: 0.78rem;
  color: var(--text-faint);
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: inline-block;
}
.legend .sw-open { background: var(--surface); }
.legend .sw-open::after {
  content: "";
  display: block;
  width: 4px; height: 4px;
  margin: 3px auto;
  border-radius: 50%;
  background: var(--accent);
}
.legend .sw-mine { background: var(--accent-soft); border-color: var(--accent); }
.legend .sw-booked { background: var(--surface-3); }
.legend .sw-blocked { background: var(--warn-soft); border-color: var(--warn); }

.legend__tip { margin-left: auto; font-style: italic; }
/* Drag is a fine-pointer interaction, so the hint is keyed to the pointer and
   not to the width: a tablet is wide enough to show it but can't do it, and
   the dialog does the same job there. */
@media (max-width: 700px), (pointer: coarse) {
  .legend__tip { display: none; }
}

/* Sport filter */
.chips { display: flex; gap: 7px; flex-wrap: wrap; }

.chip {
  padding: 5px 13px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 540;
  cursor: pointer;
  text-transform: capitalize;
  transition: all 0.14s var(--ease);
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* ==========================================================================
   Modal / sheet
   ========================================================================== */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 12, 16, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade 0.16s var(--ease);
}

.modal {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  animation: pop 0.18s var(--ease);
}

.modal--wide { max-width: 560px; }

.modal__title { margin-bottom: 3px; }
.modal__sub { color: var(--text-dim); font-size: 0.87rem; margin-bottom: 16px; }

.modal__summary {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: grid;
  gap: 9px;
}

.kv {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  font-size: 0.88rem;
}
.kv dt { color: var(--text-dim); }
.kv dd { margin: 0; font-weight: 580; text-align: right; }

.modal__actions {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}
.modal__actions .btn { flex: 1; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
}

@media (max-width: 560px) {
  .overlay { align-items: flex-end; padding: 0; }
  .modal {
    max-width: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding-bottom: max(22px, env(safe-area-inset-bottom));
    animation: slideup 0.2s var(--ease);
  }
  @keyframes slideup { from { transform: translateY(100%); } }
}

/* ==========================================================================
   Toasts
   ========================================================================== */

.toasts {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: grid;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  border-radius: var(--radius-full);
  background: var(--text);
  color: var(--bg);
  font-size: 0.87rem;
  font-weight: 540;
  box-shadow: var(--shadow-lg);
  animation: toastin 0.22s var(--ease);
}
.toast--error { background: var(--danger); color: #fff; }
.toast--ok::before { content: "✓"; font-weight: 700; }

@keyframes toastin { from { opacity: 0; transform: translateY(14px); } }

/* ==========================================================================
   Booking list
   ========================================================================== */

.blist { display: grid; gap: 10px; }

.bitem {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.bitem--past { opacity: 0.62; box-shadow: none; }

.bitem__date {
  flex: none;
  width: 54px;
  text-align: center;
  padding-right: 16px;
  border-right: 1px solid var(--border);
}
.bitem__date .dow {
  font-size: 0.66rem;
  font-weight: 660;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.bitem__date .num {
  font-size: 1.35rem;
  font-weight: 660;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.bitem__date .mon { font-size: 0.7rem; color: var(--text-faint); font-weight: 560; }

.bitem__main { flex: 1; min-width: 0; }
.bitem__time { font-weight: 600; font-variant-numeric: tabular-nums; }
.bitem__meta {
  font-size: 0.82rem;
  color: var(--text-dim);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1px;
}
.bitem__cost {
  float: right;
  font-weight: 660;
  font-variant-numeric: tabular-nums;
}

.bitem__note {
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   Admin
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 17px;
  box-shadow: var(--shadow-sm);
}
.stat--warn { border-color: var(--warn); background: var(--warn-soft); }
.stat--warn .stat__value { color: var(--warn); }
.stat--danger { border-color: var(--danger); background: var(--danger-soft); }
.stat--danger .stat__value { color: var(--danger); }

.stat__label {
  font-size: 0.73rem;
  font-weight: 620;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.stat__value {
  font-size: 1.75rem;
  font-weight: 660;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  margin-top: 3px;
}
.stat__sub { font-size: 0.8rem; color: var(--text-dim); }

.meter {
  height: 5px;
  border-radius: 3px;
  background: var(--surface-3);
  overflow: hidden;
  margin-top: 9px;
}
.meter > span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.4s var(--ease);
}

.ratecard {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.ratecard__main { flex: 1; min-width: 0; }

.tabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--surface-2);
  border-radius: var(--radius);
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
}

.tabs button {
  padding: 7px 15px;
  border: 0;
  border-radius: 9px;
  background: none;
  font: inherit;
  font-size: 0.87rem;
  font-weight: 560;
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }

.table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 0.72rem;
  font-weight: 640;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { font-variant-numeric: tabular-nums; }
.table__actions { text-align: right; white-space: nowrap; }

.tablewrap { overflow-x: auto; }

/* Inline bar under a figure in a table cell. Each column is scaled to its own
   maximum, so these compare a month against other months of the SAME measure —
   never income against hours, which share no axis and never should. Kept thin
   and recessive: the number is the value, this is only its shape over time. */

.colbar {
  height: 3px;
  border-radius: 2px;
  background: var(--surface-3);
  overflow: hidden;
  margin-top: 5px;
  margin-left: auto;
  max-width: 92px;
}

.colbar__fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
}

/* For the columns where a tall bar is bad news. Paired with a heading that
   says which measure it is, so the meaning never rests on the colour. */
.colbar__fill--warn { background: var(--warn); }

.bars { display: grid; gap: 7px; }
.bar { display: grid; grid-template-columns: 78px 1fr 34px; align-items: center; gap: 10px; font-size: 0.82rem; }
.bar__track { height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.bar__fill { height: 100%; border-radius: 4px; background: var(--accent); }
.bar__label { color: var(--text-dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar__num { text-align: right; color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* Part-to-whole: how the club's court time divides between the sports it runs.
   A ring rather than a solid pie — the hole carries the total, which is the
   number the desk actually reads, and the slices answer "how does it split"
   at a glance. The legend beside it is not decoration: it names every slice
   and prints its hours, so identity and value never rest on colour alone. */

.pie {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 22px;
}

@media (max-width: 560px) {
  .pie { grid-template-columns: 1fr; justify-items: center; gap: 16px; }
}

.pie__disc {
  position: relative;
  width: 158px;
  height: 158px;
  border-radius: 50%;
  /* The wedges themselves come from the script: only it knows the shares. */
}

/* Sits on the ring, not beside it, so the total reads as the sum of what
   surrounds it. Matches the card so the segments look cut, not stacked. */
.pie__hole {
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.pie__total {
  font-size: 1.3rem;
  font-weight: 640;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.pie__caption { font-size: 0.68rem; color: var(--text-dim); margin-top: 2px; }

/* Capped: over a wide card an uncapped legend strands the hours a foot away
   from the name they belong to. */
.pie__legend { display: grid; gap: 9px; width: 100%; max-width: 420px; }

.pie__row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
}

.pie__swatch { width: 10px; height: 10px; border-radius: 3px; }
.pie__name { text-transform: capitalize; }
.pie__hours { font-variant-numeric: tabular-nums; }
.pie__share {
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  min-width: 44px;
  text-align: right;
}

/* ==========================================================================
   Skeletons
   ========================================================================== */

.skel {
  background: linear-gradient(
    90deg,
    var(--surface-2) 25%,
    var(--surface-3) 37%,
    var(--surface-2) 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* ==========================================================================
   Mobile and touch
   Two separate concerns, deliberately keyed differently: `max-width` handles
   layout on a narrow screen, `pointer: coarse` handles finger-sized targets.
   A small laptop window should not get 44px buttons, and a tablet should.
   ========================================================================== */

@media (max-width: 700px) {
  .shell {
    padding: 0 14px;
    /* Clear the home indicator on notched phones. */
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }
  .header__inner {
    padding: 0 max(14px, env(safe-area-inset-left)) 0 max(14px, env(safe-area-inset-right));
    gap: 8px;
  }
  .brand__sub { display: none; }
  .brand__mark, .brand__logo { width: 30px; height: 30px; }
  .nav a { padding: 8px 10px; font-size: 0.86rem; }
  .page-head { padding: 18px 0 12px; }
  h1 { font-size: 1.3rem; }
  .page-head p { font-size: 0.86rem; }

  /* The page itself scrolls, so the grid's own header sticks below the app
     bar rather than at viewport top where the bar would cover it. */
  .gridwrap { max-height: none; }
  .grid thead th { top: var(--header-h); }
  .grid .timecol { width: 68px; min-width: 68px; padding: 0 9px; font-size: 0.75rem; }
  .cell { min-width: 0; }

  .bitem { padding: 13px 14px; gap: 12px; flex-wrap: wrap; }
  .bitem__date { width: 46px; padding-right: 12px; }
  .bitem__main { flex: 1 1 auto; min-width: 0; }
  .bitem__cost { float: none; margin-left: 8px; }

  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px 13px; }
  .stat__value { font-size: 1.45rem; }

  .card { padding: 16px 14px; border-radius: var(--radius); }
  .card__head { gap: 10px; }
  .modal__summary { padding: 12px 13px; }
}

@media (max-width: 560px) {
  /* Reclaim the width the facility name costs; the tab title still carries it. */
  .brand > span > div:first-child { display: none; }
  .nav { margin-left: 0; }
  .nav a { padding: 8px 9px; }
}

/* ---- finger-sized targets, whatever the screen width -------------------- */

@media (pointer: coarse) {
  /* Anything under 16px makes iOS zoom the whole page when the field takes
     focus, which then leaves the layout scrolled sideways. */
  .input, select.input, textarea.input { font-size: 16px; padding: 11px 12px; }
  select.input { padding-right: 34px; }

  .btn { min-height: 44px; padding: 11px 16px; }
  .btn--sm { min-height: 38px; padding: 9px 13px; font-size: 0.85rem; }
  .btn--lg { min-height: 50px; }

  .segmented__opt { min-height: 42px; }
  .chip { min-height: 36px; padding: 8px 14px; }
  .tabs button { min-height: 40px; }

  .daypill { min-width: 78px; padding: 11px 12px 10px; }

  /* Roomier rows beat denser ones when the pointer is a fingertip. */
  .grid { --row-h: 46px; }
  .grid--dense { --row-h: 44px; }

  .usermenu__panel button,
  .usermenu__panel a { padding: 12px 10px; }

  .table td { padding: 13px 16px; }

  /* The grey flash on tap is replaced by the components' own :active states. */
  a, button, .cell, .daypill, .chip { -webkit-tap-highlight-color: transparent; }
}

/* ---- admin tables become stacked cards on a narrow screen --------------- */

/* Keyed wider than the other narrow-screen rules: the admin tables run to
   seven columns, which a tablet in portrait can only show by scrolling
   sideways — cards are readable at a width where a real table is not. */
@media (max-width: 900px) {
  .tablewrap { overflow-x: visible; }

  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table thead { display: none; }

  .table tr {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px 0;
    margin-bottom: 10px;
    background: var(--surface);
  }
  .table tbody tr:hover { background: var(--surface); }

  .table td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--border);
    padding: 9px 14px;
    text-align: left;
  }
  .table tr td:last-child { border-bottom: 0; }

  /* The column heading rides along as a label, stamped on by admin.js. */
  .table td::before {
    content: attr(data-label);
    flex: none;
    font-size: 0.7rem;
    font-weight: 640;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-faint);
  }
  /* A cell with no heading and no content is noise once stacked. The action
     column is the exception: its heading is deliberately blank, but it holds
     the row's buttons and hiding it strands the card with nothing to do. */
  .table td:empty,
  .table td[data-label=""]:not(.table__actions) { display: none; }

  .table__actions { justify-content: flex-end; }
  .table__actions::before { content: none; }
  .table__actions .row { width: 100%; justify-content: stretch; }
  .table__actions .btn { flex: 1; }
}

/* ---- scrolling behaviour ------------------------------------------------ */

html, body { overflow-x: hidden; }
body { -webkit-text-size-adjust: 100%; }

.gridwrap, .tablewrap, .datestrip__track, .tabs {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.tabs::-webkit-scrollbar { display: none; }
.tabs { scrollbar-width: none; }

/* A dialog taller than the screen must scroll inside itself, not push its
   own buttons off the bottom. */
.modal {
  max-height: min(88vh, 780px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   Desktop
   The mobile rules above subtract from a desktop baseline; these add back the
   things only a big screen and a mouse can use.
   ========================================================================== */

/* Court columns divide whatever width they are handed, so a two-court grid on
   a wide monitor becomes two enormous, near-empty strips. Sizing the page from
   the column count instead keeps a cell roughly the shape of the thing it
   stands for, and the page stays centred rather than sprawling. book.js
   publishes --courts; the 136px covers the time column and the shell padding.
   No media query needed — below the result the cap simply never binds, so a
   phone and a tablet are untouched. */
.shell--book {
  max-width: clamp(720px, calc(136px + var(--courts, 4) * 320px), 1180px);
}

@media (min-width: 1024px) {
  h1 { font-size: 1.75rem; }
  .page-head { padding: 34px 0 22px; }
  .page-head p { font-size: 0.92rem; }

  /* Room for one more row of the grid: the viewport is wider than it is tall
     here, so vertical space is the scarce one. */
  .gridwrap { max-height: calc(100vh - 200px); }
}

/* On a large monitor the admin tables are the only thing that wants the extra
   width — reading columns is easier than scrolling them. The reading-width
   pages (:not) keep their own caps. */
@media (min-width: 1400px) {
  .shell:not(.shell--narrow):not(.shell--mid):not(.shell--book),
  .header__inner { max-width: 1320px; }
}

/* ---- hover is a capability, not an assumption --------------------------- */

/* Without this a tablet keeps the hover paint after a tap — the last cell
   touched stays lit as though it were still under a cursor. Neutralising here
   rather than at each rule keeps the desktop styles above readable. */
@media (hover: none) {
  .btn:hover { background: var(--surface-2); }
  .btn--primary:hover { background: var(--accent); }
  .btn--ghost:hover { background: transparent; color: var(--text-dim); }
  .btn--danger:hover { background: transparent; border-color: var(--border); }

  .nav a:not([aria-current="page"]):hover { background: none; color: var(--text-dim); }
  .usermenu__panel button:hover,
  .usermenu__panel a:hover { background: none; }

  .cell--open:hover { background: none; color: var(--text-faint); }
  .cell--open:hover::after { opacity: 0.4; transform: none; }
  .cell--mine:hover { background: var(--accent-soft); }
  /* Always carries .cell--booked too, so it is the stripe that goes back —
     not "no background", which would flatten the square. */
  .cell--admin-booked:hover { background: var(--stripe); color: var(--text-faint); }

  /* Excluding the selected pill, whose border is part of its accent fill. */
  .daypill:not([aria-pressed="true"]):hover { border-color: var(--border); transform: none; }
  .daypill:hover { transform: none; }

  .chip:not([aria-pressed="true"]):hover { border-color: var(--border); color: var(--text-dim); }
  .segmented__opt:hover:not(:disabled):not([aria-pressed="true"]) {
    background: none;
    color: var(--text-dim);
  }
  .tabs button:not([aria-selected="true"]):hover { color: var(--text-dim); }
}

/* Only above the stacking breakpoint: below it the rows are cards on their own
   surface, and the narrow-screen block already cancels the hover tint there. */
@media (hover: none) and (min-width: 901px) {
  .table tbody tr:hover { background: none; }
}
