/* CPOTrack — the pages around the app: home, sign-in, sign-up, password reset, account,
   seats & members. Built on the tokens and base in styles.css (same colours, same type,
   same light/dark switch), so the whole product reads as one thing. Solid surfaces and
   hairlines, no glass, no gradients on interaction. */

/* A red for text and icons that reads on both themes (4.5:1 or more). Buttons and toasts
   keep the solid #b42318 behind white text. */
:root { --bad: #b42318; --bad-bg: #fdecea; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bad: #f87171; --bad-bg: #2a1618; } }
:root[data-theme="dark"] { --bad: #f87171; --bad-bg: #2a1618; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 9px; font: 600 14.5px var(--sans); white-space: nowrap; border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s, opacity .15s; }
.btn .ic { width: 17px; height: 17px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 8px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 15.5px; border-radius: 10px; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { opacity: .9; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--faint); }
.btn-quiet { background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--sunk); color: var(--ink); }
.btn-danger { background: #b42318; color: #fff; }
.btn-danger:hover { opacity: .9; }
.btn-gold { background: var(--gold); color: #fff; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--bg) var(--bg) transparent transparent; animation: spin .7s linear infinite; }
.btn-ghost.busy::after { border-color: var(--ink) var(--ink) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.linkbtn { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------------------------------------------------------------- public header */
body.site { min-height: 100vh; display: flex; flex-direction: column; }
.site-top { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.site-top-inner { max-width: 1240px; margin: 0 auto; height: 64px; display: flex; align-items: center; gap: 26px; padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left)); }
.site-nav { display: flex; gap: 2px; }
.site-nav a { height: 36px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px; color: var(--muted); font: 500 14px var(--sans); }
.site-nav a:hover { color: var(--ink); background: var(--sunk); }
.site-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.site-main { flex: 1; }

/* ---------------------------------------------------------------- account menu */
.acct { position: relative; }
.acct-btn { height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 0 8px 0 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font: 600 13.5px var(--sans); color: var(--ink); }
.acct-btn:hover { border-color: var(--faint); }
.acct-btn .ic { width: 15px; height: 15px; color: var(--muted); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--ink); color: var(--bg); font: 700 12px var(--sans); letter-spacing: .02em; flex: none; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 270px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); }
.acct-menu a, .acct-menu button { width: 100%; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border-radius: 8px; font: 500 14px var(--sans); color: var(--ink-2); text-align: left; }
.acct-menu a:hover, .acct-menu button:hover, .acct-menu a:focus-visible, .acct-menu button:focus-visible { background: var(--sunk); color: var(--ink); outline: none; }
.acct-menu .ic { color: var(--muted); }
.acct-menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 6px 4px; }
.acct-head { display: flex; gap: 11px; align-items: center; padding: 10px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); }
.acct-head strong { display: block; font: 650 14px var(--sans); }
.acct-head .acct-role { margin-top: 3px; color: var(--gold); font-weight: 600; }
.acct-head small { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }

