/* ══════════════════════════════════════════════════════════════
   Santander Network — iOS app shell (preview)
   One stylesheet. Light + dark. Tab bar under 900px, sidebar above.
   Tokens follow Apple's HIG: 34/41 large title, 17/22 body,
   grouped background, system colours. No framework, no build.
   ══════════════════════════════════════════════════════════════ */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ─────────── tokens ─────────── */
:root {
  --bg-grouped: #F2F2F7;
  --bg-elevated: #FFFFFF;
  --label: #000000;
  --label-2: #686870;
  --label-3: rgba(60, 60, 67, .3);
  --sep: rgba(60, 60, 67, .29);
  --fill: rgba(120, 120, 128, .12);
  --fill-press: rgba(120, 120, 128, .2);
  --blue: #0062D6;
  --green: #34C759;
  --red: #FF3B30;
  --orange: #FF9500;
  --gray: #6C6C70;
  --chrome: rgba(249, 249, 251, .78);
  --chrome-solid: rgba(249, 249, 251, .94);
  --tile-bg: #FFFFFF;
  --tile-ring: rgba(0, 0, 0, .06);
  --wall: radial-gradient(120% 70% at 50% -10%, rgba(0, 122, 255, .07), transparent 60%),
          radial-gradient(90% 60% at 110% 10%, rgba(88, 86, 214, .05), transparent 65%);

  --r-card: 26px;
  --r-tile: 10px;
  --r-button: 14px;

  --spring: cubic-bezier(.32, .72, 0, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui,
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-grouped: #000000;
    --bg-elevated: #1C1C1E;
    --label: #FFFFFF;
    --label-2: rgba(235, 235, 245, .6);
    --label-3: rgba(235, 235, 245, .3);
    --sep: rgba(84, 84, 88, .6);
    --fill: rgba(120, 120, 128, .24);
    --fill-press: rgba(120, 120, 128, .36);
    --blue: #0A84FF;
    --green: #30D158;
    --red: #FF453A;
    --orange: #FF9F0A;
    --gray: #8E8E93;
    --chrome: rgba(22, 22, 23, .72);
    --chrome-solid: rgba(22, 22, 23, .92);
    --tile-bg: #2C2C2E;
    --tile-ring: rgba(255, 255, 255, .06);
    --wall: radial-gradient(120% 70% at 50% -10%, rgba(10, 132, 255, .13), transparent 60%),
            radial-gradient(90% 60% at 110% 10%, rgba(94, 92, 230, .09), transparent 65%);
  }
}

/* explicit overrides (the ?theme= switch, for previewing both) */
html[data-theme="light"] {
  --bg-grouped: #F2F2F7; --bg-elevated: #FFFFFF; --label: #000000;
  --label-2: #686870; --label-3: rgba(60, 60, 67, .3);
  --sep: rgba(60, 60, 67, .29); --fill: rgba(120, 120, 128, .12);
  --fill-press: rgba(120, 120, 128, .2); --blue: #0062D6; --green: #34C759;
  --gray: #6C6C70;
  --red: #FF3B30; --orange: #FF9500; --chrome: rgba(249, 249, 251, .78);
  --chrome-solid: rgba(249, 249, 251, .94); --tile-bg: #FFFFFF;
  --tile-ring: rgba(0, 0, 0, .06);
  --wall: radial-gradient(120% 70% at 50% -10%, rgba(0, 122, 255, .07), transparent 60%),
          radial-gradient(90% 60% at 110% 10%, rgba(88, 86, 214, .05), transparent 65%);
}
html[data-theme="dark"] {
  --bg-grouped: #000000; --bg-elevated: #1C1C1E; --label: #FFFFFF;
  --label-2: rgba(235, 235, 245, .6); --label-3: rgba(235, 235, 245, .3);
  --sep: rgba(84, 84, 88, .6); --fill: rgba(120, 120, 128, .24);
  --fill-press: rgba(120, 120, 128, .36); --blue: #0A84FF; --green: #30D158;
  --gray: #8E8E93;
  --red: #FF453A; --orange: #FF9F0A; --chrome: rgba(22, 22, 23, .72);
  --chrome-solid: rgba(22, 22, 23, .92); --tile-bg: #2C2C2E;
  --tile-ring: rgba(255, 255, 255, .06);
  --wall: radial-gradient(120% 70% at 50% -10%, rgba(10, 132, 255, .13), transparent 60%),
          radial-gradient(90% 60% at 110% 10%, rgba(94, 92, 230, .09), transparent 65%);
}

/* visually hidden, still announced: used for the distinguishing half of
   generic link labels ("More" -> "More sections") without changing the layout */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ─────────── reset ─────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 22px;
  color: var(--label);
  background: var(--bg-grouped);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background: var(--wall);
  pointer-events: none;
  z-index: 0;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: start; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 8px; }

