/* Credence UI.
   Two surfaces share one system:
   - the public page: a single centred column of large tappable tiles, made to be opened from a link or QR code on a phone;
   - the signed-in app: a top bar, a left rail with the person or team, and content cards with tabbed sections.
   No JavaScript and no inline styles (the CSP forbids both), so every state is a class. */

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

:root {
  /* Brand palette shared with Cotillion and Partner Compass (Craig, 13 Nov 2026), primary first:
     #73026b plum · #f9f9f9 page · #a5039a magenta · #41013c deep plum · #ffffff surface · #dfdfdf lines.
     Derived (not in the palette, marked "derived"): tints, the input border, muted text, dark mode.
     Status colours (green / amber / red) are deliberately NOT brand colours: they carry meaning. */
  --bg: #f9f9f9;
  --surface: #ffffff;
  --surface-2: #f6f3f6;          /* derived: faint plum-tinted panel */
  --ink: #1e1320;                /* derived: near-black, plum-leaning */
  --muted: #5c5862;              /* derived: 6.4:1 on #f9f9f9 */
  --line: #dfdfdf;
  --line-strong: #8f8a92;        /* derived: form field borders need 3:1 against white; #dfdfdf is 1.3:1 */
  --brand: #73026b;
  --brand-accent: #a5039a;
  --brand-ink: #41013c;
  --brand-soft: #f7e9f5;         /* derived tint of #73026b */
  --on-brand: #ffffff;
  --ok: #0b7a55; --ok-bg: #e2f5ed;
  --warn: #8a5300; --warn-bg: #fff0d4;
  --bad: #b42318; --bad-bg: #fde6e3;
  --neutral-bg: #efefef;
  --shadow: 0 1px 2px rgba(30, 19, 32, 0.06), 0 2px 8px rgba(30, 19, 32, 0.04);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Inter Credence", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  /* Derived: the palette has no dark tones. Plum on a dark background is unreadable (about 1.6:1),
     so links and primary buttons use a light tint of #a5039a; banners keep the real plums. */
  :root {
    --bg: #150b14; --surface: #1f121e; --surface-2: #281826; --ink: #f4eef3; --muted: #b9adb7; --line: #3b2a39; --line-strong: #7a6878;
    --brand: #e7a6e0; --brand-accent: #a5039a; --brand-ink: #41013c; --brand-soft: #3a1436; --on-brand: #150b14;
    --ok: #5fd4a5; --ok-bg: #12352a; --warn: #f3c46a; --warn-bg: #3a2c10; --bad: #ff9488; --bad-bg: #3e1814; --neutral-bg: #2c2030;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); font-feature-settings: "cv11", "ss01"; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
h1 { margin: 0 0 6px; font-size: 1.6rem; font-weight: 750; }
h2 { margin: 0 0 12px; font-size: 1.12rem; font-weight: 700; }
h3 { margin: 18px 0 8px; font-size: 0.95rem; font-weight: 700; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); } .small { font-size: 0.82rem; } .empty { color: var(--muted); }
.code { font-family: var(--mono); font-size: 0.8em; color: var(--muted); background: var(--neutral-bg); padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
code.copy { display: block; word-break: break-all; margin-top: 6px; font-family: var(--mono); font-size: 0.85rem; background: var(--surface); padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Top bar ─────────────────────────────────────────────────────────────── */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { max-width: 1128px; margin: 0 auto; padding: 0 16px; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark .seal { fill: var(--brand); }
.brand-mark .tick { stroke: var(--on-brand); }
.topnav { display: flex; align-items: stretch; gap: 4px; }
.topnav a, .topnav button.navbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 64px; padding: 8px 8px 6px; color: var(--muted); text-decoration: none; font-size: 0.75rem; font-weight: 500; border: 0; background: none; border-bottom: 2px solid transparent; cursor: pointer; font-family: inherit; }
.topnav a:hover, .topnav button.navbtn:hover { color: var(--ink); }
.topnav a.current { color: var(--ink); border-bottom-color: var(--ink); }
.topnav svg { width: 22px; height: 22px; }
.topnav .guest { flex-direction: row; font-size: 0.92rem; min-width: 0; font-weight: 600; }
.topnav form { display: flex; }

/* ── Page frames ─────────────────────────────────────────────────────────── */
main { max-width: 1128px; margin: 0 auto; padding: 24px 16px 40px; }
main.narrow { max-width: 640px; }
footer.site { max-width: 1128px; margin: 0 auto; padding: 0 16px 32px; color: var(--muted); font-size: 0.8rem; }
footer.site p { max-width: 70ch; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.narrow { max-width: 520px; margin: 24px auto; }
.card > h2:first-child, .card > header:first-child h2 { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.lede { color: var(--muted); max-width: 68ch; }

.app-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.app-grid > aside { position: sticky; top: 76px; display: grid; gap: 12px; }
@media (max-width: 860px) {
  .app-grid { grid-template-columns: minmax(0, 1fr); }
  .app-grid > aside { position: static; }
}

/* ── Identity card (left rail) and avatars ───────────────────────────────── */
.idcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-align: center; }
.idcard .banner-strip { height: 58px; }
.idcard .avatar { margin: -34px auto 8px; }
.idcard .id-body { padding: 0 16px 16px; }
.idcard .name { font-weight: 750; font-size: 1.05rem; margin: 0; }
.idcard .title { color: var(--muted); font-size: 0.85rem; margin: 2px 0 12px; }
.idcard .id-stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); text-align: left; }
.idcard .id-stats div { padding: 10px 16px; font-size: 0.8rem; color: var(--muted); }
.idcard .id-stats div + div { border-left: 1px solid var(--line); }
.idcard .id-stats strong { display: block; font-size: 1.1rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.idcard .id-foot { border-top: 1px solid var(--line); padding: 10px 16px; }
.banner-strip { background-color: var(--brand-ink); background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.07) 0 14px, transparent 14px 28px), linear-gradient(100deg, var(--brand-ink), #73026b 55%, var(--brand-accent)); }

.avatar { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; border: 3px solid var(--surface); color: #fff; font-weight: 750; font-size: 1.4rem; letter-spacing: 0.02em; }
.avatar.lg { width: 112px; height: 112px; font-size: 2.3rem; border-width: 4px; }
.avatar.sm { width: 36px; height: 36px; font-size: 0.85rem; border-width: 0; }
.av-0 { background: #73026b; } .av-1 { background: #0b7a55; } .av-2 { background: #b4421f; }
.av-3 { background: #4a4fb0; } .av-4 { background: #0f6e8c; } .av-5 { background: #8a5a00; }

.sidenav { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; box-shadow: var(--shadow); }
.sidenav a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 550; font-size: 0.92rem; }
.sidenav a:hover { background: var(--surface-2); }
.sidenav a.current { background: var(--brand-soft); color: var(--brand); }
.sidenav .count { font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .sidenav { display: flex; overflow-x: auto; gap: 4px; }
  .sidenav a { white-space: nowrap; }
  .idcard .id-stats { display: none; }
}

/* ── Tabs (team and dashboard section headers) ───────────────────────────── */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 0 -22px; padding: 0 14px; }
.tabs a { padding: 12px 10px 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.92rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.current { color: var(--brand); border-bottom-color: var(--brand); }

/* ── Header cards (team, own page) ───────────────────────────────────────── */
.hero-card { padding: 0; overflow: hidden; }
.hero-card .banner-strip { height: 84px; }
.hero-card .hero-body { padding: 0 22px 0; }
.hero-card .hero-row { display: flex; gap: 16px; align-items: flex-end; margin-top: -30px; flex-wrap: wrap; }
.hero-card .hero-row .who { padding-top: 34px; flex: 1 1 260px; min-width: 0; }
.hero-card h1 { margin: 0; }
.org-mark { width: 76px; height: 76px; border-radius: 16px; border: 4px solid var(--surface); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.6rem; }

/* ── Buttons and forms ───────────────────────────────────────────────────── */
label { display: block; margin: 6px 0; font-weight: 600; font-size: 0.88rem; }
.hint { font-weight: 400; color: var(--muted); font-size: 0.82rem; }
input, select, textarea, button { font: inherit; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input[type="file"] { padding: 7px; }
textarea { min-height: 84px; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--brand); background: var(--brand); color: var(--on-brand); cursor: pointer; text-decoration: none; font-weight: 650; line-height: 1.2; }
button:hover, .button:hover { filter: brightness(1.08); }
.button.ghost, button.ghost { background: transparent; color: var(--brand); }
.button.block { display: flex; width: 100%; }
button.link { background: none; border: none; color: var(--brand); padding: 0; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; border-radius: 0; }
button.danger, button.link.danger { color: var(--bad); }
button.danger:not(.link) { background: var(--bad); border-color: var(--bad); color: #fff; }
form.inline { display: inline; }
form.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.row input, form.row select { width: auto; flex: 1 1 160px; margin: 0; }
form.row label.check input { flex: none; }
form.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 4px 16px; align-items: end; }
form.grid .wide { grid-column: 1 / -1; }
form.grid > button { justify-self: start; margin-top: 8px; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 450; }
label.check input { width: auto; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; padding: 8px 14px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 0.85rem; }

.banner { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; }
.banner.error { background: var(--bad-bg); color: var(--bad); }
.banner.notice { background: var(--brand-soft); }
.field-error { color: var(--bad); font-size: 0.82rem; display: block; }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 0.74rem; font-weight: 650; background: var(--neutral-bg); color: var(--muted); white-space: nowrap; line-height: 1.5; }
.badge.muted { color: var(--muted); }
.v-verified { background: var(--ok-bg); color: var(--ok); }
.v-verified::before { content: ""; width: 12px; height: 12px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1l2.6 2.2 3.4-.4 1 3.3 3 1.7-1 3.2 1 3.2-3 1.7-1 3.3-3.4-.4L12 23l-2.6-2.2-3.4.4-1-3.3-3-1.7 1-3.2-1-3.2 3-1.7 1-3.3 3.4.4z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1l2.6 2.2 3.4-.4 1 3.3 3 1.7-1 3.2 1 3.2-3 1.7-1 3.3-3.4-.4L12 23l-2.6-2.2-3.4.4-1-3.3-3-1.7 1-3.2-1-3.2 3-1.7 1-3.3 3.4.4z'/%3E%3C/svg%3E") center / contain no-repeat; }
.v-verification-stale, .v-self-reported { background: var(--warn-bg); color: var(--warn); }
.v-confirmed-at-source { background: var(--ok-bg); color: var(--ok); opacity: .85; }
.v-verification-failed, .v-rejected, .v-revoked { background: var(--bad-bg); color: var(--bad); }
.v-issuer-record { background: var(--neutral-bg); color: var(--muted); }
.e-active, .e-no-expiry { background: var(--ok-bg); color: var(--ok); }
.e-expiring-soon { background: var(--warn-bg); color: var(--warn); }
.e-lapsed { background: var(--bad-bg); color: var(--bad); }

/* ── Issuer tiles ────────────────────────────────────────────────────────── */
.issuer-tile { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 0.78rem; letter-spacing: 0.02em; color: #fff; background: #565b78; }
.iss-microsoft { background: #2f6fdb; } .iss-aws { background: #232f3e; } .iss-comptia { background: #c8102e; }
.iss-cisco { background: #0d7fa8; } .iss-google-cloud { background: #1a7f48; } .iss-vmware { background: #5b4bb7; }
.iss-red-hat { background: #b80d0d; } .iss-other { background: #565b78; }
.issuer-tile.has-mark { background: var(--surface); border: 1px solid var(--line); color: var(--brand); }
.vmark { display: block; flex: none; }
.vmark.sm { display: inline-block; vertical-align: -2px; margin-right: 3px; }
.via { white-space: nowrap; }

/* ── Credential rows (dashboard) and tiles (public page) ─────────────────── */
ul.plain, ul.creds, ul.tiles, ul.tags, ul.linkbuttons, ul.attention { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 9px 0; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
ul.plain li:first-child { border-top: 0; }
ul.plain li > details { flex-basis: 100%; }
ul.plain li > details summary { cursor: pointer; color: var(--muted, inherit); }
ul.plain li > details form { margin-top: 8px; }
.cred { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
ul.creds > .cred:first-child { border-top: 0; padding-top: 4px; }
.cred .body { flex: 1 1 auto; min-width: 0; }
.cred .name { font-weight: 650; overflow-wrap: anywhere; }
.cred .meta { font-size: 0.82rem; color: var(--muted); display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.cred .why { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.cred .actions { margin-top: 8px; }
.cred.is-hidden { opacity: 0.6; }
.cred.is-lapsed .name { color: var(--muted); }

.tile { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: transform 120ms ease, border-color 120ms ease; }
a.tile:hover { border-color: var(--brand); transform: translateY(-1px); }
.tile .body { flex: 1 1 auto; min-width: 0; }
.tile .name { font-weight: 650; overflow-wrap: anywhere; line-height: 1.3; }
.tile .meta { font-size: 0.8rem; color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.tile .chev { color: var(--muted); flex: none; }
.tile.is-lapsed { background: var(--surface-2); }
.tile.is-lapsed .name { color: var(--muted); }
ul.tiles { display: grid; gap: 10px; }

/* ── Public page ─────────────────────────────────────────────────────────── */
.pp { display: grid; gap: 22px; }
.pp-head { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.pp-head .banner-strip { height: 96px; }
.pp-head .avatar { margin: -56px auto 10px; }
.pp-head .pp-body { padding: 0 20px 22px; }
.pp-head h1 { font-size: 1.75rem; margin: 0; }
.pp-head .title { font-size: 1.02rem; margin: 4px 0 0; }
.pp-head .location { color: var(--muted); margin: 2px 0 0; font-size: 0.9rem; }
.pp-head .bio { max-width: 52ch; margin: 12px auto 0; }
.pp-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pp-stats .pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.84rem; font-weight: 600; }
.pp-stats .pill strong { font-variant-numeric: tabular-nums; }
.pp-stats .pill.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.pp section > h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 10px 4px; }
ul.tags { display: flex; flex-wrap: wrap; gap: 8px; }
ul.tags li { background: var(--surface); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; font-size: 0.88rem; }
ul.tags li .lvl { color: var(--muted); }
ul.linkbuttons { display: grid; gap: 10px; }
ul.linkbuttons a { display: block; text-align: center; padding: 15px 18px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-weight: 650; text-decoration: none; transition: transform 120ms ease; }
ul.linkbuttons a:hover { transform: translateY(-1px); filter: brightness(1.08); }
ul.picons { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
ul.picons a { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--brand); box-shadow: var(--shadow); transition: transform 120ms ease, background 120ms ease, color 120ms ease; }
ul.picons a:hover, ul.picons a:focus-visible { transform: translateY(-1px); background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.picon { display: block; }
.link-row { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.link-row .picon { color: var(--brand); flex: none; }
.plainlist { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 16px; box-shadow: var(--shadow); }
.share { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.share svg { width: 96px; height: 96px; background: #fff; border-radius: 8px; display: block; }
.share .url { font-family: var(--mono); font-size: 0.85rem; overflow-wrap: anywhere; }
.verify-note { text-align: center; color: var(--muted); font-size: 0.8rem; }

/* ── KPI strip and attention list ────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 16px 0 4px; }
.kpi { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-decoration: none; color: inherit; display: block; }
a.kpi:hover { border-color: var(--brand); }
.kpi .n { font-size: 1.55rem; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .l { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.kpi.ok { border-left: 4px solid var(--ok); }
.kpi.warn { border-left: 4px solid var(--warn); }
.kpi.bad { border-left: 4px solid var(--bad); }
ul.attention li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
ul.attention li:first-child { border-top: 0; }
ul.attention .what { flex: 1 1 auto; min-width: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.bad { background: var(--bad); } .dot.warn { background: var(--warn); } .dot.ok { background: var(--ok); }

/* ── Progress bars (compliance) ──────────────────────────────────────────── */
.bar { height: 8px; border-radius: 999px; background: var(--neutral-bg); overflow: hidden; margin-top: 6px; }
.bar span { display: block; height: 100%; background: var(--ok); }
.bar.at-risk span { background: var(--warn); }
.bar.short span { background: var(--bad); }
.w-0 { width: 0; } .w-10 { width: 10%; } .w-20 { width: 20%; } .w-25 { width: 25%; } .w-30 { width: 30%; } .w-33 { width: 33.3%; } .w-40 { width: 40%; }
.w-50 { width: 50%; } .w-60 { width: 60%; } .w-67 { width: 66.7%; } .w-70 { width: 70%; } .w-75 { width: 75%; } .w-80 { width: 80%; } .w-90 { width: 90%; } .w-100 { width: 100%; }
.req { padding: 14px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px 20px; }
.req:first-of-type { border-top: 0; }
.req .prog { font-weight: 650; }
.req .holders { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
@media (max-width: 640px) { .req { grid-template-columns: minmax(0, 1fr); } }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 650; padding: 8px 8px; border-bottom: 1px solid var(--line); }
.table td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.table tbody tr:first-child td { border-top: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.actions { white-space: nowrap; }
.person { display: flex; gap: 10px; align-items: center; }
.person .avatar { flex: none; }
.person a { font-weight: 600; }
.table.matrix { min-width: 640px; }
.table.matrix td, .table.matrix th { text-align: center; }
.table.matrix td:first-child, .table.matrix th:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); }
.cell { display: inline-grid; gap: 3px; justify-items: center; }
/* Stacked tables become cards on phones; each cell carries its column name in data-label. */
@media (max-width: 640px) {
  .table.stack thead { display: none; }
  .table.stack tr { display: block; padding: 10px 0; border-top: 1px solid var(--line); }
  .table.stack tbody tr:first-child { border-top: 0; }
  .table.stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 3px 0; text-align: right; }
  .table.stack td::before { content: attr(data-label); color: var(--muted); font-size: 0.8rem; text-align: left; }
  .table.stack td:first-child { display: block; text-align: left; }
  .table.stack td:first-child::before { content: none; }
}

/* ── Calendar ────────────────────────────────────────────────────────────── */
.month { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.month-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.month-head h3 { margin: 0 0 6px; }
.month-head .total { font-weight: 700; font-variant-numeric: tabular-nums; }
.renewal { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; }
.datechip { border: 1px solid var(--line); border-radius: 10px; text-align: center; padding: 4px 0; line-height: 1.1; background: var(--surface-2); }
.datechip .d { display: block; font-weight: 750; font-size: 1.1rem; }
.datechip .m { display: block; font-size: 0.68rem; text-transform: uppercase; color: var(--muted); letter-spacing: 0.06em; }
.renewal .cost { font-variant-numeric: tabular-nums; font-weight: 650; text-align: right; }

/* ── Misc ────────────────────────────────────────────────────────────────── */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 40px; align-items: center; padding: 40px 0; }
.home-hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.08; letter-spacing: -0.03em; }
.home-hero p { font-size: 1.08rem; color: var(--muted); max-width: 52ch; }
.home-hero .ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.home-demo { display: grid; gap: 10px; }
.home-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.home-points .card { margin: 0; }
@media (max-width: 760px) { .home-hero { grid-template-columns: minmax(0, 1fr); padding: 16px 0; } }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; } dt { color: var(--muted); } dd { margin: 0; }
.verify-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.warnings li { color: var(--warn); }
.differs { color: var(--bad); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.org-mark.sm { width: 36px; height: 36px; border-width: 0; border-radius: 10px; font-size: 0.85rem; flex: none; }
h2.person, h3.person { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
h3.person { margin-top: 20px; }
.topnav a.button { flex-direction: row; min-width: 0; padding: 9px 18px; color: var(--on-brand); font-size: 0.92rem; font-weight: 650; border-bottom: 1px solid var(--brand); align-self: center; }
ul.plainlist { padding: 4px 16px; }
@media (max-width: 560px) {
  .topbar-inner { gap: 8px; }
  .brand span { display: none; }
  .topnav { gap: 0; }
  .topnav a, .topnav button.navbtn { min-width: 52px; padding: 8px 4px 6px; font-size: 0.68rem; }
  .topnav a.button { padding: 8px 14px; font-size: 0.85rem; }
  .card { padding: 16px; }
  .tabs { margin: 0 -16px; padding: 0 8px; }
  .hero-card .hero-body { padding: 0 16px; }
}
.topnav a.button { background: var(--brand); }
.home-hero h1 { margin-bottom: 16px; }
ul.attention li { flex-wrap: wrap; }
ul.attention .what { flex: 1 1 220px; }
ul.attention li > .small { white-space: nowrap; margin-left: auto; }

/* ── Members, requirements, integrations ─────────────────────────────────── */
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 16px; }
.split > .card, .stack-col > .card { margin: 0; }
.stack-col { display: grid; gap: 16px; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }
ul.members, ul.rules, ul.timeline, ul.dest-grid { list-style: none; padding: 0; margin: 0; }
.member { display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); }
.member-main { flex: 1 1 300px; min-width: 0; display: grid; gap: 6px; }
form.rolepick { display: flex; gap: 6px; align-items: center; }
form.rolepick select { width: auto; margin: 0; padding: 6px 10px; }
form.rolepick button { padding: 6px 14px; }
.member:first-child { border-top: 0; padding-top: 4px; }
.member .who { min-width: 0; }
.member .name { font-weight: 650; overflow-wrap: anywhere; }
.member-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 0; }
.badge.role-owner { background: var(--brand-soft); color: var(--brand); }
.badge.role-admin { background: var(--neutral-bg); color: var(--ink); }
form.grid.one { grid-template-columns: minmax(0, 1fr); }
ul.invites .name { font-weight: 600; overflow-wrap: anywhere; }
ul.rules li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
ul.rules li:first-child { border-top: 0; }
ul.rules .body { flex: 1 1 auto; min-width: 0; }
ul.rules .name { font-weight: 650; }
ul.timeline li { display: grid; gap: 1px; padding: 8px 0 8px 14px; border-left: 2px solid var(--line); position: relative; }
ul.timeline li::before { content: ""; position: absolute; left: -5px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
ul.dest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.dest { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.dest .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.dest .button { padding: 7px 14px; font-size: 0.86rem; }
.dest-head { display: flex; gap: 10px; align-items: center; }
.dest-head > div { flex: 1 1 auto; min-width: 0; }
.dest-head .name { font-weight: 700; line-height: 1.25; }
.dest p { margin: 0; }

/* ── Credential filter ───────────────────────────────────────────────────── */
.filterbar { display: grid; gap: 10px; margin: 4px 0 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips a { display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 0.84rem; font-weight: 600; }
.chips a:hover { border-color: var(--brand); }
.chips a.current { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.chips .count { font-variant-numeric: tabular-nums; opacity: 0.75; font-weight: 500; }
form.search input[type="search"] { flex: 1 1 220px; }

/* ── Photos ──────────────────────────────────────────────────────────────── */
.avatar.has-photo { overflow: hidden; background: var(--neutral-bg); }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-edit { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin: 8px 0 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.photo-edit > div { flex: 1 1 280px; min-width: 0; }
.photo-edit .avatar { border-color: var(--line); }
.photo-edit h2 { margin-bottom: 6px; }
.handoff { background: var(--brand-soft); border-radius: 12px; padding: 14px 16px; margin: 6px 0 14px; }
.handoff h3 { margin-top: 0; }
.handoff textarea, .handoff input { font-family: var(--mono); font-size: 0.82rem; }
.self-note { margin: 0; }
.dest-mark { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 0.85rem; color: #fff; }

/* ── solution categories (Partner Compass taxonomy) ── */
.chips.cats { align-items: center; }
.chips.cats a { font-size: 0.8rem; padding: 4px 10px; }
.chips.cats a:not(.current) { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); }
.chips.cats a:not(.current):hover { border-color: var(--brand); }
.chips-label { font-size: 0.78rem; font-weight: 650; color: var(--muted); margin-right: 2px; }
.badge.cat { background: var(--brand-soft); color: var(--brand-ink); }
.catpick { display: flex; gap: 6px; align-items: end; flex-wrap: wrap; margin: 4px 0; }
.catpick label { display: flex; gap: 6px; align-items: center; margin: 0; }
.catpick select { max-width: 100%; min-width: 0; font-size: 0.82rem; padding: 4px 8px; }
section .chips.cats { margin: 0 0 12px; }

/* Long unbroken values (file fingerprints) must wrap on phones. */
.fingerprint { overflow-wrap: anywhere; word-break: break-all; }
.badge.track { background: var(--neutral-bg); color: var(--ink); }

/* ── Profile banner (src/server/views/banner.ts) ───────────────────────────
   One image, a CSS cross-fade slideshow (6 s a slide), or an animated GIF.
   The brand strip shows behind everything, so a missing still or a slow image
   never leaves a blank box. Pause is a checkbox: no script. */
.banner-media { position: relative; aspect-ratio: 3 / 1; overflow: hidden; background-color: var(--brand-ink); background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.07) 0 14px, transparent 14px 28px), linear-gradient(100deg, var(--brand-ink), #73026b 55%, var(--brand-accent)); }
.banner-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-media .anim img { position: absolute; }
.pp-head .banner-media + .avatar { position: relative; }
.banner-toggle { position: absolute; z-index: 2; top: 10px; right: 10px; padding: 4px 12px; border-radius: 999px; background: rgba(20, 0, 18, 0.62); color: #fff; font-size: 0.78rem; font-weight: 650; cursor: pointer; }
.banner-pause:focus-visible + .banner-toggle { outline: 3px solid var(--brand-accent); outline-offset: 2px; }
.banner-toggle .on-pause, .banner-pause:checked + .banner-toggle .on-play { display: none; }
.banner-pause:checked + .banner-toggle .on-pause { display: inline; }
.banner-media .still { display: none; }
.banner-pause:checked ~ .anim { display: none; }
.banner-pause:checked ~ .still { display: block; }
.ss .slides img { opacity: 0; animation-timing-function: linear; animation-iteration-count: infinite; }
.banner-pause:checked ~ .slides img { animation-play-state: paused; }
.ss .slides img:nth-child(2) { animation-delay: 6s; }
.ss .slides img:nth-child(3) { animation-delay: 12s; }
.ss .slides img:nth-child(4) { animation-delay: 18s; }
.ss .slides img:nth-child(5) { animation-delay: 24s; }
.ss .slides img:nth-child(6) { animation-delay: 30s; }
/* Slide k is visible for 1/N of the cycle and fades over 1 s at each end, overlapping its neighbour. */
.ss-2 .slides img { animation-name: ss-2; animation-duration: 12s; }
.ss-3 .slides img { animation-name: ss-3; animation-duration: 18s; }
.ss-4 .slides img { animation-name: ss-4; animation-duration: 24s; }
.ss-5 .slides img { animation-name: ss-5; animation-duration: 30s; }
.ss-6 .slides img { animation-name: ss-6; animation-duration: 36s; }
@keyframes ss-2 { 0% { opacity: 0; } 8.333% { opacity: 1; } 50% { opacity: 1; } 58.333% { opacity: 0; } 100% { opacity: 0; } }
@keyframes ss-3 { 0% { opacity: 0; } 5.556% { opacity: 1; } 33.333% { opacity: 1; } 38.889% { opacity: 0; } 100% { opacity: 0; } }
@keyframes ss-4 { 0% { opacity: 0; } 4.167% { opacity: 1; } 25% { opacity: 1; } 29.167% { opacity: 0; } 100% { opacity: 0; } }
@keyframes ss-5 { 0% { opacity: 0; } 3.333% { opacity: 1; } 20% { opacity: 1; } 23.333% { opacity: 0; } 100% { opacity: 0; } }
@keyframes ss-6 { 0% { opacity: 0; } 2.778% { opacity: 1; } 16.667% { opacity: 1; } 19.444% { opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ss .slides img { animation: none; }
  .ss .slides img:first-child { opacity: 1; }
  .banner-toggle { display: none; }
  .gif.no-still .anim { display: none; }
}
.banner-edit .banner-media, .banner-edit .banner-strip { border-radius: 12px; margin-bottom: 14px; }
.banner-edit .banner-strip { height: 96px; }
.banner-edit fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; }
.banner-edit fieldset[disabled] { opacity: 0.6; }
.banner-edit legend { font-weight: 650; padding: 0 6px; }

/* Moderation: report line on public pages, thumbnails in the admin queue. */
.report-links { margin-top: 18px; text-align: center; }
.mod-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.mod-thumb { display: block; width: 150px; height: 50px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.mod-thumb.photo { width: 72px; height: 72px; border-radius: 50%; }

/* Security page and key step-up (CRB-65) */
.qr svg { width: 180px; height: 180px; background: #fff; padding: 8px; border-radius: 8px; }
.recovery-codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.csv-step-up { display: inline-flex; gap: 6px; align-items: center; }
.csv-step-up input { width: 10.5em; }
details.inline { display: inline-block; margin-right: 8px; }
details.inline[open] { display: block; margin: 6px 0; }

/* Sharing consent (CRB-60) */
.consent, .destinations { border: 1px solid var(--line, #dfdfdf); border-radius: 10px; padding: 10px 14px; margin: 12px 0; font-size: 0.9rem; }
.consent h3, .destinations h3 { font-size: 0.95rem; margin: 0 0 6px; }
.consent p, .destinations p { margin: 6px 0; }
.consent ul, .destinations ul { margin: 4px 0 6px 18px; padding: 0; }
.banner.notice p { margin: 4px 0 0; }

/* External review fixes (21 Nov 2026) */
/* CR-06: destructive actions sit in a row's overflow menu and need a tick naming what is lost. */
details.overflow { display: inline-block; position: relative; }
details.overflow > summary { cursor: pointer; list-style: none; color: var(--muted); }
details.overflow > summary::-webkit-details-marker { display: none; }
details.overflow > summary::after { content: " \25BE"; }
details.overflow[open] { display: block; flex-basis: 100%; margin: 6px 0; }
details.overflow .menu { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--surface); margin-top: 6px; }
form.confirm { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 4px 0; }
form.confirm label.check { margin: 0; }
.leave-team { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 8px; }
.leave-team h3 { font-size: 0.95rem; margin: 0 0 4px; }
/* CR-01: what the labels mean. */
details.legend { margin: 8px 0; }
details.legend summary { cursor: pointer; color: var(--muted); }
details.legend dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; align-items: baseline; margin: 8px 0 0; }
details.legend dd { margin: 0; }
/* CR-08: connect steps. */
ol.steps { margin: 8px 0 12px 20px; padding: 0; }
ol.steps li { margin: 4px 0; }
ol.steps li.done { color: var(--muted); }
ol.steps li.done strong::after { content: " (done)"; font-weight: 400; }
h2.section-title { margin: 20px 4px 8px; font-size: 1.05rem; }
@media (max-width: 560px) { details.legend dl { grid-template-columns: 1fr; } }

/* Legal and contact pages (CRB-29). */
.legal { max-width: 78ch; }
.legal h2 { margin-top: 1.6em; scroll-margin-top: 80px; }
.legal h3 { margin-top: 1.2em; }
.legal li { margin: 0.3em 0; }
.legal blockquote { margin: 1em 0; padding: 4px 14px; border-left: 3px solid var(--line); color: var(--muted); }
.legal hr { border: 0; border-top: 1px solid var(--line); margin: 1.4em 0; }
.legal .table-wrap { margin: 1em 0; }
.legal-toc { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 1em 0 1.4em; }
.legal-toc h2 { margin: 0 0 4px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.legal-toc ol { margin: 0; padding-left: 1.4em; columns: 2 220px; }
.legal-toc li { margin: 0 0 0.3em; break-inside: avoid; }
footer.site .footer-links a { color: inherit; }
