/* portal-chrome.css — the portal's header and footer, from the approved PUZL
 * app mockup (2026-10-24; the .top, .mainnav, .dd, .menu, .who and .foot-app
 * rules there). Portal only: admin's base.html links portal-shell.css but
 * not this file, so nothing here can reach the admin bar.
 *
 * Class names differ from the mockup where the mockup's collide with
 * components.css or portal templates (.badge, .menu, .who, .wrap, .top, .sr):
 * .bell-dot, .dd-menu, .app-who, .app-wrap, .app-top, .sr-only. Every rule is
 * scoped under .app-top or .app-foot for the same reason. Sizes are the
 * mockup's; colours are the portal tokens (tokens-portal.css), which carry
 * the dark values under :root[data-theme="dark"].
 */

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--cobalt); color: #fff;
  padding: 10px 16px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.skip-link:focus { left: 12px; }

.app-wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; box-sizing: border-box; }

/* Footer at the bottom of the window on short pages (Files, Governing).
 * The body is a column and main takes the spare height; without this the
 * footer sat straight under the content with empty page below it. */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body > main.pg { flex: 1 0 auto; width: 100%; }
body > .app-top, body > .app-foot { flex: none; }

/* ── Header ─────────────────────────────────────────────────────────── */
.app-top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 300;
  font-family: var(--font-body); font-size: 15px; line-height: 1.5; color: var(--text); }
.app-top .app-wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap;
  padding-top: 8px; padding-bottom: 8px; position: relative; }
.app-top :focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.app-top .app-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text);
  font-weight: 900; font-size: 26px; letter-spacing: -.02em; padding: 4px 0; }
.app-top .app-logo:hover { color: var(--text); }
.app-top .app-logo .puzl-mark { flex: none; display: block; }

.app-top .mainnav { display: flex; gap: 2px; align-items: center; margin-left: 8px; }
.app-top .navbtn { padding: 9px 12px; border-radius: var(--r-pill); font: inherit; font-weight: 600; font-size: 17px;
  color: var(--ink-soft); text-decoration: none; background: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
/* P13: the 2026-11-30 mockup's menu button (.menu>button, lines 53-55): hover
 * and open take --inset and --ink; the current section is --ink with no dark
 * pill (the 2026-10-24 mockup's pill is superseded). */
.app-top .navbtn:hover, .app-top .dd:has(> .dd-menu:not([hidden])) > .navbtn { color: var(--ink); background: var(--inset); }
.app-top .navbtn.active, .app-top .navbtn[aria-current="page"] { color: var(--ink); }

.app-top .dd { position: relative; }
.app-top .dd-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 12px 30px rgba(20,33,58,.14); padding: 6px;
  z-index: 30; box-sizing: border-box; }
.app-top .dd-menu.right { left: auto; right: 0; }
.app-top .dd-menu[hidden] { display: none; }
.app-top .dd-menu a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--text); }
/* The account menu's five rows (mockup .menu-list a / small, lines 57-61):
 * title left, small text right, 9px 12px, 8px corners, 15.5px/600. */
.app-top .dd-menu a.acct-item, .app-top .dd-menu button.acct-item { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; font-weight: 600; font-size: 15.5px; color: var(--ink); }
.app-top .dd-menu a.acct-item small { color: var(--ink-muted); font-weight: 500; font-size: inherit; }
.app-top .dd-menu a.acct-item:hover, .app-top .dd-menu a.acct-item:focus-visible,
.app-top .dd-menu button.acct-item:hover, .app-top .dd-menu button.acct-item:focus-visible { background: var(--inset); }
.app-top .dd-menu .acct-name { padding: 0 12px 6px; font-size: 14px; color: var(--ink-muted); overflow-wrap: anywhere; }
.app-top .dd-menu a b { display: block; font-weight: 700; font-size: 15px; }
.app-top .dd-menu a span { font-size: 13px; color: var(--text-2); }
.app-top .dd-menu a:hover, .app-top .dd-menu a:focus-visible { background: var(--subtle); }
.app-top .dd-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.app-top .dd-menu .mh { font-size: 13px; font-weight: 700; color: var(--text-2); padding: 8px 12px 4px; }
.app-top .dd-menu .dd-empty { margin: 0; padding: 6px 12px 10px; font-size: 14px; color: var(--text-2); }
.app-top .dd-menu a.support-link b { color: var(--link); letter-spacing: .04em; }
.app-top .chev { transition: transform .15s; }
.app-top [aria-expanded="true"] .chev { transform: rotate(180deg); }

