@source "../../../templates/**/*.html";
@source "../../../apps/**/*.py";

:root {
  color-scheme: light;
  --background: #f6f7f5;
  --surface: #ffffff;
  --surface-elevated: #fbfcfb;
  --primary: #465b82;
  --primary-hover: #36496d;
  --primary-soft: #eef1f7;
  --secondary: #55736d;
  --muted: #eef0ed;
  --border: #dde2de;
  --border-strong: #c8d0ca;
  --text: #17221f;
  --text-muted: #66736e;
  --success: #287158;
  --success-soft: #e9f5ef;
  --warning: #8a621c;
  --warning-soft: #fbf3df;
  --error: #a24444;
  --error-soft: #fbeeee;
  --information: #406784;
  --information-soft: #edf4f8;
  --focus-ring: #2458a6;
  --sidebar: #1d2927;
  --sidebar-muted: #9fb0aa;
  --sidebar-active: #33443f;
  --radius-sm: .5rem;
  --radius-md: .75rem;
  --radius-lg: 1rem;
  --shadow-sm: 0 1px 2px rgb(23 34 31 / .05);
  --shadow-md: 0 16px 40px rgb(23 34 31 / .12);
  --transition: 160ms ease;
  --content-wide: 76rem;
  --content-medium: 58rem;
  --content-form: 46rem;
  --content-narrow: 30rem;
  --sidebar-width: 16rem;
  --header-height: 4.25rem;
  --mobile-bottom-nav-height: 5.25rem;
}