/* ─────────── app frame ─────────── */
.app {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100dvh;
}
.pane {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ═══════════ sidebar — iPad / Mac width ═══════════ */
.sidebar { display: none; }

@media (min-width: 900px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    flex: 0 0 264px;
    width: 264px;
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 18px 10px 14px;
    gap: 4px;
    overflow-y: auto;
    background: var(--chrome);
    -webkit-backdrop-filter: saturate(180%) blur(30px);
    backdrop-filter: saturate(180%) blur(30px);
    border-inline-end: 0.5px solid var(--sep);
    z-index: 30;
  }

  .side-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 16px;
  }
  .side-logo { width: 26px; height: auto; }
  .side-brand {
    font-size: 15px;
    line-height: 20px;
    font-weight: 600;
    letter-spacing: -.01em;
  }
  .side-brand b { font-weight: 600; color: var(--label-2); }

  .side-nav { display: flex; flex-direction: column; gap: 1px; }

  .side-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 32px;
    padding: 5px 9px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 19px;
    letter-spacing: -.008em;
    color: var(--label);
    transition: background .12s ease;
  }
  .side-item svg {
    width: 19px; height: 19px;
    fill: none; stroke: currentColor; stroke-width: 1.55;
    stroke-linecap: round; stroke-linejoin: round;
    color: var(--blue);
    flex: 0 0 auto;
  }
  .side-item.is-on { background: var(--blue); color: #fff; font-weight: 590; }
  .side-item.is-on svg { color: #fff; stroke-width: 1.7; }
  .side-item:not(.is-on):hover { background: var(--fill); }
  .side-item:not(.is-on):active { background: var(--fill-press); }

  .side-label {
    margin: 18px 0 5px;
    padding-inline: 9px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--label-2);
  }

  .side-foot { margin-top: auto; padding: 22px 9px 4px; }
  .side-note {
    margin: 0 0 6px;
    font-size: 11px;
    line-height: 15px;
    color: var(--label-2);
  }
  .side-note.dim { color: var(--label-2); }
  .side-note code {
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 4px;
    background: var(--fill);
  }
}

/* ═══════════ nav bar ═══════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  height: calc(44px + var(--safe-t));
  padding: var(--safe-t) 16px 0;
  background: transparent;
  transition: background .22s ease;
}
.navbar::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 0.5px;
  background: var(--sep);
  opacity: 0;
  transition: opacity .22s ease;
}
.is-scrolled .navbar {
  background: var(--chrome-solid);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.is-scrolled .navbar::after { opacity: 1; }

/* the box at the top of the Status screen */
.status-box { display: flex; align-items: center; gap: 12px; padding: 6px 4px; }
.status-box-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.status-box-title {
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
  letter-spacing: -.012em;
}
.status-box-sub { font-size: 13px; line-height: 18px; color: var(--label-2); }

.nav-title {
  position: absolute;
  left: 50%;
  top: calc(var(--safe-t) + 11px);
  transform: translate(-50%, 6px);
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
  letter-spacing: -.012em;
  opacity: 0;
  transition: opacity .2s ease, transform .28s var(--spring);
  pointer-events: none;
  white-space: nowrap;
}
.is-scrolled .nav-title { opacity: 1; transform: translate(-50%, 0); }

.nav-mark {
  position: absolute;
  left: 50%;
  top: var(--safe-t);
  height: 44px;
  display: flex;
  align-items: center;
  transform: translate(-50%, 5px);
  opacity: 0;
  transition: opacity .2s ease, transform .28s var(--spring);
  pointer-events: none;
}
.nav-mark img { width: 24px; height: 21px; }
.is-scrolled .nav-mark { opacity: 1; transform: translate(-50%, 0); }

/* a page shows either the mark or the text title, never both */
.nav-title:empty { display: none; }

.nav-action {
  margin-inline-start: auto;
  font-size: 17px;
  line-height: 22px;
  color: var(--blue);
  letter-spacing: -.012em;
  padding: 4px 2px;
  border-radius: 8px;
}
.nav-action:active { opacity: .55; }

@media (min-width: 900px) {
  .navbar { padding-inline: 28px; }
  .nav-lead { display: none; }
  .nav-title { display: none; }
}

/* ═══════════ content ═══════════ */
.content {
  flex: 1 1 auto;
  width: 100%;
  max-width: 752px;
  margin-inline: auto;
  padding: 0 16px calc(24px + var(--safe-b));
}
@media (min-width: 900px) {
  .content { padding: 0 28px 48px; }
}

.title-block { padding: 10px 0 22px; }
.large-title {
  margin: 0;
  font-size: 34px;
  line-height: 41px;
  font-weight: 700;
  letter-spacing: -.022em;
}
.title-sub {
  margin: 3px 0 0;
  font-size: 15px;
  line-height: 20px;
  letter-spacing: -.008em;
  color: var(--label-2);
}

/* ─────────── groups ─────────── */
.group { margin-bottom: 28px; }
.group-title {
  margin: 0 0 7px;
  padding-inline: 16px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: .002em;
  color: var(--label-2);
}
.group-foot {
  margin: 7px 0 0;
  padding-inline: 16px;
  font-size: 12px;
  line-height: 16px;
  color: var(--label-2);
}

.card {
  background: var(--bg-elevated);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: 0 0 0 0.5px var(--tile-ring);
}