.app-top .app-who { margin-left: auto; display: flex; align-items: center; gap: 8px; }
/* P13 (mockup .icon-btn, line 63): 42px circle, 1px --line border, --surface. */
.app-top .iconbtn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); cursor: pointer; display: grid; place-items: center; position: relative; }
.app-top .iconbtn svg { width: 19px; height: 19px; }
.app-top .iconbtn:hover { background: var(--inset); }
.app-top .themebtn .moon { display: none; }
:root[data-theme="dark"] .app-top .themebtn .sun { display: none; }
:root[data-theme="dark"] .app-top .themebtn .moon { display: inline; }
/* Device dark with no stored choice (P03): same icon swap. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .app-top .themebtn .sun { display: none; }
  :root:not([data-theme="light"]) .app-top .themebtn .moon { display: inline; }
}
/* P13 (mockup .user and .av, lines 65-66): padding 4px 14px 4px 4px, a 34px
 * avatar. The avatar colours are --cobalt-tint / --on-tint; tokens-portal.css
 * gives them #243072 / #E3E8FF in both dark modes. */
.app-top .userbtn { border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font: inherit; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; }
.app-top .userbtn:hover { background: var(--subtle); }
.app-top .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--cobalt-tint); color: var(--on-tint);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.app-top .bell-dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 999px;
  background: #c8312b; border: 2px solid var(--surface); }