* { box-sizing: border-box; min-width: 0; }
html { min-width: 20rem; max-width: 100%; overflow-x: clip; background: var(--background); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; max-width: 100%; overflow-x: clip; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: .9375rem; line-height: 1.55; background: var(--background); color: var(--text); -webkit-font-smoothing: antialiased; }
body.drawer-open, body.viewer-open, body.modal-open { overflow: hidden; overscroll-behavior: none; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: .2em; }
a:hover { text-decoration-color: currentColor; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, li, dt, dd, label, small, strong, span { overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.25; letter-spacing: 0; }
h1 { font-size: clamp(1.55rem, 3vw, 2rem); }
h2 { font-size: 1.08rem; }
h3 { font-size: .98rem; }
p { margin: .5rem 0; }
[hidden] { display: none !important; }

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .65rem 1rem; border-radius: var(--radius-sm); background: var(--text); color: white; font-weight: 700; transition: top var(--transition); }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
:target, :focus { scroll-margin-block: calc(var(--header-height) + 1rem) calc(var(--mobile-bottom-nav-height) + 1rem); }
input, select, textarea { width: 100%; min-height: 2.75rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .65rem .75rem; background: var(--surface); color: var(--text); transition: border-color var(--transition), box-shadow var(--transition); }
textarea { min-height: 7rem; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #aeb9b1; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: 3px solid color-mix(in srgb, var(--focus-ring) 35%, transparent); outline-offset: 0; box-shadow: 0 0 0 1px var(--primary); }
input[type="checkbox"], input[type="radio"] { width: 1.1rem; min-height: 1.1rem; accent-color: var(--primary); }
input[type="file"] { min-height: auto; border: 0; padding: 0; background: transparent; }
input[type="file"]::file-selector-button { min-height: 2.5rem; margin-right: .75rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .45rem .75rem; background: var(--surface); color: var(--text); font-weight: 700; cursor: pointer; }

.icon { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.icon-lg { width: 1.45rem; height: 1.45rem; }
.button { display: inline-flex; min-height: 2.65rem; min-width: 0; align-items: center; justify-content: center; gap: .5rem; border: 1px solid transparent; border-radius: var(--radius-sm); padding: .55rem .95rem; font-weight: 720; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition); }
.button:hover { text-decoration: none; }
.button:active { transform: translateY(1px); }
.button-primary { background: var(--primary); color: white; box-shadow: var(--shadow-sm); }
.button-primary:hover { background: var(--primary-hover); }
.button-secondary { border-color: var(--border-strong); background: var(--surface); color: var(--text); }
.button-secondary:hover { border-color: #aab4ad; background: var(--surface-elevated); }
.button-quiet { background: transparent; color: var(--primary); }
.button-quiet:hover { background: var(--primary-soft); }
.button-ghost { background: transparent; color: var(--primary); }
.button-ghost:hover { background: var(--primary-soft); }
.button-danger { background: var(--error); color: white; }
.button-danger:hover { background: #873737; }
.button-small { min-height: 2.25rem; padding: .4rem .7rem; font-size: .875rem; }
.button-full { width: 100%; }
.button[disabled], .button[aria-disabled="true"], .btn[disabled] { cursor: not-allowed; opacity: .62; transform: none; }
.button[aria-busy="true"] { min-width: var(--loading-button-width, 7rem); }
.btn { display: inline-flex; min-height: 2.65rem; align-items: center; justify-content: center; gap: .5rem; border: 1px solid transparent; border-radius: var(--radius-sm); padding: .55rem .95rem; font-weight: 720; line-height: 1.2; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--primary); color: white; }
.btn-secondary { border-color: var(--border-strong); background: var(--surface); color: var(--text); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-danger { background: var(--error); color: white; }
.button-row { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.checkbox-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .65rem; align-items: start; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem; background: var(--surface); }
.checkbox-row input { margin-top: .2rem; }
.legal-link, .legal-content a, .legal-document .back-link { color: var(--primary); text-decoration: underline; text-decoration-thickness: .1em; text-underline-offset: .18em; }
.legal-link { font-weight: 760; }
.legal-link:hover, .legal-content a:hover, .legal-document .back-link:hover { color: var(--primary-hover); }
.page-shell { display: grid; gap: 1.5rem; }
.auth-card { width: min(calc(100% - 2rem), 34rem); margin: clamp(2rem, 8vh, 6rem) auto; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.25rem, 4vw, 2.25rem); background: var(--surface); box-shadow: var(--shadow-md); }
.auth-card form { display: grid; gap: .8rem; margin: 1rem 0; }
.permission-option { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: .65rem; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem; }
.permission-option input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; }
.permission-option label { display: grid; gap: .15rem; cursor: pointer; }
.permission-option small { color: var(--text-muted); }
.permission-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.permission-fieldset { display: grid; min-width: 0; gap: .65rem; border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 0; padding: .9rem; }
.permission-fieldset legend { padding: 0 .25rem; font-weight: 780; }
.permission-summary, .permission-summary-panel { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .7rem .8rem; background: var(--surface-elevated); color: var(--text-muted); }
.permission-summary-panel { color: var(--text); font-weight: 650; }
.list-check { display: grid; gap: .35rem; padding-left: 1.2rem; }
.invitation-share-card { display: grid; gap: 1rem; overflow: hidden; }
.invitation-manual-copy { display: grid; min-width: 0; gap: .35rem; }
.invitation-manual-copy input { width: 100%; min-width: 0; font-family: ui-monospace, monospace; }
.invitation-copy-status { min-height: 1.4rem; margin: 0; font-weight: 680; color: var(--primary); }
.icon-button { display: inline-grid; width: 2.75rem; height: 2.75rem; flex: 0 0 auto; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.icon-button:hover { background: var(--muted); }
.actions, .form-actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.danger-zone { display: flex; justify-content: flex-end; margin-top: .5rem; padding-top: 1rem; border-top: 1px solid var(--border); }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: sticky; top: 0; width: var(--sidebar-width); height: 100vh; height: 100dvh; flex: 0 0 var(--sidebar-width); overflow-y: auto; overscroll-behavior: contain; background: var(--sidebar); color: white; scrollbar-width: thin; }
.sidebar-inner { display: flex; min-height: 100%; flex-direction: column; padding: 1.1rem .85rem; }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; padding: 0 .45rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-size: 1.12rem; font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.brand-mark { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .65rem; background: #e7eee9; color: var(--sidebar); font-size: .8rem; letter-spacing: -.06em; }
.brand-logo { display: block; object-fit: contain; border-radius: .45rem; background: #fff; }
.sidebar .brand-logo-horizontal { width: 9rem; height: 3rem; }
.sidebar-close { border-color: rgb(255 255 255 / .14); background: transparent; color: white; }
.nav-list { display: grid; gap: .2rem; }
.nav-heading { margin: 1.2rem .7rem .35rem; color: var(--sidebar-muted); font-size: .68rem; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.nav-link { display: flex; min-height: 2.55rem; width: 100%; align-items: center; gap: .7rem; border: 0; border-radius: var(--radius-sm); padding: .55rem .7rem; background: transparent; color: #e9efec; text-align: left; text-decoration: none; cursor: pointer; transition: background var(--transition), color var(--transition); }
.nav-link:hover { background: rgb(255 255 255 / .07); color: white; text-decoration: none; }
.nav-link.is-active { background: var(--sidebar-active); color: white; font-weight: 700; box-shadow: inset 3px 0 #b6c5dd; }
.sidebar-account { display: grid; gap: .65rem; margin-top: auto; padding: 1.25rem .35rem .2rem; }
.sidebar-person { display: flex; min-width: 0; align-items: center; gap: .65rem; padding: .65rem; border-top: 1px solid rgb(255 255 255 / .1); }
.sidebar-person > div { min-width: 0; }
.sidebar-person > div strong, .sidebar-person > div span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-person > div span { color: var(--sidebar-muted); font-size: .75rem; }
.sidebar-account form { margin: 0; }
.sidebar-backdrop { position: fixed; inset: 0; z-index: 40; background: rgb(17 29 26 / .52); backdrop-filter: blur(2px); }
.content-shell { min-width: 0; flex: 1; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; min-height: var(--header-height); align-items: center; gap: .75rem; border-bottom: 1px solid color-mix(in srgb, var(--border) 85%, transparent); padding: .65rem clamp(.9rem, 2.5vw, 1.75rem); background: rgb(246 247 245 / .92); backdrop-filter: blur(14px); }
.topbar-brand { display: inline-flex; min-width: 0; flex: 0 0 auto; align-items: center; gap: .55rem; color: var(--text); font-size: .95rem; font-weight: 820; letter-spacing: -.025em; text-decoration: none; }
.topbar-brand:hover { color: var(--primary); text-decoration: none; }
.topbar-brand-picture { display: block; flex: 0 0 auto; }
.topbar-brand-logo { width: 13rem; height: 3.5rem; flex: 0 0 auto; object-fit: contain; border-radius: 0; background: transparent; mix-blend-mode: multiply; }
.topbar-context { min-width: 0; }
.topbar-context span, .topbar-context strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-context span { color: var(--text-muted); font-size: .72rem; }
.topbar-context strong { font-size: .92rem; }
.topbar-actions { display: flex; min-width: 0; align-items: center; gap: .55rem; margin-left: auto; }
.user-pill { display: grid; width: 2.7rem; height: 2.7rem; place-items: center; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--primary); font-weight: 800; text-decoration: none; }
.verification-banner { border-bottom: 1px solid #e8d9ad; padding: .6rem 1.25rem; background: var(--warning-soft); color: #684a18; text-align: center; font-size: .85rem; }
.verification-banner a { font-weight: 750; }
.messages { width: min(100%, var(--content-wide)); margin: 0 auto; padding: 1rem clamp(1rem, 3vw, 2rem) 0; }
.page-content { width: min(100%, var(--content-wide)); margin: 0 auto; overflow: clip; padding: clamp(1.15rem, 3vw, 2rem); padding-bottom: max(clamp(1.15rem, 3vw, 2rem), env(safe-area-inset-bottom)); }
.page-content[data-width="medium"] { max-width: var(--content-medium); }
.page-content[data-width="form"] { max-width: var(--content-form); }

.stack { display: grid; gap: 1rem; }
.stack-lg { gap: 1.5rem; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .15rem; }
.page-header-copy { min-width: 0; max-width: 44rem; }
.eyebrow { margin: 0 0 .25rem; color: var(--primary); font-size: .73rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.page-header h1 { margin: 0; }
.page-header p:not(.eyebrow) { max-width: 42rem; margin: .35rem 0 0; color: var(--text-muted); }
.back-link { display: inline-flex; width: fit-content; align-items: center; gap: .35rem; color: var(--text-muted); font-size: .875rem; font-weight: 680; text-decoration: none; }
.back-link:hover { color: var(--text); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section-heading h2, .card h2, .empty-state h2 { margin: 0; }
.section-heading a { color: var(--primary); font-size: .875rem; font-weight: 700; }
.section-label, .fine-print, .field-help { color: var(--text-muted); font-size: .82rem; }
.form-subheading { margin: .4rem 0 -.35rem; color: var(--text); font-size: .94rem; }

.card, .empty-state, .auth-panel, .feature-card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1rem, 2.5vw, 1.35rem); background: var(--surface); box-shadow: var(--shadow-sm); }
.card { padding: clamp(1rem, 2.5vw, 1.35rem); }
.card-subtle { background: var(--surface-elevated); box-shadow: none; }
.card-interactive { transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition); }
.card-interactive:hover { border-color: var(--border-strong); box-shadow: 0 6px 18px rgb(23 34 31 / .07); transform: translateY(-1px); }
.profile-grid, .record-grid, .quick-action-grid, .feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .85rem; }
.dashboard-masthead { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 1rem; }
.dashboard-actions { display: flex; align-items: center; justify-content: flex-end; gap: .65rem; flex-wrap: wrap; }
.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, .38fr); align-items: start; gap: 1rem; }
.dashboard-profile-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; }
.health-stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.health-stat-grid .summary-card { min-height: 6.25rem; }
.health-stat-grid .summary-card span { order: -1; }
.health-stat-grid .summary-card small { color: var(--text-muted); font-size: .76rem; font-weight: 700; }
.next-action-panel { display: grid; gap: .8rem; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem; background: var(--surface); box-shadow: var(--shadow-sm); }
.next-action-panel h2 { margin: 0; }
.next-action-list { display: grid; gap: .35rem; }
.next-action-list a { display: flex; align-items: center; gap: .65rem; border-radius: var(--radius-sm); padding: .65rem; color: var(--text); font-weight: 720; text-decoration: none; }
.next-action-list a:hover { background: var(--muted); }
.profile-overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.profile-overview-grid article { display: grid; gap: .15rem; border: 1px solid var(--border); border-radius: var(--radius-md); padding: .85rem; background: var(--surface); box-shadow: var(--shadow-sm); }
.profile-overview-grid span { color: var(--text-muted); font-size: .76rem; font-weight: 760; text-transform: uppercase; }
.profile-overview-grid strong { font-size: 1.55rem; line-height: 1.1; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1rem; margin: 1.25rem 0 2rem; }
.card-grid .card { display: flex; min-height: 12rem; flex-direction: column; align-items: flex-start; gap: .55rem; }
.card-grid .card p { flex: 1; color: var(--text-muted); }
.internal-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; }
.internal-summary-tile { display: grid; gap: .25rem; min-height: 5.5rem; align-content: center; border: 1px solid var(--border); border-radius: var(--radius-md); padding: .8rem; background: var(--surface); box-shadow: var(--shadow-sm); }
.internal-summary-tile span { color: var(--text-muted); font-size: .76rem; font-weight: 750; }
.internal-summary-tile strong { font-size: 1.55rem; line-height: 1; }
.internal-subscription-cards { display: none; gap: .75rem; }
.internal-subscription-card { display: grid; gap: .7rem; border: 1px solid var(--border); border-radius: var(--radius-md); padding: .9rem; background: var(--surface); }
.internal-subscription-card h2 { margin: .15rem 0; font-size: 1rem; }
.internal-subscription-card p { margin: .15rem 0; color: var(--text-muted); }
.internal-subscription-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: 0; }
.internal-subscription-card dt { color: var(--text-muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; }
.internal-subscription-card dd { margin: .1rem 0 0; }
.internal-reference { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.internal-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-filter-panel { padding: 0; }
.audit-filter-panel summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1rem; cursor: pointer; font-weight: 760; list-style: none; }
.audit-filter-panel summary::-webkit-details-marker { display: none; }
.filter-summary-hint { color: var(--text-muted); font-size: .8rem; font-weight: 600; }
.audit-filter-panel[open] summary { border-bottom: 1px solid var(--border); }
.audit-filter-panel .filters-grid { padding: 1rem; }
.filters-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; align-items: end; }
.filters-grid label { display: grid; gap: .25rem; color: var(--text-muted); font-size: .76rem; font-weight: 720; }
.filters-grid .filter-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.access-page { max-width: var(--content-wide); }
.access-explainer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.access-explainer article { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; background: var(--surface); }
.access-explainer h2 { margin: 0; }
.access-explainer p { color: var(--text-muted); }
.access-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: .85rem; }
.compact-access-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.access-card { display: grid; align-content: start; gap: .85rem; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; background: var(--surface); box-shadow: var(--shadow-sm); }
.access-card-compact { gap: .25rem; }
.access-card-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .75rem; }
.access-card-top h2, .access-card-top h3 { margin: 0; }
.access-card-top p { margin: .15rem 0 0; color: var(--text-muted); font-size: .84rem; }
.access-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem .9rem; margin: 0; }
.access-facts div { min-width: 0; }
.access-facts dt { color: var(--text-muted); font-size: .76rem; font-weight: 750; }
.access-facts dd { margin: 0; overflow-wrap: anywhere; }
.access-actions form { margin: 0; }
.long-token { overflow-wrap: anywhere; word-break: break-word; }
.role-comparison { display: grid; gap: .85rem; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; background: var(--surface); }
.role-comparison h2, .role-comparison h3 { margin: 0; }
.role-comparison p { color: var(--text-muted); }
.role-comparison-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.role-comparison-grid article { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .8rem; background: var(--surface-elevated); }
.role-comparison-grid dl { display: grid; gap: .35rem; margin: .65rem 0 0; }
.role-comparison-grid dt { color: var(--text-muted); font-size: .76rem; font-weight: 750; }
.role-comparison-grid dd { margin: 0; }
.representation-end-form { display: grid; gap: .55rem; border-top: 1px solid var(--border); padding-top: .85rem; }
.representation-end-form label { font-weight: 720; }
.supporting-document-note { display: grid; gap: .25rem; border: 1px solid #cadce7; border-radius: var(--radius-sm); padding: .75rem; background: var(--information-soft); color: #31536c; }
.supporting-document-note p { margin: 0; }
.access-card ~ .representation-empty { display: none; }
.section-stack, .record-list { display: grid; gap: .85rem; }
.record-list > .record-card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.form-card { display: grid; max-width: var(--content-form); gap: 1.25rem; margin-top: 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1rem, 3vw, 1.5rem); background: var(--surface); box-shadow: var(--shadow-sm); }
.form-card fieldset { display: grid; min-width: 0; gap: .8rem; border: 0; border-bottom: 1px solid var(--border); margin: 0; padding: 0 0 1.25rem; }
.form-card legend { margin-bottom: .7rem; font-size: 1.05rem; font-weight: 780; }
.form-card ul { display: grid; gap: .45rem; max-height: 16rem; overflow-y: auto; margin: 0; padding: .25rem; list-style: none; }
.form-card ul label { display: flex; align-items: flex-start; gap: .55rem; border-radius: var(--radius-sm); padding: .45rem; }
.form-card ul label:hover { background: var(--muted); }
.helper-text { color: var(--text-muted); font-size: .82rem; }
.profile-card { display: grid; min-height: 6rem; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: .8rem; padding: 1rem; text-decoration: none; }
.profile-card-content { min-width: 0; flex: 1; }
.profile-card-content strong, .profile-card-content > span { display: block; }
.profile-card-content strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-card-content > span { color: var(--text-muted); font-size: .82rem; }
.profile-card .badge { margin-top: .35rem; }
.profile-card-content .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.profile-card-action { grid-column: 1 / -1; justify-self: end; color: var(--primary); font-weight: 700; }
.add-card { display: flex; justify-content: center; border-style: dashed; color: var(--primary); font-weight: 750; }
.avatar { display: grid; width: 2.7rem; height: 2.7rem; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.active-profile-context { display: flex; min-width: 12rem; max-width: 18rem; align-items: center; gap: .65rem; border: 1px solid var(--border); border-radius: var(--radius-md); padding: .38rem .55rem; background: var(--surface); }
.active-profile-copy { min-width: 0; flex: 1; }
.active-profile-copy span, .active-profile-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.active-profile-copy span { color: var(--text-muted); font-size: .7rem; }
.active-profile-copy strong { font-size: .84rem; }
.profile-context-card { display: flex; align-items: center; gap: .85rem; padding: 1rem 1.1rem; border: 1px solid #d8ddd8; border-radius: var(--radius-lg); background: linear-gradient(100deg, #fafcf9, #f3f6f4); }
.profile-context-card > div:nth-child(2) { min-width: 0; flex: 1; }
.profile-context-card > div:nth-child(2) span, .profile-context-card small { display: block; color: var(--text-muted); }
.profile-context-card strong { display: block; font-size: 1.02rem; }
.profile-switcher { position: relative; }
.profile-switcher summary { display: flex; min-width: 12.5rem; align-items: center; gap: .65rem; list-style: none; border: 1px solid var(--border); border-radius: var(--radius-md); padding: .38rem .55rem; background: var(--surface); cursor: pointer; }
.profile-switcher summary::-webkit-details-marker { display: none; }
.profile-switcher-copy { min-width: 0; flex: 1; }
.profile-switcher-copy span, .profile-switcher-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-switcher-copy span { color: var(--text-muted); font-size: .7rem; }
.profile-switcher-copy strong { font-size: .84rem; }
.profile-menu { position: absolute; top: calc(100% + .45rem); right: 0; z-index: 50; width: min(22rem, calc(100vw - 1rem)); max-height: min(32rem, calc(100dvh - 5rem)); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--border); border-radius: var(--radius-md); padding: .4rem; background: var(--surface); box-shadow: var(--shadow-md); }
.profile-menu-label { margin: .35rem .55rem .45rem; color: var(--text-muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; }
.profile-menu-empty { margin: .35rem; border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: .65rem; color: var(--text-muted); font-size: .84rem; text-align: center; }
.profile-search { display: block; margin: .35rem; }
.profile-search input { min-height: 2.35rem; padding: .45rem .65rem; font-size: .86rem; }
.profile-menu form { margin: 0; }
.profile-menu button, .profile-menu-actions > a { display: flex; width: 100%; align-items: center; gap: .65rem; border: 0; border-radius: var(--radius-sm); padding: .65rem; background: transparent; text-align: left; text-decoration: none; cursor: pointer; }
.profile-menu button:hover, .profile-menu-actions > a:hover { background: var(--muted); }
.profile-menu button.is-active { background: var(--primary-soft); color: var(--primary); }
.profile-menu button > span:nth-child(2) { min-width: 0; flex: 1; }
.profile-menu button strong, .profile-menu button small { display: block; }
.profile-menu button small { color: var(--text-muted); }
.profile-menu-actions { display: grid; gap: .15rem; border-top: 1px solid var(--border); margin-top: .35rem; padding-top: .35rem; }

.quick-action-grid { grid-template-columns: repeat(4, 1fr); }
.quick-action { display: grid; min-height: 8.2rem; align-content: space-between; gap: 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem; background: var(--surface); text-decoration: none; transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition); }
.quick-action:hover { border-color: var(--border-strong); box-shadow: 0 7px 20px rgb(23 34 31 / .07); transform: translateY(-2px); text-decoration: none; }
.quick-action-icon { display: grid; width: 2.35rem; height: 2.35rem; place-items: center; border-radius: .7rem; background: var(--primary-soft); color: var(--primary); }
.quick-action strong, .quick-action span { display: block; }
.quick-action span { margin-top: .15rem; color: var(--text-muted); font-size: .79rem; }
.quick-capture-panel { display: grid; grid-template-columns: minmax(14rem, .85fr) minmax(0, 1.65fr); gap: 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1rem, 2.5vw, 1.35rem); background: var(--surface); box-shadow: var(--shadow-sm); }
.quick-capture-heading { min-width: 0; }
.quick-capture-heading h2 { margin: 0; font-size: 1.2rem; }
.quick-capture-heading p:not(.eyebrow) { color: var(--text-muted); }
.quick-capture-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.quick-capture-option { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .75rem; min-height: 5.25rem; border: 1px solid var(--border); border-radius: var(--radius-md); padding: .85rem; background: var(--surface-elevated); text-decoration: none; transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition); }
.quick-capture-option:hover { border-color: var(--border-strong); box-shadow: 0 7px 20px rgb(23 34 31 / .06); transform: translateY(-1px); text-decoration: none; }
.quick-capture-option span:last-child { min-width: 0; }
.quick-capture-option strong, .quick-capture-option small { display: block; }
.quick-capture-option small { margin-top: .1rem; color: var(--text-muted); font-size: .78rem; }
.quick-capture-option em { display: block; margin-top: .25rem; color: var(--text-muted); font-size: .75rem; font-style: normal; }
.quick-capture-card { display: grid; gap: .85rem; }
.summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; }
.summary-card { display: grid; gap: .15rem; min-height: 5.5rem; border: 1px solid var(--border); border-radius: var(--radius-md); padding: .85rem; background: var(--surface); }
.summary-card strong { font-size: 1.45rem; line-height: 1.1; }
.summary-card span { color: var(--text-muted); font-size: .78rem; font-weight: 700; }

