/*
 * 4050 Fit — the redesigned screens (design/app-redesign/).
 * Sizes are in rem against a 17px root, so the text-size control (which
 * changes the root size) scales every screen at once.
 */
:root {
  --ink: #14182B;
  --ground: #F2F4F7;
  --surface: #FFFFFF;
  --muted: #555D70;
  --muted-on-tint: #4A4F5E;
  --line: #D5DAE3;
  --control: #8A93A6;
  --accent: #C2480A;
  --accent-tint: #FBE6D8;
  --on-dark: #C8CEDD;
  --on-dark-label: #FFB27A;
  --nav-dark: #D5DAE6;
  --panel-dark: #232842;
  --rule-dark: #3A4060;
  --ok: #1B6B3C;
  --ok-bg: #E6F3EB;
  --note: #5C3300;
  --note-bg: #FFF1DC;
  --danger: #A3241B;
  --danger-bg: #FDECEA;
  --focus: #1D5FBF;
  --display: 'Archivo', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, sans-serif;
}

html { font-size: 17px; -webkit-text-size-adjust: 100%; }
html.txt-lg { font-size: 19px; }
html.txt-xl { font-size: 21px; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1rem/1.4 var(--body); }
a { color: var(--ink); }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--display); }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type ---------- */
.h1 { font: 800 1.65rem/1.1 var(--display); }
.h1-lg { font: 800 2.1rem/1.1 var(--display); }
.h2 { font: 700 1.5rem/1.15 var(--display); }
.h3 { font: 700 1.18rem/1.3 var(--display); }
.eyebrow { font: 700 0.76rem/1.3 var(--display); letter-spacing: 0.08em; text-transform: uppercase; }
.label-caps { font: 700 0.82rem/1.3 var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: 0.94rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; color: var(--muted); }
.strong { font-weight: 700; }
.center { text-align: center; }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.3rem; padding: 0 1.6rem; border: 0; border-radius: 12px;
  background: var(--accent); color: #FFFFFF; font: 700 1.1rem/1 var(--display);
  text-decoration: none; text-align: center; cursor: pointer;
}
.btn-block { display: flex; width: 100%; }
.btn-outline { background: var(--surface); color: var(--ink); border: 1.5px solid var(--control); min-height: 3.06rem; font-size: 1rem; }
.btn-on-dark { background: transparent; color: #FFFFFF; border: 1.5px solid var(--control); }
.btn-sm { min-height: 2.8rem; padding: 0 1.05rem; font-size: 0.94rem; }
.btn-dashed { background: var(--surface); color: var(--ink); border: 1.5px dashed var(--control); min-height: 2.6rem; font-size: 0.88rem; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
/* Hover only where there is a pointer: a phone keeps :hover on whatever was
   last tapped. Every light button needs its own rule, or it inherits the
   accent button's white text on a white background (as .btn-dashed did). */
@media (hover: hover) {
  .btn:hover { color: #FFFFFF; filter: brightness(0.95); }
  .btn-outline:hover, .btn-dashed:hover { color: var(--ink); background: #F7F8FA; filter: none; }
  .btn-on-dark:hover { color: #FFFFFF; }
}
.link-strong { min-height: 2.6rem; display: inline-flex; align-items: center; font-weight: 700; color: var(--ink); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--ink); text-decoration: underline; cursor: pointer; min-height: 2.6rem; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field > label, .legend { font-size: 0.88rem; font-weight: 700; }
.input {
  width: 100%; height: 3.06rem; padding: 0 0.85rem;
  border: 1.5px solid var(--control); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: 400 1.06rem/1 var(--body);
}
.input:focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.input[readonly] { background: #F7F8FA; }
.input.is-invalid { border-color: var(--danger); }
.hint { font-size: 0.82rem; color: var(--muted); }
.field-error { font-size: 0.88rem; font-weight: 700; color: var(--danger); }
.pw { position: relative; }
.pw .input { padding-right: 4.5rem; }
.pw-toggle {
  position: absolute; top: 4px; right: 4px; height: calc(100% - 8px); padding: 0 0.7rem;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink);
  font: 700 0.88rem/1 var(--display); cursor: pointer;
}
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.legend { padding: 0; margin-bottom: 0.5rem; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.choice {
  min-height: 4.95rem; display: flex; flex-direction: column; gap: 0.25rem; padding: 0.7rem;
  border: 1.5px solid var(--control); border-radius: 12px; background: var(--surface); cursor: pointer;
}
.choice.is-checked, .choice:has(input:checked) { border: 2px solid var(--accent); background: var(--accent-tint); }
.choice-title { display: flex; align-items: center; gap: 0.5rem; font: 700 1rem/1.2 var(--display); }
.choice input { width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--accent); }
.choice-desc { font-size: 0.82rem; color: var(--muted); }
.choice.is-checked .choice-desc, .choice:has(input:checked) .choice-desc { color: var(--muted-on-tint); }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- messages ---------- */
.alert { padding: 0.75rem 0.85rem; border-radius: 12px; font-size: 0.9rem; }
.alert-note { background: var(--note-bg); color: var(--note); }
.alert-ok { background: var(--ok-bg); color: var(--ok); font-weight: 700; }
.alert-error { background: var(--danger-bg); color: var(--danger); font-weight: 700; }
.alert-staging { background: #E8EEFA; color: #1A3E7A; border: 1px dashed #1D5FBF; }
.alert-staging a { color: #1A3E7A; word-break: break-all; }
.alert-row { display: flex; align-items: flex-start; gap: 0.6rem; }
.alert-row svg { flex: none; margin-top: 1px; }

/* ---------- auth pages (sign up, log in, invites) ---------- */
.auth-top {
  height: 3.55rem; display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.2rem; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { font: 800 1.3rem/1 var(--display); color: var(--ink); text-decoration: none; }
/* The 4050 Fit logo (assets/images/brand): white letters on navy, dark letters on white. */
.brand-logo { display: inline-flex; align-items: center; }
.brand-logo img { display: block; width: auto; height: 2.1rem; }
.invite-brand { display: block; width: auto; height: 1.6rem; margin-left: auto; flex: none; }
.auth-top .link-strong { font-family: var(--display); font-size: 0.94rem; }
.auth-main { max-width: 27rem; margin: 0 auto; padding: 1.2rem 1.2rem 2.4rem; display: flex; flex-direction: column; gap: 0.95rem; }
.auth-main.is-centered { padding-top: 2.6rem; align-items: center; text-align: center; }
.auth-head { display: flex; flex-direction: column; gap: 0.25rem; }
.auth-icon { width: 5.2rem; height: 5.2rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-tint); color: var(--accent); }
.auth-divider { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.4rem; font-size: 0.88rem; color: var(--muted); }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-foot { padding: 0.95rem 1.4rem 1.6rem; text-align: center; font-size: 0.82rem; color: var(--muted); }
.invite-top { display: flex; align-items: center; gap: 0.85rem; padding: 1.2rem; background: var(--ink); color: #FFFFFF; }
.invite-logo { width: 3.3rem; height: 3.3rem; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: #FFFFFF; color: var(--ink); font: 800 1.18rem/1 var(--display); overflow: hidden; }
.invite-logo img { width: 100%; height: 100%; object-fit: contain; }
.invite-name { font: 700 1.12rem/1.2 var(--display); }
.invite-sub { font-size: 0.88rem; color: var(--on-dark); }
.readout { padding: 0.7rem 0.85rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 0.1rem; }

/* ---------- app shell ---------- */
.shell { min-height: 100vh; display: flex; }
.sidebar { flex: 0 0 15rem; padding: 1.4rem 0.95rem; display: flex; flex-direction: column; gap: 1.4rem; background: var(--ink); color: #FFFFFF; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-brand { padding: 0 0.7rem; display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar-brand .brand { color: #FFFFFF; font-size: 1.41rem; }
.sidebar-brand .brand-logo { align-self: flex-start; }
.sidebar-brand .brand-logo img { height: 2.55rem; }
.side-coach { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.55rem; min-width: 0; }
.coach-mark { flex: none; width: 2.6rem; height: 2.6rem; padding: 0.2rem; border-radius: 10px; background: #FFFFFF; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.coach-mark img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sidebar-sub { font-size: 0.88rem; color: var(--nav-dark); }
.side-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.side-nav a { min-height: 2.82rem; display: flex; align-items: center; gap: 0.7rem; padding: 0 0.7rem; border-radius: 10px; color: var(--nav-dark); font: 600 1rem/1 var(--display); text-decoration: none; }
.side-nav a:hover { background: rgba(255,255,255,0.08); color: #FFFFFF; }
.side-nav a[aria-current="page"] { background: #FFFFFF; color: var(--ink); font-weight: 700; }
.side-box { margin-top: auto; padding: 0.85rem 0.7rem; border-radius: 12px; background: var(--panel-dark); display: flex; flex-direction: column; gap: 0.35rem; }
.side-box a { color: #FFFFFF; font-weight: 700; min-height: 2.6rem; display: inline-flex; align-items: center; }
.meter { height: 8px; border-radius: 4px; background: var(--rule-dark); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 4px; background: var(--on-dark-label); }
.textsize { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0 0.7rem; }
.textsize-label { font-size: 0.88rem; color: var(--nav-dark); }
.textsize-buttons { display: flex; gap: 0.35rem; }
.textsize button { width: 2.6rem; height: 2.6rem; border: 1.5px solid var(--control); border-radius: 10px; background: transparent; color: #FFFFFF; font: 700 0.82rem/1 var(--display); cursor: pointer; }
.textsize button + button { font-size: 1.18rem; }
.sidebar form { margin: 0; }
.side-logout { width: 100%; min-height: 2.6rem; padding: 0 0.7rem; border: 0; border-radius: 10px; background: transparent; color: var(--nav-dark); font: 600 0.94rem/1 var(--display); text-align: left; cursor: pointer; }
.side-logout:hover { color: #FFFFFF; }

.content { flex: 1; min-width: 0; padding: 1.65rem clamp(1rem, 4vw, 2.4rem) 2.4rem; }
.content-inner { max-width: 61rem; display: flex; flex-direction: column; gap: 1.4rem; }

.mobile-top { display: none; }
.bottom-nav { display: none; }

@media (max-width: 899.98px) {
  .sidebar { display: none; }
  .shell { flex-direction: column; }
  .mobile-top {
    display: flex; position: sticky; top: 0; z-index: 5; height: 3.75rem; align-items: center; justify-content: space-between; gap: 0.6rem;
    padding: 0 1.2rem; background: var(--surface); border-bottom: 1px solid var(--line);
  }
  .mobile-top-title { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
  .mobile-top-title .eyebrow { color: var(--muted); font-size: 0.7rem; }
  .mobile-logo { display: block; width: auto; height: 1.2rem; align-self: flex-start; }
  .mobile-brand { display: flex; align-items: center; gap: 0.45rem; }
  .mobile-top-end { display: flex; align-items: center; gap: 0.5rem; flex: none; }
  .mobile-top .coach-mark { border: 1px solid var(--line); }
  .mobile-top-title .h1 { font-size: 1.41rem; }
  .aa-btn { min-width: 3.05rem; height: 2.6rem; border: 1.5px solid var(--control); border-radius: 10px; background: var(--surface); color: var(--ink); font: 700 1rem/1 var(--display); cursor: pointer; }
  .content { padding: 1rem 1.2rem 6.5rem; }
  .bottom-nav {
    display: grid; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; min-height: 4.45rem;
    grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font: 600 0.76rem/1.2 var(--display); text-decoration: none; }
  .bottom-nav a .pill { width: 3.3rem; height: 1.76rem; display: flex; align-items: center; justify-content: center; border-radius: 1rem; }
  .bottom-nav a[aria-current="page"] { color: var(--accent); font-weight: 700; }
  .bottom-nav a[aria-current="page"] .pill { background: var(--accent-tint); }
  .desktop-only { display: none !important; }
}
@media (min-width: 900px) { .mobile-only { display: none !important; } }

/* ---------- cards & layout helpers ---------- */
.card { padding: 1.3rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 0.7rem; }
.card-dark { padding: 1.65rem; border-radius: 18px; background: var(--ink); color: #FFFFFF; display: flex; flex-direction: column; gap: 0.85rem; }
.card-dark .eyebrow { color: var(--on-dark-label); }
.card-dark p { color: var(--on-dark); }
.card-dark label { color: #FFFFFF; }
.cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.4rem; }
.col-main { flex: 2 1 25rem; min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
.col-side { flex: 1 1 17.5rem; min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem; }
.grow { flex: 1 1 15rem; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 0.6rem; }
.split { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.step { display: flex; gap: 0.95rem; }
.step-num { width: 2.1rem; height: 2.1rem; flex: none; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--control); border-radius: 50%; font: 700 0.94rem/1 var(--display); }
.step-num.is-done { background: var(--ok); border-color: var(--ok); color: #FFFFFF; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; text-align: center; padding: 0.4rem 0; }
.empty-icon { width: 3.75rem; height: 3.75rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--ground); color: var(--muted); }
.logo-slot { width: 3.75rem; height: 3.75rem; flex: none; display: flex; align-items: center; justify-content: center; border: 1.5px dashed var(--control); border-radius: 12px; color: var(--muted); font: 800 1.06rem/1 var(--display); overflow: hidden; }
.logo-slot img { width: 100%; height: 100%; object-fit: contain; }
.badge { align-self: flex-start; padding: 0.35rem 0.6rem; border-radius: 999px; background: var(--ground); color: var(--ink); font: 700 0.76rem/1.2 var(--display); }
.badge-accent { background: var(--accent-tint); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-wait { background: var(--note-bg); color: var(--note); }

/* client list */
.list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.list > li { min-height: 3.75rem; display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list-main { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.list-main .strong { overflow-wrap: anywhere; }
.list-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-end; }
.list-actions form { margin: 0; }

/* plans */
.toggle { align-self: flex-start; display: inline-grid; grid-auto-flow: column; gap: 0.35rem; padding: 4px; border-radius: 12px; background: #DDE1E9; }
.toggle button { min-height: 2.6rem; padding: 0 1.2rem; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font: 600 0.94rem/1 var(--display); cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; font-weight: 700; }
.plans { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.plan { flex: 1 1 17.5rem; min-width: 0; padding: 1.55rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); display: flex; flex-direction: column; gap: 0.6rem; }
.plan.is-featured { border: 2px solid var(--accent); }
.plan-price { display: flex; align-items: baseline; gap: 0.35rem; }
.plan-price .amount { font: 800 2.8rem/1 var(--display); }
.plan form { margin: 0.45rem 0 0; }
.plan-action { margin-top: auto; padding-top: 0.45rem; }
.plan-action form { margin: 0; }
.checks { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.6rem 1.4rem; }
.checks li { display: flex; align-items: flex-start; gap: 0.6rem; }
.checks svg { flex: none; margin-top: 2px; }

/* ---------- programs (library, preview, builder) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { min-height: 2.6rem; display: inline-flex; align-items: center; padding: 0 0.85rem; border: 1.5px solid var(--control); border-radius: 999px; background: var(--surface); color: var(--ink); font: 700 0.88rem/1 var(--display); text-decoration: none; cursor: pointer; }
.chip[aria-current="true"], .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.prog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.7rem; }
.prog-card { display: flex; align-items: center; gap: 0.7rem; padding: 1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-decoration: none; }
.prog-card:hover { border-color: var(--control); }
.prog-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.prog-card-name { font: 700 1.18rem/1.2 var(--display); overflow-wrap: anywhere; }
.prog-card svg { flex: none; color: var(--muted); }
.day-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.day-list li { min-height: 2.85rem; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.4rem 0.95rem; border-top: 1px solid var(--line); }
.day-list li:first-child { border-top: 0; }
.day-list .small { white-space: nowrap; }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.meta-pill { padding: 0.3rem 0.6rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: 700 0.88rem/1.2 var(--body); }
.danger-link { color: var(--danger); }
@media (max-width: 899.98px) { .first-on-phone { order: -1; } }

.bday-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.bday-head .h3 { font-size: 1.3rem; margin-right: 0.2rem; }
.bday-head .input { flex: 1 1 12rem; min-width: 0; }
.icon-btn { width: 2.6rem; height: 2.6rem; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 700 1.06rem/1 var(--display); cursor: pointer; }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn.is-danger { border-color: transparent; color: var(--danger); font-size: 1.4rem; }
.bx-list { display: flex; flex-direction: column; gap: 0.5rem; }
.bx { padding: 0.5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 0.3rem; }
.bx-name { height: 2.85rem; font-weight: 700; }
.bx-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.35rem; }
.bx-toggle { flex: 1; min-width: 0; min-height: 2.6rem; display: flex; align-items: center; gap: 0.4rem; padding: 0 0.3rem; border: 0; background: transparent; color: var(--muted); font: 400 0.88rem/1.2 var(--body); text-align: left; cursor: pointer; }
.bx-toggle::before { content: "▸"; font-size: 0.8rem; }
.bx-toggle[aria-expanded="true"]::before { content: "▾"; }
.bx-tools { display: flex; gap: 0.3rem; flex: none; }
.bx-settings { display: flex; flex-direction: column; gap: 0.7rem; padding: 0.3rem 0.3rem 0.5rem; }
.goal-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.goal-row .field { margin: 0; }
.bday-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.bday-foot .link-btn { margin-left: auto; }
.seg { align-self: flex-start; display: inline-grid; grid-auto-flow: column; border: 1.5px solid var(--control); border-radius: 10px; overflow: hidden; }
.seg label { min-height: 2.6rem; display: flex; align-items: center; padding: 0 0.95rem; font: 700 0.94rem/1 var(--display); cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label:has(input:checked) { background: var(--ink); color: #FFFFFF; }
.seg label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: -3px; }
.check { min-height: 2.6rem; display: flex; align-items: center; gap: 0.6rem; font-weight: 700; }
.check input { width: 1.3rem; height: 1.3rem; margin: 0; accent-color: var(--accent); }
.badd { display: flex; flex-direction: column; gap: 0.3rem; padding-top: 0.5rem; border-top: 1px solid var(--line); }
.badd-row { display: flex; gap: 0.5rem; }
.badd-row .input { flex: 1; min-width: 0; }
.radio { min-height: 2.6rem; display: flex; align-items: center; gap: 0.6rem; font-weight: 700; }
.radio input { width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--accent); }
.howto summary { display: inline-flex; align-items: center; min-height: 2.4rem; font-weight: 700; text-decoration: underline; cursor: pointer; }
.howto p { margin: 0.2rem 0 0; white-space: pre-line; }

/* ---------- admin (2026-10 redesign) ---------- */
.admin-tabs { display: none; }
@media (max-width: 899.98px) {
  .admin-tabs {
    display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.6rem 1.2rem;
    background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 3.75rem; z-index: 4;
  }
  .admin-tabs a { flex: none; min-height: 2.4rem; display: inline-flex; align-items: center; padding: 0 0.85rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); font: 600 0.88rem/1 var(--display); text-decoration: none; }
  .admin-tabs a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
  .is-admin .content { padding-bottom: 2.4rem; }
}
.is-admin .content-inner { max-width: 72rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 0.8rem; }
.stat { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 0.25rem; text-decoration: none; color: var(--ink); }
.stat .num { font: 800 1.9rem/1 var(--display); font-variant-numeric: tabular-nums; }
.stat .lbl { font-size: 0.88rem; color: var(--muted); }
a.stat:focus-visible { outline: 3px solid var(--focus); }
@media (hover: hover) { a.stat:hover { border-color: var(--control); } }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.tbl th { text-align: left; font: 700 0.76rem/1.2 var(--display); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding: 0.7rem 0.9rem; background: #F7F8FA; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 0.7rem 0.9rem; border-top: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr:first-child td { border-top: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td.sub { font-size: 0.82rem; color: var(--muted); }
.tbl .who { display: flex; flex-direction: column; gap: 0.1rem; min-width: 12rem; }
.tbl .who a { font-weight: 700; }
.tbl .who span { font-size: 0.82rem; color: var(--muted); overflow-wrap: anywhere; }
.pill-s { display: inline-flex; align-items: center; padding: 0.2rem 0.55rem; border: 1px solid var(--line); border-radius: 999px; font: 700 0.76rem/1.2 var(--display); white-space: nowrap; background: var(--surface); color: var(--ink); }
.pill-s.ok, .pill-s.wait, .pill-s.bad, .pill-s.info { border-color: transparent; }
.pill-s.ok { background: var(--ok-bg); color: var(--ok); }
.pill-s.wait { background: var(--note-bg); color: var(--note); }
.pill-s.bad { background: var(--danger-bg); color: var(--danger); }
.pill-s.info { background: #E3EDFA; color: #17457E; }
.filters, .card.filters { display: flex; flex-direction: row; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; }
.filters .field { flex: 1 1 10rem; min-width: 0; }
.filters .field.grow { flex: 2 1 16rem; }
select.input { appearance: auto; padding-right: 0.5rem; }
textarea.input { height: auto; min-height: 5rem; padding: 0.6rem 0.85rem; line-height: 1.4; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; margin: 0; font-size: 0.94rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.two-col > div { display: flex; flex-direction: column; gap: 1.2rem; min-width: 0; }
@media (max-width: 899.98px) { .two-col { grid-template-columns: 1fr; } }
.action-list { display: flex; flex-direction: column; }
.action-list details { border-top: 1px solid var(--line); }
.action-list details:first-of-type { border-top: 0; }
.action-list summary { min-height: 2.9rem; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; font-weight: 700; cursor: pointer; list-style: none; }
.action-list summary::-webkit-details-marker { display: none; }
.action-list summary::after { content: "+"; font: 700 1.2rem/1 var(--display); color: var(--muted); }
.action-list details[open] summary::after { content: "\2212"; }
.action-list form, .action-list .act-body { display: flex; flex-direction: column; gap: 0.6rem; padding: 0 0 1rem; margin: 0; }
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.history li { padding: 0.6rem 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.1rem; }
.history li:first-child { border-top: 0; }
.needs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.needs li { min-height: 3.2rem; padding: 0.55rem 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.needs li:first-child { border-top: 0; }
.btn-danger-outline { background: var(--surface); color: var(--danger); border: 1.5px solid var(--danger); min-height: 2.8rem; font-size: 0.94rem; }
@media (hover: hover) { .btn-danger-outline:hover { color: var(--danger); background: var(--danger-bg); filter: none; } }
.avatar { width: 4.2rem; height: 4.2rem; flex: none; border-radius: 50%; background: var(--accent-tint); color: var(--accent); display: flex; align-items: center; justify-content: center; font: 800 1.4rem/1 var(--display); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- pay buttons (partials/pay-buttons): card through Stripe, then PayPal ---------- */
.pay-buttons { display: flex; flex-direction: column; gap: 0.5rem; margin: 0; }
.pay-label { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 0.55rem 0; }
.pay-sub { font: 400 0.8rem/1.2 var(--body); opacity: 0.92; }
/* A key-value list in a narrow column: each label above its value. */
.kv.kv-stack { display: flex; flex-direction: column; gap: 0.1rem; }
.kv.kv-stack dt { margin-top: 0.55rem; }
.kv.kv-stack dd { margin: 0; overflow-wrap: anywhere; }