/* ─────────── rows ─────────── */
.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  font-size: 17px;
  line-height: 22px;
  color: var(--label);
  background: transparent;
  transition: background .1s ease;
  -webkit-tap-highlight-color: transparent;
}
.row { --sep-in: 72px; }
.row + .row::before {
  content: "";
  position: absolute;
  top: 0; right: 0; left: var(--sep-in);
  height: 0.5px;
  background: var(--sep);
}
.row-plain { --sep-in: 16px; }
.row-dot { --sep-in: 38px; }
.row-plain .row-sub { white-space: normal; }
.row:active { background: var(--fill); }
@media (hover: hover) { .row:hover { background: var(--fill); } }

.row-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.row-title {
  font-size: 17px;
  line-height: 22px;
  letter-spacing: -.012em;
  color: var(--label);
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-title--action { color: var(--blue); }
.row-sub {
  font-size: 15px;
  line-height: 20px;
  letter-spacing: -.008em;
  color: var(--label-2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.row-detail {
  font-size: 15px;
  line-height: 20px;
  color: var(--label-2);
  flex: 0 0 auto;
}

.chev {
  width: 7px; height: 12px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--label-3);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tile {
  width: 44px; height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--r-tile);
  background: var(--tile-bg);
  box-shadow: inset 0 0 0 0.5px var(--tile-ring);
}
.tile img { width: 26px; height: 26px; object-fit: contain; }

/* status dots */
.dot {
  width: 10px; height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gray);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gray) 14%, transparent);
}
.dot-ok { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 15%, transparent); }
.dot-warn { background: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 15%, transparent); }
.dot-down { background: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 15%, transparent); }

.page-foot {
  margin: 34px 0 0;
  text-align: center;
  font-size: 12px;
  line-height: 16px;
  color: var(--label-2);
}

/* ═══════════ tab bar — compact width ═══════════ */
.tabbar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 25;
  display: flex;
  height: calc(49px + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--chrome);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--sep);
}
.tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding-top: 3px;
  font-size: 10px;
  line-height: 12px;
  font-weight: 500;
  letter-spacing: .004em;
  color: var(--gray);
  -webkit-tap-highlight-color: transparent;
}
.tab svg {
  width: 25px; height: 25px;
  fill: none; stroke: currentColor; stroke-width: 1.55;
  stroke-linecap: round; stroke-linejoin: round;
}
.tab[aria-current="page"] { color: var(--blue); }
.tab[aria-current="page"] svg { stroke-width: 1.8; }
.tab:active { opacity: .55; }

.tabbar-space { height: calc(49px + var(--safe-b) + 8px); }

@media (min-width: 900px) {
  .tabbar { display: none; }
  .tabbar-space { display: none; }
}

/* ═══════════ sheets ═══════════ */
.sheet {
  position: fixed;
  inset: auto 0 0 0;
  width: 100%;
  max-width: 100%;
  max-height: 88dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 38px 38px 0 0;
  background: var(--bg-elevated);
  color: var(--label);
  overflow: auto;
  overscroll-behavior: contain;
}
.sheet[open] { animation: sheet-up .42s var(--spring); }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

.sheet::backdrop {
  background: rgba(0, 0, 0, .34);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  animation: backdrop-in .3s ease;
}
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }

.grabber {
  width: 36px; height: 5px;
  margin: 8px auto 0;
  border-radius: 3px;
  background: var(--label-3);
}
.sheet-body { padding: 18px 20px calc(22px + var(--safe-b)); }

.sheet-title {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
  letter-spacing: -.018em;
}
.sheet-text {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 20px;
  letter-spacing: -.008em;
  color: var(--label-2);
}
.sheet-text.dim { color: var(--label-2); font-size: 13px; line-height: 18px; }