/* ---------------------------------------------------------------- toast */
#toasts { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 10px; background: var(--ink); color: var(--bg); font: 600 13.5px var(--sans); box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.toast.in { opacity: 1; transform: none; }
.toast .ic { width: 16px; height: 16px; }
.toast.err { background: #b42318; color: #fff; }

/* ---------------------------------------------------------------- forms */
/* One column that may shrink: a field's own width never widens the page on a phone. */
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; }
.field > label, .field > .label { font: 600 13.5px var(--sans); color: var(--ink); }
.field .opt { font-weight: 500; color: var(--muted); }
.input { position: relative; display: flex; align-items: center; height: 48px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input > .ic { margin-left: 14px; color: var(--muted); }
.input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; padding: 0 14px 0 10px; font: 500 15px var(--sans); color: var(--ink); }
.input input::placeholder { color: var(--faint); font-weight: 400; }
.input input:disabled { color: var(--muted); }
.reveal { width: 40px; height: 40px; margin-right: 4px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.reveal:hover { background: var(--sunk); color: var(--ink); }
.reveal[aria-pressed="true"] { color: var(--accent); }
.hint { font-size: 12.5px; color: var(--muted); }
.meter { display: flex; gap: 4px; margin-top: 2px; }
.meter i { flex: 1; height: 4px; border-radius: 99px; background: var(--line); transition: background .2s; }
.meter[data-s="1"] i:nth-child(-n+1) { background: #c2410c; }
.meter[data-s="2"] i:nth-child(-n+2) { background: #b45309; }
.meter[data-s="3"] i:nth-child(-n+3) { background: #15803d; }
.meter[data-s="4"] i { background: #15803d; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.check a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 13.5px; line-height: 1.5; border: 1px solid; }
.alert .ic { width: 18px; height: 18px; margin-top: 1px; }
.alert.err { background: var(--bad-bg); border-color: var(--bad); color: var(--ink); }
.alert.err .ic { color: var(--bad); }
@supports (background: color-mix(in srgb, red 50%, blue)) { .alert.err { background: color-mix(in srgb, var(--bad) 8%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 35%, transparent); } }
.alert.ok { background: var(--good-bg); border-color: var(--good); color: var(--ink); }
@supports (background: color-mix(in srgb, red 50%, blue)) { .alert.ok { border-color: color-mix(in srgb, var(--good) 35%, transparent); } }
.alert.ok .ic { color: var(--good); }
.alert.info { background: var(--accent-soft); border-color: var(--line); color: var(--ink); }
@supports (background: color-mix(in srgb, red 50%, blue)) { .alert.info { border-color: color-mix(in srgb, var(--accent) 25%, transparent); } }
.alert.info .ic { color: var(--accent); }

/* ---------------------------------------------------------------- auth pages */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100vh - 64px); }
.auth-main { display: grid; place-items: center; padding: 48px 24px; }
.auth-card { width: min(420px, 100%); }
.auth-card h1 { margin: 0 0 8px; font: 700 30px/1.15 var(--sans); letter-spacing: -.03em; }
.auth-card .sub { margin: 0 0 26px; color: var(--muted); font-size: 15px; }
.auth-foot { margin-top: 22px; font-size: 14px; color: var(--muted); text-align: center; }
.auth-foot a { color: var(--ink); font-weight: 600; }
.auth-aside { position: relative; background: #0b1220; color: #e7ecf2; padding: 56px 56px 48px; display: flex; flex-direction: column; justify-content: center; gap: 28px; overflow: hidden; }
.auth-aside h2 { margin: 0; font: 700 30px/1.2 var(--sans); letter-spacing: -.03em; max-width: 18ch; }
.auth-aside p { margin: 0; color: #a9b6c7; font-size: 15px; line-height: 1.6; max-width: 46ch; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: #d4dce6; line-height: 1.5; }
.ticks .ic { width: 18px; height: 18px; color: #c9a46a; margin-top: 2px; }
.ticks strong { color: #fff; font-weight: 600; }
.mini-board { background: #111a2b; border: 1px solid #22314a; border-radius: 14px; padding: 18px; max-width: 440px; }
.mini-board .mb-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.mini-board .mb-head b { font: 700 16px var(--sans); color: #fff; }
.mini-board .mb-head span { font: 600 12px var(--sans); color: #8796ab; }
.mb-row { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid #1d2a40; font-size: 13.5px; color: #c0cad6; }
.mb-row:first-of-type { border-top: 0; }
.mb-row b { color: #fff; font-variant-numeric: tabular-nums; }
.mb-row.best b { color: #4ade80; }
.mb-row .sw { width: 18px; height: 18px; border-radius: 50%; background: #fff; object-fit: cover; }
.aside-show { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 30px; align-items: center; }
.aside-phone { background: #000; border-radius: 30px; padding: 7px; box-shadow: inset 0 0 0 1.5px #2c313a, 0 30px 60px -20px rgba(0, 0, 0, .7); }
.aside-phone img { display: block; width: 100%; height: auto; aspect-ratio: 390 / 720; object-fit: cover; object-position: top center; border-radius: 24px; }
@media (max-width: 1180px) { .aside-show { grid-template-columns: minmax(0, 1fr); } .aside-phone { display: none; } }
.inbox { text-align: center; }
.inbox .big-ic { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.inbox .big-ic .ic { width: 30px; height: 30px; }

/* ---------------------------------------------------------------- blocked */
.blocked { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.blocked-card { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px; box-shadow: var(--shadow-md); }
.blocked-card h1 { margin: 26px 0 8px; font: 700 24px var(--sans); }
.blocked-card p { margin: 0 0 22px; color: var(--ink-2); line-height: 1.6; }

/* ---------------------------------------------------------------- terms and privacy */
.legal { padding: 44px 24px 64px; }
.legal-doc { max-width: 700px; margin: 0 auto; color: var(--ink-2); font-size: 15.5px; line-height: 1.7; }
.legal-doc h1 { margin: 0 0 6px; font: 700 32px/1.15 var(--sans); letter-spacing: -.03em; color: var(--ink); }
.legal-date { margin: 0 0 30px; color: var(--muted); font-size: 14px; }
.legal-doc h2 { margin: 34px 0 10px; font: 650 18px/1.3 var(--sans); letter-spacing: -.01em; color: var(--ink); }
.legal-doc p { margin: 0 0 14px; }
.legal-doc ul { margin: 0 0 14px; padding-left: 20px; }
.legal-doc li { margin: 0 0 8px; }
.legal-doc strong { color: var(--ink); font-weight: 600; }
.legal-doc a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.legal-foot { border-top: 1px solid var(--line); background: var(--surface); }
.legal-foot-inner { max-width: 700px; margin: 0 auto; padding: 22px 24px 30px; display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; font-size: 13px; color: var(--muted); }
.legal-foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.legal-foot a { color: var(--ink-2); }
.legal-foot a:hover { color: var(--ink); }
@media (max-width: 760px) {
  .legal { padding: 30px 16px 48px; }
  .legal-doc h1 { font-size: 27px; }
  .legal-foot-inner { padding-left: 16px; padding-right: 16px; }
}

/* ---------------------------------------------------------------- public reference pages (seo.py) */
.ref-page { padding: 36px 24px 72px; }
.ref-doc { max-width: 820px; margin: 0 auto; color: var(--ink-2); font-size: 15.5px; line-height: 1.65; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 22px; font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ref-doc h1 { margin: 0; font: 750 36px/1.12 var(--sans); letter-spacing: -.03em; color: var(--ink); }
.ref-kicker { margin: 8px 0 18px; color: var(--gold-ink); font: 600 14px var(--sans); }
.ref-lead { margin: 0 0 10px; font-size: 17.5px; line-height: 1.6; color: var(--ink); }
.ref-doc h1 + .ref-lead { margin-top: 14px; }
.ref-date { margin: 0 0 24px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.ref-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 16px; font-size: 14.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ref-table th { text-align: left; padding: 12px 18px; font: 600 12.5px var(--sans); color: var(--muted); background: var(--sunk); border-bottom: 1px solid var(--line); }
.ref-table td { padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ref-table tr:last-child td { border-bottom: 0; }
.ref-table td b { display: block; color: var(--ink); font-weight: 600; }
.ref-table td small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.ref-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ref-table td.num { color: var(--ink); font-weight: 600; }
.ref-table td.ref-low { color: var(--good); }
.ref-note { margin: 0 0 10px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.ref-cta { margin: 26px 0 14px; padding: 22px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.ref-cta p { margin: 0; max-width: 380px; color: var(--ink); font-weight: 600; line-height: 1.5; }
.ref-doc h2 { margin: 40px 0 12px; font: 700 20px/1.3 var(--sans); letter-spacing: -.015em; color: var(--ink); }
.ref-faq h3 { margin: 20px 0 6px; font: 650 16px/1.4 var(--sans); color: var(--ink); }
.ref-faq p { margin: 0; }
.ref-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ref-list a { display: block; height: 100%; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; transition: border-color .15s; }
.ref-list a:hover { border-color: var(--ink-2); }
.ref-list b { display: block; font-weight: 650; }
.ref-list span { display: block; margin-top: 2px; font-size: 13.5px; color: var(--muted); }
.ref-more { margin: 14px 0 0; font-size: 14px; }
.ref-more a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) {
  .ref-page { padding: 26px 16px 52px; }
  .ref-doc h1 { font-size: 28px; }
  .ref-lead { font-size: 16.5px; }
  .ref-table th, .ref-table td { padding: 11px 13px; }
  .ref-list { grid-template-columns: minmax(0, 1fr); }
  .ref-cta { padding: 18px; }
}

/* ---------------------------------------------------------------- account & admin pages */
.page { max-width: 1080px; margin: 0 auto; padding: 36px 24px 72px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { margin: 4px 0 0; font: 700 30px/1.15 var(--sans); letter-spacing: -.03em; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.kicker { margin: 0; font: 600 12px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.cards > * { min-width: 0; }
.card2 { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.card2-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 0; }
.card2-head h2 { margin: 0; font: 650 17px var(--sans); letter-spacing: -.01em; }
.card2-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.card2-body { padding: 18px 22px 22px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.danger { border-color: var(--line); }
@supports (background: color-mix(in srgb, red 50%, blue)) { .danger { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); } }
.danger h2 { color: var(--bad); }
.side-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.side-nav a { height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font: 600 13px var(--sans); color: var(--ink-2); }
.side-nav a[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Seats */
.seats-top { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.seat-figure { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 14px; }
.seat-figure b { font: 750 42px/1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.seat-figure span { color: var(--muted); font-weight: 600; }
.seat-bar { height: 10px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.seat-bar i { display: block; height: 100%; border-radius: 99px; background: var(--ink); transition: width .4s var(--ease); }
.seat-bar.warn i { background: #b45309; }
.seat-bar.full i { background: #b42318; }
.seat-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--muted); }
.seat-legend b { color: var(--ink); }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--good); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line-2); }
.setting:first-child { border-top: 0; padding-top: 0; }
.setting strong { display: block; font: 600 14px var(--sans); }
.setting small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.num-input { width: 96px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); padding: 0 10px; font: 600 14px var(--sans); color: var(--ink); text-align: right; }
.share { display: flex; gap: 8px; margin-top: 4px; }
.share input { flex: 1; min-width: 0; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--sunk); padding: 0 10px; font: 500 13px var(--sans); color: var(--ink-2); }

.members-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.members-tools .input { height: 40px; flex: 1; min-width: 220px; }
.filter-tabs { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--sunk); }
.sort-select { flex: none; height: 40px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); padding: 0 10px; font: 600 13px var(--sans); color: var(--ink); }
.more-row { display: flex; justify-content: center; margin-top: 12px; }
.filter-tabs button { height: 32px; padding: 0 12px; border-radius: 7px; font: 600 13px var(--sans); color: var(--muted); }
.filter-tabs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.mtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.mtable th { text-align: left; font: 600 12px var(--sans); color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mtable td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.mtable tr:last-child td { border-bottom: 0; }
.who2 { display: flex; align-items: center; gap: 11px; min-width: 0; }
.who2 .avatar { background: var(--sunk); color: var(--ink-2); }
.who2 strong { display: block; font: 600 14px var(--sans); }
.who2 small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.row-actions .btn { height: 32px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.nowrap { white-space: nowrap; }
/* Status as plain coloured text, never a pill. */
.st-active, .st-ok { color: var(--good); font-weight: 600; }
.st-suspended, .st-bad { color: var(--bad); font-weight: 600; }
.st-pending { color: var(--warm); font-weight: 600; }
.rowmenu { position: relative; }
.rowmenu summary { list-style: none; gap: 4px; }
.rowmenu summary::-webkit-details-marker { display: none; }
.rowmenu summary .ic { width: 14px; height: 14px; color: var(--muted); transition: transform .15s; }
.rowmenu[open] summary .ic { transform: rotate(180deg); }
.rowmenu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 230px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); }
.rowmenu-list button { width: 100%; display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 10px; border-radius: 7px; font: 500 13.5px var(--sans); color: var(--ink-2); text-align: left; }
.rowmenu-list button:hover, .rowmenu-list button:focus-visible { background: var(--sunk); color: var(--ink); outline: none; }
.rowmenu-list button .ic { width: 16px; height: 16px; color: var(--muted); }
.rowmenu-list button.danger, .rowmenu-list button.danger .ic { color: var(--bad); }
.setting .row { flex-wrap: nowrap; }
.muted { color: var(--muted); }
.empty2 { padding: 40px 20px; text-align: center; color: var(--muted); }

dialog.confirm { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
dialog.confirm::backdrop { background: rgba(10, 15, 25, .5); }
dialog.confirm .cf-body { padding: 24px 24px 8px; }
dialog.confirm h3 { margin: 0 0 8px; font: 700 18px var(--sans); }
dialog.confirm p { margin: 0; color: var(--ink-2); line-height: 1.55; font-size: 14px; }
dialog.confirm .cf-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 18px 24px 22px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .site-nav { display: none; }
  .seats-top { grid-template-columns: minmax(0, 1fr); }
  /* The members table needs about 1000 px; below this it is one card per person. */
  .mtable thead { display: none; }
  .mtable, .mtable tbody, .mtable tr, .mtable td { display: block; width: 100%; }
  .mtable tr { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
  .mtable td { border: 0; padding: 4px 0; }
  .mtable td[data-l]::before { content: attr(data-l); display: inline-block; width: 92px; color: var(--muted); font-size: 12px; }
  .row-actions { justify-content: flex-start; margin-top: 6px; }
  .rowmenu-list { left: 0; right: auto; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { display: none; }
  .two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .site-top-inner { height: 58px; gap: 12px; padding: 0 max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)); }
  .site-actions .btn-sm { height: 34px; padding: 0 11px; font-size: 13px; }
  .only-wide { display: none; }
  .acct-name { display: none; }
  .page, .site-foot-inner { padding-left: 16px; padding-right: 16px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
  .site-foot-inner { grid-template-columns: minmax(0, 1fr); }
  .auth-main { padding: 28px 16px 40px; place-items: start center; }
  .auth-card h1 { font-size: 26px; }
  .page-head h1 { font-size: 26px; }
}
@media (max-width: 420px) { .site-top .icon-btn { display: none; } .site-actions { gap: 6px; } }
.only-narrow { display: none; }
@media (max-width: 760px) { .only-narrow { display: inline; } }

/* ---------------------------------------------------------------- plans and team seats */
.plan-pick { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.plan-pick[hidden] { display: none; }
.plan-pick legend { padding: 0; margin-bottom: 7px; font: 600 13.5px var(--sans); color: var(--ink); }
.plan-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.plan-opt:hover { border-color: var(--faint); }
/* .on and .off are set by CPO.planPicker, so the outline works without :has (iOS 15.0 to 15.3). */
.plan-opt.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.plan-opt.off { opacity: .55; cursor: default; }
.plan-opt input { width: 17px; height: 17px; margin: 0; accent-color: var(--ink); flex: none; }
.plan-opt span { flex: 1; min-width: 0; }
.plan-opt b { display: block; font: 650 14.5px var(--sans); }
.plan-opt small { display: block; margin-top: 1px; font-size: 12.5px; color: var(--muted); }
.plan-opt i { font: 700 15px var(--sans); font-style: normal; font-variant-numeric: tabular-nums; }
.kv dd.plain { font-weight: 500; color: var(--ink-2); line-height: 1.5; }
.team { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.team h3 { margin: 0 0 10px; font: 650 14.5px var(--sans); }
.team-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; }
.team-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.team-list .avatar { background: var(--sunk); color: var(--ink-2); }
.team-list .tm { flex: 1; min-width: 0; }
.team-list strong { display: block; font: 600 14px var(--sans); }
.team-list small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invite { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; justify-items: start; }
.invite strong { font: 600 13.5px var(--sans); }
.invite .share { width: 100%; }
.plan-change { margin: 18px 0 0; line-height: 1.55; }
.sub2 { display: block; margin-top: 1px; color: var(--muted); font-size: 12px; font-weight: 500; }

/* ---------------------------------------------------------------- per-seat plans */
/* Monthly or yearly. The saving is plain coloured text, never a pill. */
.bill-switch { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--sunk); }
.bill-switch button { height: 34px; padding: 0 14px; border-radius: 7px; display: inline-flex; align-items: center; gap: 7px; font: 600 13.5px var(--sans); color: var(--muted); transition: color .15s, background .15s; }
.bill-switch button:hover { color: var(--ink); }
.bill-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.bill-switch em { font-style: normal; color: var(--good); }
/* A seat counter: minus, the number, plus. */
.stepper { display: inline-flex; align-items: center; height: 40px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.stepper:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.stepper button { width: 38px; height: 100%; display: grid; place-items: center; border-radius: 8px; color: var(--ink-2); }
.stepper button:hover:not(:disabled) { background: var(--sunk); color: var(--ink); }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper button .ic { width: 16px; height: 16px; }
.stepper input { width: 44px; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; text-align: center; font: 700 15px var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; appearance: textfield; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* The plan chooser of sign-up, the account page and the admin page (CPO.planPicker). */
.pp { display: grid; gap: 8px; min-width: 0; }
.pp .bill-switch { justify-self: start; margin-bottom: 2px; }
.seat-pick { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 9px 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.seat-pick[hidden] { display: none; }
.seat-pick b { display: block; font: 650 14.5px var(--sans); }
.seat-pick small { display: block; margin-top: 1px; font-size: 12.5px; color: var(--muted); }
.plan-total { margin: 4px 0 0; font: 600 14px var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
#planHost { min-height: 262px; align-content: start; }

/* The account page's seats: the people on them, the open ones, and the counter. */
.card2-head > .row { flex: none; }
.kv-note { display: block; margin-top: 3px; font-size: 13px; font-weight: 600; }
button.kv-note { text-align: left; }
.team-list li:last-child { border-bottom: 0; }
.team-list li.seat-open .avatar { background: transparent; border: 1px dashed var(--faint); color: var(--muted); }
.team-list li.seat-open .avatar .ic { width: 14px; height: 14px; }
.team-list li.seat-open strong { color: var(--ink-2); }
.seat-edit { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-2); display: grid; gap: 10px; }
.seat-change { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; padding: 10px 10px 10px 14px; border-radius: 10px; background: var(--accent-soft); font: 600 13.5px var(--sans); line-height: 1.45; font-variant-numeric: tabular-nums; }
.nudge { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; }
.nudge p { margin: 0; flex: 1 1 280px; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.nudge strong { color: var(--ink); font-weight: 600; }
dialog.confirm.wide { width: min(480px, calc(100vw - 32px)); }
dialog.confirm .pp { margin-top: 16px; }
dialog.confirm .pd-note { min-height: 21px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.seat-value { margin: 12px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.seat-value b { color: var(--ink); font-variant-numeric: tabular-nums; }
/* Members table: the role sits beside the name as plain coloured text, and the second
   line of a cell never wraps. */
.mtable td:last-child { text-align: right; }
.who2 strong .role { margin-left: 8px; font: 600 12.5px var(--sans); font-style: normal; color: var(--gold); }
.mtable .sub2 { white-space: nowrap; }
@media (max-width: 760px) {
  /* A person on a phone: who they are, then their state, then what can be done. */
  .team-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 12px; }
  .team-list li > .muted, .team-list li > .btn { grid-column: 2 / -1; justify-self: start; }
}
@media (max-width: 1080px) {
  .mtable td[data-l] .sub2 { display: inline; margin-left: 8px; }
  .mtable td:last-child { text-align: left; }
}
@media (max-width: 760px) {
  /* The plan card's buttons go under its title, and the invitation link gets a row of its own. */
  #plan .card2-head { flex-wrap: wrap; }
  #plan .card2-head > .row { flex: 0 1 auto; }
  .invite .share { flex-wrap: wrap; }
  .invite .share input { flex: 1 1 100%; }
}

/* Price emails on /account: the line under the switch. */
.a-note { margin: 0; font-size: 13.5px; }

/* Payment on /account: one quiet line, or the button that pays. */
.bill-line { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-2); }
.bill-line.warn { color: var(--warm); font-weight: 600; }
.bill-pay { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.bill-pay p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

/* The question about Google Analytics (measure.js): a small card in the corner, never over
   the page's own buttons on a phone for longer than one answer. Both answers look alike. */
.ask-bar { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; width: min(360px, calc(100vw - 32px)); padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink-2); box-shadow: 0 8px 30px rgba(8, 12, 20, .18); }
.ask-bar p { margin: 0 0 12px; font: 13.5px/1.5 var(--sans); }
.ask-bar a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.ask-bar .row { display: flex; gap: 8px; }
.ask-bar .btn { flex: 1 1 0; justify-content: center; }
.ask-choice { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 14px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.ask-choice[hidden] { display: none; }
.ask-choice p { margin: 0; }
@media print { .ask-bar { display: none; } }