.app-top .bell-dot[hidden] { display: none; }
.app-top .menutoggle { display: none; }
/* PUZL v2 team-member header (mockup .biz-tag and .navlink). */
.app-top .dd-menu .acct-mobile { display: none; }
.app-top .biz-tag { font-weight: 700; font-size: 14.5px; color: var(--ink-soft); background: var(--inset);
  border-radius: var(--r-pill); padding: 5px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.app-top .navlink { text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 17px;
  padding: 9px 12px; border-radius: var(--r-pill); }
.app-top .navlink:hover { background: var(--inset); color: var(--ink); }
.app-top .navlink[aria-current="page"] { color: var(--ink); background: var(--inset); }
.app-top .userbtn .chev { margin-right: 6px; color: var(--ink-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The product switcher's rows inside the person's menu (_product_switcher.html). */
.app-top .suite-switcher form { margin: 0; padding: 4px 12px 10px; }
.app-top .suite-locked { padding: 10px 12px 4px; opacity: .6; }
.app-top .suite-locked b { display: block; font-weight: 700; font-size: 15px; }
.app-top .suite-locked span { font-size: 13px; color: var(--text-2); }
.app-top .request-access-btn { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--link); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.app-top .request-access-btn:hover { background: var(--subtle); }

/* Nav centred between the logo and the icons. */
@media (min-width: 1081px) {
  .app-top .mainnav { flex: 1 1 auto; justify-content: center; margin-left: 0; }
  .app-top .app-who { margin-left: 0; }
}
/* At 1080px and below one Menu button opens every group as a stacked panel. */
@media (max-width: 1080px) {
  /* A member has no Menu button: the plain links move to the top of the
     account dropdown (.acct-mobile) at this width, so Files is never lost. */
  .app-top .mainnav.member-nav { display: none; }
  .app-top .dd-menu .acct-mobile { display: block; }
  .app-top .menutoggle { display: inline-flex; border: 1px solid var(--line); }
  .app-top .mainnav { display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0; background: var(--surface);
    flex-direction: column; align-items: stretch; padding: 12px 28px 20px; border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 36px rgba(20,33,58,.16); max-height: calc(100vh - 80px); overflow: auto; z-index: 40; }
  .app-top .mainnav.open { display: flex; }
  .app-top .mainnav .dd-menu { position: static; display: block !important; box-shadow: none; border: 0;
    padding: 0 0 8px 8px; min-width: 0; }
  .app-top .mainnav .navbtn { cursor: default; color: var(--text); padding-left: 12px; }
  .app-top .mainnav .navbtn .chev { display: none; }
  .app-top .mainnav .navbtn:hover { background: none; }
  .app-top .app-who { gap: 4px; }
}
@media (max-width: 640px) {
  .app-top .u-name { display: none; }
}
@media (max-width: 480px) {
  /* One row at 390px (PUZL v2): logo, chip, theme, bell, avatar. The business
     name gives way first; nothing else shrinks below 36px. */
  .app-top .app-wrap { flex-wrap: nowrap; }
  .app-top .biz-tag { flex: 0 1 auto; min-width: 0; max-width: 110px; }
  .app-top .mainnav.member-nav { display: none; }
  /* The chip never clips: it was flex-shrinkable with overflow:hidden, so a
     narrow row cut "LIVE" to "LI". Now only the business name pill shrinks;
     the AI's name is capped at 8ch with an ellipsis, the long reconnect words
     are hidden, and the state word (LIVE, Reconnect, Not connected) always
     shows. The owner's row has its own rules further down. */
  .app-top .app-who { flex: 0 0 auto; justify-content: flex-end; }
  .app-top .ai-chip { flex: none; overflow: visible; gap: 6px; padding: 6px 8px 6px 8px; font-size: 14px; }
  .app-top .ai-chip [data-ai-name] { display: inline-block; max-width: 8ch; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
  .app-top .ai-chip .chip-long { display: none; }
  .app-top .iconbtn { width: 36px; height: 36px; flex: none; }
  .app-top .avatar { width: 30px; height: 30px; font-size: 12px; }
  .app-top .userbtn .chev { margin-right: 2px; }
  .app-top .menutoggle { flex: none; }
  .app-top .app-wrap { padding-left: 16px; padding-right: 16px; gap: 6px; }
  .app-top .app-logo > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .app-top .mt-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .app-top .menutoggle { width: 44px; padding: 0; justify-content: center; }
  .app-top .app-who { gap: 2px; }
  .app-top .userbtn { padding: 4px 6px 4px 4px; }
  /* The mockup's right-hand menus are 290px wide; at 390px the gear and bell
     sit far enough left that right:0 would push them off the left edge. */
  .app-top .app-who .dd { position: static; }
  .app-top .app-who .dd-menu.right { left: 16px; right: 16px; min-width: 0; }
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.app-foot { background: var(--surface); border-top: 1px solid var(--line); margin-top: 40px;
  font-family: var(--font-body); font-size: 15px; line-height: 1.5; color: var(--text); }
.app-foot .app-wrap { padding-top: 56px; padding-bottom: 28px; }
.app-foot :focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.app-foot .fcols { display: grid; grid-template-columns: minmax(220px,1.4fr) repeat(4,minmax(0,1fr)); gap: 28px; }
.app-foot .app-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text);
  font-weight: 900; font-size: 26px; letter-spacing: -.02em; padding: 4px 0; }
.app-foot .app-logo .puzl-mark { flex: none; display: block; }
.app-foot .fbrand p { margin: 12px 0 0; color: var(--text); font-weight: 700; font-size: 17px; max-width: 280px; }
.app-foot .fcol { display: flex; flex-direction: column; gap: 4px; }
.app-foot .fcol h2 { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--text-2);
  text-transform: none; letter-spacing: 0; font-family: var(--font-body); }
.app-foot .fcol a { color: var(--text); text-decoration: none; font-size: 15px; padding: 6px 0; }
.app-foot .fcol a:hover { color: var(--link); text-decoration: underline; }
.app-foot .fcol a.support-link { color: var(--link); font-weight: 800; letter-spacing: .04em; }
.app-foot .fbottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex;
  justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.app-foot .fleg { display: flex; gap: 16px; flex-wrap: wrap; }
.app-foot .fleg a { color: var(--text-2); }
.app-foot .fleg a.support-link { letter-spacing: .04em; }
@media (max-width: 900px) {
  .app-foot .fcols { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .app-foot .fbrand { grid-column: 1/-1; }
}
/* The owner's row (logo, menu, chip, theme, bell, settings, avatar) holds
   one more menu than a member's, and its chip cannot shrink, so it scrolled
   the page sideways on phones (measured 2026-12-03: 418 at 390; with a long
   AI name in Reconnect, 396 at 360 and 434 at 412). So on phones the owner's
   theme switch moves into the account menu (base.html, [data-theme-proxy]),
   and at 400px and narrower the owner's chip drops the AI's name and "Pro":
   the state word stays and the chip's aria-label still names the AI. A
   member's row has no settings menu and keeps both, as the team screen shows. */
/* Same weight as the .acct-item row rule above, and later, so it wins. */
.app-top .dd-menu button.dd-theme { display: none; }
@media (max-width: 480px) {
  .app-top .userbtn .chev { display: none; }
  .app-top .userbtn { padding: 3px; }
  /* The menu button stays 44x44 (the tap-target floor); see line 168. */
  .app-top .app-wrap { gap: 4px; }
  .app-top .app-who:has([data-group="settings"]) .themebtn { display: none; }
  .app-top .app-who:has([data-group="settings"]) .dd-theme { display: flex; width: 100%; border: 0; background: none; font-family: inherit; text-align: left; cursor: pointer; }
}
@media (max-width: 400px) {
  .app-top .app-who:has([data-group="settings"]) .ai-chip [data-ai-name],
  .app-top .app-who:has([data-group="settings"]) .ai-chip [data-pro] { display: none; }
}
@media (max-width: 480px) {
  .app-foot .app-wrap { padding-left: 16px; padding-right: 16px; }
}

/* ── Site-wide page content (Brief 5 G1b) ──────────────────────────────
 * Joe's puzl-app.html literal rules, read directly from his CSS (not from
 * a screenshot), promoted from the Rules pilot's page-scoped copies to the
 * whole portal. Portal-only (this file): admin's base.html never links it,
 * so none of this can reach the admin surface — see
 * tests/test_responsive_css.py::test_admin_css_never_imports_portal_chrome.
 *
 *   .wrap{max-width:1180px;margin:0 auto;padding:0 28px}  main{padding:28px 0 72px}
 *   h1{margin:4px 0 0;font-size:44px;line-height:1;font-weight:900;letter-spacing:-.035em}
 *   .btn{min-height:44px;padding:0 22px;border:0;border-radius:999px;background:#2b45f0;color:#fff;font-weight:700}
 *   .btn.dark{background:#14213a;color:#fff}
 *   .btn.ghost{background:transparent;color:var(--text);border:1.5px solid var(--text)}
 *   .btn.small{min-height:36px;padding:0 14px;font-size:14px}
 *   .btn.outline{background:transparent;color:var(--link);border:1.5px solid var(--line)}
 *   a{color:var(--link)} (keeps the underline on an inline text link)
 */

/* 1. Page container: Joe's .wrap + main combined into our single <main
 * class="pg">. Higher specificity than components.css's bare `.pg` (which
 * admin also uses, unscoped there), so this wins on the portal without
 * touching admin's own 1080px/2rem box. Supersedes the Rules pilot's
 * `main.pg:has(#files-rules)` page-scoped copy, removed from
 * portal_governing.html now that every page gets this. */
main.pg {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 28px 72px;
  /* 15px/1.5 -- Joe's own body text size (typography audit 2026-11-29:
   * measured 15px/22.5px line-height on card/card-title/body/small text
   * across most app pages, consistently 10% larger than what this page
   * inherited). components.css's `body` rule sets 13.5px/1.6 as the
   * shared portal+admin default (admin-shell.css has its own look and was
   * never reviewed against Joe's design, so that default is left alone);
   * this override is scoped to `main.pg`, portal-only (admin's base.html
   * also uses class="pg" but never links this portal-only file), so it
   * reaches every portal page's content without touching admin. */
  font-size: 15px;
  line-height: 1.5;
}

/* 2. Page header: Joe's bare h1 (44px/900/-0.035em/1), and no divider under
 * the header — Joe's screens never draw one. Supersedes the Rules pilot's
 * `#files-rules h1` / `#files-rules .pg-header` page-scoped copies.
 *
 * overflow-wrap: at 44px the old 1.6rem titles never had this, but a page
 * header's title is not always ours to size — portal_site_lead_detail.html
 * puts a website visitor's own typed name straight into it (lead.name,
 * autoescaped but unbounded). A one-word payload like "<script>window..."
 * has no space to break on, so at 390px it pushed the page wider than the
 * viewport (measured on the site-leads detail and spam-detail pages,
 * 2026-11-27). Every other place untrusted text lands in this codebase
 * wraps the same way (components.css's .src-tile-note, .preview-field-value,
 * .data-table--sticky-actions td). */
/* :not(.fr-h1) -- portal_signup.html extends base.html (the SAME <main
 * class="pg"> wrapper every dashboard page uses) rather than
 * _first_run_base.html's fr-main, so this rule's higher specificity
 * (0,1,2 vs. .fr-h1's 0,1,0) was silently demoting the sign-up H1 from
 * the onboarding family's 52px (first-run.css:106) down to this rule's
 * 44px -- both sign-up pages measured 44px against Joe's 52px (typography
 * audit 2026-11-29, Finding 1). Every other onboarding page extends
 * _first_run_base.html's fr-main instead, which this selector never
 * matched, so excluding .fr-h1 here fixes sign-up without touching any
 * dashboard page's own H1. */
main.pg h1:not(.fr-h1) {
  margin: 4px 0 0;
  font-size: 2.75rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}
/* Typography audit 2026-11-29, Finding 2: Joe's own puzl-app.html shrinks
 * this H1 at narrow widths (44px -> 36px, measured); this rule had no
 * mobile override at all, so it stayed flat 44px on every one of our 12
 * app pages at 390px. Same breakpoint as first-run.css's .fr-h1 override
 * (640px). letter-spacing stays -0.035em (unchanged from the base rule
 * above) -- Joe's measured 390 value (-1.26px) is exactly -0.035em * 36px,
 * so no separate override is needed for it. */
@media (max-width: 640px) {
  main.pg h1:not(.fr-h1) { font-size: 36px; }
}
main.pg .pg-header {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 1.25rem;
}
/* Subcopy directly under an h1 (Joe's `.lead`: 17px, 680px max width, no
 * divider above it). Not every page has one; this is the shared class for
 * the ones that do. Supersedes the Rules pilot's page-scoped `.pg-rules-lead`. */
main.pg .pg-sub {
  /* Joe's own `.lead` margin is also `8px 0 0` (puzl-app.html) — his ~32px
   * gap to the first card comes from the NEXT element, not from .lead
   * itself, so matching that number has to live on our side of the seam.
   * Brief 5 G1b pass 2: found touching (0px) on app-playbook-rules's
   * light shot, because `.pg-rules-group` carries no margin-top either. */
  margin: 8px 0 32px;
  max-width: 680px;
  color: var(--text-2);
  font-size: 1.0625rem;
}

/* 3. Buttons: Joe's three pill shapes, mapped onto the portal's existing
 * button classes rather than renaming every call site. `.btn-primary` is
 * Joe's bare filled `.btn`; `.btn-ghost` is `.btn.ghost`; `.btn-secondary`
 * is `.btn.outline`. Each is written as a complete, self-sufficient rule
 * (not relying on being paired with a bare `.btn`), because several portal
 * templates already use `.btn-secondary` alone (portal_settings_team.html).
 * `.btn-sm` is Joe's `.btn.small` height/padding/font-size, layered on top
 * of whichever colour class it is paired with. Supersedes the Rules pilot's
 * page-scoped `.pg-rules-btn-pill` / `.pg-rules-btn-pill-primary` — both
 * removed from portal_governing.html, replaced with `.btn-ghost`/`.btn-sm`
 * and `.btn-primary`/`.btn-sm`. */
.btn, .btn-primary, .btn-ghost, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--cobalt);
  color: #fff;
}
.btn:hover, .btn-primary:hover { background: var(--cobalt-deep); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--text);
}
.btn-ghost:hover { background: var(--subtle); border-color: var(--text); color: var(--text); }
.btn-secondary {
  background: transparent;
  color: var(--link);
  border: 1.5px solid var(--line);
}
.btn-secondary:hover { border-color: var(--link); color: var(--link); }
.btn-sm, .btn--sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