.activity-list, .card-list, .timeline { display: grid; gap: .75rem; }
.activity-item { display: flex; align-items: center; gap: .75rem; border-bottom: 1px solid var(--border); padding: .8rem .15rem; text-decoration: none; }
.activity-item:last-child { border-bottom: 0; }
.activity-icon, .record-icon { display: grid; width: 2.35rem; height: 2.35rem; flex: 0 0 auto; place-items: center; border-radius: .7rem; background: var(--muted); color: var(--secondary); }
.activity-copy { min-width: 0; flex: 1; }
.activity-copy strong, .activity-copy span { display: block; }
.activity-copy span { color: var(--text-muted); font-size: .8rem; }
.activity-arrow { color: var(--text-muted); }
.record-card { display: flex; align-items: flex-start; gap: .85rem; padding: 1rem 1.1rem; }
.record-card-main { min-width: 0; flex: 1; }
.record-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.record-card h2 { margin: .1rem 0 .25rem; font-size: 1.03rem; }
.record-card h2 a { text-decoration: none; }
.record-card h2 a::after { position: absolute; inset: 0; content: ""; }
.record-card { position: relative; }
.record-card .record-actions { position: relative; z-index: 1; display: flex; gap: .4rem; margin-top: .75rem; flex-wrap: wrap; }
.record-meta { display: flex; gap: .4rem .8rem; flex-wrap: wrap; color: var(--text-muted); font-size: .82rem; }
.record-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.timeline-group { display: grid; gap: .65rem; }
.timeline-date { display: flex; align-items: center; gap: .7rem; margin: .8rem 0 0; color: var(--text-muted); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.timeline-date::after { height: 1px; flex: 1; background: var(--border); content: ""; }

.badge { display: inline-flex; width: fit-content; min-height: 1.55rem; align-items: center; gap: .3rem; border: 1px solid var(--border); border-radius: 999px; padding: .18rem .55rem; background: var(--muted); color: #4f5c57; font-size: .72rem; font-weight: 720; line-height: 1.2; white-space: nowrap; }
.badge::before { width: .36rem; height: .36rem; border-radius: 999px; background: currentColor; content: ""; opacity: .7; }
.badge-success { border-color: #c9e5d8; background: var(--success-soft); color: var(--success); }
.badge-warning { border-color: #eadcb9; background: var(--warning-soft); color: var(--warning); }
.badge-info { border-color: #cadce7; background: var(--information-soft); color: var(--information); }
.badge-error { border-color: #ebcccc; background: var(--error-soft); color: var(--error); }
.badge-danger { border-color: #ebcccc; background: var(--error-soft); color: var(--error); }
.badge-neutral { border-color: var(--border); background: var(--muted); color: #4f5c57; }
.check-list { display: grid; gap: .45rem; margin: .35rem 0 0; padding-left: 1.25rem; }
.claim-summary { display: grid; gap: .55rem; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; background: var(--surface-elevated); }
.claim-summary h2, .claim-summary h3, .profile-review-card h3 { margin: 0; }
.compact-facts, .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem .9rem; margin: 0; }
.compact-facts div, .detail-grid div { min-width: 0; }
.compact-facts dt, .detail-grid span { display: block; color: var(--text-muted); font-size: .76rem; font-weight: 750; }
.compact-facts dd, .detail-grid strong { display: block; margin: 0; overflow-wrap: anywhere; font-weight: 760; }
.review-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.profile-review-card { display: grid; align-content: start; gap: .75rem; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; background: var(--surface); box-shadow: var(--shadow-sm); }
.status-timeline { display: grid; gap: .75rem; margin: .25rem 0 0; padding: 0; list-style: none; }
.status-timeline-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .65rem; align-items: start; color: var(--text-muted); }
.status-timeline-item strong, .status-timeline-item time { display: block; }
.status-timeline-item time { color: var(--text-muted); font-size: .8rem; }
.status-timeline-item.is-reached { color: var(--text); }
.status-dot { width: .85rem; height: .85rem; margin-top: .28rem; border: 2px solid var(--border-strong); border-radius: 999px; background: var(--surface); }
.status-timeline-item.is-reached .status-dot { border-color: var(--success); background: var(--success); }
.merge-review-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem); gap: 1rem; align-items: start; }
.review-action-panel { position: sticky; top: calc(var(--header-height) + 1rem); }
.conflict-grid, .record-count-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .75rem; }
.conflict-card { display: grid; gap: .55rem; border: 1px solid var(--border); border-radius: var(--radius-md); padding: .9rem; background: var(--surface-elevated); }
.conflict-card h3 { margin: 0; }
.record-count-grid div { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .7rem; background: var(--surface); }
.record-count-grid span { display: block; color: var(--text-muted); font-size: .76rem; font-weight: 750; }
.record-count-grid strong { display: block; font-size: 1.15rem; }
.comparison-row-list { display: grid; gap: .75rem; }
.comparison-row { display: grid; grid-template-columns: minmax(10rem, .42fr) minmax(0, 1fr); gap: .85rem; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius-md); padding: .85rem; background: var(--surface); box-shadow: var(--shadow-sm); }
.comparison-row-field { display: grid; align-content: start; gap: .35rem; min-width: 0; border-right: 1px solid var(--border); padding-right: .85rem; }
.comparison-row-field strong { overflow-wrap: anywhere; font-size: 1rem; }
.comparison-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 0; }
.comparison-values div { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .7rem; background: var(--surface-elevated); }
.comparison-values dt { color: var(--text-muted); font-size: .74rem; font-weight: 780; text-transform: uppercase; }
.comparison-values dd { margin: .2rem 0 0; overflow-wrap: anywhere; word-break: normal; }
.review-queue-cards { display: none; gap: .75rem; }
.review-queue-card { display: grid; gap: .8rem; border: 1px solid var(--border); border-radius: var(--radius-md); padding: .9rem; background: var(--surface); box-shadow: var(--shadow-sm); }
.comparison-table-wrap { overflow-x: auto; overscroll-behavior-inline: contain; border-radius: var(--radius-sm); }
.comparison-table-wrap::after, .table-wrap::after { display: block; padding: .35rem .7rem; color: var(--text-muted); font-size: .72rem; content: "Scroll sideways for more"; }
.comparison-table { width: 100%; border-collapse: collapse; }
.comparison-table caption { color: var(--text-muted); text-align: left; font-size: .82rem; margin-bottom: .55rem; }
.comparison-table th, .comparison-table td { border-bottom: 1px solid var(--border); padding: .75rem; text-align: left; vertical-align: top; }
.comparison-table thead th { background: var(--surface-elevated); color: var(--text-muted); font-size: .76rem; text-transform: uppercase; }

.filter-bar { padding: .8rem; }
.filter-toggle { display: none; width: 100%; justify-content: space-between; }
.filter-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .7rem; align-items: end; }
.filter-form .filter-search { grid-column: span 2; }
.filter-form label { display: block; margin-bottom: .25rem; color: var(--text-muted); font-size: .76rem; font-weight: 720; }
.filter-actions { display: flex; align-items: center; gap: .45rem; }
.filter-tabs { display: flex; gap: .4rem; overflow-x: auto; padding: .1rem 0 .35rem; scrollbar-width: thin; }
.filter-tabs a { flex: 0 0 auto; border: 1px solid var(--border); border-radius: 999px; padding: .43rem .72rem; background: var(--surface); color: var(--text-muted); font-size: .82rem; font-weight: 680; text-decoration: none; }
.filter-tabs a:hover, .filter-tabs a.is-active { border-color: #bec8d8; background: var(--primary-soft); color: var(--primary); }
.active-filter-chips { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-top: .7rem; }
.filter-chip { display: inline-flex; min-height: 2rem; max-width: 100%; align-items: center; border: 1px solid var(--border); border-radius: 999px; padding: .25rem .65rem; background: var(--surface-elevated); color: var(--text-muted); font-size: .82rem; font-weight: 700; }
.pagination { display: flex; align-items: center; justify-content: center; gap: .5rem; padding-top: .4rem; }

.detail-hero { display: flex; align-items: flex-start; gap: .9rem; padding: 1.15rem; }
.detail-hero .record-icon { width: 3rem; height: 3rem; }
.detail-hero-copy { min-width: 0; flex: 1; }
.detail-hero-copy h1 { margin: 0; }
.detail-hero-copy p { color: var(--text-muted); }
.detail-section { display: grid; gap: .8rem; }
.detail-list { display: grid; grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr); gap: .7rem 1rem; margin: 0; }
.detail-list dt { color: var(--text-muted); }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.related-records { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.related-record { display: grid; gap: .45rem; border: 1px solid var(--border); border-radius: var(--radius-md); padding: .85rem; background: var(--surface-elevated); }
.related-record span { color: var(--text-muted); font-size: .82rem; }
.file-panel { display: flex; align-items: center; gap: 1rem; }
.file-panel .record-icon { width: 3.25rem; height: 3.25rem; }
.file-copy { min-width: 0; flex: 1; }
.file-copy strong, .file-copy span { display: block; }
.file-copy strong { overflow-wrap: anywhere; }
.file-copy span { color: var(--text-muted); font-size: .82rem; }
.file-copy small { display: block; margin-top: .15rem; color: var(--text-muted); font-size: .76rem; }
.file-state-copy { margin: .35rem 0 0; color: var(--text-muted); }
.export-card .record-card-main { display: flex; justify-content: space-between; gap: 1rem; }
.medical-thumbnail { display: block; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #e9ece9; }
.medical-thumbnail img { width: 100%; max-height: 28rem; object-fit: contain; }
.medical-thumbnail span { display: flex; align-items: center; justify-content: center; gap: .4rem; padding: .6rem; background: var(--surface); color: var(--primary); font-weight: 700; }

.form-shell { width: 100%; max-width: var(--content-form); margin: 0 auto; }
.form-section { min-width: 0; }
.form-section h2, .form-section legend { margin: 0 0 .2rem; font-size: 1rem; font-weight: 780; }
.form-section-intro { margin: 0 0 .85rem; color: var(--text-muted); font-size: .84rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1rem; }
.form-grid .full-width { grid-column: 1 / -1; }
.form-field { min-width: 0; margin: 0; }
.form-field label { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .3rem; font-size: .84rem; font-weight: 720; }
.optional-label { color: var(--text-muted); font-size: .72rem; font-weight: 500; }
.form-field small { display: block; margin-top: .3rem; color: var(--text-muted); font-size: .76rem; }
.field-error { margin: .3rem 0 0; color: var(--error); font-size: .8rem; font-weight: 650; }
.form-field:has(.field-error) input, .form-field:has(.field-error) select, .form-field:has(.field-error) textarea { border-color: var(--error); }
.form-errors { border: 1px solid #ebcccc; border-radius: var(--radius-md); padding: .75rem .9rem; background: var(--error-soft); color: #7f3434; font-size: .85rem; }
.form-errors h2 { margin: 0 0 .35rem; color: inherit; font-size: .95rem; }
.form-errors ul { margin: .25rem 0; padding-left: 1.2rem; }
.form-errors a { font-weight: 700; }
.password-field { position: relative; display: grid; }
.password-field .form-field input { padding-right: 4.5rem; }
.password-toggle { position: absolute; right: .45rem; bottom: .42rem; min-height: 2rem; border: 0; border-radius: var(--radius-sm); padding: .25rem .55rem; background: var(--primary-soft); color: var(--primary); font-size: .78rem; font-weight: 750; cursor: pointer; }
.otp-field { display: grid; gap: .4rem; }
.otp-field > label { font-size: .84rem; font-weight: 720; }
.otp-slots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .45rem; }
.otp-slot { min-width: 0; min-height: 3.1rem; padding: .4rem; text-align: center; font-size: 1.25rem; font-weight: 800; }
.consent-stack { display: grid; gap: .45rem; border-top: 1px solid var(--border); padding-top: .35rem; }
.consent-stack .form-field { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: .55rem; }
.consent-stack .form-field label { grid-column: 2; margin: 0; justify-content: start; }
.consent-stack .form-field input { grid-column: 1; grid-row: 1; margin-top: .2rem; }
.auth-form-row { display: flex; justify-content: flex-end; margin-top: -.25rem; font-size: .86rem; font-weight: 700; }
.account-profile-note { display: grid; gap: .35rem; border: 1px solid #cadce7; border-radius: var(--radius-md); padding: .85rem .95rem; background: var(--information-soft); color: #31536c; }
.account-profile-note p { margin: 0; }
.additional-details { padding: 0; overflow: clip; }
.additional-details summary { display: flex; min-height: 3.5rem; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.15rem; cursor: pointer; list-style: none; font-weight: 750; }
.additional-details summary::-webkit-details-marker { display: none; }
.additional-summary-label { display: flex; align-items: center; gap: .55rem; }
.additional-details summary .chevron { transition: transform var(--transition); }
.additional-details[open] summary .chevron { transform: rotate(180deg); }
.additional-details summary small { color: var(--text-muted); font-weight: 520; }
.additional-details-content { border-top: 1px solid var(--border); padding: 1rem 1.15rem 1.15rem; }
.medication-item { border-top: 1px solid var(--border); padding-top: 1rem; }
.medication-item p { margin: .6rem 0; }

.file-upload { position: relative; display: grid; place-items: center; gap: .45rem; min-height: 11rem; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-md); padding: 1.2rem; background: var(--surface-elevated); text-align: center; transition: border-color var(--transition), background var(--transition); }
.file-upload:hover, .file-upload.is-dragover { border-color: var(--primary); background: var(--primary-soft); }
.file-upload input[type="file"] { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-upload-prompt { display: grid; place-items: center; gap: .35rem; }
.file-upload .record-icon { color: var(--primary); }
.file-upload strong { font-size: .95rem; }
.file-upload span { color: var(--text-muted); font-size: .8rem; }
.file-upload-selected { position: relative; z-index: 2; display: none; width: 100%; align-items: center; gap: .65rem; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .65rem; background: var(--surface); text-align: left; }
.file-upload.has-file .file-upload-prompt { display: none; }
.file-upload.has-file .file-upload-selected { display: flex; }
.file-selected-copy { min-width: 0; flex: 1; }
.file-selected-copy strong, .file-selected-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-remove { position: relative; z-index: 3; border: 0; padding: .35rem; background: transparent; color: var(--error); font-weight: 700; cursor: pointer; }

.alert { display: flex; align-items: flex-start; gap: .65rem; border: 1px solid #c9e5d8; border-radius: var(--radius-md); padding: .75rem .9rem; background: var(--success-soft); color: #205b48; }
.alert-error { border-color: #ebcccc; background: var(--error-soft); color: #7f3434; }
.alert-warning { border-color: #eadcb9; background: var(--warning-soft); color: #684a18; }
.alert-info { border-color: #cadce7; background: var(--information-soft); color: #31536c; }
.alert p { margin: 0; }
.empty-state { display: grid; min-height: 14rem; place-items: center; align-content: center; gap: .5rem; padding: 2rem; text-align: center; }
.empty-state .record-icon { margin-bottom: .25rem; }
.empty-state p { max-width: 28rem; margin: 0 0 .55rem; color: var(--text-muted); }

.public-body { display: flex; min-height: 100vh; flex-direction: column; }
.public-main { flex: 1; }
.public-header { border-bottom: 1px solid var(--border); background: rgb(255 255 255 / .88); }
.public-nav, .public-footer-inner, .landing { width: min(calc(100% - 2rem), 70rem); margin: 0 auto; }
.public-nav { display: flex; min-height: 4.25rem; align-items: center; justify-content: space-between; gap: 1rem; }
.public-nav .brand-logo-horizontal { width: 10rem; height: 3.4rem; }
.public-nav .brand-mark { background: var(--primary-soft); color: var(--primary); }
.public-nav .platform-icon, .about-hero-mark .platform-icon { background: transparent; color: inherit; object-fit: cover; }
.public-actions { display: flex; align-items: center; gap: .65rem; }
.public-menu-toggle { display: none; }
.public-menu-backdrop { position: fixed; inset: 0; z-index: 60; background: rgb(17 29 26 / .52); backdrop-filter: blur(2px); }
.public-menu { position: fixed; inset: 0 0 0 auto; z-index: 65; display: none; width: min(88vw, 22rem); transform: translateX(105%); transition: transform 220ms ease; overflow-y: auto; padding: 1.1rem; background: var(--surface); box-shadow: -16px 0 40px rgb(23 34 31 / .16); }
.public-menu { visibility: hidden; pointer-events: none; }
.public-menu.is-open { visibility: visible; pointer-events: auto; transform: translateX(0); }
.public-menu-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; color: var(--text); font-size: 1.05rem; }
.public-menu-close { flex: 0 0 auto; }
.public-menu-links { display: grid; gap: .35rem; }
.public-menu-links a, .public-menu-links button { display: flex; width: 100%; min-height: 2.8rem; align-items: center; border: 0; border-radius: var(--radius-sm); padding: .65rem .75rem; background: transparent; color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.public-menu-links a:hover, .public-menu-links button:hover { background: var(--muted); }
.public-menu-links form { margin: 0; }
.landing { padding-top: clamp(2.5rem, 7vw, 5.5rem); padding-bottom: 4rem; }
.landing-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(18rem, .85fr); align-items: center; gap: clamp(2rem, 6vw, 5rem); }
.landing-hero-copy { max-width: 42rem; }
.landing-hero h1 { margin: 0 0 1rem; font-size: clamp(2rem, 4.6vw, 3.45rem); line-height: 1.08; letter-spacing: 0; }
.landing-hero p { max-width: 37rem; color: var(--text-muted); font-size: 1.05rem; }
.landing-checks { display: grid; gap: .35rem; margin: 1rem 0 1.2rem; padding-left: 1.2rem; color: var(--text); }
.trust-note { font-size: .9rem !important; }
.landing-visual { position: relative; display: grid; gap: .75rem; border: 1px solid var(--border); border-radius: 1.4rem; padding: 1rem; background: #eef2ef; box-shadow: 0 22px 60px rgb(23 34 31 / .12); transform: rotate(1.5deg); }
.landing-visual-card { display: flex; align-items: center; gap: .7rem; border: 1px solid var(--border); border-radius: .85rem; padding: .75rem; background: var(--surface); }
.landing-visual-card div { min-width: 0; }
.landing-visual-card > div strong, .landing-visual-card > div span { display: block; }
.landing-visual-card > div span { color: var(--text-muted); font-size: .75rem; }
.landing-section { padding-top: clamp(3rem, 7vw, 5rem); }
.landing-section-heading { max-width: 38rem; margin-bottom: 1.4rem; }
.landing-section-heading h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); }
.landing-section-heading p { color: var(--text-muted); }
.feature-card { padding: 1.25rem; }
.feature-card .record-icon { margin-bottom: 1.2rem; }
.privacy-panel { display: flex; align-items: center; gap: 1.3rem; border-radius: 1.2rem; padding: clamp(1.3rem, 4vw, 2.2rem); background: var(--sidebar); color: white; }
.privacy-panel .record-icon { width: 3rem; height: 3rem; background: rgb(255 255 255 / .1); color: #d8e3dd; }
.privacy-panel p { color: #bdcbc5; }
.privacy-panel a { color: white; font-weight: 750; }
.final-cta { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; border-top: 1px solid var(--border); padding-top: 2rem; }
.public-footer { border-top: 1px solid var(--border); background: var(--surface); }
.public-footer-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1.2fr); align-items: center; gap: 1rem 2rem; padding-top: 1.2rem; padding-bottom: 1.2rem; color: var(--text-muted); font-size: .78rem; }
.footer-links { display: flex; gap: .4rem 1rem; flex-wrap: wrap; justify-content: center; }
.footer-links form { margin: 0; }
.footer-links button { border: 0; padding: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.footer-links button:hover { color: var(--primary); text-decoration: underline; }

.auth-wrap { display: grid; min-height: calc(100vh - 9.5rem); place-items: center; padding: 2rem 1rem; }
.auth-panel { width: min(100%, var(--content-narrow)); padding: clamp(1.25rem, 4vw, 2rem); }
.auth-panel-wide { width: min(100%, var(--content-form)); }
.auth-brand { display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.3rem; text-decoration: none; }
.auth-brand-logo { width: 10rem; height: 3.2rem; object-fit: contain; border-radius: .45rem; background: #fff; }
.auth-brand .brand-mark { width: 10rem; height: 3.2rem; background: #fff url("/static/assets/brand_logos/horizontal_logo.0cdbec1eb62b.png") center / contain no-repeat; color: transparent; font-size: 0; }
.auth-brand .brand-mark + strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.auth-panel h1 { margin: 0; font-size: 1.65rem; }
.auth-intro { margin: .45rem 0 1.3rem; color: var(--text-muted); }
.auth-panel form { display: grid; gap: .9rem; }
.auth-panel .button-primary { width: 100%; margin-top: .2rem; }
.auth-links { margin-top: 1.25rem; text-align: center; }
.policy-content { max-width: 42rem; }
.legal-document { width: min(calc(100% - 2rem), 52rem); margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) 0 4rem; }
.legal-document .page-header { margin-top: 1rem; }
.legal-toc { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin: 1.25rem 0; border: 1px solid var(--border); border-radius: var(--radius-md); padding: .85rem 1rem; background: var(--surface); }
.legal-toc a { color: var(--primary); font-weight: 720; }
.legal-section { display: grid; gap: .7rem; margin-top: 1.4rem; }
.legal-section h2 { margin: 0; }
.legal-content { display: grid; gap: .65rem; margin-top: 1.5rem; }
.legal-content h2 { margin: 1.4rem 0 .15rem; font-size: 1.15rem; }
.legal-content h3 { margin: .8rem 0 0; }
.legal-content ul { display: grid; gap: .35rem; padding-left: 1.35rem; list-style: disc; }
.legal-content p { margin: 0; }
.legal-content .table-wrap { max-width: 100%; margin: .35rem 0; }
.legal-content .table-wrap table { min-width: 38rem; }
.legal-content .table-wrap th, .legal-content .table-wrap td { min-width: 12rem; }
.public-page { width: min(calc(100% - 2rem), 70rem); margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) 0 4rem; }
.public-form-page { max-width: 42rem; }
.public-form-page form.card { padding: clamp(1rem, 3vw, 1.5rem); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.pricing-card { padding: 1.25rem; align-content: start; }
.pricing-card h3 { margin-top: .85rem; font-size: .88rem; }
.pricing-features { display: grid; gap: .45rem; margin: .35rem 0 .8rem; padding-left: 1.15rem; color: var(--text-muted); font-size: .88rem; }
.pricing-price { font-size: 1.1rem; color: var(--primary); }
.app-legal-footer { margin-top: auto; }
.app-legal-footer .public-footer-inner { width: min(calc(100% - 2rem), var(--content-wide)); }
.error-panel .button-row { margin-top: 1rem; }

.modal { width: min(calc(100vw - 2rem), 38rem); max-height: min(42rem, calc(100dvh - 2rem)); overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1rem, 3vw, 1.5rem); background: var(--surface); box-shadow: var(--shadow-md); }
.modal::backdrop { background: rgb(17 29 26 / .52); backdrop-filter: blur(2px); }
.legal-review-dialog { width: min(calc(100vw - 2rem), 58rem); max-height: min(44rem, calc(100dvh - 2rem)); overflow: hidden; padding: 0; }
.legal-review-dialog-inner { display: grid; max-height: min(44rem, calc(100dvh - 2rem)); grid-template-rows: auto minmax(0, 1fr) auto; }
.legal-review-dialog-header, .legal-review-dialog-footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; }
.legal-review-dialog-header { border-bottom: 1px solid var(--border); }
.legal-review-dialog-header h2 { margin: .15rem 0 .25rem; }
.legal-review-dialog-header p:last-child { margin: 0; color: var(--text-muted); font-size: .85rem; }
.legal-review-dialog-body { min-height: 0; max-height: calc(100dvh - 13rem); overflow-y: auto; padding: 1.25rem; }
.legal-review-dialog-footer { justify-content: flex-end; border-top: 1px solid var(--border); }
.legal-review-links { display: flex; flex-wrap: wrap; gap: .55rem; }
.comparison-table-wrap { max-width: 100%; overflow-x: auto; }
.comparison-table { width: 100%; min-width: 38rem; border-collapse: collapse; }
.comparison-table th, .comparison-table td { border-bottom: 1px solid var(--border); padding: .7rem .65rem; text-align: left; }
.comparison-table thead th:not(:first-child), .comparison-table td { text-align: center; }
.comparison-table tbody th { font-weight: 650; }
.comparison-table td { color: var(--success); font-size: 1.05rem; font-weight: 800; }
.faq-list { display: grid; gap: .55rem; }
.faq-list details { border-top: 1px solid var(--border); padding: .75rem 0; }
.faq-list summary { cursor: pointer; font-weight: 750; }
.faq-list p { margin: .55rem 0 0; color: var(--text-muted); }
@media (max-width: 767px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card .button { width: 100%; justify-content: center; }
  .legal-review-dialog { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); }
  .legal-review-dialog-inner { max-height: calc(100dvh - 1rem); }
  .legal-review-dialog-header, .legal-review-dialog-footer { padding: .85rem; }
  .legal-review-dialog-body { max-height: calc(100dvh - 10rem); padding: .95rem; }
}
.image-viewer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow: auto; overscroll-behavior: contain; padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(4rem, calc(3rem + env(safe-area-inset-bottom))) max(1rem, env(safe-area-inset-left)); background: rgb(10 17 15 / .94); }
.image-viewer img { max-width: 100%; max-height: calc(100dvh - 7rem); object-fit: contain; }
.image-viewer-close { position: fixed; top: max(1rem, env(safe-area-inset-top)); right: 1rem; border-color: rgb(255 255 255 / .25); background: rgb(20 29 26 / .8); color: white; }
.image-viewer-prev, .image-viewer-next { position: fixed; top: 50%; border-color: rgb(255 255 255 / .25); background: rgb(20 29 26 / .8); color: white; transform: translateY(-50%); }
.image-viewer-prev { left: 1rem; }
.image-viewer-next { right: 1rem; }
.image-viewer-position { position: fixed; right: 1rem; bottom: max(1rem, env(safe-area-inset-bottom)); left: 1rem; margin: 0; color: rgb(255 255 255 / .78); text-align: center; font-size: .82rem; font-weight: 700; }

.mobile-bottom-nav { display: none; }
@media (max-width: 1023px) {
  .app-shell { display: block; }
  .content-shell { width: 100%; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: min(85vw, 19rem); height: 100dvh; transform: translateX(-105%); transition: transform 220ms ease; }
  .sidebar.is-open { transform: translateX(0); box-shadow: var(--shadow-md); }
  .page-content { max-width: none; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .health-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-action-grid { grid-template-columns: repeat(2, 1fr); }
  .landing-hero { grid-template-columns: 1fr; }
  .landing-visual { max-width: 34rem; transform: none; }
}
@media (min-width: 1024px) {
  .desktop-hidden, .lg\:hidden { display: none !important; }
}
@media (max-width: 767px) {
  .pricing-grid { grid-template-columns: 1fr; }
  body { font-size: .9rem; }
  .mobile-hidden { display: none !important; }
  .topbar { min-height: 3.9rem; padding: .55rem .8rem; }
  .topbar-context { display: none; }
  .profile-switcher { margin-left: auto; }
  .profile-switcher summary { min-width: 0; max-width: min(13rem, calc(100vw - 8.6rem)); border: 0; background: transparent; padding: .3rem; }
  .profile-switcher summary .avatar { width: 2.3rem; height: 2.3rem; }
  .profile-menu { position: fixed; top: 4.2rem; right: .5rem; left: .5rem; width: auto; max-height: calc(100dvh - 8.5rem); }
  .page-content { padding: 1rem .9rem calc(var(--mobile-bottom-nav-height) + 2.2rem + env(safe-area-inset-bottom)); }
  .messages { padding: .8rem .9rem 0; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .page-header > .button, .page-header > .actions { width: 100%; }
  .page-header > .button { justify-content: center; }
  .page-header > .actions .button { flex: 1; }
  .dashboard-masthead { grid-template-columns: 1fr; }
  .dashboard-actions, .dashboard-actions .button { width: 100%; }
  .dashboard-actions .button { flex: 1; }
  .dashboard-profile-card { grid-template-columns: auto minmax(0, 1fr); }
  .dashboard-profile-card .badge, .dashboard-profile-card .button { grid-column: 2; width: fit-content; }
  .profile-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-action { min-height: 7.5rem; }
  .quick-action-grid { gap: .65rem; }
  .quick-capture-panel { grid-template-columns: 1fr; }
  .quick-capture-grid, .summary-grid, .health-stat-grid { grid-template-columns: 1fr; }
  .access-explainer, .access-facts, .permission-groups, .role-comparison-grid { grid-template-columns: 1fr; }
  .internal-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .internal-summary-tile { min-height: 4.5rem; padding: .7rem; }
  .internal-summary-tile strong { font-size: 1.35rem; }
  .internal-subscriptions-table { display: none; }
  .internal-subscription-cards { display: grid; }
  .internal-subscription-card .button { width: 100%; }
  .compact-facts, .detail-grid, .review-columns, .merge-review-layout { grid-template-columns: 1fr; }
  .review-action-panel { position: static; }
  .comparison-table, .comparison-table thead, .comparison-table tbody, .comparison-table tr, .comparison-table th, .comparison-table td { display: block; }
  .comparison-table-wrap { overflow: visible; }
  .comparison-table-wrap::after { display: none; }
  .comparison-table { min-width: 0; }
  .comparison-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .comparison-table tr { border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: .75rem; background: var(--surface); }
  .comparison-table th, .comparison-table td { border-bottom: 1px solid var(--border); }
  .comparison-table tbody th { background: var(--surface-elevated); }
  .comparison-table td { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .75rem; text-align: right; }
  .comparison-table td::before { display: block; margin: 0; color: var(--text-muted); font-size: .74rem; font-weight: 750; text-align: left; content: attr(data-label); }
  .comparison-row, .comparison-values { grid-template-columns: 1fr; }
  .comparison-row-field { border-right: 0; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: .75rem; }
  .profile-merge-queue .table-wrap { display: none; }
  .review-queue-cards { display: grid; }
  .access-card-top { grid-template-columns: auto minmax(0, 1fr); }
  .access-card-top .badge { grid-column: 1 / -1; width: fit-content; }
  .access-actions .button, .access-actions form { width: 100%; }
  .access-actions .button { justify-content: center; }
  .profile-grid, .record-grid { grid-template-columns: 1fr; }
  .record-card { padding: .9rem; }
  .record-card-top { align-items: flex-start; }
  .export-card .record-card-main { display: grid; gap: .85rem; }
  .record-actions .button { min-height: 2.4rem; }
  .filter-toggle { display: flex; }
  .filter-form { display: none; grid-template-columns: 1fr; padding-top: .8rem; }
  .filter-bar.is-open .filter-form { display: grid; }
  .filter-form .filter-search { grid-column: auto; }
  .filter-actions .button { flex: 1; }
  .detail-list { grid-template-columns: 1fr; gap: .15rem; }
  .detail-list dd { margin-bottom: .6rem; }
  .related-records { grid-template-columns: 1fr; }
  .file-panel { align-items: flex-start; flex-wrap: wrap; }
  .file-panel .actions { width: 100%; }
  .file-panel .actions .button { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full-width { grid-column: auto; }
  .form-actions { position: sticky; bottom: calc(var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom)); z-index: 10; margin: 0 -.9rem -.8rem; border-top: 1px solid var(--border); padding: .75rem .9rem; background: rgb(246 247 245 / .96); backdrop-filter: blur(10px); }
  .form-actions .button { flex: 1; }
  .audit-filter-panel .filters-grid { grid-template-columns: 1fr; }
  .audit-filter-panel .filter-actions .button { flex: 1; }
  .audit-filter-panel summary { min-height: 2.9rem; }
  .filter-summary-hint { max-width: 55%; text-align: right; }
  .notification-history { gap: .6rem; }
  .notification-row { padding: .85rem; }
  .notification-row-meta { gap: .3rem .6rem; }
  .notification-actions .button { min-height: 2.4rem; }
  .empty-state { min-height: 9rem; padding: 1.25rem; }
  .settings-row { grid-template-columns: minmax(0, 1fr) 4.5rem 4.5rem; gap: .45rem; padding: .8rem .75rem; }
  .settings-head { font-size: .7rem; }
  .settings-row p { font-size: .82rem; }
  .switch-label { justify-content: center; flex-wrap: wrap; }
  .mobile-bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 35; display: grid; min-height: var(--mobile-bottom-nav-height); overflow: visible; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--border); padding: .35rem .2rem calc(.45rem + env(safe-area-inset-bottom)); background: rgb(255 255 255 / .96); box-shadow: 0 -8px 24px rgb(23 34 31 / .06); backdrop-filter: blur(12px); isolation: isolate; }
  .mobile-bottom-nav::before { position: absolute; z-index: 0; top: -1.35rem; left: 50%; width: 5.2rem; height: 2.7rem; border: 1px solid var(--border); border-bottom: 0; border-radius: 50% 50% 0 0; background: rgb(255 255 255 / .96); content: ""; transform: translateX(-50%); }
  .mobile-nav-item { position: relative; z-index: 1; display: grid; min-width: 0; min-height: 3.75rem; place-items: center; align-content: center; gap: .12rem; border-radius: var(--radius-sm); color: var(--text-muted); font-size: .65rem; font-weight: 680; line-height: 1.1; text-decoration: none; }
  .mobile-nav-item.is-active { color: var(--primary); }
  .mobile-nav-add { z-index: 2; align-content: start; padding-top: .45rem; }
  .mobile-nav-item-add { display: grid; width: 2.75rem; height: 2.75rem; min-height: 0; margin: -1.6rem auto .4rem; place-items: center; border: 3px solid var(--surface); border-radius: 999px; background: var(--primary); color: white; box-shadow: 0 3px 10px rgb(70 91 130 / .2); }
  .mobile-nav-item-add .icon { width: 1.05rem; height: 1.05rem; }
  .mobile-nav-item-add + span { color: var(--text); }
  .landing { width: min(calc(100% - 1.5rem), 70rem); padding-top: 2.5rem; }
  .public-nav { width: min(calc(100% - 1.5rem), 70rem); }
  .public-nav .button { min-height: 2.4rem; padding: .45rem .7rem; }
  .landing-hero h1 { font-size: clamp(1.85rem, 10vw, 2.7rem); }
  .landing-visual { padding: .7rem; }
  .privacy-panel, .final-cta { align-items: flex-start; flex-direction: column; }
  .public-footer-inner { grid-template-columns: 1fr; align-items: flex-start; }
  .footer-links { justify-content: flex-start; }
  .public-footer-inner { width: min(calc(100% - 1.5rem), 70rem); }
}

@media (max-width: 435px) {
  .public-actions > a:not(.button), .public-actions > form { display: none; }
  .public-menu-toggle { display: inline-grid; }
  .public-menu { display: block; }
  .quick-action-grid { grid-template-columns: 1fr; }
  .quick-action { min-height: 6.3rem; grid-template-columns: auto 1fr; align-items: center; align-content: center; }
  .profile-switcher-copy span { display: none; }
  .profile-overview-grid { grid-template-columns: 1fr; }
}

/* P12B authenticated workflow refinements: profile state, storage, capacity,
   and mobile-first record/access surfaces. */
.capacity-panel, .storage-panel { display: grid; gap: 1rem; border: 1px solid #c9dfe1; border-radius: var(--radius-lg); padding: clamp(1rem, 2.5vw, 1.35rem); background: linear-gradient(120deg, #f8fcfb, #edf5f8); box-shadow: var(--shadow-sm); }
.capacity-panel h2, .storage-panel h2 { margin: 0; }
.capacity-panel p:not(.eyebrow), .storage-panel p:not(.eyebrow) { margin: .25rem 0 0; color: var(--text-muted); }
.capacity-panel-heading, .storage-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.capacity-total { flex: 0 0 auto; border: 1px solid #b8d6d8; border-radius: 999px; padding: .35rem .7rem; background: white; color: var(--primary); font-size: .82rem; font-weight: 800; }
.capacity-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.capacity-stats > div { display: grid; gap: .1rem; border-left: 2px solid #b8d6d8; padding-left: .75rem; }
.capacity-stats span, .capacity-stats small { color: var(--text-muted); font-size: .78rem; font-weight: 720; }
.capacity-stats strong { color: var(--text); font-size: 1.5rem; line-height: 1.1; }
.storage-panel-full { border-color: #e2c37d; background: linear-gradient(120deg, #fffaf0, #f8f4e9); }
.storage-panel-warning { border-color: #e2c37d; }
.storage-panel-heading > strong { flex: 0 0 auto; color: var(--primary); font-size: .92rem; }
.storage-meter { height: .65rem; overflow: hidden; border-radius: 999px; background: #dce7e8; }
.storage-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--secondary), var(--primary)); }
.storage-panel-warning .storage-meter span, .storage-panel-full .storage-meter span { background: var(--warning); }
.storage-copy, .storage-notice { font-size: .82rem; }
.storage-notice { color: var(--text-muted); }
.storage-notice-warning { color: var(--warning) !important; font-weight: 750; }
.profile-card-account-state { display: block; color: var(--text-muted); font-size: .78rem; }
.status-callout { border-color: #c9e5d8; background: #f3faf7; }
.student-verification-page > .alert { max-width: 58rem; }

@media (max-width: 767px) {
  .page-header, .capacity-panel-heading, .storage-panel-heading { align-items: stretch; flex-direction: column; }
  .page-header > .button, .page-header > .button-row, .page-header > .badge { width: 100%; }
  .page-header > .button, .page-header > .badge { justify-content: center; }
  .capacity-total { width: fit-content; }
  .capacity-stats { grid-template-columns: 1fr; }
  .capacity-stats > div { grid-template-columns: auto 1fr auto; align-items: baseline; border-left: 0; border-bottom: 1px solid #d4e3e4; padding: 0 0 .65rem; }
  .capacity-stats > div:last-child { border-bottom: 0; padding-bottom: 0; }
  .capacity-stats strong { grid-column: 2; grid-row: 1 / span 2; font-size: 1.25rem; }
  .capacity-stats small { grid-column: 3; }
  .storage-panel-heading > strong { width: 100%; }
  .record-card-top { flex-direction: column; }
  .record-card-top > .badge { align-self: flex-start; }
  .record-card .record-actions .button { flex: 1 1 auto; }
  .access-card-top { grid-template-columns: auto minmax(0, 1fr); }
  .access-card-top > .badge { grid-column: 2; justify-self: start; }
  .access-facts { grid-template-columns: 1fr; }
  .access-actions .button, .access-actions form, .access-actions form .button { width: 100%; }
  .permission-groups { grid-template-columns: 1fr; }
  .form-actions .button { flex: 1 1 10rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight; }
  .button, .btn, .icon-button, input, select, textarea, .badge, .file-upload, .notification-panel, .profile-menu { border-color: ButtonText; }
  .nav-link.is-active, .mobile-nav-item.is-active { outline: 2px solid Highlight; outline-offset: -2px; }
}

.notification-control { position: relative; }
.notification-button { position: relative; font-weight: 800; }
.notification-badge { position: absolute; top: -.25rem; right: -.25rem; display: grid; min-width: 1.25rem; height: 1.25rem; place-items: center; border: 2px solid white; border-radius: 999px; background: #9f3a38; color: white; font-size: .68rem; line-height: 1; }
.notification-badge.is-empty { display: none; }
.notification-panel { position: absolute; top: calc(100% + .55rem); right: 0; z-index: 45; width: min(24rem, calc(100vw - 1.5rem)); max-height: min(36rem, calc(100dvh - 6rem)); overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: white; box-shadow: var(--shadow-md); }
.notification-panel-header, .notification-panel-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
.notification-panel-header p { margin: .15rem 0 0; color: var(--text-muted); font-size: .8rem; }
.notification-panel-footer { justify-content: center; border-top: 1px solid var(--border); border-bottom: 0; color: var(--primary); font-weight: 720; text-decoration: none; }
.notification-panel-list { display: grid; }
.notification-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .75rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
.notification-item.is-unread { background: #f3faf7; }
.notification-item-copy { min-width: 0; }
.notification-item-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: .35rem .75rem; align-items: center; }
.notification-item-actions form { margin: 0; }
.notification-meta, .notification-row-meta { color: var(--text-muted); font-size: .78rem; font-weight: 650; }
.notification-title { color: var(--text); font-weight: 760; text-decoration: none; }
.notification-item p, .notification-row p, .settings-row p { margin: .25rem 0 0; color: var(--text-muted); }
.notification-context { font-size: .86rem; }
.notification-loading, .notification-error { padding: 1rem; color: var(--text-muted); }
.text-button { border: 0; background: transparent; color: var(--primary); font: inherit; font-weight: 720; cursor: pointer; }
.compact { min-width: 2rem; width: auto; height: 2rem; padding-inline: .5rem; font-size: .75rem; }
.notification-history { display: grid; gap: .75rem; }
.notification-group-heading { margin: .75rem 0 -.15rem; color: var(--text-muted); font-size: .82rem; font-weight: 780; text-transform: uppercase; letter-spacing: .05em; }
.notification-row { display: grid; grid-template-columns: auto 1fr; gap: .8rem; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; background: white; }
.notification-row.is-unread { border-color: #73b99d; background: #f7fcfa; }
.notification-dot { width: .65rem; height: .65rem; margin-top: .35rem; border-radius: 999px; background: var(--border-strong); }
.notification-row.is-unread .notification-dot { background: #087a55; }
.notification-row h2 { margin: .2rem 0; font-size: 1rem; }
.notification-row h2 a { color: var(--text); text-decoration: none; }
.notification-row-meta { display: flex; flex-wrap: wrap; gap: .45rem .8rem; }
.notification-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.notification-actions form { margin: 0; }
.settings-table { display: grid; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); background: white; }
.settings-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(5rem, .25fr) minmax(5rem, .25fr); gap: .75rem; align-items: center; padding: .9rem 1rem; border-bottom: 1px solid var(--border); }
.settings-row:last-child { border-bottom: 0; }
.settings-head { background: #f6f7f5; color: var(--text-muted); font-size: .8rem; font-weight: 750; text-transform: uppercase; }
.switch-label { display: flex; align-items: center; gap: .4rem; font-weight: 700; }
.status-pill { display: inline-flex; align-items: center; min-height: 1.45rem; border: 1px solid var(--border); border-radius: 999px; padding: .15rem .5rem; background: var(--surface-elevated); color: var(--text-muted); font-size: .75rem; font-weight: 740; }
.status-pill.warning { border-color: #e2c37d; background: var(--warning-soft); color: #684a18; }
.status-text { color: var(--text-muted); font-size: .86rem; font-weight: 650; }
.status-text.warning { color: #684a18; }
.section-intro, .privacy-note { max-width: 48rem; color: var(--text-muted); }
.privacy-note { margin-top: 1rem; font-size: .9rem; }
.event-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; margin: .75rem 0; }
.event-summary-grid dt { color: var(--text-muted); font-size: .75rem; font-weight: 750; text-transform: uppercase; }
.event-summary-grid dd { margin: .1rem 0 0; }
.table-wrap { overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--border); border-radius: var(--radius-sm); background: white; }
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap th, .table-wrap td { padding: .8rem .9rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table-wrap th { background: #f6f7f5; color: var(--text-muted); font-size: .78rem; text-transform: uppercase; }
.delivery-card-list { display: none; gap: .75rem; }
.delivery-card { display: grid; gap: .65rem; border: 1px solid var(--border); border-radius: var(--radius-md); padding: .9rem; background: var(--surface); box-shadow: var(--shadow-sm); }
.delivery-card h2 { margin: 0; font-size: .98rem; }
.delivery-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem .9rem; margin: 0; }
.delivery-card dt { color: var(--text-muted); font-size: .74rem; font-weight: 750; text-transform: uppercase; }
.delivery-card dd { margin: .1rem 0 0; }
.delivery-card .full-width { grid-column: 1 / -1; }
.meta-list { display: grid; gap: .5rem; margin: 1rem 0; }
.meta-list div { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; }
.meta-list dt { color: var(--text-muted); font-weight: 700; }
.section-title { margin: 1.5rem 0 .75rem; font-size: 1.1rem; }
.continuity-page .form-actions, .confirmation-panel .form-actions { justify-content: flex-start; }
.continuity-card, .event-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .85rem; align-items: start; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .95rem; background: white; overflow-wrap: anywhere; }

/* UI4.8.1 privacy, notification, and navigation remediation */
.audit-event { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; background: var(--surface); }
.audit-event-sensitive { border-left: 3px solid var(--primary); }
.audit-event-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.audit-event-topline h2 { margin: 0; font-size: 1rem; }
.audit-event-topline time { display: block; margin-top: .2rem; color: var(--text-muted); font-size: .8rem; }
.audit-event-eyebrow { margin: 0 0 .15rem; color: var(--primary); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.audit-event-summary { margin: .7rem 0 .25rem; }
.audit-event-context { margin: 0; color: var(--text-muted); font-size: .82rem; }
.audit-event-details { margin-top: .7rem; border-top: 1px solid var(--border); padding-top: .65rem; }
.audit-event-details summary { color: var(--primary); font-size: .82rem; font-weight: 720; cursor: pointer; }
.audit-event-details .event-summary-grid { margin: .7rem 0 0; }
.audit-event .subtle-link { display: inline-block; margin-top: .65rem; font-size: .82rem; font-weight: 700; }
.audit-permission-list { margin: .6rem 0 0; color: var(--text-muted); font-size: .82rem; }
.button-quiet { border: 1px solid var(--border); background: transparent; color: var(--primary); }
.notification-page-header { align-items: flex-start; }
.notification-privacy-copy { margin: .35rem 0 0; font-size: .78rem; }
.notification-scope-filters { display: flex; align-items: center; gap: .45rem; margin: 1rem 0; overflow-x: auto; }
.notification-scope-filters > .filter-chip { flex: 0 0 auto; }
.notification-category-filter { position: relative; flex: 0 0 auto; }
.notification-category-filter summary { border: 1px solid var(--border); border-radius: 999px; padding: .25rem .7rem; background: var(--surface-elevated); color: var(--text-muted); font-size: .82rem; font-weight: 700; cursor: pointer; list-style: none; }
.notification-category-filter summary::-webkit-details-marker { display: none; }
.notification-category-menu { position: absolute; right: 0; z-index: 5; display: grid; gap: .35rem; min-width: 14rem; margin-top: .4rem; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .55rem; background: var(--surface); box-shadow: var(--shadow-md); }
.notification-category-menu .filter-chip { justify-content: flex-start; border: 0; border-radius: var(--radius-sm); }
.compact-empty-state { min-height: 8rem; padding: 1.25rem; }
.preference-section { display: contents; }
.preference-section h2 { grid-column: 1 / -1; margin: 0; border-bottom: 1px solid var(--border); padding: .8rem 1rem .45rem; background: var(--surface-elevated); font-size: .9rem; }
.preference-row { border-bottom: 1px solid var(--border); }
.privacy-note { display: grid; gap: .2rem; margin-top: 1rem; border-left: 3px solid var(--border-strong); padding: .65rem .8rem; background: var(--surface-elevated); font-size: .82rem; }
.privacy-note p { margin: 0; }
.privacy-note strong { color: var(--text); font-size: .8rem; }

@media (max-width: 767px) {
  .notification-scope-filters { margin: .8rem 0; }
  .notification-category-menu { position: fixed; top: auto; right: .75rem; left: .75rem; min-width: 0; }
  .notification-page-header .button { width: 100%; }
  .preference-section h2 { padding: .7rem .75rem .4rem; }
  .preference-row { grid-template-columns: minmax(0, 1fr) 4.5rem 4.5rem; }
  .preference-row > div:first-child { grid-column: 1 / -1; }
  .preference-row .switch-label { justify-content: flex-start; }
  .preference-actions { position: static; margin: 0; border-top: 1px solid var(--border); padding: .9rem .75rem; background: var(--surface); }
  .mobile-nav-item-add { width: 2.75rem; height: 2.75rem; }
}
.continuity-card h3, .event-card h3, .timeline-item h3 { margin: .1rem 0 .25rem; font-size: 1rem; line-height: 1.25; }
.continuity-card p, .event-card p, .timeline-item p { margin: .25rem 0 0; color: var(--text-muted); }
.event-meta, .card-kicker { color: var(--text-muted); font-size: .75rem; font-weight: 780; text-transform: uppercase; letter-spacing: .04em; }
.timeline-list { display: grid; gap: .8rem; }
.timeline-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .75rem; overflow-wrap: anywhere; }
.timeline-marker { width: .7rem; height: .7rem; margin-top: .35rem; border: 2px solid #6fa68b; border-radius: 999px; background: white; }
.confirmation-panel { max-width: 54rem; }
.confirmation-panel .form-actions form { margin: 0; }
.audit-detail-section { border-top: 1px solid var(--border); padding-top: 1rem; }
.audit-detail-section h2 { margin: 0 0 .4rem; font-size: 1rem; }
.notification-row-body, .notification-item-copy, .delivery-card, .table-wrap td, .meta-list dd { overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.subscription-summary-grid, .subscription-plan-grid, .family-capacity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.subscription-plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.subscription-page .page-header { align-items: flex-start; }
.subscription-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid #8ac5aa; border-radius: var(--radius-md); padding: 1rem 1.15rem; background: #eef9f3; }
.subscription-banner-warning { border-color: #e2c37d; background: var(--warning-soft); }
.subscription-banner p { margin: .25rem 0 0; color: var(--text-muted); }
.plan-card { display: flex; gap: .8rem; min-height: 15rem; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; background: white; cursor: pointer; }
.plan-card:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(16, 111, 78, .12); }
.plan-card input { margin-top: .25rem; accent-color: var(--primary); }
.plan-card-copy { display: grid; align-content: start; gap: .6rem; min-width: 0; }
.plan-card-copy > strong { font-size: 1.15rem; }
.plan-coverage, .plan-card-copy small, .selected-plan-summary span { color: var(--text-muted); }
.plan-prices { display: flex; flex-wrap: wrap; gap: .8rem; font-size: 1.1rem; font-weight: 800; }
.plan-prices small { margin-left: .15rem; font-size: .75rem; font-weight: 650; }
.annual-saving { color: #0b6d4d !important; font-weight: 750; }
.billing-cycle-fieldset { border: 0; padding: 0; }
.billing-cycle-options { display: flex; flex-wrap: wrap; gap: .75rem; }
.billing-cycle-options label { display: grid; grid-template-columns: auto 1fr; gap: .4rem .55rem; min-width: 9rem; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem; background: white; }
.billing-cycle-options small { grid-column: 2; color: var(--text-muted); }
.selected-plan-summary { display: grid; gap: .2rem; border-left: 3px solid var(--primary); padding: .8rem 1rem; background: #f3faf7; }
.subscription-price { margin: .2rem 0; color: var(--text); font-size: 1.5rem; font-weight: 800; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.family-capacity-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 1rem 0; }
.family-capacity-grid div { display: grid; gap: .2rem; border-left: 2px solid var(--border); padding-left: .75rem; }
.family-capacity-grid strong { font-size: 1.35rem; }
.family-capacity-grid span { color: var(--text-muted); font-size: .85rem; }
.scheduled-change { border-color: #8ac5aa; background: #f3faf7; }
.billing-mini-list { display: grid; gap: .6rem; }
.billing-mini-list div { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; border-bottom: 1px solid var(--border); padding: .55rem 0; }
.billing-mini-list span:last-child { color: var(--text-muted); }
.subscription-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.subscription-actions form { margin: 0; }
.subscription-plans { max-width: 74rem; margin-inline: auto; }
.subscription-plans .page-header-copy { max-width: 50rem; }
.cycle-option { min-width: 12rem; }
.plan-card { min-height: 18rem; border-radius: 1.1rem; padding: 1.25rem; box-shadow: 0 8px 24px rgb(23 34 31 / .04); transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition); }
.plan-card:hover { border-color: #8ac5aa; box-shadow: 0 12px 30px rgb(23 34 31 / .08); transform: translateY(-2px); }
.plan-card-copy > strong { font-size: 1.35rem; }
.plan-card-kicker { color: var(--primary); font-size: .74rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.plan-prices { align-items: baseline; gap: .45rem; }
.plan-price-line { font-size: 1.1rem; font-weight: 800; }
.price-or { color: var(--text-muted); font-size: .8rem; font-weight: 650; }
.feature-reassurance { display: grid; gap: .25rem; border-radius: var(--radius-lg); padding: 1.1rem 1.25rem; background: linear-gradient(110deg, #eef9f3, #f7fbf8); }
.feature-reassurance span { color: var(--text-muted); }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(18rem, .9fr); gap: 1rem; max-width: 62rem; }
.checkout-summary { display: grid; gap: 1.4rem; }
.checkout-plan h2 { margin: .2rem 0; }
.checkout-amount { color: var(--primary); font-size: 2rem; font-weight: 850; }
.terms-check { display: flex; align-items: flex-start; gap: .6rem; }
.checkout-page .card { padding: clamp(1.25rem, 3vw, 2rem); }
.checkout-page dl { margin: 0; }
.checkout-page dl div { display: contents; }
.checkout-page .card-kicker { color: var(--text-muted); }
.checkout-summary p { color: var(--text-muted); }
.merchant-disclosure { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, .8fr); gap: 1rem; }
.merchant-disclosure dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem .8rem; margin: 0; }
.merchant-disclosure dt { color: var(--text-muted); font-size: .78rem; font-weight: 750; }
.merchant-disclosure dd { margin: 0; text-align: right; }
.payment-disclosure { align-items: flex-start; }
.payment-methods { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.payment-method { display: grid; place-items: center; min-width: 4.2rem; height: 2.55rem; padding: .3rem .5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.payment-method img { width: auto; max-width: 4.8rem; height: 1.75rem; object-fit: contain; }
.processor-disclosure, .footer-payment { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }
.processor-logo { width: auto; max-width: 8rem; height: 2rem; object-fit: contain; }
.footer-payment { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: .85rem; }
.footer-payment-copy { display: grid; gap: .1rem; }
.footer-payment-copy span { color: var(--text-muted); }
.footer-payment .payment-methods { margin-left: auto; }
.payment-information { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.payment-information > div:first-child { max-width: 38rem; }

@media (max-width: 900px) { .subscription-plan-grid { grid-template-columns: 1fr; } }
@media (max-width: 767px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .merchant-disclosure { grid-template-columns: 1fr; }
  .merchant-disclosure dd { text-align: left; }
  .footer-payment .payment-methods { margin-left: 0; }
  .payment-information { align-items: flex-start; }
  .subscription-summary-grid, .family-capacity-grid { grid-template-columns: 1fr; }
  .subscription-banner, .section-heading, .subscription-actions { align-items: stretch; flex-direction: column; }
  .subscription-banner .button, .section-heading .button, .subscription-actions .button { width: 100%; justify-content: center; }
  .billing-mini-list div { grid-template-columns: 1fr auto; }
  .billing-mini-list div span:last-child { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  .notification-panel { position: fixed; inset: 4.3rem .75rem auto .75rem; width: auto; max-height: calc(100dvh - var(--mobile-bottom-nav-height) - 5.2rem - env(safe-area-inset-bottom)); }
  .notification-item { grid-template-columns: auto minmax(0, 1fr); }
  .notification-item-actions { grid-column: 1 / -1; padding-left: 1.4rem; }
  .settings-row { grid-template-columns: 1fr; align-items: start; }
  .settings-head { display: none; }
  .settings-row:not(.settings-head) { margin: .65rem; border: 1px solid var(--border); border-radius: var(--radius-md); }
  .switch-label { justify-content: space-between; border-top: 1px solid var(--border); padding-top: .55rem; }
  .delivery-card-list { display: grid; }
  .delivery-table-wrap { display: none; }
  .event-summary-grid { grid-template-columns: 1fr; }
  .continuity-card, .event-card { grid-template-columns: 1fr; }
  .continuity-card .button, .event-card .button { width: 100%; justify-content: center; }
.meta-list div { grid-template-columns: 1fr; gap: .15rem; }
}

/* P12A visual foundation: calm surfaces, clearer hierarchy, and reusable status panels. */
:root {
  --background: #f4f7f8;
  --surface-elevated: #f8fbfb;
  --primary: #315f7c;
  --primary-hover: #244b64;
  --primary-soft: #eaf2f6;
  --secondary: #3e786d;
  --muted: #edf2f2;
  --border: #d8e3e6;
  --border-strong: #c0d0d5;
  --text: #17313c;
  --text-muted: #60757e;
  --sidebar: #173542;
  --sidebar-active: #285266;
  --radius-sm: .6rem;
  --radius-md: .85rem;
  --radius-lg: 1.15rem;
  --shadow-sm: 0 2px 7px rgb(23 49 60 / .06);
  --shadow-md: 0 20px 50px rgb(23 49 60 / .14);
}

.public-header { position: sticky; top: 0; z-index: 30; background: rgb(255 255 255 / .9); box-shadow: 0 1px 0 rgb(23 49 60 / .04); backdrop-filter: blur(16px); }
.public-nav { min-height: 4.6rem; }
.public-nav .brand-mark, .auth-brand .brand-mark { background: linear-gradient(135deg, #d9edf0, #dfe8f5); color: var(--primary); box-shadow: inset 0 0 0 1px rgb(49 95 124 / .08); }
.public-actions { gap: .85rem; }
.public-actions > a:not(.button) { color: var(--text-muted); font-size: .88rem; font-weight: 700; text-decoration: none; }
.public-actions > a:not(.button):hover { color: var(--primary); }
.landing { padding-top: clamp(3.2rem, 8vw, 6.5rem); padding-bottom: clamp(3rem, 8vw, 6rem); }
.landing-hero { gap: clamp(2.5rem, 7vw, 7rem); }
.landing-hero-copy { position: relative; }
.landing-hero-copy::before { position: absolute; z-index: -1; top: -4rem; left: -3rem; width: 12rem; height: 12rem; border-radius: 50%; background: #e6f0f1; content: ""; filter: blur(2px); }
.landing-hero h1 { max-width: 14ch; font-weight: 820; letter-spacing: -.045em; color: #14323f; }
.landing-hero p { font-size: 1.08rem; }
.landing-checks { gap: .55rem; margin-top: 1.35rem; padding-left: 0; list-style: none; }
.landing-checks li { display: flex; align-items: flex-start; gap: .55rem; }
.landing-checks li::before { display: inline-grid; width: 1.2rem; height: 1.2rem; flex: 0 0 auto; place-items: center; margin-top: .15rem; border-radius: 50%; background: #dff1e9; color: var(--success); content: "✓"; font-size: .75rem; font-weight: 800; }
.landing-visual { transform: rotate(0); border-color: #cfe0e2; padding: clamp(1rem, 2vw, 1.4rem); background: linear-gradient(145deg, #eaf4f2, #e8eef7); box-shadow: 0 28px 70px rgb(23 49 60 / .16); }
.landing-visual-header { display: flex; align-items: center; gap: .7rem; padding: .45rem .35rem .8rem; }
.landing-visual-header > div { min-width: 0; }
.landing-visual-header span:not(.brand-mark), .landing-visual-header strong { display: block; }
.landing-visual-header span:not(.brand-mark) { color: var(--text-muted); font-size: .72rem; }
.landing-visual-header strong { color: var(--text); font-size: .88rem; }
.landing-visual-card { min-height: 4.2rem; padding: .85rem; box-shadow: 0 5px 18px rgb(23 49 60 / .05); }
.landing-visual-card > div strong { font-size: .92rem; }
.landing-visual-card > div span { line-height: 1.35; }
.feature-card { padding: 1.35rem; box-shadow: none; }
.feature-card h3 { margin: 1rem 0 .35rem; font-size: 1rem; }
.feature-card p { color: var(--text-muted); }
.privacy-panel, .final-cta { border-color: #cfe0e2; box-shadow: var(--shadow-sm); }
.about-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, .55fr); align-items: end; gap: 2rem; padding: clamp(1.5rem, 5vw, 3.5rem); border: 1px solid #cfe0e2; border-radius: var(--radius-lg); background: linear-gradient(135deg, #e8f3f1, #edf2f8); }
.about-hero h1 { max-width: 15ch; margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.04em; }
.about-hero p:not(.eyebrow) { max-width: 42rem; color: var(--text-muted); font-size: 1.05rem; }
.about-hero-mark { display: grid; justify-items: center; gap: .75rem; color: var(--text-muted); font-size: .75rem; font-weight: 750; text-align: center; }
.about-hero-mark .brand-mark { width: 5.5rem; height: 5.5rem; border-radius: 1.5rem; font-size: 1.55rem; }
.about-note { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 1rem; padding: clamp(1.25rem, 3vw, 1.75rem); background: #f1f7f7; }
.about-note h2 { margin: 0; }
.about-note .button { margin-top: .5rem; }
.coverage-card { display: grid; gap: 1rem; border: 1px solid #cfe0e2; border-radius: var(--radius-lg); padding: clamp(1rem, 2.5vw, 1.35rem); background: linear-gradient(120deg, #f8fcfb, #edf5f8); box-shadow: var(--shadow-sm); }
.coverage-card-heading, .coverage-facts { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.coverage-card-heading h2 { margin: 0; font-size: 1.12rem; }
.coverage-card-heading p:not(.eyebrow) { margin: .25rem 0 0; color: var(--text-muted); }
.coverage-facts { justify-content: flex-start; flex-wrap: wrap; }
.coverage-facts > div { display: grid; gap: .1rem; min-width: 9rem; padding-right: 1rem; border-right: 1px solid var(--border); }
.coverage-facts > div span { color: var(--text-muted); font-size: .74rem; font-weight: 750; }
.coverage-facts > div strong { font-size: .88rem; }
.sidebar { background: linear-gradient(180deg, #173542, #142f3b); }
.nav-link.is-active { box-shadow: inset 3px 0 #91c9ca; }
.topbar { box-shadow: 0 1px 0 rgb(23 49 60 / .03); }
.card, .empty-state, .auth-panel, .feature-card { box-shadow: 0 2px 7px rgb(23 49 60 / .05); }
.card-interactive:hover { box-shadow: 0 10px 28px rgb(23 49 60 / .1); }

@media (max-width: 767px) {
  .public-actions { display: none; }
  .public-menu-toggle { display: inline-grid; }
  .public-menu { display: block; }
  .about-hero { grid-template-columns: 1fr; padding: 1.25rem; }
  .about-hero-mark { justify-items: start; grid-template-columns: auto 1fr; text-align: left; }
  .about-hero-mark .brand-mark { width: 3.25rem; height: 3.25rem; border-radius: 1rem; font-size: 1rem; }
  .coverage-card-heading { align-items: flex-start; flex-direction: column; }
  .coverage-facts { align-items: stretch; flex-direction: column; }
  .coverage-facts > div { min-width: 0; padding-right: 0; padding-bottom: .65rem; border-right: 0; border-bottom: 1px solid var(--border); }
  .coverage-facts .button { width: 100%; }
}

/* Responsive public surfaces: keep the shared shell calm and useful at every width. */
.public-nav .brand { flex: 0 0 auto; white-space: nowrap; }
.privacy-panel { align-items: flex-start; border: 1px solid #c8dfe2; background: linear-gradient(120deg, #e7f2f1, #f1f6f8); color: var(--text); }
.privacy-panel .record-icon { flex: 0 0 auto; background: #d5e9eb; color: var(--primary); }
.privacy-panel h2 { margin: .1rem 0 .35rem; color: var(--text); }
.privacy-panel p { margin: 0; color: var(--text-muted); }
.privacy-panel a { color: var(--primary); }
.final-cta { min-height: 0; border: 1px solid #c8dfe2; border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; background: linear-gradient(120deg, #f8fcfb, #edf5f8); }
.final-cta h2 { margin: 0; }
.final-cta .fine-print { margin: .25rem 0 0; }
.public-footer-inner { grid-template-columns: minmax(14rem, 1fr) minmax(20rem, 1.45fr) minmax(13rem, .85fr); align-items: start; gap: 1.35rem 2.5rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.footer-brand { display: grid; gap: .16rem; line-height: 1.45; }
.footer-brand-logo { width: 10rem; height: 3.1rem; object-fit: contain; object-position: left center; border-radius: .45rem; background: #fff; }
.footer-brand strong { color: var(--text); font-size: .9rem; }
.footer-links { align-content: start; justify-content: flex-start; gap: .55rem 1rem; line-height: 1.45; }
.footer-disclaimer { margin: 0; line-height: 1.5; }
.footer-payment { grid-template-columns: minmax(0, auto) auto minmax(0, 1fr); align-items: center; gap: .7rem 1rem; }
.footer-payment .payment-methods { margin-left: auto; }

@media (max-width: 767px) {
  .public-footer-inner { grid-template-columns: 1fr; gap: 1.15rem; padding-top: 1.25rem; padding-bottom: 1.25rem; }
  .footer-payment { grid-template-columns: 1fr; align-items: start; }
  .footer-payment .payment-methods { margin-left: 0; }
  .footer-disclaimer { max-width: 34rem; }
  .legal-content .table-wrap { overflow: visible; border: 0; background: transparent; }
  .legal-content .table-wrap::after { display: none; }
  .legal-content .table-wrap table { display: block; min-width: 0; }
  .legal-content .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .legal-content .table-wrap tbody { display: grid; gap: .75rem; }
  .legal-content .table-wrap tr { display: block; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
  .legal-content .table-wrap td { display: grid; grid-template-columns: minmax(6.5rem, .55fr) minmax(0, 1fr); min-width: 0; gap: .7rem; border-bottom: 1px solid var(--border); padding: .75rem .8rem; }
  .legal-content .table-wrap td:last-child { border-bottom: 0; }
  .legal-content .table-wrap td::before { color: var(--text-muted); font-size: .7rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; content: attr(data-label); }
  .auth-wrap { min-height: auto; place-items: start stretch; padding: 1rem .75rem 2rem; }
  .auth-panel { width: 100%; border-radius: var(--radius-lg); padding: 1.15rem .95rem 1.25rem; }
  .auth-brand { white-space: nowrap; }
  .auth-panel h1 { font-size: 1.45rem; }
  .auth-intro { font-size: .9rem; }
  .consent-stack .form-field label { font-size: .85rem; line-height: 1.4; }
  .auth-links .fine-print { font-size: .75rem; }
  .topbar-brand { gap: 0; }
  .topbar-brand span { display: none; }
  .topbar-brand-logo { width: 4.5rem; height: 3.6rem; border-radius: 0; }
}

@media (max-width: 435px) {
  .public-nav { min-height: 4rem; gap: .5rem; }
  .public-nav .brand { gap: .45rem; font-size: 1rem; }
  .public-nav .brand-mark { width: 2.2rem; height: 2.2rem; }
  .public-actions { flex: 1 1 auto; justify-content: flex-end; gap: .45rem; }
  .public-menu-toggle { width: 2.6rem; height: 2.6rem; }
  .landing { padding-top: 2rem; padding-bottom: 3rem; }
  .landing-hero { gap: 2rem; }
  .landing-hero h1 { max-width: 12ch; font-size: clamp(2rem, 9vw, 2.35rem); line-height: 1.1; }
  .landing-hero p { font-size: .98rem; line-height: 1.5; }
  .landing-checks { gap: .45rem; font-size: .9rem; }
  .final-cta { padding: 1.1rem; }
  .final-cta .button { width: 100%; }
  .legal-content .table-wrap td { grid-template-columns: minmax(5.5rem, .48fr) minmax(0, 1fr); gap: .55rem; padding: .7rem; }
  .password-toggle { top: 1.72rem; right: .4rem; bottom: auto; }
  .topbar-brand-logo { width: 2.8rem; height: 2.8rem; border-radius: .6rem; }
}

/* Responsive follow-up: keep dashboard context, file actions, and type
   readable after all component-specific rules have loaded. */
.profile-context-card.dashboard-profile-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; }
.dashboard-profile-card > div { min-width: 0; }
.file-panel .actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.file-panel .actions .button { min-width: 0; white-space: normal; }

@media (max-width: 767px) {
  body { font-size: .875rem; }
  h1 { font-size: clamp(1.4rem, 5.5vw, 1.8rem); }
  h2 { font-size: 1rem; }
  .profile-context-card.dashboard-profile-card { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .dashboard-profile-card .badge { grid-column: 2; justify-self: start; }
  .dashboard-profile-card .button { grid-column: 2; justify-self: start; }
  .file-panel .actions { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .file-panel .actions .button { width: 100%; }
  .file-panel .actions .button:last-child:nth-child(3) { grid-column: 1 / -1; }
}

@media (max-width: 435px) {
  body { font-size: .84rem; }
  h1 { font-size: 1.45rem; }
  h2 { font-size: .98rem; }
  .auth-panel { padding: 1rem .85rem 1.1rem; }
  .auth-panel .form-field label { font-size: .8rem; }
  .auth-panel .auth-intro { font-size: .84rem; }
  .auth-panel .button { font-size: .86rem; }
}

/* Keep the authenticated header focused on one profile control at every width. */
@media (max-width: 767px) {
  .profile-switcher-copy span { display: block; }
}

/* P12C subscription, billing, and account finishing details. */
.retention-panel { border-color: #c4d8df; background: var(--surface-elevated); }
.retention-panel .detail-list { max-width: 34rem; }
.cancel-action { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; flex-wrap: wrap; }
.cancel-action p { max-width: 38rem; margin: 0; color: var(--text-muted); font-size: .86rem; }
.cancel-action form { margin: 0; }
.checkout-recurring-note { border-left: 3px solid var(--primary); padding-left: .8rem; color: var(--text) !important; }
.legal-reacceptance-item { display: grid; gap: .45rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.legal-reacceptance-item:first-child { border-top: 0; padding-top: 0; }
.legal-reacceptance-item h2, .legal-reacceptance-item p { margin: 0; }
.billing-history-table td, .billing-history-table th { vertical-align: top; }

@media (max-width: 767px) {
  .cancel-action { align-items: stretch; justify-content: stretch; }
  .cancel-action form, .cancel-action .button { width: 100%; }
  .billing-history-table { overflow: visible; border: 0; background: transparent; }
  .billing-history-table::after { display: none; }
  .billing-history-table table { display: block; min-width: 0; }
  .billing-history-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .billing-history-table tbody { display: grid; gap: .75rem; }
  .billing-history-table tr { display: block; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
  .billing-history-table td { display: grid; grid-template-columns: minmax(6rem, .5fr) minmax(0, 1fr); gap: .7rem; border-bottom: 1px solid var(--border); padding: .75rem .8rem; overflow-wrap: anywhere; }
  .billing-history-table td:last-child { border-bottom: 0; }
  .billing-history-table td::before { color: var(--text-muted); font-size: .7rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; content: attr(data-label); }
}

/* HL-PUBLIC-2: About and database-backed FAQ surfaces. */
.about-split, .about-story { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.about-split { padding: clamp(1.4rem, 4vw, 2.3rem); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-elevated); }
.about-split h2, .about-story h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); }
.about-feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.about-moments { padding-top: .5rem; }
.moment-grid, .audience-grid, .principles-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.moment-grid article, .audience-grid article, .principles-grid article, .isnt-grid article { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.15rem; background: var(--surface); }
.moment-grid h3, .audience-grid h3, .principles-grid h3, .isnt-grid h3 { margin: 0 0 .35rem; font-size: 1rem; }
.moment-grid p, .audience-grid p, .principles-grid p, .isnt-grid p { margin: 0; color: var(--text-muted); }
.about-steps { padding: clamp(1.25rem, 3vw, 2rem); }
.about-step-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.about-step-list li { display: grid; gap: .7rem; align-content: start; }
.about-step-list li > span { display: grid; width: 2.2rem; height: 2.2rem; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.about-step-list h3 { margin: 0; font-size: 1rem; }
.about-step-list p { margin: .25rem 0 0; color: var(--text-muted); }
.about-steps > .fine-print { margin-top: 1.25rem; }
.privacy-panel .button-row { margin-top: .9rem; }
.about-isnt { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 2rem; align-items: start; }
.isnt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.isnt-grid article:first-child { border-color: #b8d9d3; background: #eff8f5; }
.audience-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.about-story { align-items: stretch; }
.company-fact { align-content: start; padding: 1.35rem; }
.company-fact h3 { margin: 0; }
.company-fact p:last-child { margin-bottom: 0; color: var(--text-muted); }
.mission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.mission-grid article { border-radius: var(--radius-lg); padding: clamp(1.25rem, 3vw, 2rem); background: var(--sidebar); color: white; }
.mission-grid article:last-child { background: var(--primary-soft); color: var(--text); }
.mission-grid h2 { margin: 0; font-size: clamp(1.25rem, 2.5vw, 1.7rem); }
.mission-grid .eyebrow { color: inherit; opacity: .75; }
.principles-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.about-faq { padding: clamp(1.25rem, 3vw, 2rem); }
.faq-answer { display: grid; gap: .55rem; margin-top: .55rem; color: var(--text-muted); }
.faq-answer p { margin: 0; }
.faq-answer ul, .faq-answer ol { display: grid; gap: .3rem; margin: 0; padding-left: 1.25rem; }
.faq-answer a { color: var(--primary); font-weight: 700; }
.faq-hero { max-width: 54rem; margin: 0 auto; text-align: center; }
.faq-hero h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -.04em; }
.faq-hero > p:not(.eyebrow) { max-width: 42rem; margin: .8rem auto 0; color: var(--text-muted); font-size: 1.05rem; }
.faq-search { max-width: 42rem; margin: 1.5rem auto 0; text-align: left; }
.faq-search label { display: block; margin-bottom: .4rem; color: var(--text); font-size: .82rem; font-weight: 750; }
.faq-search > div { display: flex; gap: .6rem; }
.faq-search input { min-width: 0; flex: 1; }
.faq-layout { display: grid; grid-template-columns: minmax(12rem, .3fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.faq-categories { position: sticky; top: 5.5rem; }
.faq-categories > div { display: grid; gap: .25rem; margin-top: .65rem; }
.faq-categories a { border-radius: var(--radius-sm); padding: .6rem .7rem; color: var(--text-muted); font-size: .88rem; font-weight: 700; text-decoration: none; }
.faq-categories a:hover, .faq-categories a.is-active { background: var(--primary-soft); color: var(--primary); }
.faq-results-heading { align-items: end; }
.faq-result-count { margin: 0; color: var(--text-muted); font-size: .82rem; }
.faq-results details { padding: 1rem 0; }
.faq-results summary { display: flex; justify-content: space-between; gap: 1rem; list-style: none; }
.faq-results summary::-webkit-details-marker { display: none; }
.faq-results summary::after { flex: 0 0 auto; color: var(--primary); content: "+"; font-size: 1.2rem; line-height: 1; }
.faq-results details[open] summary::after { content: "−"; }
.faq-results .empty-state { margin-top: .5rem; }
@media (max-width: 900px) {
  .about-feature-grid, .moment-grid, .principles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-step-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .about-split, .about-story, .about-isnt, .faq-layout { grid-template-columns: 1fr; }
  .about-feature-grid, .moment-grid, .audience-grid, .principles-grid, .isnt-grid, .mission-grid { grid-template-columns: 1fr; }
  .about-step-list { grid-template-columns: 1fr; }
  .faq-categories { position: static; }
  .faq-categories > div { display: flex; overflow-x: auto; gap: .4rem; margin-right: -1rem; padding-right: 1rem; padding-bottom: .3rem; }
  .faq-categories a { flex: 0 0 auto; border: 1px solid var(--border); }
  .faq-search > div { align-items: stretch; flex-direction: column; }
  .faq-search .button { width: 100%; justify-content: center; }
  .faq-results-heading { align-items: flex-start; }
  .faq-results-heading .faq-result-count { display: none; }
  .privacy-panel { align-items: flex-start; }
}

/* Final cascade for the shared public footer and transactional policy modal. */
.public-page.stack-lg { gap: clamp(2rem, 5vw, 4rem); }
.public-page > .page-header { padding-bottom: .35rem; }
.public-page > .page-header h1, .legal-document > .page-header h1 { letter-spacing: -.025em; }
.legal-document { max-width: 52rem; }
.legal-content { gap: .9rem; max-width: 50rem; margin-inline: auto; font-size: .97rem; line-height: 1.7; }
.legal-content h2 { margin-top: 1.8rem; font-size: 1.18rem; }
.legal-content h3 { margin-top: 1.15rem; }
.legal-content ul, .legal-content ol { gap: .5rem; }
.legal-dialog-trigger { margin: 0; border: 0; padding: 0; background: transparent; font: inherit; cursor: pointer; }
.legal-dialog-trigger:hover { background: transparent; }
.public-footer-inner { grid-template-columns: minmax(14rem, 1.35fr) repeat(3, minmax(8rem, 1fr)); align-items: start; gap: 1.5rem 2rem; padding-top: 1.4rem; padding-bottom: 1.15rem; }
.footer-nav { display: grid; align-content: start; justify-items: start; gap: .38rem; }
.footer-nav a, .footer-nav button { display: inline-flex; width: fit-content; align-items: center; border: 0; padding: 0; background: transparent; color: var(--text-muted); font: inherit; font-size: .8rem; text-decoration: none; cursor: pointer; }
.footer-nav a:hover, .footer-nav button:hover { color: var(--primary); text-decoration: underline; }
.footer-nav form { margin: 0; }
.footer-heading { margin: 0 0 .2rem; color: var(--text); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.footer-payment { display: grid; grid-column: 1 / -1; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: .7rem 1rem; border-top: 1px solid var(--border); padding-top: .9rem; }
.footer-payment .payment-methods { margin-left: auto; }
.footer-disclaimer { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: .75rem; }

@media (max-width: 900px) {
  .public-footer-inner { grid-template-columns: minmax(13rem, 1.4fr) repeat(2, minmax(9rem, 1fr)); gap: 1rem 1.5rem; }
  .footer-nav[aria-label="Legal"] { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  .public-footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1.25rem; padding-top: 1.25rem; padding-bottom: 1.1rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-nav[aria-label="Legal"] { grid-column: 1 / -1; }
  .footer-payment { grid-template-columns: 1fr; align-items: start; gap: .65rem; }
  .footer-payment .payment-methods { margin-left: 0; }
  .footer-disclaimer { grid-column: 1 / -1; }
  .app-legal-footer { padding-bottom: calc(var(--mobile-bottom-nav-height) + .75rem); }
}

@media (max-width: 435px) {
  .public-footer-inner { grid-template-columns: 1fr 1fr; column-gap: 1rem; }
  .footer-nav a, .footer-nav button { font-size: .78rem; }
}