.sheet-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.btn {
  display: grid;
  place-items: center;
  min-height: 50px;
  padding: 0 18px;
  border-radius: var(--r-button);
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
  letter-spacing: -.012em;
  transition: opacity .12s ease, background .12s ease;
}
.btn:active { opacity: .65; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-secondary { background: var(--fill); color: var(--blue); }

@media (min-width: 900px) {
  .sheet {
    inset: 0;
    margin: auto;
    width: min(440px, calc(100% - 48px));
    height: fit-content;
    max-height: 80dvh;
    border-radius: 26px;
  }
  .sheet[open] { animation: sheet-pop .3s var(--spring); }
  @keyframes sheet-pop {
    from { transform: scale(.94); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }
  .grabber { display: none; }
  .sheet-body { padding: 22px 20px 20px; }
  .sheet--short { width: min(400px, calc(100% - 48px)); }
}

/* ─────────── reduced motion ─────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    transition-duration: .001s !important;
  }
}

/* ─────────── print / no-js sanity ─────────── */
@media (max-width: 380px) {
  .large-title { font-size: 30px; line-height: 36px; }
  .row-sub { white-space: normal; }
}


/* ═══════════ home: brand hero ═══════════ */
.hero { text-align: center; padding: 12px 0 6px; }
.hero-logo { width: 76px; height: auto; margin: 0 auto 14px; }
.hero-word {
  margin: 0;
  font-size: 12px;
  line-height: 15px;
  font-weight: 600;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--label-2);
}
.hero-word b { font-weight: 600; color: var(--label); }
.hero-sub { margin: 9px 0 0; font-size: 15px; line-height: 20px; color: var(--label-2); }

/* ═══════════ home: the grid ═══════════ */
.appgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 4px;
  padding: 8px 2px 4px;
  justify-items: center;
}
.appitem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
  font-size: 11px;
  line-height: 14px;
  letter-spacing: -.004em;
  color: var(--label);
  text-align: center;
}
.appitem span:last-child {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.appitem:active { opacity: .6; }
.apptile {
  width: 62px;
  height: 62px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--tile-bg);
  box-shadow: 0 0 0 0.5px var(--tile-ring), 0 1px 3px rgba(0, 0, 0, .07);
}
.apptile img { width: 36px; height: 36px; object-fit: contain; }
.apptile--glyph { background: var(--fill); box-shadow: none; }
.app-glyph {
  width: 28px; height: 28px;
  fill: none; stroke: var(--blue); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ═══════════ home: widget ═══════════ */
.widget {
  display: block;
  padding: 16px 18px 14px;
  border-radius: 24px;
  background: var(--bg-elevated);
  box-shadow: 0 0 0 0.5px var(--tile-ring);
}
.widget:active { background: var(--fill); }
.widget-k { display: block; font-size: 13px; line-height: 18px; color: var(--label-2); }
.widget-figures { display: flex; gap: 30px; margin: 6px 0 10px; }
.widget-figures > span { display: flex; flex-direction: column; }
.figure-n {
  font-size: 30px;
  line-height: 34px;
  font-weight: 700;
  letter-spacing: -.028em;
  font-variant-numeric: tabular-nums;
}
.figure-l { font-size: 12px; line-height: 15px; color: var(--label-2); }
.widget-foot { font-size: 12px; line-height: 16px; color: var(--label-2); }

/* ═══════════ monograms, badges ═══════════ */
.mono {
  width: 44px; height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 16px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -.01em;
  color: #fff;
}
.mono-blue { background: #007AFF; }
.mono-indigo { background: #5856D6; }
.mono-teal { background: #30B0C7; }
.mono-green { background: #34C759; }
.mono-orange { background: #FF9500; }
.mono-pink { background: #FF2D55; }
.mono-purple { background: #AF52DE; }
.mono-gray { background: #8E8E93; }

.badge {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--fill);
  font-size: 11px;
  line-height: 15px;
  font-weight: 600;
  color: var(--label-2);
}

/* ═══════════ segmented control ═══════════ */
.card--pad { padding: 10px 12px; }
.segmented {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  background: var(--fill);
}
.segmented button {
  flex: 1 1 0;
  height: 32px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--label);
  transition: background .15s ease, box-shadow .15s ease;
}
.segmented button[aria-pressed="true"] {
  background: var(--bg-elevated);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .14);
}
.segmented button:active { opacity: .7; }

#serviceFilter { margin: 0 0 24px; }
.group[hidden] { display: none; }

/* the app grid gets a wider row where there is room */
@media (min-width: 900px) {
  .appgrid { grid-template-columns: repeat(7, 1fr); gap: 20px 8px; padding-top: 4px; }
  .hero { padding-top: 22px; }
  .hero-logo { width: 88px; }
}


/* ══════════════════════════════════════════════════════════════
   LIQUID GLASS
   The chrome sits above the content and refracts it: a real
   backdrop blur, a specular rim along the top edge, and a faint
   gradient sheen. Blur is spent on chrome only — bars, sheet,
   the one widget — never on every list card, because backdrop
   blur is the expensive part and content is meant to be opaque.
   ══════════════════════════════════════════════════════════════ */

:root {
  --glass: rgba(255, 255, 255, .56);
  --glass-strong: rgba(255, 255, 255, .72);
  --glass-rim: rgba(255, 255, 255, .85);
  --glass-sheen: rgba(255, 255, 255, .32);
  --card-bg: rgba(255, 255, 255, .84);
  --tile-glass: rgba(255, 255, 255, .74);
}
@media (prefers-color-scheme: dark) {
  :root {
    --glass: rgba(28, 28, 30, .52);
    --glass-strong: rgba(28, 28, 30, .74);
    --glass-rim: rgba(255, 255, 255, .10);
    --glass-sheen: rgba(255, 255, 255, .07);
    --card-bg: rgba(30, 30, 32, .78);
    --tile-glass: rgba(44, 44, 46, .68);
  }
}
html[data-theme="light"] {
  --glass: rgba(255, 255, 255, .56);
  --glass-strong: rgba(255, 255, 255, .72);
  --glass-rim: rgba(255, 255, 255, .85);
  --glass-sheen: rgba(255, 255, 255, .32);
  --card-bg: rgba(255, 255, 255, .84);
  --tile-glass: rgba(255, 255, 255, .74);
}
html[data-theme="dark"] {
  --glass: rgba(28, 28, 30, .52);
  --glass-strong: rgba(28, 28, 30, .74);
  --glass-rim: rgba(255, 255, 255, .10);
  --glass-sheen: rgba(255, 255, 255, .07);
  --card-bg: rgba(30, 30, 32, .78);
  --tile-glass: rgba(44, 44, 46, .68);
}

/* something for the glass to bend: a low, slow colour field
   that lives under everything and pools where the bar sits */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(58% 38% at 82% 106%, rgba(0, 122, 255, .16), transparent 72%),
    radial-gradient(52% 34% at 8% 102%, rgba(94, 92, 230, .13), transparent 72%),
    radial-gradient(46% 30% at 50% 62%, rgba(48, 176, 199, .07), transparent 70%);
}
@media (prefers-color-scheme: dark) {
  body::after {
    background:
      radial-gradient(58% 38% at 82% 106%, rgba(10, 132, 255, .26), transparent 72%),
      radial-gradient(52% 34% at 8% 102%, rgba(94, 92, 230, .22), transparent 72%),
      radial-gradient(46% 30% at 50% 62%, rgba(48, 176, 199, .10), transparent 70%);
  }
}
html[data-theme="dark"] body::after {
  background:
    radial-gradient(58% 38% at 82% 106%, rgba(10, 132, 255, .26), transparent 72%),
    radial-gradient(52% 34% at 8% 102%, rgba(94, 92, 230, .22), transparent 72%),
    radial-gradient(46% 30% at 50% 62%, rgba(48, 176, 199, .10), transparent 70%);
}
html[data-theme="light"] body::after {
  background:
    radial-gradient(58% 38% at 82% 106%, rgba(0, 122, 255, .16), transparent 72%),
    radial-gradient(52% 34% at 8% 102%, rgba(94, 92, 230, .13), transparent 72%),
    radial-gradient(46% 30% at 50% 62%, rgba(48, 176, 199, .07), transparent 70%);
}

/* ── the tab bar ── */
.tabbar {
  background: var(--glass);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  backdrop-filter: blur(30px) saturate(190%);
  border-top: 0;
  box-shadow: inset 0 1px 0 var(--glass-rim), 0 -0.5px 0 var(--sep);
  overflow: hidden;
  isolation: isolate;
}
.tabbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, var(--glass-sheen), rgba(255, 255, 255, 0) 62%);
}

/* ── the nav bar, once it is floating over content ── */
.is-scrolled .navbar {
  background: var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  box-shadow: inset 0 -1px 0 var(--glass-rim);
}
.is-scrolled .navbar::after {
  background: linear-gradient(90deg, transparent, var(--sep) 18%, var(--sep) 82%, transparent);
}

/* ── the sidebar ── */
@media (min-width: 900px) {
  .sidebar {
    background: var(--glass);
    -webkit-backdrop-filter: blur(34px) saturate(180%);
    backdrop-filter: blur(34px) saturate(180%);
    box-shadow: inset -1px 0 0 var(--glass-rim);
    border-inline-end: 0;
  }
}

/* ── cards: translucent, lit along the top edge, no blur ── */
.card {
  background: var(--card-bg);
  box-shadow:
    inset 0 0 0 0.5px var(--tile-ring),
    inset 0 1px 0 var(--glass-rim),
    0 1px 2px rgba(0, 0, 0, .04);
}

/* ── the one widget: a single blurred pane is affordable ── */
.widget {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    inset 0 0 0 0.5px var(--tile-ring),
    inset 0 1px 0 var(--glass-rim),
    0 2px 10px rgba(0, 0, 0, .05);
}

/* ── app tiles and the segmented thumb pick up the same light ── */
.apptile,
.tile {
  background: var(--tile-glass);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  box-shadow:
    inset 0 0 0 0.5px var(--tile-ring),
    inset 0 1px 0 var(--glass-rim),
    0 1px 3px rgba(0, 0, 0, .07);
}
.segmented button[aria-pressed="true"] {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(10px) saturate(170%);
  backdrop-filter: blur(10px) saturate(170%);
  box-shadow:
    inset 0 1px 0 var(--glass-rim),
    0 1px 3px rgba(0, 0, 0, .14);
}

/* ── sheets ── */
.sheet {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  backdrop-filter: blur(40px) saturate(180%);
  box-shadow:
    inset 0 1px 0 var(--glass-rim),
    0 -8px 40px rgba(0, 0, 0, .18);
}
.sheet::backdrop {
  background: rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(4px) saturate(120%);
  backdrop-filter: blur(4px) saturate(120%);
}

/* browsers without backdrop-filter get the old solid material, not mud */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(249, 249, 251, .96); --glass-strong: #fff; --card-bg: #fff; --tile-glass: #fff; }
  :root { }
  .tabbar, .is-scrolled .navbar, .sidebar, .widget, .sheet { background: var(--glass-strong); }
}
@media (prefers-color-scheme: dark) {
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    :root { --glass: rgba(22, 22, 23, .97); --glass-strong: #161617; --card-bg: #1C1C1E; --tile-glass: #2C2C2E; }
  }
}


/* ── the float: iOS 26 style capsule, so the material is visible
      on every side instead of only along one edge ── */
.tabbar {
  left: 12px;
  right: 12px;
  bottom: calc(8px + var(--safe-b));
  width: auto;
  height: 58px;
  padding: 0 6px;
  padding-bottom: 0;
  border-radius: 30px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(34px) saturate(200%);
  backdrop-filter: blur(34px) saturate(200%);
  box-shadow:
    inset 0 0 0 0.5px var(--glass-rim),
    inset 0 1px 0 var(--glass-rim),
    0 8px 28px rgba(0, 0, 0, .13),
    0 1px 2px rgba(0, 0, 0, .06);
}
.tabbar::before {
  border-radius: inherit;
  background: linear-gradient(180deg, var(--glass-sheen), rgba(255, 255, 255, 0) 58%);
}
.tab { gap: 3px; padding-top: 0; }
.tabbar-space { height: calc(58px + 8px + var(--safe-b) + 14px); }

/* the colour field the glass is sampling */
body::after {
  background:
    radial-gradient(70% 42% at 78% 104%, rgba(0, 122, 255, .30), transparent 70%),
    radial-gradient(64% 40% at 6% 100%, rgba(94, 92, 230, .26), transparent 72%),
    radial-gradient(52% 38% at 52% 12%, rgba(48, 176, 199, .14), transparent 72%),
    radial-gradient(44% 34% at 100% 40%, rgba(255, 45, 85, .10), transparent 74%);
}
html[data-theme="dark"] body::after {
  background:
    radial-gradient(70% 42% at 78% 104%, rgba(10, 132, 255, .42), transparent 70%),
    radial-gradient(64% 40% at 6% 100%, rgba(94, 92, 230, .34), transparent 72%),
    radial-gradient(52% 38% at 52% 12%, rgba(48, 176, 199, .16), transparent 72%),
    radial-gradient(44% 34% at 100% 40%, rgba(255, 45, 85, .14), transparent 74%);
}
@media (prefers-color-scheme: dark) {
  body::after {
    background:
      radial-gradient(70% 42% at 78% 104%, rgba(10, 132, 255, .42), transparent 70%),
      radial-gradient(64% 40% at 6% 100%, rgba(94, 92, 230, .34), transparent 72%),
      radial-gradient(52% 38% at 52% 12%, rgba(48, 176, 199, .16), transparent 72%),
      radial-gradient(44% 34% at 100% 40%, rgba(255, 45, 85, .14), transparent 74%);
  }
}
html[data-theme="light"] body::after {
  background:
    radial-gradient(70% 42% at 78% 104%, rgba(0, 122, 255, .30), transparent 70%),
    radial-gradient(64% 40% at 6% 100%, rgba(94, 92, 230, .26), transparent 72%),
    radial-gradient(52% 38% at 52% 12%, rgba(48, 176, 199, .14), transparent 72%),
    radial-gradient(44% 34% at 100% 40%, rgba(255, 45, 85, .10), transparent 74%);
}

/* tab labels sit on a moving material, so they get the darker secondary
   label colour rather than the mid-grey used for status dots */
.tab { color: var(--label-2); }
.tab[aria-current="page"] { color: var(--blue); }


/* ══════════════════════════════════════════════════════════════
   SETTINGS-GRADE ROWS
   iOS Settings is the reference: 20pt card inset, 52pt rows,
   29pt coloured glyph tiles with 7pt corners, grey trailing
   values, and section headers aligned to the card edge.
   ══════════════════════════════════════════════════════════════ */
.content { padding-inline: 20px; }
@media (min-width: 900px) { .content { padding-inline: 28px; } }

.group { margin-bottom: 35px; }
.group-title { padding-inline: 0; }
.group-foot { padding-inline: 0; }

.row {
  min-height: 52px;
  padding: 10px 16px;
  gap: 12px;
  --sep-in: 57px;            /* 16 + 29 tile + 12 gap */
}
.row-plain { --sep-in: 16px; }
.row-dot { --sep-in: 37px; }

.tile {
  width: 29px;
  height: 29px;
  border-radius: 7px;
}
.tile img { width: 18px; height: 18px; }

/* the Settings signature: a coloured square, a white glyph */
.icon-tile {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
.icon-tile svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tint-blue   { background: #0A84FF; }
.tint-green  { background: #30D158; }
.tint-teal   { background: #40C8E0; }
.tint-orange { background: #FF9F0A; }
.tint-red    { background: #FF453A; }
.tint-purple { background: #BF5AF2; }
.tint-grey   { background: #8E8E93; }

.row-value {
  flex: 0 0 auto;
  font-size: 17px;
  line-height: 22px;
  letter-spacing: -.012em;
  color: var(--label-2);
}
.row-title--action { color: var(--blue); }


/* ══════════════════════════════════════════════════════════════
   LIQUID GLASS — CORRECTED TO APPLE'S RULES
   HIG, Materials:
     · Liquid Glass is "a distinct functional layer for controls and
       navigation elements — like tab bars and sidebars — that floats
       above the content layer."
     · "Don't use Liquid Glass in the content layer … use standard
       materials for elements in the content layer."
     · "Use Liquid Glass effects sparingly."
   So: chrome is glass, content is opaque, and the material samples the
   page itself — not a decorative gradient invented to show it off.
   ══════════════════════════════════════════════════════════════ */

/* 1 · no painted colour field. The glass reads the content. */
body::after { content: none; }

/* 2 · content layer stays opaque (standard material). */
.card,
.widget,
.row,
.segmented button[aria-pressed="true"] {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.card {
  background: var(--bg-elevated);
  box-shadow: 0 0 0 0.5px var(--tile-ring);
}
.widget {
  background: var(--bg-elevated);
  box-shadow: 0 0 0 0.5px var(--tile-ring);
}
.tile,
.apptile:not(.apptile--glyph) {
  background: var(--tile-bg);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: inset 0 0 0 0.5px var(--tile-ring);
}
.segmented button[aria-pressed="true"] {
  background: var(--bg-elevated);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .14);
}

/* 3 · chrome: the regular variant — neutral tint, luminosity-adjusting
      blur, one specular edge. No hues. */
:root {
  --lg-tint: rgba(255, 255, 255, .60);
  --lg-edge: rgba(0, 0, 0, .07);
  --lg-lit: rgba(255, 255, 255, .90);
  --lg-sheen: rgba(255, 255, 255, .14);
  --lg-drop: 0 10px 26px -14px rgba(0, 0, 0, .30);
}
@media (prefers-color-scheme: dark) {
  :root {
    --lg-tint: rgba(28, 28, 30, .52);
    --lg-edge: rgba(255, 255, 255, .11);
    --lg-lit: rgba(255, 255, 255, .09);
    --lg-sheen: rgba(255, 255, 255, .07);
    --lg-drop: 0 12px 32px -16px rgba(0, 0, 0, .85);
  }
}
html[data-theme="light"] {
  --lg-tint: rgba(255, 255, 255, .60);
  --lg-edge: rgba(0, 0, 0, .07);
  --lg-lit: rgba(255, 255, 255, .90);
  --lg-sheen: rgba(255, 255, 255, .14);
  --lg-drop: 0 10px 26px -14px rgba(0, 0, 0, .30);
}
html[data-theme="dark"] {
  --lg-tint: rgba(28, 28, 30, .52);
  --lg-edge: rgba(255, 255, 255, .11);
  --lg-lit: rgba(255, 255, 255, .09);
  --lg-sheen: rgba(255, 255, 255, .07);
  --lg-drop: 0 12px 32px -16px rgba(0, 0, 0, .85);
}

.tabbar {
  background: var(--lg-tint);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow:
    inset 0 0 0 0.5px var(--lg-edge),
    inset 0 1px 0 var(--lg-lit),
    var(--lg-drop);
}
.tabbar::before {
  background: linear-gradient(180deg, var(--lg-sheen), rgba(255, 255, 255, 0) 46%);
}

.is-scrolled .navbar {
  background: var(--lg-tint);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: inset 0 -1px 0 var(--lg-edge);
}
.is-scrolled .navbar::after { background: none; }

@media (min-width: 900px) {
  .sidebar {
    background: var(--lg-tint);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
    backdrop-filter: blur(28px) saturate(150%);
    box-shadow: inset -1px 0 0 var(--lg-edge);
  }
}

/* sheets are content surfaces: solid, with the page dimmed behind them */
.sheet {
  background: var(--bg-elevated);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 0 0 0.5px var(--lg-edge), 0 -10px 40px rgba(0, 0, 0, .28);
}
.sheet::backdrop {
  background: rgba(0, 0, 0, .30);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}


/* 4 · restraint pass — Apple's tiles are flat, and the bar's shadow is a
      suggestion, not a drop. Gloss and long shadows are what make a
      glass imitation read as decoration rather than material. */
.icon-tile { box-shadow: none; }
.tile,
.apptile {
  box-shadow: inset 0 0 0 0.5px var(--tile-ring);
}
.tabbar {
  box-shadow:
    inset 0 0 0 0.5px var(--lg-edge),
    inset 0 1px 0 var(--lg-lit),
    0 6px 20px -14px rgba(0, 0, 0, .55);
}


/* ═══════════ request form, in the same list language ═══════════ */
.form-card { overflow: hidden; }
.field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 16px;
  cursor: text;
}
.field + .field::before {
  content: "";
  position: absolute;
  top: 0; right: 0; left: 16px;
  height: 0.5px;
  background: var(--sep);
}
.field-label {
  font-size: 13px;
  line-height: 18px;
  color: var(--label-2);
}
.field input {
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  font: inherit;
  font-size: 17px;
  line-height: 22px;
  letter-spacing: -.012em;
  color: var(--label);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.field input::placeholder { color: var(--label-2); }
.field input:focus { outline: none; }
.field .hint { font-size: 12px; line-height: 16px; color: var(--label-2); margin: 1px 0 0; }

.err {
  display: none;
  margin: 10px 0 0;
  padding-inline: 2px;
  font-size: 13px;
  line-height: 18px;
  color: var(--red);
}
.err.on { display: block; }

.btn-wrap { margin-top: 18px; }
#successState .status-box-sub { white-space: normal; }


/* ═══ Liquid Glass — Apple material spec, final pass ═══════════════
   HIG: glass is a functional layer (chrome only); one specular edge
   per surface; blur 20–30px; no gradient fill; never a painted
   backdrop. Glass here: nav bar once scrolled, tab bar, sidebar,
   chrome buttons. Cards, rows, widgets stay opaque. */

:root {
  --lg-tint: rgba(28, 28, 30, .58);
  --lg-edge: rgba(255, 255, 255, .12);
  --lg-lit: rgba(255, 255, 255, .16);
  --lg-drop: 0 10px 26px -14px rgba(0, 0, 0, .55);
  --seg-thumb: #636366;
}
:root[data-theme="light"] {
  --seg-thumb: #ffffff;
  --lg-tint: rgba(255, 255, 255, .68);
  --lg-edge: rgba(0, 0, 0, .08);
  --lg-lit: rgba(255, 255, 255, .95);
  --lg-drop: 0 10px 26px -14px rgba(0, 0, 0, .18);
}
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    --lg-tint: rgba(255, 255, 255, .68);
    --lg-edge: rgba(0, 0, 0, .08);
    --lg-lit: rgba(255, 255, 255, .95);
    --lg-drop: 0 10px 26px -14px rgba(0, 0, 0, .18);
    --seg-thumb: #ffffff;
  }
}

/* the bar is clear until content passes beneath it */
.navbar {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  transition: background-color .24s ease, box-shadow .24s ease;
}
.is-scrolled .navbar {
  background: var(--lg-tint);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  backdrop-filter: blur(26px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--lg-lit), inset 0 -0.5px 0 var(--lg-edge);
}

/* chrome buttons carry the material too — they float on the bar */
.nav-action {
  padding: 5px 12px;
  border-radius: 100px;
  background: var(--lg-sheen);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  backdrop-filter: blur(12px) saturate(150%);
  box-shadow: inset 0 0 0 .5px var(--lg-edge), inset 0 1px 0 var(--lg-lit);
  font-weight: 590;
}

/* tab bar: one specular edge, no gradient overlay, floating over content */
.tabbar {
  background: var(--lg-tint);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
  box-shadow: inset 0 0 0 .5px var(--lg-edge), inset 0 1px 0 var(--lg-lit), var(--lg-drop);
  transition: height .24s cubic-bezier(.32, .72, 0, 1), bottom .24s cubic-bezier(.32, .72, 0, 1),
    border-radius .24s ease;
}
.tabbar::before { background: none; }
.tabbar span { transition: opacity .18s ease, transform .18s ease; }

/* The bar keeps one geometry. Resizing a backdrop-filtered element forces Safari
   to re-rasterise the blur and re-clip the radius every frame — that was the
   scroll glitch. Material stays static; only cheap properties animate. */

/* sidebar: glass panel, selection is a translucent capsule — not a blue block */
.sidebar {
  background: var(--lg-tint);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
  box-shadow: inset 0 0 0 .5px var(--lg-edge);
}
.side-item.is-on { background: rgba(120, 120, 128, .26); color: var(--label); font-weight: 590; }
.side-item.is-on svg { color: var(--blue); }
:root[data-theme="light"] .side-item.is-on { background: rgba(120, 120, 128, .16); }
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] .side-item.is-on { background: rgba(120, 120, 128, .16); }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .is-scrolled .navbar, .tabbar, .sidebar, .nav-action { background: var(--bg-elevated); }
}


/* ═══ pass 3 — the rest of the iOS surface ═══════════════════════════ */

/* the blurred bar owns a compositor layer, so scrolling never re-rasterises it */
.tabbar, .sidebar, .is-scrolled .navbar {
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
}

/* sheet presentation: the page behind recedes, as it does on iOS.
   :has() keeps it declarative — no JS state to fall out of sync.
   Only the pane and sidebar move; the tab bar is fixed chrome and stays put. */
.pane, .sidebar {
  transition: transform .32s cubic-bezier(.32,.72,0,1), filter .32s ease;
}
.pane { transform-origin: 50% 16%; }
.sidebar { transform-origin: 0 16%; }
body:has(dialog.sheet[open]) .pane { transform: scale(.968); filter: brightness(.88); }
body:has(dialog.sheet[open]) .sidebar { transform: scale(.968); filter: brightness(.88); }

/* content-layer rules from the HIG: opaque rows, full-bleed separators inset
   to the text edge, and a press state that reads on touch, not hover */
.row, .apptile, .tab, .side-item { -webkit-tap-highlight-color: transparent; }
.row:active { background: var(--fill-press); }
@media (hover: hover) { .row:hover { background: var(--fill); } }

/* segmented control: iOS proportions — 9pt container, 7pt thumb, 32pt tall */
.segmented { border-radius: 9px; }
.segmented button { border-radius: 7px; }
.segmented button[aria-pressed="true"] {
  background: var(--seg-thumb) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.16), 0 0 0 .5px rgba(0,0,0,.04) !important;
}
:root[data-theme="dark"] .segmented button[aria-pressed="true"] { background: #636366 !important; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .segmented button[aria-pressed="true"] { background: #636366 !important; }
}

/* respect the system setting — Apple's own apps honour it everywhere */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