/* 3b. The danger button takes the portal's pill shape. components.css gives
 * `.btn-danger` the admin shape (4px 10px, 0.78rem, small radius), which sat
 * next to a 44px `.btn-ghost` pill in the Your AI disconnect dialog. Shape
 * only here; the danger colours and hover come from components.css, restated
 * for `.btn btn-danger` (api keys) where `.btn`'s cobalt would otherwise win.
 * This file loads in the portal only, so admin keeps the small shape. */
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  border: 1.5px solid var(--error-br);
  background: var(--error-bg);
  color: var(--error);
}
.btn-danger:hover:not(:disabled) { background: var(--error); border-color: var(--error); color: var(--btn-danger-hover-fg); }
.btn-danger.btn-sm, .btn-danger.btn--sm { min-height: 36px; padding: 0 14px; font-size: 14px; }

/* 4. Inline text links in body copy: Joe's base `a{color:var(--link)}`
 * keeps the browser underline — components.css strips it sitewide
 * (`a { text-decoration: none; }`), which is right for nav/menu/footer/
 * button links (Joe's own .fcol/.navbtn/.btn have none) and wrong for a
 * link inside a paragraph, list item or table cell. Scoped to those three
 * contexts rather than every `<a>`, and excluding anything button-shaped
 * (`class*="btn"`) that happens to sit in a table cell's actions column.
 * Supersedes the Rules pilot's page-scoped `.pg-rules-blurb a`. */
main.pg p a:not([class*="btn"]),
main.pg li a:not([class*="btn"]),
main.pg td a:not([class*="btn"]) {
  text-decoration: underline;
}

/* 5. Cards and tables: Joe's card radius/padding (dsh-card already matches
 * this on the dashboards) and his table header/row style (sentence case,
 * body font, 13px/700 headers — not components.css's uppercase mono),
 * as the portal defaults. The compact/mono/notes `.data-table` variants
 * (components.css) are untouched: their own compound selectors
 * (`.data-table--compact th`, etc.) carry higher specificity than the
 * plain `.data-table th` below, so they keep overriding it exactly as
 * before. Reference pages: the Rules table (app-playbook-rules) and
 * Team People (app-team-people). */
main.pg .card {
  border-radius: var(--r-lg);
  padding: 24px;
}
main.pg .data-table th {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-2);
  padding: 8px 12px 8px 0;
}
main.pg .data-table td {
  padding: 10px 12px 10px 0;
}
