/* UYWI LDP demonstration. System fonts only; no external assets.
   Widths: desktop above 860px (sidebar), tablet 641 to 860px (top bar, but
   real tables and multi-column grids), phone 640px and below (stacked). */
:root {
  --navy: #16233f;
  --navy-2: #22355e;
  --ink: #1b2437;
  --muted: #586276;
  --line: #e5e1d9;
  --line-strong: #cfc9bd;
  --control: #868b98; /* 3.4:1 on white: the edge of every input and choice */
  --bg: #f6f4ef;
  --card: #ffffff;
  --accent: #f0883e;
  --accent-ink: #a8470f;
  --accent-soft: #fdf1e6;
  --blue-soft: #e6edf5;
  --good: #1c6646;
  --good-soft: #e5f2ea;
  --warn: #7d5200;
  --warn-soft: #fbf0d6;
  --info: #1d4f8f;
  --info-soft: #e6eef9;
  --care: #8c2f39;
  --care-soft: #f9e8ea;
  --radius: 14px;
  --radius-small: 9px;
  --shadow: 0 1px 2px rgba(22, 35, 63, 0.04), 0 4px 14px rgba(22, 35, 63, 0.04);
  --shadow-lift: 0 2px 4px rgba(22, 35, 63, 0.06), 0 10px 24px rgba(22, 35, 63, 0.1);
  --strip: 34px;  /* demonstration strip */
  --guide: 0px;   /* guide strip, when there is one */
  --bar: 0px;     /* top bar that replaces the sidebar below 861px */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
html.has-guide { --guide: 48px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--strip) + var(--guide) + var(--bar) + 16px); }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--bg); overflow-wrap: break-word; }
h1, h2, h3 { color: var(--navy); line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 1.85rem; font-weight: 700; }
h2 { font-size: 1.12rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 0.75em; }
p:last-child { margin-bottom: 0; }
a { color: var(--info); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
code, pre { font-family: var(--mono); font-size: 0.88em; }
:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 8px; color: #fff; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: 0.86rem; }
.nowrap { white-space: nowrap; }
.icon { flex: none; }
.icon-small { width: 16px; height: 16px; }
.icon-large { width: 30px; height: 30px; }

/* Demonstration strip: one fixed-height line, always in view */
.demo-strip { position: sticky; top: 0; z-index: 50; height: var(--strip); display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 16px; background: var(--navy); color: #e8ecf4; font-size: 0.8125rem; white-space: nowrap; overflow: hidden; }
.demo-strip a { color: #ffd2ad; font-weight: 600; display: inline-flex; align-items: center; height: var(--strip); padding: 0 8px; }
.demo-strip a:focus-visible, .credits-card:focus-visible { outline-color: #fff; outline-offset: -3px; }
.demo-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.demo-short { display: none; }

/* Guide strip: sticky directly under the demonstration strip */
.guide-strip { position: sticky; top: var(--strip); z-index: 45; height: var(--guide); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 24px; background: var(--accent-soft); border-bottom: 1px solid #f3d6bd; font-size: 0.9rem; white-space: nowrap; }
.guide-now { margin: 0; color: #5c2a08; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.guide-actions { display: flex; align-items: center; gap: 10px; }
.guide-form { display: flex; align-items: center; gap: 8px; }
.guide-form label { font-weight: 600; color: #5c2a08; }
.guide-form select { width: auto; min-height: 32px; height: 32px; padding: 2px 30px 2px 10px; font-size: 0.88rem; }
.guide-strip :focus-visible { outline-color: var(--navy); }
.guide-toggle { display: none; }

/* Shell */
.shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: calc(100vh - var(--strip) - var(--guide)); }
.sidebar { background: var(--card); border-right: 1px solid var(--line); position: sticky; top: calc(var(--strip) + var(--guide)); height: calc(100vh - var(--strip) - var(--guide)); overflow-y: auto; display: flex; flex-direction: column; padding: 22px 16px 18px; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand-name { font-weight: 750; font-size: 1.05rem; letter-spacing: 0.01em; }
.brand-center { display: flex; justify-content: center; margin-bottom: 14px; }
.brand-light { color: #fff; }
.monogram { flex: none; display: block; }
.menu-button { display: none; }
.site-nav { display: flex; flex-direction: column; flex: 1; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.site-nav li a { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 8px 12px; border-radius: var(--radius-small); color: #3b4458; text-decoration: none; font-size: 0.95rem; }
.site-nav li a:hover { background: #f3f1ec; color: var(--navy); }
.site-nav li a[aria-current="page"] { background: #eef0f4; color: var(--navy); font-weight: 650; }
.site-nav li a[aria-current="page"] .icon { color: var(--accent-ink); }
.who { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.who-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-small); text-decoration: none; color: var(--ink); }
.who-card:hover, .who-card[aria-current="page"] { background: #f3f1ec; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--blue-soft); color: var(--navy); display: grid; place-items: center; font-size: 0.82rem; font-weight: 700; }
.who-text { display: grid; line-height: 1.25; min-width: 0; }
.who-name { font-weight: 650; font-size: 0.92rem; }
.who-title { color: var(--muted); font-size: 0.8125rem; }
.sign-out { width: 100%; min-height: 36px; padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--navy); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.sign-out:hover { background: #f3f1ec; border-color: var(--control); }

/* One content width on every page; text and forms are held narrower inside it */
.main { padding: 34px 44px 72px; max-width: 1288px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.lede { color: var(--muted); font-size: 1.04rem; margin: 6px 0 0; max-width: 70ch; }
.subnav { position: sticky; top: calc(var(--strip) + var(--guide) + var(--bar)); z-index: 30; margin: -8px -8px 20px; padding: 8px; background: var(--bg); border-bottom: 1px solid var(--line); overflow-x: auto; }
.subnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; white-space: nowrap; }
.subnav a { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--line-strong); color: var(--navy); font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.subnav a:hover { background: #f3f1ec; border-color: var(--control); }
.subnav ~ [id], .subnav ~ * [id] { scroll-margin-top: 60px; }

/* Plain pages: sign-in, review form, signed-out About and errors */
.plain-main { max-width: 480px; margin: 0 auto; padding: 44px 20px 72px; min-height: calc(100vh - var(--strip) - var(--guide)); display: flex; flex-direction: column; justify-content: center; }
.plain-main.medium { max-width: 620px; }
.plain-main.split { max-width: 940px; }
.plain-main.wide { max-width: 860px; display: block; }
.plain-main .card { margin-bottom: 0; }
.plain-main.wide .card { margin-bottom: 20px; }
.plain-main .card-pad > h1 { margin: 14px 0 10px; }
.plain-main .card-pad > .lede { margin: 0 0 12px; }
.plain-main .card-pad > form { margin-top: 18px; }
.center-card { text-align: center; }
.center-card h1 { font-size: 1.5rem; margin-bottom: 8px; }
.center-card .btn { margin-top: 10px; }
.error-card { max-width: 520px; margin: 8vh auto 0; }
.sign-in-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lift); background: var(--card); }
.sign-in-about { background: var(--navy); color: #dfe5f0; padding: 40px 36px; display: flex; flex-direction: column; gap: 18px; }
.sign-in-lede { font-size: 1.3rem; font-weight: 650; color: #fff; line-height: 1.3; margin: 8px 0 0; }
.sign-in-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 0.95rem; }
.sign-in-points li { display: flex; gap: 12px; align-items: flex-start; }
.sign-in-points .icon { color: #ffb37a; margin-top: 2px; }
.sign-in-note { margin: auto 0 0; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.18); font-size: 0.88rem; color: #c9d3e6; }
.sign-in { border: 0; border-radius: 0; box-shadow: none; padding: 40px 32px; display: flex; flex-direction: column; justify-content: center; }
.plain-main .sign-in > h1 { font-size: 1.5rem; margin: 0 0 4px; }
.sign-in form { margin: 18px 0 16px; }
.about-head { margin-bottom: 24px; }
.about-head h1 { margin: 18px 0 8px; }
.about-body { max-width: 860px; }
.about-body .about-head h1 { margin-top: 0; }

/* Cards and layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; min-width: 0; }
.card-pad { padding: 22px 24px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 20px 24px 0; }
.card-head h2 a, .card-head h3 a { color: var(--navy); }
.card-sub { color: var(--muted); font-size: 0.9rem; margin: 4px 0 0; max-width: 78ch; }
.card-body { padding: 16px 24px 22px; }
.card-body > h3 { margin: 22px 0 12px; }
.card-body > h3:first-child { margin-top: 0; }
.grid.inner h3 { margin-bottom: 12px; }
.card-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.lift { transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease; }
.lift:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
.grid { display: grid; gap: 20px; margin-bottom: 20px; }
.grid > .card { margin-bottom: 0; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two-wide { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
.grid.start { align-items: start; }
.grid.inner { margin-bottom: 18px; gap: 28px; }
.stack-cards > .card:last-child { margin-bottom: 0; }
.section { margin: 30px 0 0; }
.section + .card, .section-sub + .card { margin-top: 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; }
.section-sub { color: var(--muted); font-size: 0.92rem; margin: -6px 0 14px; max-width: 80ch; }
.group-heading { margin: 30px 0 12px; }
.more-link { font-weight: 600; font-size: 0.92rem; }
.count { display: inline-block; min-width: 1.6em; padding: 1px 8px; margin-left: 4px; border-radius: 99px; background: #e9e6df; color: var(--navy); font-size: 0.8125rem; text-align: center; vertical-align: 2px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8125rem; font-weight: 700; color: var(--accent-ink); margin: 0 0 4px; }
.eyebrow .badge { text-transform: none; letter-spacing: 0; margin-left: 4px; }
.notice { background: var(--blue-soft); border-radius: var(--radius-small); padding: 12px 16px; color: #1f2f4d; font-size: 0.93rem; margin-bottom: 20px; max-width: 110ch; }
.empty { color: var(--muted); font-style: italic; margin: 0; }
.plain-list { margin: 0 0 0.75em; padding-left: 1.2em; }
.plain-list li { margin-bottom: 6px; }
.plain-list:last-child { margin-bottom: 0; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; background: #efede7; color: #3d4557; font-size: 0.8125rem; font-weight: 600; }
.target-card:target { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Flash messages */
.flash { border-radius: var(--radius-small); padding: 12px 16px; margin-bottom: 20px; font-weight: 550; border: 1px solid transparent; }
.flash-ok { background: var(--good-soft); color: #134a32; border-color: #bfdfcc; }
.flash-error { background: var(--care-soft); color: #6f1f29; border-color: #ecc4c8; }
.flash-info { background: var(--warn-soft); color: #5c3c00; border-color: #ecd9a4; }

/* Buttons. One height. Solid navy for the action that commits a form,
   outline for secondary actions, red outline for ones that undo or refuse. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 7px 18px; border-radius: 10px; border: 1px solid var(--control); background: #fff; color: var(--navy); font: inherit; font-weight: 600; font-size: 0.95rem; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color 0.12s ease, border-color 0.12s ease; }
.btn:hover { background: #f3f1ec; color: var(--navy); border-color: #6d7280; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.btn-danger { border-color: var(--care); color: var(--care); }
.btn-danger:hover { background: var(--care-soft); border-color: var(--care); color: #6f1f29; }
.btn-small { padding: 7px 14px; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn-strip { min-height: 32px; height: 32px; padding: 2px 12px; font-size: 0.86rem; border-radius: 8px; }
.btn-light { background: #fff; border-color: #c98a55; color: #5c2a08; }
.btn-ghost-light { background: transparent; border-color: #c98a55; color: #5c2a08; }
.btn-ghost-light:hover, .btn-light:hover { background: #fbe3cf; border-color: #b0733f; color: #5c2a08; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Badges: sentence case everywhere */
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 0.8125rem; font-weight: 650; line-height: 1.5; white-space: nowrap; background: #eceae4; color: #3d4557; }
.badge-good { background: var(--good-soft); color: var(--good); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge-care { background: var(--care-soft); color: var(--care); }
.badge-identity { background: #e9ecf3; color: var(--navy); }
.badge-row { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.sample-note { display: inline-block; font-size: 0.78rem; color: var(--muted); background: #f1efe9; border: 1px dashed var(--control); border-radius: 6px; padding: 1px 8px; font-weight: 500; white-space: normal; }

/* Forms */
.stack { display: grid; gap: 16px; }
.stack > .btn { justify-self: start; }
.stack > .btn-block { justify-self: stretch; }
.form-narrow { max-width: 560px; }
.field { display: grid; gap: 5px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field label, .field legend { font-weight: 600; font-size: 0.93rem; color: var(--ink); padding: 0; }
.hint { color: var(--muted); font-size: 0.86rem; margin: 0; }
.visibility-hint { background: var(--blue-soft); color: #1f2f4d; border-radius: var(--radius-small); padding: 8px 12px; }
.field-error { color: var(--care); font-size: 0.86rem; font-weight: 600; margin: 0; }
input[type="text"], input[type="password"], input[type="search"], input[type="number"], select, textarea { width: 100%; max-width: 560px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--control); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; }
textarea { resize: vertical; min-height: 76px; line-height: 1.5; max-width: 640px; }
select { text-overflow: ellipsis; appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, #586276 50%), linear-gradient(135deg, #586276 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--info); outline-offset: 1px; border-color: var(--info); border-radius: 10px; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--care); border-width: 2px; }
.input-small { width: 88px !important; }
.select-small { width: auto; min-width: 76px; }
.choice legend { margin-bottom: 4px; }
.choice-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.choice-item { position: relative; }
.choice-item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-item label { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; min-height: 42px; padding: 6px 16px; border: 1px solid var(--control); border-radius: 10px; background: #fff; font-weight: 600; cursor: pointer; }
.choice-item label:hover { background: #f3f1ec; }
.choice-item input:checked + label { background: var(--navy); border-color: var(--navy); color: #fff; }
.choice-item input:focus-visible + label { outline: 3px solid var(--info); outline-offset: 2px; }
.choice[data-invalid="true"] .choice-item label { border-color: var(--care); border-width: 2px; }
.choice[data-invalid="true"] .choice-item input:checked + label { border-color: var(--navy); }
.scale legend { font-weight: 500; }
.scale-end { color: var(--muted); font-size: 0.8125rem; }
.scale .scale-end:first-child { margin-right: 2px; }
.scale .scale-end:last-child { margin-left: 2px; }
.pulse-group { display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.pulse-group h3 { color: var(--accent-ink); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8125rem; }
.privacy-note { display: flex; gap: 8px; align-items: flex-start; background: var(--blue-soft); border-radius: var(--radius-small); padding: 10px 14px; font-size: 0.9rem; margin-bottom: 18px; max-width: 640px; }
.privacy-note .icon { margin-top: 3px; }
.field-pair { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 12px; align-items: start; }
.filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.filters .field { flex: 1 1 190px; }
.filters-one .field { flex: 0 1 320px; }
.filter-actions { display: flex; gap: 8px; }
/* Every setting has a label, a hint and an input; the input sits on the
   bottom edge so the two columns line up whatever the hint's length. */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 32px; margin-bottom: 22px; }
.settings-grid .field { grid-template-rows: auto 1fr auto; align-content: stretch; }
.settings-grid .field > input, .settings-grid .field > select { max-width: 220px; align-self: end; }
.settings-grid .hint { align-self: start; }
.settings-form > .btn { margin-top: 4px; }
.settings-form .table-wrap { margin-bottom: 18px; }

/* Things that open: one chevron style instead of the browser's triangle */
details.disclosure > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 16px 6px 10px; border: 1px solid var(--control); border-radius: 10px; background: #fff; color: var(--navy); font-weight: 600; font-size: 0.93rem; cursor: pointer; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary:hover { background: #f3f1ec; }
.chev { display: grid; place-items: center; transition: transform 0.12s ease; }
details[open] > summary .chev { transform: rotate(90deg); }
.disclosure-body { margin-top: 12px; }
details.inline-form { margin-top: 14px; }
details.reverse > summary { min-height: 34px; padding: 3px 12px 3px 6px; font-size: 0.88rem; border-color: var(--care); color: var(--care); }
details.reverse .stack { min-width: 220px; gap: 10px; }
details.more-rows { margin-top: 14px; }

/* Facts */
.facts { display: grid; gap: 8px; margin: 0; }
.facts > div { display: grid; grid-template-columns: minmax(110px, 190px) minmax(0, 1fr); gap: 4px 16px; }
.facts dt { color: var(--muted); font-size: 0.9rem; }
.facts dd { margin: 0; }
.facts-tiles { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 24px; }
.facts-tiles > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
.facts-tiles dt { font-size: 0.8125rem; }
.facts-tiles dd { font-weight: 600; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.table th { text-align: left; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 650; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table th.num { padding-right: 12px; }
.cell-sub { display: block; color: var(--muted); font-size: 0.8125rem; }
.cell-list { display: grid; gap: 2px; font-size: 0.88rem; white-space: nowrap; }
.amount { font-weight: 650; font-variant-numeric: tabular-nums; }
.amount.plus, .credit-plus { color: var(--good); font-weight: 650; white-space: nowrap; }
.amount.minus { color: var(--care); }
.source-id { font-family: var(--mono); white-space: nowrap; }
/* Why an approved log earned nothing: a sentence, so it wraps under the badge even in a cell that otherwise does not */
.table .credits-why { display: block; white-space: normal; min-width: 13rem; max-width: 22rem; margin-top: 4px; font-size: 0.86rem; }

/* Meters */
.meter { margin-bottom: 14px; }
.meter:last-child { margin-bottom: 0; }
.meter-label { display: flex; justify-content: space-between; gap: 10px; font-size: 0.88rem; margin-bottom: 5px; }
.meter-value { font-weight: 650; white-space: nowrap; }
.cap-extra { margin: -6px 0 14px; }
progress { display: block; width: 100%; height: 9px; border: 0; border-radius: 99px; background: #ebe8e1; overflow: hidden; appearance: none; -webkit-appearance: none; }
progress::-webkit-progress-bar { background: #ebe8e1; border-radius: 99px; }
progress::-webkit-progress-value { background: var(--navy); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--navy); border-radius: 99px; }

/* Home */
.home-top { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 20px; margin-bottom: 20px; }
.welcome { background: var(--blue-soft); border-radius: var(--radius); padding: 28px 30px; display: flex; flex-direction: column; justify-content: center; }
.welcome h1 { font-size: 1.7rem; margin-bottom: 8px; }
.welcome p { font-size: 1.04rem; color: #26334d; }
.welcome p:last-child { margin-top: 6px; }
.identity-card { display: grid; align-content: center; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; text-decoration: none; color: var(--navy); }
.identity-head { display: flex; align-items: center; gap: 14px; }
.identity-glyph { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.identity-label { display: block; font-size: 0.86rem; color: var(--muted); }
.identity-value { display: block; font-size: 1.3rem; font-weight: 750; line-height: 1.2; }
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.journey li { position: relative; display: grid; justify-items: center; gap: 6px; font-size: 0.75rem; color: var(--muted); text-align: center; }
.journey li + li::before { content: ""; position: absolute; top: 6px; right: 50%; width: 100%; height: 2px; background: var(--line-strong); }
.journey-dot { position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--control); }
.journey .here .journey-dot { background: var(--accent); border-color: var(--accent-ink); box-shadow: 0 0 0 4px var(--accent-soft); }
.journey .here .journey-name { color: var(--navy); font-weight: 700; }
.mini { margin-bottom: 0; display: block; }
.mini-title { font-size: 0.86rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.mini-strong { font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.mini-line { color: #3b4458; font-size: 0.9rem; margin-bottom: 2px; }
.mini p:last-child a:not(.btn) { font-weight: 600; font-size: 0.9rem; }
.mini .btn, .roadmap-action { margin-top: 8px; }
.link-card { display: grid; align-content: start; gap: 2px; text-decoration: none; color: var(--ink); }
.link-card .mini-strong, .link-card .mini-line { display: block; }
.link-card .pill { justify-self: start; margin-top: 8px; }
.link-card:hover .mini-strong { text-decoration: underline; text-underline-offset: 2px; }
.session-dots { list-style: none; margin: 10px 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.session-dots li { width: 16px; height: 16px; border-radius: 50%; }
.dot-attended { background: var(--navy); }
.dot-missed { background: #fff; border: 2px solid var(--warn); background-image: linear-gradient(45deg, transparent 43%, var(--warn) 43%, var(--warn) 57%, transparent 57%); }
.dot-upcoming { background: #fff; border: 2px dashed var(--control); }
.credits-card { background: var(--navy); border-color: var(--navy); color: #fff; text-decoration: none; display: grid; align-content: center; gap: 4px; }
a.credits-card:hover { background: var(--navy-2); color: #fff; border-color: var(--navy-2); }
.credits-label { color: #ffb37a; font-weight: 700; font-size: 0.95rem; }
.credits-value { font-size: 1.75rem; font-weight: 750; line-height: 1.2; }
.credits-month { display: flex; align-items: flex-end; gap: 12px; margin: 6px 0 2px; color: #dfe5f0; font-size: 0.88rem; }
.spark-bar { fill: #7f8db0; }
.spark-now { fill: #ffb37a; }
.credits-link { color: #c9d3e6; font-size: 0.86rem; }
.home-row { margin-bottom: 0; }
.home-foot { margin-top: 28px; max-width: 90ch; }

/* Passport and charts */
.passport-head { display: grid; grid-template-columns: minmax(220px, 0.5fr) minmax(0, 1.5fr); gap: 24px; align-items: center; }
.passport-id { display: flex; align-items: center; gap: 14px; }
.passport-identity { font-size: 1.6rem; font-weight: 750; color: var(--navy); margin: 0; line-height: 1.2; }
.dim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); gap: 14px; margin-bottom: 10px; }
.dim-chart { margin: 0; border: 1px solid var(--line); border-radius: var(--radius-small); padding: 12px 12px 6px; background: #fdfcfa; }
.dim-chart figcaption { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 8px; }
.dim-name { font-weight: 650; color: var(--navy); }
.dim-latest { font-size: 1.3rem; font-weight: 750; color: var(--navy); font-variant-numeric: tabular-nums; }
.dim-change { grid-column: 1 / -1; font-size: 0.8125rem; color: var(--muted); margin: 0; }
.dim-big { font-size: 2.6rem; font-weight: 750; color: var(--navy); line-height: 1.1; margin: 10px 0 6px; font-variant-numeric: tabular-nums; }
.dim-single { padding-bottom: 14px; }
/* Chart drawings keep their own pixel size, so their text is never scaled up */
.dim-chart svg, .month-bars { display: block; max-width: 100%; height: auto; margin-top: 4px; }
.chart-box { overflow-x: auto; }
.grid-line { stroke: #e7e3da; stroke-width: 1; }
.axis-text { fill: #586276; font-size: 12px; font-family: var(--font); }
.series-line { fill: none; stroke: var(--navy); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.series-point { fill: var(--navy); stroke: #fdfcfa; stroke-width: 2; }
.point-label { fill: var(--ink); font-size: 12px; font-weight: 650; font-family: var(--font); }
.bar { fill: #7986a8; }
.bar-now { fill: var(--navy); }
.bar-zero { fill: var(--line-strong); }
.credential-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-auto-rows: 1fr; gap: 12px; }
.credential-list li { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-small); padding: 12px 14px; }
.credential-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.credential-title { display: block; font-weight: 650; color: var(--navy); }
.credential-meta { display: block; color: var(--muted); font-size: 0.8125rem; }
.expiry-warning { background: var(--warn-soft); color: #5c3c00; border-radius: var(--radius-small); padding: 8px 12px; }

/* Roadmap, logs, resources */
.roadmap { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.roadmap li { border-left: 3px solid var(--accent); padding: 2px 0 2px 16px; }
.roadmap-title { font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.impact-list { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 14px; }
.impact-list li { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius-small); padding: 14px 16px; background: #fdfcfa; }
.impact-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.cohort-facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: center; margin-bottom: 18px; }
.log-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.log-list li { display: grid; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.log-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.log-link { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.log-meta { color: var(--muted); font-size: 0.85rem; }
.resource-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.resource-card { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 0; }
.resource-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--blue-soft); color: var(--navy); flex: none; }
.resource-title { font-size: 1rem; }
.resource-kind { color: var(--accent-ink); font-size: 0.8125rem; font-weight: 650; margin: 2px 0 6px; }
.resource-detail { color: #3b4458; font-size: 0.92rem; }

/* Leadership Guide sample */
.chat { display: grid; gap: 12px; }
.chat-turn { margin: 0; padding: 12px 16px; border-radius: 14px; max-width: 92%; font-size: 0.95rem; }
.chat-who { display: block; font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 3px; color: var(--muted); }
.chat-you { background: var(--blue-soft); justify-self: end; border-bottom-right-radius: 4px; }
.chat-guide { background: #f4f2ec; border: 1px dashed var(--control); justify-self: start; border-bottom-left-radius: 4px; }
.chat-box { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.chat-box-field { flex: 1; min-height: 40px; display: flex; align-items: center; padding: 8px 12px; border: 1px dashed var(--control); border-radius: 10px; background: #f4f2ec; color: var(--muted); font-size: 0.92rem; }
.chat-box-send { min-height: 40px; display: inline-flex; align-items: center; padding: 7px 18px; border-radius: 10px; background: #dcdfe6; color: #586276; font-weight: 600; font-size: 0.95rem; }
.guide-sample { border-style: dashed; border-color: var(--control); }

/* Criteria, queue, approvals */
.criteria { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.criteria li { display: flex; gap: 10px; align-items: flex-start; }
.tick { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; margin-top: 1px; }
.tick-yes { background: var(--good-soft); color: var(--good); }
.tick-no { background: #efece6; color: #5d6474; }
.criterion-text { display: grid; }
.criterion-label { font-size: 0.93rem; }
.criterion-detail { color: var(--muted); font-size: 0.8125rem; }
.unmet .criterion-label { color: #454d60; }
.queue-list { display: grid; gap: 10px; }
details.queue-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
details.queue-item > summary { display: grid; grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; width: 100%; min-height: 64px; padding: 12px 18px 12px 14px; border: 0; border-radius: var(--radius); background: transparent; font-weight: 400; }
details.queue-item > summary:hover { background: #faf9f6; }
.queue-who { display: grid; min-width: 0; }
.queue-name { font-weight: 700; color: var(--navy); font-size: 1rem; }
.queue-sub { color: var(--muted); font-size: 0.86rem; }
.queue-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.queue-met { color: #3b4458; font-size: 0.88rem; font-weight: 600; white-space: nowrap; }
.queue-open { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 14px; border: 1px solid var(--control); border-radius: 10px; color: var(--navy); font-weight: 600; font-size: 0.9rem; }
details.queue-item[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.queue-body { margin: 0; padding: 16px 20px 20px 46px; }
.queue-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.queue-card { margin-bottom: 0; }
.span-all { grid-column: 1 / -1; }
.activation-wide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; align-items: start; }
.decision-form { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.decision-form .btn { justify-self: start; }
.care-reasons { background: var(--care-soft); border-radius: var(--radius-small); padding: 12px 14px; margin-bottom: 16px; color: #4d1920; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 8px; }
.stat-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; }
.attention { margin-top: 0; }
.stat { display: grid; gap: 0; align-content: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.stat-value { font-size: 1.7rem; font-weight: 750; color: var(--navy); line-height: 1.2; }
.stat-kicker { color: var(--accent-ink); font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-strong { font-weight: 700; color: var(--navy); font-size: 1.05rem; }
.stat-label { color: var(--muted); font-size: 0.88rem; }
.approval-list { display: grid; gap: 16px; }
.approval { margin-bottom: 0; box-shadow: none; background: #fdfcfa; }
.approval-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cap-note { margin: 14px 0 0; font-size: 0.88rem; color: var(--muted); }
.cap-note.at-cap { background: var(--warn-soft); color: #5c3c00; border-radius: var(--radius-small); padding: 8px 12px; margin-top: 0; }
.approval .cap-note { margin-top: 14px; }
.approval-form { display: grid; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.schedule { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-small); overflow: hidden; }
.schedule li { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
.schedule li:last-child { border-bottom: 0; }
.schedule-day { font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.schedule-note { display: block; font-size: 0.8125rem; }
.schedule-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.schedule li.step-due { color: var(--ink); background: var(--warn-soft); }
.schedule li.step-done { color: var(--good); background: var(--good-soft); }
.schedule li.step-not_needed { color: #6b7385; background: #faf9f6; }
.impact-record { display: grid; gap: 12px; }
.card-body:not(.activation-wide) > .impact-record { border-top: 1px solid var(--line); padding-top: 14px; }
.payload { background: var(--navy); color: #e8ecf4; padding: 16px 18px; border-radius: var(--radius-small); overflow-x: auto; margin: 0; }

/* Restricted sections */
.restricted { border-color: #e6c3c7; border-left: 4px solid var(--care); }
.restricted-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--care); font-size: 0.8125rem; font-weight: 700; margin: 0 0 4px; }
.restricted-heading { display: flex; align-items: center; gap: 8px; margin: 34px 0 6px; font-size: 1.25rem; color: var(--care); }
details.pulse-entry { border: 1px solid var(--line); border-radius: var(--radius-small); margin-bottom: 10px; background: #fdfcfa; }
details.pulse-entry > summary { display: flex; width: 100%; min-height: 46px; padding: 8px 14px 8px 10px; border: 0; border-radius: var(--radius-small); background: transparent; color: var(--ink); font-weight: 500; }
details.pulse-entry > summary .summary-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; }
.pulse-quarter { font-weight: 700; color: var(--navy); }
.pulse-entry .disclosure-body { margin: 0; }
.pulse-detail { padding: 6px 14px 14px 34px; display: grid; gap: 12px; }
.answers { list-style: none; padding: 0; }
.answer-score { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: #e9ecf3; color: var(--navy); font-weight: 700; font-size: 0.85rem; margin-right: 6px; }
.observation-list { display: grid; gap: 12px; }
.observation { border: 1px solid var(--line); border-radius: var(--radius-small); padding: 14px 16px; background: #fdfcfa; display: grid; gap: 10px; }
.observation p { margin: 0; }
.observation-head .fine { margin-left: 6px; }
.ratings { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 6px 16px; font-size: 0.93rem; }
.observation-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.observation-note { border-left: 3px solid var(--line-strong); padding-left: 12px; color: #2c3447; }
.input-360 { border: 1px solid var(--line); border-radius: var(--radius-small); padding: 14px 16px; margin-bottom: 14px; background: #fdfcfa; display: grid; gap: 8px; }
.link-once { border: 2px solid var(--accent); background: var(--accent-soft); }
.link-once h2 { margin-bottom: 8px; }
.copy-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.copy-input { flex: 1 1 320px; max-width: none !important; font-family: var(--mono); font-size: 0.85rem; }
.account-sign-out { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.account-lede { max-width: 80ch; }

/* The styled confirmation that replaces the browser's own */
dialog.confirm { border: 0; border-radius: var(--radius); padding: 24px 26px; width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow-lift); color: var(--ink); }
dialog.confirm::backdrop { background: rgba(22, 35, 63, 0.5); }
dialog.confirm h2 { font-size: 1.2rem; margin-bottom: 8px; }
dialog.confirm .button-row { margin-top: 20px; justify-content: flex-end; }

/* Narrower desktop and tablet: fewer columns, same components */
@media (max-width: 1100px) {
  .main { padding: 28px 28px 64px; }
  .grid.two-wide, .queue-grid, .passport-head, .activation-wide, .home-top { grid-template-columns: minmax(0, 1fr); }
  /* The guide tools fold away behind "Change" when they no longer fit on one line */
  .js .guide-toggle { display: inline-flex; align-items: center; min-height: 44px; height: 44px; padding: 2px 14px; border: 1px solid #c98a55; border-radius: 8px; background: #fff; color: #5c2a08; font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer; flex: none; }
  .js .guide-actions { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 24px 18px; background: var(--accent-soft); border-bottom: 1px solid #f3d6bd; box-shadow: 0 12px 24px rgba(22, 35, 63, 0.14); white-space: normal; }
  .js .guide-open .guide-actions { display: flex; }
  .js .guide-actions .btn-strip, .js .guide-form select { min-height: 44px; height: 44px; font-size: 0.95rem; }
  .js .guide-actions > form:not(.guide-form) .btn { width: 100%; }
  .js .guide-form select { flex: 1; min-width: 0; max-width: none; }
  html:not(.js) .guide-strip { position: static; height: auto; flex-wrap: wrap; white-space: normal; padding: 10px 16px; }
  html:not(.js) .guide-actions { flex-wrap: wrap; }
}
@media (max-width: 1040px) and (min-width: 861px) {
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.two, .grid.inner { grid-template-columns: minmax(0, 1fr); }
}

/* Tablet and phone: the sidebar becomes a sticky top bar with a menu */
@media (max-width: 860px) {
  :root { --bar: 56px; }
  .shell { display: block; }
  .sidebar { position: sticky; top: calc(var(--strip) + var(--guide)); z-index: 40; height: auto; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); padding: 0; display: block; }
  .sidebar-top { height: var(--bar); padding: 0 16px; }
  .sidebar-top .brand { min-height: 44px; }
  .js .menu-button { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--control); border-radius: 10px; background: #fff; color: var(--navy); font: inherit; font-weight: 600; cursor: pointer; }
  .menu-icon { position: relative; display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.12s ease; }
  .menu-icon::before { top: -5px; }
  .menu-icon::after { top: 5px; }
  .menu-button[aria-expanded="true"] .menu-icon { background: transparent; }
  .menu-button[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(45deg); }
  .menu-button[aria-expanded="true"] .menu-icon::after { top: 0; transform: rotate(-45deg); }
  .site-nav { padding: 8px 16px 16px; }
  .js .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100vh - var(--strip) - var(--guide) - var(--bar)); overflow-y: auto; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: 0 16px 28px rgba(22, 35, 63, 0.16); }
  .js .nav-open .site-nav { display: flex; }
  html:not(.js) .sidebar { position: static; }
  .site-nav li a { min-height: 44px; }
  .who { margin-top: 12px; }
  .sign-out { min-height: 44px; }
  .main { padding: 22px 16px 56px; }
  h1 { font-size: 1.5rem; }
  .welcome { padding: 22px 20px; }
  .welcome h1 { font-size: 1.45rem; }
  .guide-strip { padding: 0 16px; }
  .js .guide-actions { padding: 14px 16px 18px; }
  .chat-turn { max-width: 100%; }
  .sign-in-split { grid-template-columns: minmax(0, 1fr); }
  .sign-in-about { padding: 24px 24px 20px; gap: 10px; }
  .sign-in-points { display: none; }
  .sign-in-note { margin-top: 0; padding-top: 0; border-top: 0; }
  .sign-in { padding: 26px 24px; }
  details.queue-item > summary { grid-template-columns: auto minmax(0, 1fr) auto; }
  .queue-tags { grid-column: 2 / -1; grid-row: 2; }
  .queue-open { grid-column: 3; grid-row: 1; }
  .queue-body { padding-left: 20px; }
}

/* Phone: one column, and each table row becomes one compact card */
@media (max-width: 640px) {
  /* The strip's sentence takes two lines, so the strip is as tall as a comfortable tap on its link */
  :root { --strip: 44px; }
  html.has-guide { --guide: 44px; }
  .demo-long, .guide-extra { display: none; }
  .demo-short { display: inline; }
  .demo-strip { justify-content: space-between; gap: 10px; white-space: normal; }
  .demo-text { font-size: 0.78rem; line-height: 1.3; text-wrap: balance; max-height: 2.6em; }
  .demo-strip a { flex: none; padding: 0 12px; margin-right: -12px; white-space: nowrap; }
  .grid.two, .grid.three, .grid.inner, .cohort-facts, .settings-grid, .field-pair, .stat-row.three { grid-template-columns: minmax(0, 1fr); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-pad { padding: 18px; }
  .card-head { padding: 18px 18px 0; }
  .card-body { padding: 14px 18px 18px; }
  .facts > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .facts-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters .field, .filters-one .field { flex: 1 1 100%; }
  .resource-grid { grid-template-columns: minmax(0, 1fr); }
  .journey li { font-size: 0.75rem; }
  .identity-card { padding: 18px 12px; }
  .identity-head { padding: 0 6px; }
  /* Links that stand on their own, and every control, are a full 44px tall to tap */
  .more-link, .back-link, .section-head a, .card-head h2 a, .card-head h3 a, .table td.p-stat a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; }
  input[type="text"], input[type="password"], input[type="search"], input[type="number"], select { min-height: 44px; }
  /* A name that heads a row's card, or a figure that is a tile's link: the tap reaches past the words */
  .table td.p-title a, .facts-tiles > div { position: relative; }
  .table td.p-title a::after { content: ""; position: absolute; inset: -13px -10px; }
  /* A value that is a link ("Enter", "Edit") gets a line of its own, apart from the plain figures */
  .table td.p-stat:has(a:not(.btn)) { flex: 1 1 100%; }
  .facts-tiles dd > a::after { content: ""; position: absolute; inset: -4px; }
  details.disclosure > summary { min-height: 44px; }
  .subnav a { min-height: 44px; }
  .schedule li { grid-template-columns: 76px minmax(0, 1fr); }
  .schedule-date { grid-column: 2; }
  .pulse-detail { padding-left: 14px; }
  /* 1 to 5 scales: the five choices fill the row, with the end captions beneath */
  .scale .choice-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .scale .choice-item { grid-row: 1; }
  .scale .choice-item label { width: 100%; min-width: 0; padding: 6px 4px; min-height: 44px; }
  .scale .scale-end:first-child { grid-row: 2; grid-column: 1 / span 2; margin: 0; }
  .scale .scale-end:last-child { grid-row: 2; grid-column: 4 / span 2; margin: 0; text-align: right; }
  .choice-item label { min-height: 44px; }
  .btn, .js .menu-button { min-height: 44px; }
  .btn-strip { min-height: 44px; }

  .table-wrap { overflow-x: visible; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table, .table tbody { display: block; width: 100%; }
  .table tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 16px; border: 1px solid var(--line); border-radius: var(--radius-small); padding: 12px 14px; margin-bottom: 10px; background: #fdfcfa; }
  .table td { display: block; border: 0; padding: 0; min-width: 0; text-align: left; }
  .table td.num { text-align: left; }
  .table td:has(> .cell:empty) { display: none; }
  .table td.p-title { order: -3; flex: 1 1 55%; font-weight: 650; color: var(--navy); font-size: 0.98rem; }
  .table td.p-title a { color: var(--navy); }
  .table td.p-end { order: -2; flex: 0 0 auto; margin-left: auto; font-weight: 650; white-space: nowrap; }
  .table td.p-meta { order: -1; flex: 1 1 100%; color: var(--muted); font-size: 0.86rem; }
  .table td.p-hide { display: none; }
  .table td.p-bare { flex: 0 1 auto; }
  .table td.p-stat { flex: 0 1 auto; font-size: 0.9rem; }
  .table td.p-stat > .cell { display: inline; }
  .table td.p-stat::before { content: attr(data-label) ": "; color: var(--muted); font-size: 0.8125rem; }
  .table td.p-full { flex: 1 1 100%; font-size: 0.92rem; padding-top: 4px; }
  .table td.p-full::before { content: attr(data-label); display: block; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
  .table td.p-stat .cell-sub, .table td.p-bare .cell-sub { display: inline; margin-left: 6px; }
  /* A literal value (HubSpot preview) goes on its own line under the friendly one, never broken in the middle */
  .table td.p-stat .source-id, .table td.p-bare .source-id { display: block; margin-left: 0; }
  .cell-list { display: inline; white-space: normal; }
  details.reverse, details.reverse .stack { width: 100%; min-width: 0; }
  details.reverse input { width: 100%; max-width: 100%; }
  .table td.p-full:has(> .cell > details.reverse)::before { content: none; }
  .input-small { width: 96px !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .lift:hover { transform: none; }
}

@media print {
  .sidebar, .guide-strip, .skip-link, .subnav { display: none; }
  .shell { display: block; }
  .demo-strip { position: static; }
}
