/* GuardMyContract brand tokens. Source of truth: docs/brand/brand-tokens.json (kept in sync by
   test/unit-brand.test.ts). Use these variables; do not add hard-coded colours, radii or font sizes. */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --color-primary: #1d5bd8;
  --color-primary-hover: #1749b0;
  --color-primary-pressed: #133d93;
  --color-primary-50: #edf3ff;
  --color-primary-100: #dbe7ff;
  --color-on-primary: #ffffff;
  --color-navy: #0c1a36;
  --color-navy-2: #1b2c52;
  --color-text: #0f1b33;
  --color-text-2: #46516a;
  --color-text-muted: #5f6b85;
  --color-bg: #f3f6fb;
  --color-bg-soft: #f6f8fc;
  --color-surface: #ffffff;
  --color-border: #e3e8f1;
  --color-border-strong: #c9d3e4;
  --color-border-input: #8a95ab;
  --color-success: #127a46;
  --color-success-bg: #e5f5ec;
  --color-warning: #b45309;
  --color-warning-strong: #8a4b00;
  --color-warning-bg: #fff4e0;
  --color-warning-bg-subtle: #fffaf0;
  --color-warning-border: #fde3b8;
  --color-warning-accent: #d97706;
  --color-danger: #b42318;
  --color-danger-hover: #912018;
  --color-danger-bg: #fdecea;
  --color-danger-border: #f6c9c4;
  --color-info: #1d5bd8;
  --color-info-bg: #edf3ff;
  --color-person: #4b3fb5;
  --color-person-bg: #ecebfb;
  --color-calc: #0b6b78;
  --color-calc-bg: #e3f5f7;
  --color-neutral: #5f6b85;
  --color-neutral-bg: #eef1f6;
  --color-neutral-accent: #8a95ab;
  --color-due-soon: #c2410c;
  --color-due-soon-bg: #ffedd5;
  --color-due-soon-accent: #ea580c;
  --color-due-later: #a16207;
  --color-due-later-bg: #fef6c7;
  --color-due-later-accent: #ca8a04;
  --color-sidebar-text: #c3cee6;
  --color-sidebar-label: #8392b3;
  --color-sidebar-indicator: #5b8dff;
  --color-sidebar-active-bg: rgba(77, 133, 255, .2);
  --color-sidebar-hover-bg: rgba(255, 255, 255, .06);
  --color-sidebar-line: rgba(255, 255, 255, .08);
  --color-overlay: rgba(12, 26, 54, .45);
  --color-focus: #1d5bd8;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-email: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --text-2xs: 11px;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 14px;
  --text-base: 15px;
  --text-lg: 16px;
  --text-xl: 18px;
  --text-2xl: 20px;
  --text-3xl: 26px;
  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-strong: 650;
  --weight-bold: 700;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-22: 88px;
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 51, .05);
  --shadow-md: 0 1px 2px rgba(15, 27, 51, .04), 0 6px 20px rgba(15, 27, 51, .05);
  --shadow-lg: 0 1px 2px rgba(15, 27, 51, .05), 0 12px 32px rgba(15, 27, 51, .08);
  --border-width: 1px;
  --border-accent: 4px;
  --focus-width: 2px;
  --focus-offset: 2px;
  --size-control-sm: 32px;
  --size-control-md: 40px;
  --size-control-lg: 48px;
  --size-touch: 44px;
  --size-icon-sm: 16px;
  --size-icon-md: 18px;
  --size-icon-lg: 20px;
  --size-tile: 40px;
  --layout-app-max: 1440px;
  --layout-public-max: 1160px;
  --layout-reading: 720px;
  --layout-form: 440px;
  --layout-settings: 880px;
}
* { box-sizing: border-box; }
/* Focus: one visible ring for every interactive element (keyboard focus). */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: var(--focus-width) solid var(--color-focus); outline-offset: var(--focus-offset); }
/* Dates, amounts and counters line up in columns. */
.ac-date, .ac-days, .cp-date-value, .tl-day, .dl-days, .kpi-value, .mon-figure .big, .value-big, .pv-when, .notif-when { font-variant-numeric: tabular-nums; }
body { margin: 0; font: var(--text-base)/var(--leading-normal) var(--font-sans); color: var(--color-text); background: var(--color-bg); }
a { color: var(--color-primary); }
h1 { font-size: var(--text-3xl); line-height: var(--leading-tight); margin: 0 0 .75rem; }
h2 { font-size: var(--text-xl); margin: 0 0 .75rem; }
main { max-width: 1400px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: .7rem 1.25rem; background: var(--color-navy); color: var(--color-on-primary); }
.topbar .brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--color-on-primary); font-weight: 700; text-decoration: none; }
/* Logo tile: the mark is white on the brand blue at 72% of the tile (docs/brand/logo.md). */
.brand-tile { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--color-primary); color: var(--color-on-primary); flex: none; }
.logo-mark { display: block; width: 72%; height: 72%; flex: none; }
.topbar .who { display: flex; gap: 1rem; align-items: center; font-size: var(--text-md); }
.topbar .org { font-weight: 600; }
.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; color: var(--color-sidebar-text); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); margin-bottom: 1rem; }
.narrow { max-width: 440px; margin: 3rem auto; }
label { display: block; margin-bottom: .8rem; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input:not([type]) { display: block; width: 100%; min-height: var(--size-control-md); margin-top: .25rem; padding: .55rem .65rem; border: 1px solid var(--color-border-input); border-radius: var(--radius-xs); font: inherit; }
button.primary { background: var(--color-primary); color: var(--color-on-primary); border: 0; border-radius: var(--radius-xs); padding: .55rem 1rem; font: inherit; font-weight: 600; cursor: pointer; }
.hint, .muted { color: var(--color-text-muted); }
.small { font-size: var(--text-md); }
.error { color: var(--color-danger); background: var(--color-danger-bg); padding: .5rem .75rem; border-radius: var(--radius-xs); }
.notice { margin-bottom: 1rem; }
.notice p { margin: .25rem 0; padding: .5rem .75rem; background: var(--color-primary-50); border-radius: var(--radius-xs); }
.notice p.error { background: var(--color-danger-bg); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kpi { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1rem 1.25rem; }
.kpi.attention { border-color: var(--color-warning-accent); background: var(--color-warning-bg-subtle); }
.kpi-label { color: var(--color-text-muted); font-size: var(--text-md); }
.kpi-value { font-size: 1.6rem; font-weight: 700; margin: .2rem 0; }
.kpi-note { font-size: var(--text-sm); color: var(--color-text-muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--color-border); vertical-align: top; }
thead th { font-size: var(--text-sm); color: var(--color-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.nowrap { white-space: nowrap; }
ul.actions { list-style: none; padding: 0; margin: 0; }
ul.actions > li { padding: .5rem 0; border-bottom: 1px solid var(--color-border); }
ul.actions ul { margin: .2rem 0 0; padding-left: 1.1rem; font-size: var(--text-md); color: var(--color-text-muted); }
ul.actions li.urgent { color: var(--color-danger); font-weight: 600; }
ul.actions li.action > div + div { margin-top: .15rem; }
ul.actions li.action .badge { margin-right: .35rem; }
ul.actions strong.urgent { color: var(--color-danger); }
.badge { display: inline-block; font-size: var(--text-xs); font-weight: 600; padding: .1rem .45rem; border-radius: var(--radius-full); vertical-align: middle; white-space: nowrap; }
.badge.ok { color: var(--color-success); background: var(--color-success-bg); }
.badge.warn { color: var(--color-warning); background: var(--color-warning-bg); }
.badge.muted { color: var(--color-text-muted); background: var(--color-neutral-bg); }
.badge.user { color: var(--color-person); background: var(--color-person-bg); }
.badge.ai { color: var(--color-neutral); background: var(--color-neutral-bg); }
.badge.calc { color: var(--color-calc); background: var(--color-calc-bg); }
.warn-text { color: var(--color-warning); }
.disclaimer { font-size: var(--text-sm); color: var(--color-text-muted); }
.upload { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.reanalyse { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin: 0 0 1rem; }
.crumbs { margin: 0 0 .5rem; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 1000px) { .detail { grid-template-columns: 1fr; } }
.detail-doc { position: sticky; top: 1rem; }
.banner { padding: .75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.banner.info { background: var(--color-primary-50); }
.banner.warn { background: var(--color-warning-bg); color: var(--color-warning); }
.banner.error { background: var(--color-danger-bg); color: var(--color-danger); }
.calcs { display: grid; gap: .75rem; }
.calc { border: 1px solid var(--color-border); border-left: 4px solid var(--color-calc); border-radius: var(--radius-sm); padding: .65rem .85rem; }
.calc.calc-unverified { border-left-color: var(--color-warning-accent); }
.calc-title { font-size: var(--text-sm); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .02em; }
.calc-value { font-size: var(--text-xl); margin: .15rem 0; }
.calc-formula { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--color-calc); }
.calc-inputs { font-size: var(--text-sm); color: var(--color-text-muted); }
table.fields th[scope=row] { width: 26%; font-weight: 600; }
table.fields tr.status-needs_review { background: var(--color-warning-bg-subtle); }
blockquote { margin: .35rem 0 0; padding: .3rem .6rem; border-left: 3px solid var(--color-success); background: var(--color-bg-soft); font-size: var(--text-md); color: var(--color-text-2); }
blockquote.unverified { border-left-color: var(--color-warning-accent); background: var(--color-warning-bg-subtle); }
button.cite { font: inherit; font-size: var(--text-sm); padding: .1rem .5rem; border: 1px solid var(--color-border-strong); background: var(--color-surface); border-radius: var(--radius-xs); cursor: pointer; }
button.cite.active, button.cite:hover { border-color: var(--color-primary); color: var(--color-primary); }
.viewer { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.viewer-bar { display: flex; justify-content: center; align-items: center; gap: 1rem; padding: .4rem; border-bottom: 1px solid var(--color-border); background: var(--color-bg-soft); }
.viewer-bar button { font: inherit; font-size: var(--text-xl); width: 2rem; border: 1px solid var(--color-border-strong); background: var(--color-surface); border-radius: var(--radius-xs); cursor: pointer; }
.viewer-page { position: relative; max-height: calc(100vh - 7rem); overflow: auto; }
.viewer-page canvas { display: block; }
.highlights { position: absolute; inset: 0; pointer-events: none; }
.hl { position: absolute; background: rgba(255, 200, 0, .35); outline: 2px solid rgba(230, 160, 0, .8); border-radius: 2px; }
.hl-note { position: absolute; top: .5rem; left: .5rem; right: .5rem; background: var(--color-warning-bg); color: var(--color-warning); padding: .4rem .6rem; border-radius: var(--radius-xs); font-size: var(--text-md); }

/* ---------------------------------------------------------------------------
   App shell + dashboard (pages rendered with layout({ sidebar }))
   Blue = brand/interactive, navy = structure. Red/amber only for real urgency or status.
   --------------------------------------------------------------------------- */
body.shell { background: var(--color-bg); color: var(--color-text); }
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
main.app-main { max-width: 1440px; width: 100%; margin: 0; padding: 1.75rem 2.25rem 3rem; }
/* Main column: page content, then the footer at the bottom (not fixed; pushed down on short pages). */
.app-col { display: flex; flex-direction: column; min-width: 0; }
.app-col > main.app-main { flex: 1 0 auto; }
.app-footer { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: .5rem 2rem; max-width: 1440px; width: 100%; padding: 1.1rem 2.25rem 1.3rem; border-top: 1px solid var(--color-border); background: var(--color-bg-soft); color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.5; }
.af-brand, .af-meta { display: flex; flex-direction: column; gap: .1rem; }
.af-brand strong { color: var(--color-text); font-size: var(--text-md); font-weight: 650; }
.af-meta { align-items: flex-end; text-align: right; }
.af-links { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.af-links a { color: var(--color-text-muted); text-decoration: none; }
.af-links a + a::before { content: "·"; margin: 0 .55rem; color: var(--color-border-strong); }
.af-links a:hover, .af-links a:focus-visible { color: var(--color-primary); }
@media (max-width: 640px) {
  .app-footer { flex-direction: column; padding: 1rem 1rem 1.2rem; }
  .af-meta { align-items: flex-start; text-align: left; }
  .af-links { justify-content: flex-start; }
}
svg.i { width: var(--size-icon-md); height: var(--size-icon-md); flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Sidebar */
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1.75rem; padding: 1.25rem .9rem; background: var(--color-navy); color: var(--color-sidebar-text); }
.sb-brand { display: flex; align-items: center; gap: .65rem; padding: .25rem .5rem; color: var(--color-on-primary); font-weight: 700; font-size: var(--text-lg); letter-spacing: -.01em; text-decoration: none; }
.sb-logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-md); background: var(--color-primary); color: var(--color-on-primary); }
.sb-nav { display: flex; flex-direction: column; gap: .2rem; }
.sb-item { display: flex; align-items: center; gap: .7rem; padding: .58rem .75rem; border-radius: var(--radius-md); color: var(--color-sidebar-text); font-size: var(--text-base); font-weight: 500; text-decoration: none; }
.sb-item:hover { background: var(--color-sidebar-hover-bg); color: var(--color-on-primary); }
.sb-item.active { background: var(--color-sidebar-active-bg); color: var(--color-on-primary); box-shadow: inset 3px 0 0 var(--color-sidebar-indicator); }
.sb-item.disabled { opacity: .5; cursor: default; }
.sb-item.disabled:hover { background: none; color: var(--color-sidebar-text); }
.sb-soon { margin-left: auto; padding: .05rem .45rem; border-radius: var(--radius-full); background: var(--color-sidebar-line); font-size: var(--text-2xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.sb-foot { margin-top: auto; display: flex; flex-direction: column; gap: .1rem; padding: .9rem .75rem 0; border-top: 1px solid var(--color-sidebar-line); font-size: var(--text-sm); }
.sb-foot-label { font-size: var(--text-2xs); letter-spacing: .06em; text-transform: uppercase; color: var(--color-sidebar-label); }
.sb-org { color: var(--color-on-primary); font-weight: 600; }

/* Header */
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.dash-head h1 { margin: 0; font-size: var(--text-3xl); line-height: var(--leading-tight); letter-spacing: -.02em; color: var(--color-text); }
.dash-head .sub { margin: .25rem 0 0; color: var(--color-text-muted); }
.head-actions { display: flex; align-items: center; gap: .6rem; }
/* Pages with a long subtitle: let the title block shrink so the header actions stay top-right
   instead of wrapping below the subtitle (and stay right-aligned if they do wrap on narrow screens). */
.dash-head.pin-actions > div:first-child { flex: 1 1 320px; min-width: 0; }
.dash-head.pin-actions > .head-actions { flex: none; margin-left: auto; }
.btn { display: inline-flex; align-items: center; gap: .45rem; min-height: var(--size-control-md); padding: .58rem 1rem; border: 1px solid transparent; border-radius: var(--radius-md); font: inherit; font-size: var(--text-md); font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--color-primary); color: var(--color-on-primary); box-shadow: 0 1px 2px rgba(29, 91, 216, .25); }
.btn.primary:hover { background: var(--color-primary-hover); }
.btn.ghost { background: var(--color-surface); border-color: var(--color-border); color: var(--color-text); }
.btn.ghost:hover { border-color: var(--color-border-strong); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.sm { min-height: var(--size-control-sm); padding: .35rem .75rem; font-size: var(--text-sm); border-radius: var(--radius-sm); }
.icon-btn { position: relative; display: grid; place-items: center; width: var(--size-control-md); height: var(--size-control-md); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text); }
.icon-btn:hover { border-color: var(--color-border-strong); }
.icon-btn .count { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border: 2px solid var(--color-bg); border-radius: var(--radius-full); background: var(--color-navy-2); color: var(--color-on-primary); font-size: var(--text-2xs); font-weight: 700; }
.icon-btn .count.urgent { background: var(--color-danger); }
.user-menu { position: relative; }
.user-menu summary { display: flex; align-items: center; gap: .55rem; padding: .25rem .55rem .25rem .25rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); cursor: pointer; list-style: none; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary svg.i { width: var(--size-icon-sm); height: var(--size-icon-sm); color: var(--color-text-muted); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--color-primary-50); color: var(--color-primary); font-weight: 700; }
.um-name { display: flex; flex-direction: column; font-size: var(--text-md); font-weight: 600; line-height: 1.2; }
.um-name small { color: var(--color-text-muted); font-weight: 500; font-size: var(--text-xs); }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 230px; padding: .4rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-lg); }
.menu-head { display: flex; flex-direction: column; padding: .5rem .65rem .6rem; margin-bottom: .3rem; border-bottom: 1px solid var(--color-border); font-size: var(--text-md); }
.menu-head span { color: var(--color-text-muted); font-size: var(--text-sm); }
.menu-item { width: 100%; padding: .5rem .65rem; border: 0; border-radius: var(--radius-sm); background: none; color: var(--color-text); font: inherit; font-size: var(--text-md); text-align: left; cursor: pointer; }
.menu-item:hover { background: var(--color-bg-soft); }
a.menu-item { display: block; text-decoration: none; }
/* Shared header actions: Notifications | + Add contract | Account. The notifications panel opens
   directly under the bell (absolutely positioned, so it never moves the controls). On narrow
   screens it is anchored to the whole action row instead so it cannot run off the left edge. */
.head-actions { position: relative; }
.notif-menu { position: relative; }
@media (max-width: 600px) {
  .notif-menu { position: static; }
}
.notif-menu summary { list-style: none; cursor: pointer; }
.notif-menu summary::-webkit-details-marker { display: none; }
.notif-menu[open] summary { border-color: var(--color-primary-100); background: var(--color-primary-50); color: var(--color-primary); }
.notif-panel { width: min(360px, calc(100vw - 2rem)); padding: .4rem; }
.notif-list { display: flex; flex-direction: column; gap: .15rem; max-height: min(420px, 60vh); margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.notif-row { display: flex; align-items: center; gap: .35rem; }
.notif-row[hidden] { display: none; }
.notif-row .notif-item { flex: 1; min-width: 0; }
.notif-read { flex: none; margin: 0; }
.notif-read-btn { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: var(--radius-sm); background: none; color: var(--color-text-muted); cursor: pointer; }
.notif-read-btn svg.i { width: var(--size-icon-sm); height: var(--size-icon-sm); }
.notif-read-btn:hover, .notif-read-btn:focus-visible { border-color: var(--color-border); background: var(--color-success-bg); color: var(--color-success); }
.notif-read-btn:disabled { opacity: .5; cursor: default; }
.notif-item { display: flex; flex-direction: column; gap: .1rem; padding: .55rem .65rem .55rem .8rem; border-radius: var(--radius-sm); border-left: 3px solid var(--color-border); color: var(--color-text); text-decoration: none; }
.notif-item:hover, .notif-item:focus-visible { background: var(--color-bg-soft); }
.notif-item.p-urgent { border-left-color: var(--color-danger); }
.notif-item.p-high { border-left-color: var(--color-warning-accent); }
.notif-item.p-normal { border-left-color: var(--color-primary); }
.notif-kind { font-size: var(--text-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--color-text-muted); }
.notif-kind.g-missed { color: var(--color-danger); }
.notif-title { overflow: hidden; font-size: var(--text-md); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.notif-when { font-size: var(--text-sm); color: var(--color-text-muted); }
.notif-all { display: block; margin-top: .3rem; padding: .55rem .65rem; border-top: 1px solid var(--color-border); color: var(--color-primary); font-size: var(--text-md); font-weight: 600; text-decoration: none; }
.notif-all:hover { text-decoration: underline; }
.notif-empty { margin: 0; padding: .9rem .65rem 1rem; color: var(--color-text-muted); font-size: var(--text-md); }
.hd-upload { margin: 0; }
.hd-upload label.btn { margin: 0; }
.hd-upload input:focus-visible + label { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.hd-upload.is-busy label.btn { opacity: .75; pointer-events: none; }
/* Pagination (Contracts page). */
.pager { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--color-border); }
.pager-nav { display: flex; align-items: center; gap: .6rem; }
.pager-page { font-size: var(--text-md); font-weight: 600; color: var(--color-text); }
.btn.is-disabled { opacity: .45; cursor: default; }
body.shell .notice p { background: var(--color-primary-50); border-radius: var(--radius-md); }
/* Email verification notice (every app page until verified). Amber = "check this" (docs/brand/status.md). */
.verify-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-4); margin: 0 0 var(--space-5); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-warning-border); border-left: var(--border-accent) solid var(--color-warning-accent); border-radius: var(--radius-lg); background: var(--color-warning-bg); }
.verify-banner p { flex: 1 1 360px; margin: 0; color: var(--color-text-2); font-size: var(--text-md); }
.verify-banner strong { color: var(--color-text); }
.verify-banner form { margin: 0; flex: none; }

/* Status widgets */
.status-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; margin-bottom: 1.25rem; }
.stat-card { display: flex; align-items: flex-start; gap: 1rem; padding: 1.15rem 1.3rem; border: 1px solid var(--color-border); border-radius: var(--radius-xl); background: var(--color-surface); box-shadow: var(--shadow-md); color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.stat-card:hover { border-color: var(--color-primary-100); box-shadow: var(--shadow-lg); }
.stat-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-lg); background: var(--color-primary-50); color: var(--color-primary); flex: none; }
.stat-card.is-urgent .stat-icon { background: var(--color-danger-bg); color: var(--color-danger); }
.stat-card.is-warn .stat-icon { background: var(--color-warning-bg); color: var(--color-warning); }
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-eyebrow { font-size: var(--text-xs); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--color-text-muted); }
.stat-card .kpi-value { margin: .15rem 0 0; font-size: 1.85rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; color: var(--color-text); }
.stat-card .kpi-value .of { font-size: var(--text-xl); font-weight: 600; color: var(--color-text-muted); }
.stat-card .kpi-label { color: var(--color-text); font-size: var(--text-md); font-weight: 500; }
.stat-note { margin-top: .15rem; font-size: var(--text-sm); color: var(--color-text-muted); }

/* Panels */
.panel { margin-bottom: 1.25rem; padding: var(--space-5) var(--space-6); border: 1px solid var(--color-border); border-radius: var(--radius-xl); background: var(--color-surface); box-shadow: var(--shadow-md); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.panel-head h2 { margin: 0; font-size: var(--text-xl); letter-spacing: -.01em; color: var(--color-text); }
.panel-head p { margin: .2rem 0 0; }
.widget-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-md); background: var(--color-bg-soft); color: var(--color-text-muted); flex: none; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr); gap: 1.25rem; align-items: start; }
.dash-side { display: flex; flex-direction: column; }

/* Action Center: the focal point */
.panel.ac { padding: 1.5rem 1.6rem; border-color: var(--color-primary-100); box-shadow: var(--shadow-lg); }
.panel.ac .panel-head h2 { font-size: var(--text-2xl); }
.ac-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.1rem; }
.chip { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .75rem; border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-bg-soft); color: var(--color-text); font-size: var(--text-sm); font-weight: 600; }
.chip b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 .35rem; border-radius: var(--radius-full); background: var(--color-surface); font-size: var(--text-xs); }
.chip.g-missed { border-color: var(--color-danger-border); background: var(--color-danger-bg); color: var(--color-danger); }
/* Action Center filter: the category chips are radio buttons; CSS shows only the chosen category
   (instant, no reload, no JavaScript). "All" is checked by default. */
.ac-filter { display: flex; flex-wrap: wrap; gap: .5rem; min-width: 0; margin: 0 0 1.1rem; padding: 0; border: 0; }
.ac-filter .chip { margin: 0; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.ac-filter .chip:hover { border-color: var(--color-border-strong); }
.ac-filter .chip:has(input:checked) { border-color: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary); }
.ac-filter .chip.g-all:has(input:checked) { background: var(--color-primary-50); color: var(--color-primary); }
.ac-filter .chip:has(input:focus-visible) { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.ac-filter .chip:has(input:disabled) { opacity: .5; cursor: default; }
.ac-filter .chip:has(input:disabled):hover { border-color: var(--color-border); }
.ac:has(.ac-filter input[value="missed"]:checked) .ac-item:not(.g-missed),
.ac:has(.ac-filter input[value="deadline"]:checked) .ac-item:not(.g-deadline),
.ac:has(.ac-filter input[value="renewal"]:checked) .ac-item:not(.g-renewal),
.ac:has(.ac-filter input[value="review"]:checked) .ac-item:not(.g-review),
.ac:has(.ac-filter input[value="cannot_monitor"]:checked) .ac-item:not(.g-cannot_monitor) { display: none; }
.ac-list { display: flex; flex-direction: column; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.ac-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 1rem; padding: 1rem 1.1rem; border: 1px solid var(--color-border); border-left: 4px solid var(--color-border-strong); border-radius: var(--radius-lg); background: var(--color-surface); }
.ac-item:hover { background: var(--color-bg-soft); }
.ac-item.p-urgent { border-left-color: var(--color-danger); }
.ac-item.p-high { border-left-color: var(--color-warning-accent); }
.ac-item.p-normal { border-left-color: var(--color-primary); }
.ac-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--radius-lg); background: var(--color-primary-50); color: var(--color-primary); }
.p-urgent .ac-icon { background: var(--color-danger-bg); color: var(--color-danger); }
.p-high .ac-icon { background: var(--color-warning-bg); color: var(--color-warning); }
.p-low .ac-icon { background: var(--color-bg-soft); color: var(--color-text-muted); }
.ac-body { min-width: 0; }
.ac-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; font-size: var(--text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-muted); }
.ac-meta .badge { letter-spacing: 0; text-transform: none; }
.ac-title { margin: .15rem 0 .1rem; font-size: var(--text-lg); font-weight: 650; color: var(--color-text); }
.ac-title.urgent { color: var(--color-danger); }
.ac-contract { font-size: var(--text-md); }
.ac-contract a { color: var(--color-primary); font-weight: 600; text-decoration: none; }
.ac-contract a:hover { text-decoration: underline; }
.ac-detail { margin: .35rem 0 0; font-size: var(--text-md); line-height: 1.5; color: var(--color-text-2); }
.ac-when { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; min-width: 112px; text-align: right; }
.ac-date { font-size: var(--text-base); font-weight: 650; white-space: nowrap; }
.ac-days { font-size: var(--text-sm); color: var(--color-text-muted); white-space: nowrap; }
.ac-when .btn { margin-top: .25rem; }
.ac-empty { padding: 2.25rem 1rem; text-align: center; }
.ac-empty p { margin: .25rem 0; }
.ac-empty-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: .5rem; border-radius: 50%; background: var(--color-success-bg); color: var(--color-success); }

/* Monitoring + value widgets */
.mon-figure { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; }
.mon-figure .big { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; }
progress.meter { display: block; width: 100%; height: 8px; margin: .7rem 0 1rem; border: 0; border-radius: var(--radius-full); background: var(--color-neutral-bg); overflow: hidden; appearance: none; -webkit-appearance: none; }
progress.meter::-webkit-progress-bar { background: var(--color-neutral-bg); border-radius: var(--radius-full); }
progress.meter::-webkit-progress-value { background: var(--color-primary); border-radius: var(--radius-full); }
progress.meter::-moz-progress-bar { background: var(--color-primary); border-radius: var(--radius-full); }
.mon-list { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; font-size: var(--text-md); }
.mon-list li { display: flex; align-items: center; gap: .6rem; }
.mon-list b { margin-left: auto; font-weight: 650; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-border-strong); flex: none; }
.dot.ok { background: var(--color-primary); }
.dot.warn { background: var(--color-warning-accent); }
.dot.err { background: var(--color-danger); }
.widget-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--color-border); }
.widget-foot .kpi-label { color: var(--color-text-muted); font-size: var(--text-sm); }
.widget-foot .kpi-value { margin: 0; font-size: var(--text-lg); font-weight: 700; }
.value-big { font-size: 1.65rem; font-weight: 700; letter-spacing: -.02em; }
/* One line per currency: amounts in different currencies are never added together. */
.value-big { display: flex; flex-direction: column; gap: .1rem; line-height: 1.2; }
.value-cur { white-space: nowrap; }
.value-note { margin: .35rem 0 0; }
.top-title { margin: 1rem 0 .45rem; padding-top: .85rem; border-top: 1px solid var(--color-border); font-size: var(--text-xs); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--color-text-muted); }
.top-list { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; font-size: var(--text-md); }
/* [title, truncated with an ellipsis ........] [amount, right-aligned, one line] */
.top-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: .75rem; }
.top-list a { min-width: 0; overflow: hidden; color: var(--color-text); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.top-list a:hover { color: var(--color-primary); }
.top-list span { font-weight: 600; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Timeline */
.legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: var(--text-sm); color: var(--color-text-muted); }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.legend .ev-deadline { color: var(--color-navy-2); }
.legend .ev-renewal { color: var(--color-primary); }
.legend .ev-end { color: var(--color-neutral-accent); }
.tl { display: grid; grid-auto-columns: minmax(150px, 1fr); grid-auto-flow: column; margin: 0; padding: 6px 0 0; list-style: none; overflow-x: auto; }
.tl-month { position: relative; padding: 1rem .75rem 0 0; border-top: 2px solid var(--color-border); }
.tl-month::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border: 2px solid var(--color-border-strong); border-radius: 50%; background: var(--color-surface); }
.tl-month.now::before { border-color: var(--color-primary); background: var(--color-primary); box-shadow: 0 0 0 4px var(--color-primary-50); }
.tl-label { margin-bottom: .6rem; font-size: var(--text-sm); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--color-text); }
.now .tl-label { color: var(--color-primary); }
.tl-events { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.tl-ev { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: .5rem; align-items: start; padding: .5rem .6rem; border: 1px solid var(--color-border); border-left: 3px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-bg-soft); font-size: var(--text-sm); }
.tl-ev.ev-deadline { border-left-color: var(--color-navy-2); }
.tl-ev.ev-soon { border-left-color: var(--color-warning-accent); }
.tl-ev.ev-urgent { border-left-color: var(--color-danger); }
.tl-ev.ev-renewal { border-left-color: var(--color-primary); }
.tl-day { font-size: var(--text-xl); font-weight: 700; line-height: 1.1; text-align: center; color: var(--color-text); }
.tl-text { display: flex; flex-direction: column; min-width: 0; gap: .1rem; }
.tl-kind { font-weight: 650; color: var(--color-text); }
.ev-urgent .tl-kind { color: var(--color-danger); }
.tl-text a { overflow: hidden; color: var(--color-text-2); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.tl-text a:hover { color: var(--color-primary); }
.tl-text .badge { align-self: flex-start; }
.tl-empty { padding: .4rem 0; font-size: var(--text-sm); color: var(--color-text-muted); }

/* Upload + contracts table inside the shell */
body.shell .upload input[type=file] { padding: .45rem; border: 1px dashed var(--color-border-input); border-radius: var(--radius-md); background: var(--color-surface); font: inherit; font-size: var(--text-md); }
.table-wrap { overflow-x: auto; }
table.contracts th, table.contracts td { padding: .7rem .6rem; border-bottom-color: var(--color-border); vertical-align: middle; }
table.contracts thead th { font-size: var(--text-xs); letter-spacing: .06em; color: var(--color-text-muted); }
table.contracts tbody tr:hover { background: var(--color-bg-soft); }
table.contracts tbody tr:last-child td { border-bottom: 0; }
table.contracts a { color: var(--color-primary); font-weight: 600; text-decoration: none; }
body.shell .disclaimer { margin-top: .5rem; }

/* Deadlines page. Red = overdue, orange = within 30 days, yellow = within 90 days, neutral = cannot monitor. */
.status-row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card.is-yellow .stat-icon { background: var(--color-due-later-bg); color: var(--color-due-later); }
.pill { display: inline-block; padding: .18rem .6rem; border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: 650; white-space: nowrap; }
.pill.s-overdue { background: var(--color-danger-bg); color: var(--color-danger); }
.pill.s-within_30 { background: var(--color-due-soon-bg); color: var(--color-due-soon); }
.pill.s-within_90 { background: var(--color-due-later-bg); color: var(--color-due-later); }
.pill.s-later { background: var(--color-primary-50); color: var(--color-primary); }
.pill.s-cannot_monitor { background: var(--color-neutral-bg); color: var(--color-text-muted); }
.dl-section .panel-head h2 { display: flex; align-items: center; gap: .55rem; }
.dl-section .panel-head .chip { padding: .05rem .55rem; font-size: var(--text-sm); }
#overdue .panel-head h2 .chip { border-color: var(--color-danger-border); background: var(--color-danger-bg); color: var(--color-danger); }
.dl-table tr.row-overdue td:first-child { box-shadow: inset 3px 0 0 var(--color-danger); }
.dl-table tr.row-within_30 td:first-child { box-shadow: inset 3px 0 0 var(--color-due-soon-accent); }
.dl-table tr.row-within_90 td:first-child { box-shadow: inset 3px 0 0 var(--color-due-later-accent); }
.dl-table td:first-child { padding-left: .85rem; }
.dl-note { margin-top: .15rem; font-size: var(--text-sm); color: var(--color-text-muted); white-space: normal; }
.dl-days { font-weight: 600; }
.row-overdue .dl-days { color: var(--color-danger); }
.row-within_30 .dl-days { color: var(--color-due-soon); }
.dl-reason { font-size: var(--text-md); color: var(--color-text-2); min-width: 260px; }
.dl-open { text-align: right; white-space: nowrap; }
.dl-empty { display: flex; align-items: center; gap: .85rem; padding: .9rem 1rem; border: 1px dashed var(--color-border); border-radius: var(--radius-lg); background: var(--color-bg-soft); }
.dl-empty p { margin: .1rem 0 0; }
.dl-empty-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--color-surface); color: var(--color-primary); flex: none; border: 1px solid var(--color-border); }
table.dl-table { min-width: 720px; }

/* Renewals page (reuses the Deadlines section/table styles). Red = very soon, then orange / yellow / blue / neutral. */
.pill.s-very_soon { background: var(--color-danger-bg); color: var(--color-danger); }
.dl-table tr.row-very_soon td:first-child { box-shadow: inset 3px 0 0 var(--color-danger); }
.row-very_soon .dl-days { color: var(--color-danger); }
table.rn-table { min-width: 860px; }
.rn-explain { display: flex; align-items: flex-start; gap: .75rem; margin: 0 0 1.25rem; padding: .85rem 1rem; border: 1px solid var(--color-primary-100); border-radius: var(--radius-lg); background: var(--color-primary-50); }
.rn-explain p { margin: 0; font-size: var(--text-md); color: var(--color-text-2); }
.rn-explain a { color: var(--color-primary); font-weight: 600; }
.rn-explain-icon { display: grid; place-items: center; color: var(--color-primary); flex: none; margin-top: .1rem; }

/* Reviews page (reuses the Deadlines section/table styles). Orange = missing information, yellow = check, blue = processing. */
.rv-lead { margin: .35rem 0 0; font-size: var(--text-lg); font-weight: 650; color: var(--color-text); }
.pill.s-rv-missing { background: var(--color-due-soon-bg); color: var(--color-due-soon); }
.pill.s-rv-check { background: var(--color-due-later-bg); color: var(--color-due-later); }
.pill.s-rv-processing { background: var(--color-primary-50); color: var(--color-primary); }
.dl-table tr.row-rv-missing td:first-child { box-shadow: inset 3px 0 0 var(--color-due-soon-accent); }
.dl-table tr.row-rv-check td:first-child { box-shadow: inset 3px 0 0 var(--color-due-later-accent); }
.rv-what { font-size: var(--text-md); color: var(--color-text-2); min-width: 240px; }
table.rv-table { min-width: 640px; }

/* Contracts page (reuses the Deadlines section/table styles). Green = monitored, amber = needs attention,
   red = urgent action or document not analysed, blue = analysing, neutral = ended / not monitored. */
.pill.s-ct-monitored { background: var(--color-success-bg); color: var(--color-success); }
.pill.s-ct-attention { background: var(--color-warning-bg); color: var(--color-warning); }
.pill.s-ct-urgent, .pill.s-ct-failed { background: var(--color-danger-bg); color: var(--color-danger); }
.pill.s-ct-analysing { background: var(--color-primary-50); color: var(--color-primary); }
.pill.s-ct-ended, .pill.s-ct-not_monitored { background: var(--color-neutral-bg); color: var(--color-text-muted); }
.dl-table tr.row-ct-urgent td:first-child, .dl-table tr.row-ct-failed td:first-child { box-shadow: inset 3px 0 0 var(--color-danger); }
.dl-table tr.row-ct-attention td:first-child { box-shadow: inset 3px 0 0 var(--color-warning-accent); }
table.ct-table { min-width: 820px; }

/* Contract page ("contract cockpit"): details on the left, the original contract on the right.
   Amber only for details that need attention; red only for urgent or passed deadlines. */
.cp-crumbs { margin: 0 0 .6rem; font-size: var(--text-md); }
.cp-crumbs a { color: var(--color-text-muted); font-weight: 600; text-decoration: none; }
.cp-crumbs a:hover { color: var(--color-primary); }
.cp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.cp-main { min-width: 0; }
.cp-doc { position: sticky; top: 1rem; min-width: 0; }
.cp-doc-panel { padding: 1.1rem 1.1rem 1.2rem; }
.cp-doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .9rem; }
.cp-doc-head h2 { margin: 0; font-size: var(--text-xl); letter-spacing: -.01em; color: var(--color-text); }
.cp-doc-head p { margin: .15rem 0 0; overflow-wrap: anywhere; }
.cp-doc-head .btn { flex: none; }
.cp-doc .btn svg.i { width: var(--size-icon-sm); height: var(--size-icon-sm); }
.cp-doc .viewer { border-color: var(--color-border); border-radius: var(--radius-lg); }
.cp-doc .viewer-page { max-height: calc(100vh - 10rem); }
/* Key dates: full width above the two columns, one roomy card per date. */
.cp-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; margin-bottom: 1.5rem; }
.cp-date { display: flex; flex-direction: column; gap: .55rem; padding: 1.2rem 1.4rem 1.25rem; border: 1px solid var(--color-border); border-radius: var(--radius-xl); background: var(--color-surface); box-shadow: var(--shadow-md); }
.cp-date-head { display: flex; align-items: center; gap: .6rem; }
.cp-date-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-md); background: var(--color-primary-50); color: var(--color-primary); flex: none; }
.cp-date-label { font-size: var(--text-xs); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--color-text-muted); }
.cp-date-value { font-size: 1.65rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; color: var(--color-text); white-space: nowrap; }
.cp-date-note { padding-top: .55rem; border-top: 1px solid var(--color-border); font-size: var(--text-md); font-weight: 500; color: var(--color-text-2); }
.cp-date.is-urgent .cp-date-icon { background: var(--color-danger-bg); color: var(--color-danger); }
.cp-date.is-urgent .cp-date-note { color: var(--color-danger); }
.cp-date.is-warn .cp-date-icon { background: var(--color-warning-bg); color: var(--color-warning); }
.cp-attention { display: flex; align-items: flex-start; gap: .8rem; margin: 0 0 1.25rem; padding: .95rem 1.1rem; border: 1px solid var(--color-warning-border); border-radius: var(--radius-lg); background: var(--color-warning-bg); }
.cp-attention-icon { display: grid; place-items: center; color: var(--color-warning); flex: none; margin-top: .1rem; }
.cp-attention strong { color: var(--color-text); }
.cp-attention p { margin: .15rem 0 0; font-size: var(--text-md); color: var(--color-text-2); }
.cp-attention a { color: var(--color-warning); font-weight: 600; }
.cp-section .panel-head { margin-bottom: .35rem; }
.cp-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--color-border); scroll-margin-top: 1rem; }
.panel-head + .cp-row { border-top: 0; }
.cp-row:target { margin: 0 -.75rem; padding: .85rem .75rem; border-radius: var(--radius-md); background: var(--color-primary-50); }
.cp-label { padding-top: .1rem; font-size: var(--text-md); font-weight: 600; color: var(--color-text-muted); }
.st-check .cp-label, .st-missing .cp-label { color: var(--color-text); }
.cp-body { min-width: 0; }
.cp-value { font-size: var(--text-lg); font-weight: 650; color: var(--color-text); overflow-wrap: anywhere; }
.cp-unit { margin-left: .2rem; font-size: var(--text-sm); font-weight: 500; color: var(--color-text-muted); }
.cp-unit.is-passed { color: var(--color-danger); }
.cp-empty { font-weight: 500; color: var(--color-text-muted); }
.cp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; margin-top: .3rem; }
.cp-tag { display: inline-flex; align-items: center; gap: .3rem; font-size: var(--text-sm); font-weight: 600; color: var(--color-text-muted); }
.cp-tag svg.i { width: 14px; height: 14px; }
.cp-tag.ok { color: var(--color-success); }
.cp-tag.user { color: var(--color-person); }
.cp-tag.calc { color: var(--color-primary); }
.cp-tag.warn { padding: .12rem .55rem; border-radius: var(--radius-full); background: var(--color-warning-bg); color: var(--color-warning); }
.cp-meta button.cite { padding: .05rem .5rem; font-size: var(--text-sm); color: var(--color-primary); }
.cp-hint { margin: .3rem 0 0; font-size: var(--text-sm); color: var(--color-text-2); }
.cp-how { margin-top: .35rem; font-size: var(--text-sm); color: var(--color-text-muted); }
.cp-how summary { color: var(--color-primary); font-weight: 600; cursor: pointer; }
.cp-how p { margin: .3rem 0 0; font-family: var(--font-mono); font-size: var(--text-sm); overflow-wrap: anywhere; }
.cp-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .65rem; }
.cp-actions form { margin: 0; }
.cp-row .btn svg.i { width: 15px; height: 15px; }
.cp-row label.btn { margin: 0; font-weight: 600; }
/* Edit a whole section: a small edit button in the section header switches view -> editor (no JavaScript). */
.cp-toggle { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.cp-secform { margin: 0; }
.cp-section .panel-head { align-items: flex-start; }
.cp-sec-edit { display: grid; place-items: center; width: 32px; height: 32px; margin: 0; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text-muted); cursor: pointer; flex: none; }
.cp-sec-edit:hover { border-color: var(--color-primary-100); color: var(--color-primary); }
.cp-sec-edit svg.i { width: var(--size-icon-sm); height: var(--size-icon-sm); }
.cp-sec-toggle:focus-visible ~ .panel-head .cp-sec-edit { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.cp-sec-toggle:checked ~ .panel-head .cp-sec-edit { visibility: hidden; }
.cp-view > .cp-row:first-child, .cp-editor > .cp-row:first-child { border-top: 0; }
.cp-editor { display: none; }
.cp-sec-toggle:checked ~ .cp-view { display: none; }
.cp-sec-toggle:checked ~ .cp-editor { display: block; }
.cp-editor-row { align-items: start; }
.cp-editor-row .cp-label { padding-top: .45rem; color: var(--color-text); }
.cp-editor-row .cp-body { display: flex; flex-direction: column; gap: .5rem; max-width: 420px; }
.cp-editor .cp-edit-actions { padding: 1rem 0 .4rem; border-top: 1px solid var(--color-border); }
.cp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Delete contract: the question only appears in a dialog after clicking the button. */
.btn.danger { background: var(--color-danger); color: var(--color-on-primary); box-shadow: 0 1px 2px rgba(180, 35, 24, .25); }
.btn.danger:hover { background: var(--color-danger-hover); }
.cp-danger { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1.5rem 0 1rem; padding: 1rem 1.2rem; border: 1px solid var(--color-danger-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.cp-danger strong { color: var(--color-text); }
.cp-danger p { margin: .15rem 0 0; font-size: var(--text-md); color: var(--color-text-muted); }
.cp-danger .btn { flex: none; }
.cp-dialog { width: min(440px, calc(100vw - 2rem)); padding: 1.5rem 1.6rem; border: 0; border-radius: var(--radius-xl); background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-lg); }
.cp-dialog::backdrop { background: var(--color-overlay); }
.cp-dialog p { margin: 0 0 1.25rem; font-size: var(--text-base); line-height: 1.55; color: var(--color-text); }
.cp-dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; margin: 0; }
.cp-edit-actions { display: flex; gap: .5rem; }
.fi-row { display: flex; gap: .5rem; }
.fi-row > * { flex: 1; min-width: 0; }
.fi-row > .fi-short { flex: 0 0 5.5rem; }
.fi-in { margin: 0; font-size: var(--text-sm); font-weight: 600; color: var(--color-text-muted); }
.fi-in span { display: block; margin-bottom: .2rem; }
.fi-in input, .fi-in select { display: block; width: 100%; min-height: var(--size-control-md); margin: 0; padding: .5rem .6rem; border: 1px solid var(--color-border-input); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text); font: inherit; font-size: var(--text-base); font-weight: 400; }
.fi-in input:focus, .fi-in select:focus { outline: var(--focus-width) solid var(--color-focus); outline-offset: 1px; border-color: var(--color-focus); }
.cp-todo { margin-top: .35rem; padding-top: 1rem; border-top: 1px solid var(--color-border); }
.cp-todo h3 { margin: 0 0 .6rem; font-size: var(--text-base); color: var(--color-text); }
.cp-todo ul { display: flex; flex-direction: column; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.cp-todo li { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .9rem; border: 1px solid var(--color-border); border-left: 4px solid var(--color-primary); border-radius: var(--radius-md); font-size: var(--text-md); color: var(--color-text-2); }
.cp-todo li strong { font-size: var(--text-base); color: var(--color-text); }
.cp-todo li.p-urgent { border-left-color: var(--color-danger); }
.cp-todo li.p-high { border-left-color: var(--color-warning-accent); }
body.shell .reanalyse { margin-bottom: 1.25rem; }
/* Settings: read-only rows (same as the contract page) and not-yet-available controls. */
.st-stack { max-width: 880px; }
.st-soon { margin-left: .35rem; }
.st-desc { margin: 0 0 .7rem; font-size: var(--text-md); color: var(--color-text-2); }
.st-switch { display: inline-flex; align-items: center; gap: .6rem; margin: 0; font-size: var(--text-base); font-weight: 600; color: var(--color-text); }
.st-switch input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.st-track { position: relative; width: 38px; height: 22px; border-radius: var(--radius-full); background: var(--color-border-strong); flex: none; }
.st-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--color-surface); box-shadow: 0 1px 2px rgba(12, 26, 54, .2); }
.st-switch input:checked + .st-track { background: var(--color-primary); }
.st-switch input:checked + .st-track::after { left: 19px; }
.st-switch.is-disabled > :not(.st-soon) { opacity: .55; }
.st-switch.is-disabled { cursor: not-allowed; }
.st-options { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; padding: 0; border: 0; }
.st-options .chip { margin: 0; }
.st-options .chip:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.st-option input { margin: 0; }
.st-switches { display: flex; flex-direction: column; align-items: flex-start; gap: .65rem; }
.st-line { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.st-line .st-soon { margin-left: 0; }
.st-hint { font-size: var(--text-md); color: var(--color-text-2); }
/* Account: each editable row is its own form; the Edit button switches view -> editor (no JavaScript). */
.st-form { margin: 0; }
.panel-head + .st-form .cp-row { border-top: 0; }
.st-view { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; }
.st-view label.btn { margin: 0; font-weight: 600; }
.st-editor { display: none; flex-direction: column; gap: .65rem; max-width: 420px; }
.st-toggle:checked ~ .cp-row .st-view { display: none; }
.st-toggle:checked ~ .cp-row .st-editor { display: flex; }
.st-toggle:focus-visible ~ .cp-row .st-view label.btn { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.st-editor .cp-hint { margin: 0; }
.st-msg { margin: 0 0 .6rem; font-size: var(--text-md); }
.st-ok { padding: .5rem .75rem; border-radius: var(--radius-md); background: var(--color-success-bg); color: var(--color-success); }
p.error.st-msg { border-radius: var(--radius-md); }
/* Danger zone */
.panel.st-danger { border-color: var(--color-danger-border); }
.st-danger .panel-head h2 { color: var(--color-danger); }
.st-danger-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 1.5rem; padding: .9rem 0; border-top: 1px solid var(--color-border); }
.panel-head + .st-danger-row { border-top: 0; }
.st-danger-row strong { color: var(--color-text); font-size: var(--text-base); }
.st-danger-row p { margin: .15rem 0 0; font-size: var(--text-md); color: var(--color-text-muted); }
@media (max-width: 1100px) {
  .cp-grid { grid-template-columns: 1fr; }
  .cp-doc { position: static; }
}
@media (max-width: 900px) {
  .cp-row { grid-template-columns: 1fr; gap: .2rem; }
  .cp-doc-head { flex-wrap: wrap; }
}

@media (max-width: 1180px) {
  .status-row.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-side { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .dash-side .panel { margin-bottom: 0; }
  .dash-grid { margin-bottom: 1.25rem; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .75rem 1rem; }
  .sb-nav { flex-direction: row; flex-wrap: nowrap; gap: .25rem; width: 100%; overflow-x: auto; }
  .sb-item { white-space: nowrap; padding: .45rem .65rem; }
  .sb-item.active { box-shadow: inset 0 -2px 0 var(--color-sidebar-indicator); }
  .sb-foot { display: none; }
  main.app-main { padding: 1.25rem 1rem 2.5rem; }
  .status-row, .status-row.four, .dash-side { grid-template-columns: 1fr; }
  .head-actions { flex-wrap: wrap; }
  .head-actions .btn.ghost span, .um-name { display: none; }
  .ac-item { grid-template-columns: 36px minmax(0, 1fr); gap: .75rem; }
  .ac-icon { width: 36px; height: 36px; }
  .ac-when { grid-column: 2; flex-direction: row; align-items: center; flex-wrap: wrap; gap: .6rem; min-width: 0; text-align: left; }
  .ac-when .btn { margin: 0 0 0 auto; }
}

/* ---------------------------------------------------------------------------
   Public website (body.pub): Home, Features, Pricing, Security, Log in, Sign up.
   Same tokens as the app shell; everything is scoped to body.pub.
   --------------------------------------------------------------------------- */
body.pub { background: var(--color-surface); color: var(--color-text); font-size: var(--text-lg); line-height: 1.6; }
body.pub main.pub-main { max-width: none; margin: 0; padding: 0; }
.pub h1, .pub h2, .pub h3 { color: var(--color-text); letter-spacing: -.02em; line-height: 1.2; }
.pub a { color: var(--color-primary); }
.pub .btn { text-decoration: none; }
.pub .btn.primary, .pub .btn.primary:visited { color: var(--color-on-primary); }
.pub .btn.ghost { color: var(--color-text); }
.pub-btn-lg { min-height: var(--size-control-lg); padding: .78rem 1.35rem; font-size: var(--text-lg); border-radius: var(--radius-lg); }
.pub-btn-block { width: 100%; justify-content: center; padding: .72rem 1rem; font-size: var(--text-lg); }
.pub-wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.pub svg.i { width: var(--size-icon-lg); height: var(--size-icon-lg); }

/* Header */
.pub-head { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--color-border); background: rgba(255, 255, 255, .96); }
.pub-bar { display: flex; align-items: center; gap: 2rem; height: 68px; }
.pub .pub-brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--color-text); font-weight: 700; font-size: var(--text-xl); letter-spacing: -.01em; text-decoration: none; }
.pub-logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-md); background: var(--color-primary); color: var(--color-on-primary); flex: none; }
.pub-nav { display: flex; gap: .25rem; }
.pub-nav a, .pub-menu-panel nav a { padding: .45rem .75rem; border-radius: var(--radius-sm); color: var(--color-text-muted); font-size: var(--text-base); font-weight: 500; text-decoration: none; }
.pub-nav a:hover, .pub-menu-panel nav a:hover { background: var(--color-bg-soft); color: var(--color-text); }
.pub-nav a.is-active, .pub-menu-panel nav a.is-active { color: var(--color-primary); background: var(--color-primary-50); }
.pub-ctas { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.pub .pub-login { padding: .5rem .8rem; border-radius: var(--radius-sm); color: var(--color-text); font-weight: 600; font-size: var(--text-base); text-decoration: none; }
.pub .pub-login:hover, .pub .pub-login.is-active { background: var(--color-bg-soft); }
.pub-menu { display: none; position: relative; margin-left: auto; }
.pub-menu summary { list-style: none; cursor: pointer; }
.pub-menu summary::-webkit-details-marker { display: none; }
.pub-menu[open] summary { border-color: var(--color-primary-100); background: var(--color-primary-50); color: var(--color-primary); }
.pub-menu-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(320px, calc(100vw - 32px)); padding: .75rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-lg); }
.pub-menu-panel nav { display: flex; flex-direction: column; gap: .15rem; }
.pub-menu-panel nav a { padding: .65rem .75rem; font-size: var(--text-lg); }
.pub-menu-ctas { display: flex; flex-direction: column; gap: .5rem; margin-top: .6rem; padding-top: .75rem; border-top: 1px solid var(--color-border); }
.pub-menu-ctas a { justify-content: center; text-align: center; }

/* Type */
.pub-eyebrow { display: inline-block; margin-bottom: .75rem; color: var(--color-primary); font-size: var(--text-sm); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pub-lead { margin: 0; color: var(--color-text-2); font-size: var(--text-xl); line-height: 1.65; }
.pub-sec { padding: 88px 0; }
.pub-soft { background: linear-gradient(180deg, var(--color-primary-50) 0, var(--color-bg) 240px); }
.pub-sec-head { max-width: 680px; margin-bottom: 2.75rem; }
.pub-sec-head h2 { margin: 0 0 .75rem; font-size: clamp(1.75rem, 3vw, 2.35rem); }
.pub-sec-head p { margin: 0; color: var(--color-text-2); font-size: var(--text-xl); }
.pub-hero h1, .pub-sec-head h2, .pub-page-head h1 { text-wrap: balance; }
.pub-lead, .pub-sec-head p { text-wrap: pretty; }
.pub-more { margin: 2rem 0 0; }
.pub-more a { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; text-decoration: none; }
.pub-more a:hover { text-decoration: underline; }
.pub-more svg.i { width: var(--size-icon-md); height: var(--size-icon-md); }
@media (prefers-reduced-motion: no-preference) {
  .pub-more svg.i { transition: transform .2s ease-out; }
  .pub-more a:hover svg.i, .pub-more a:focus-visible svg.i { transform: translateX(3px); }
}

/* Hero */
.pub-hero { position: relative; isolation: isolate; overflow: hidden; padding: 96px 0 104px; border-bottom: 1px solid var(--color-navy-2); color: var(--color-sidebar-text);
  background: linear-gradient(165deg, var(--color-navy) 0%, var(--color-navy-2) 48%, var(--color-primary-pressed) 100%); }
/* Layer 1: blue and cyan light blooms that drift a few percent over 26 s (transform only, no layout). */
.pub-hero::before { content: ""; position: absolute; inset: -14% -10%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40rem 30rem at 82% 22%, color-mix(in srgb, var(--color-primary) 85%, transparent) 0%, transparent 70%),
    radial-gradient(26rem 20rem at 70% 78%, color-mix(in srgb, var(--color-calc) 70%, transparent) 0%, transparent 72%),
    radial-gradient(32rem 22rem at 4% 0%, color-mix(in srgb, var(--color-sidebar-indicator) 45%, transparent) 0%, transparent 70%);
  will-change: transform; animation: pub-hero-drift 26s ease-in-out infinite alternate; }
/* Layer 2: a faint grid that fades out towards the edges, for depth. */
.pub-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--color-sidebar-line) 1px, transparent 1px), linear-gradient(90deg, var(--color-sidebar-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 90% at 70% 40%, var(--color-text) 0%, transparent 75%); mask-image: radial-gradient(70% 90% at 70% 40%, var(--color-text) 0%, transparent 75%); }
@keyframes pub-hero-drift { from { transform: translate3d(-2.5%, -2%, 0); } to { transform: translate3d(3%, 2.5%, 0) scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .pub-hero::before { animation: none; will-change: auto; } }
.pub-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 4rem; }
.pub-hero .pub-eyebrow { padding: .3rem .85rem; border: 1px solid var(--color-sidebar-indicator); border-radius: var(--radius-full); background: var(--color-sidebar-active-bg); color: var(--color-on-primary); margin-bottom: 1.1rem; }
.pub-hero h1 { margin: 0 0 1.25rem; color: var(--color-on-primary); font-size: clamp(2.3rem, 5vw, 3.6rem); letter-spacing: -.035em; line-height: 1.08; }
.pub-hero .pub-lead { color: var(--color-sidebar-text); }
.pub-hero .btn.primary { box-shadow: 0 0 0 1px var(--color-sidebar-indicator), var(--shadow-md); }
.pub-hero .btn.ghost { background: transparent; border-color: var(--color-sidebar-label); color: var(--color-on-primary); }
.pub-hero .btn.ghost:hover { background: var(--color-sidebar-hover-bg); border-color: var(--color-sidebar-text); }
.pub-hero-copy > * { animation: pub-hero-rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.pub-hero-copy > :nth-child(2) { animation-delay: .08s; }
.pub-hero-copy > :nth-child(3) { animation-delay: .16s; }
.pub-hero-copy > :nth-child(4) { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .pub-hero-copy > * { animation: none; } }
.pub-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.pub-hero-card { position: relative; isolation: isolate; color: var(--color-text); padding: 1.15rem; border: 1px solid var(--color-primary-100); border-radius: var(--radius-2xl); background: var(--color-surface); box-shadow: var(--shadow-lg);
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg-soft) 100%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-sidebar-indicator) 55%, transparent), 0 0 64px -8px color-mix(in srgb, var(--color-sidebar-indicator) 55%, transparent), 0 36px 80px -28px color-mix(in srgb, var(--color-navy) 85%, transparent), var(--shadow-lg);
  animation: pub-hero-in 1s cubic-bezier(.2, .7, .2, 1) .1s both, pub-hero-glow 2.6s ease-in-out .7s 1 both; }
/* Light pass over the surface (behind the text) and around the border (about 2.6 s once, then rest). The card is aria-hidden. */
.pub-hero-card::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 28%, var(--color-primary-100) 50%, transparent 72%) 100% 0 / 300% 100% no-repeat;
  animation: pub-hero-sweep 2s ease-in-out .8s 1 both; }
.pub-hero-card::after { content: ""; position: absolute; inset: calc(-1 * var(--border-width)); padding: calc(2 * var(--border-width)); border-radius: inherit; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 25%, var(--color-sidebar-indicator) 42%, var(--color-on-primary) 50%, var(--color-sidebar-indicator) 58%, transparent 75%) 100% 0 / 300% 100% no-repeat;
  -webkit-mask: linear-gradient(var(--color-surface) 0 0) content-box, linear-gradient(var(--color-surface) 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(var(--color-surface) 0 0) content-box exclude, linear-gradient(var(--color-surface) 0 0);
  animation: pub-hero-sweep 2s ease-in-out .8s 1 both; }
.pub-hero-card > * { animation: pub-hero-rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.pub-hero-card > :nth-child(1) { animation-delay: .5s; }
.pub-hero-card > :nth-child(2) { animation-delay: .7s; }
.pub-hero-card > :nth-child(3) { animation-delay: .9s; }
.pub-hero-card > :nth-child(4) { animation-delay: 1.1s; }
@keyframes pub-hero-in { from { opacity: 0; transform: translateY(32px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes pub-hero-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pub-hero-sweep { 0% { background-position: 100% 0; opacity: 0; } 12%, 88% { opacity: 1; } 100% { background-position: 0 0; opacity: 0; } }
@keyframes pub-hero-glow { 0%, 100% { outline: 0 solid transparent; } 50% { outline: 6px solid var(--color-sidebar-active-bg); outline-offset: 0; } }
@media (prefers-reduced-motion: reduce) { .pub-hero-card, .pub-hero-card::before, .pub-hero-card::after, .pub-hero-card > * { animation: none; } }
.pub-hc-head { display: flex; justify-content: space-between; align-items: center; padding: .25rem .35rem .8rem; font-size: var(--text-base); }
.pub-hc-head span { color: var(--color-text-muted); font-size: var(--text-xs); }
.pub-hc-item { display: flex; flex-direction: column; gap: .15rem; margin-top: .6rem; padding: .85rem 1rem; border: 1px solid var(--color-border); border-left: 4px solid var(--color-primary); border-radius: var(--radius-lg); font-size: var(--text-md); color: var(--color-text-muted); }
.pub-hc-item strong { color: var(--color-text); font-size: var(--text-lg); }
.pub-hc-item.p-urgent { border-left-color: var(--color-danger); }

/* Icons, cards, grids */
.pub-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--radius-lg); background: var(--color-primary-50); color: var(--color-primary); box-shadow: inset 0 0 0 1px var(--color-primary-100); flex: none; }
.pub-ic.warn { background: var(--color-warning-bg); color: var(--color-warning); box-shadow: inset 0 0 0 1px var(--color-warning-border); }
.pub-card { padding: var(--space-6); border: 1px solid var(--color-border); border-radius: var(--radius-xl); background: var(--color-surface); box-shadow: var(--shadow-md); }
.pub-card h3 { margin: 1rem 0 .4rem; font-size: var(--text-xl); }
.pub-card p { margin: 0; color: var(--color-text-2); font-size: var(--text-base); }
.pub-soft .pub-card { border-color: var(--color-border-strong); }
.pub-card, .pub-flow li, .pub-plan { background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg-soft) 100%); }
.pub-ic { background: linear-gradient(135deg, var(--color-primary-50) 0%, var(--color-primary-100) 100%); }
.pub-ic.warn { background: linear-gradient(135deg, var(--color-warning-bg-subtle) 0%, var(--color-warning-bg) 100%); }
.pub-grid2, .pub-grid3, .pub-grid4 { display: grid; gap: 1.25rem; }
.pub-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pub-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pub-grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Problem */
.pub-risks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.pub-risks li { display: flex; gap: 1rem; align-items: flex-start; padding: 1.4rem; border: 1px solid var(--color-border); border-radius: var(--radius-xl); background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg-soft) 100%); box-shadow: var(--shadow-md); }
.pub-risks strong { display: block; margin-bottom: .3rem; font-size: var(--text-lg); letter-spacing: -.01em; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .pub-risks li { transition: transform .2s ease-out, box-shadow .2s ease-out, border-color .2s ease-out; }
  .pub-risks li:hover { transform: translateY(-3px); border-color: var(--color-primary-100); box-shadow: var(--shadow-lg); }
}
@media (max-width: 1020px) { .pub-risks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pub-risks { grid-template-columns: 1fr; } }
.pub-risks p { margin: 0; color: var(--color-text-2); font-size: var(--text-base); }

/* Solution flow */
.pub-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; counter-reset: flow; }
.pub-flow li { position: relative; padding: 1.4rem; border: 1px solid var(--color-border); border-radius: var(--radius-xl); background: var(--color-surface); box-shadow: var(--shadow-md); }
.pub-flow li strong { display: block; margin: 1rem 0 .35rem; font-size: var(--text-lg); }
.pub-flow li p { margin: 0; color: var(--color-text-2); font-size: var(--text-base); }
.pub-principle { display: flex; gap: 1rem; align-items: flex-start; margin-top: 2rem; padding: 1.25rem 1.4rem; border: 1px solid var(--color-primary-100); border-radius: var(--radius-xl); background: var(--color-surface); }
.pub-principle p { margin: 0; color: var(--color-text-2); }
.pub-principle strong { color: var(--color-text); }

/* How it works */
.pub-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.pub-step-n { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: var(--radius-full); background: var(--color-primary-50); box-shadow: inset 0 0 0 1px var(--color-primary-100); color: var(--color-primary); font-size: var(--text-base); font-weight: 800; letter-spacing: .02em; }
.pub-steps .pub-card h3 { margin-top: .9rem; font-size: var(--text-2xl); }

/* Product preview: a static picture of the dashboard (sample data) */
.pv-window { overflow: hidden; border: 1px solid var(--color-border-strong); border-radius: var(--radius-2xl); background: var(--color-bg); box-shadow: 0 2px 4px rgba(15, 27, 51, .04), 0 24px 60px rgba(15, 27, 51, .12);
  box-shadow: var(--shadow-sm), 0 44px 90px -28px color-mix(in srgb, var(--color-primary) 45%, transparent), 0 24px 56px -20px color-mix(in srgb, var(--color-navy) 35%, transparent); }
.pv-bar { display: flex; gap: 6px; padding: .7rem .9rem; border-bottom: 1px solid var(--color-border); background: var(--color-surface); }
.pv-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--color-border-strong); }
.pv-app { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: 420px; }
.pv-side { display: flex; flex-direction: column; gap: .2rem; padding: 1rem .7rem; background: var(--color-navy); color: var(--color-sidebar-text); font-size: var(--text-sm); }
.pv-brand { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; padding: 0 .3rem; color: var(--color-on-primary); font-weight: 700; font-size: var(--text-md); }
.pv-brand .pub-logo { width: 26px; height: 26px; border-radius: var(--radius-sm); }
.pv-item { display: flex; align-items: center; gap: .55rem; padding: .45rem .6rem; border-radius: var(--radius-sm); }
.pv-item.active { background: var(--color-sidebar-active-bg); color: var(--color-on-primary); box-shadow: inset 3px 0 0 var(--color-sidebar-indicator); }
.pub .pv-item svg.i { width: 15px; height: 15px; }
.pv-main { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem 1.4rem; min-width: 0; }
.pv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.pv-head strong { display: block; font-size: var(--text-2xl); letter-spacing: -.02em; }
.pv-head > div > span { color: var(--color-text-muted); font-size: var(--text-sm); }
.pv-add { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .8rem; border-radius: var(--radius-md); background: var(--color-primary); color: var(--color-on-primary); font-size: var(--text-sm); font-weight: 600; white-space: nowrap; }
.pub .pv-add svg.i { width: 14px; height: 14px; }
.pv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.pv-stat { display: flex; flex-direction: column; padding: .8rem .9rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-sm); }
.pv-stat span { color: var(--color-text-muted); font-size: var(--text-2xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pv-stat strong { font-size: 1.5rem; line-height: 1.2; }
.pv-stat small { color: var(--color-text); font-size: var(--text-sm); }
.pv-stat.is-warn { border-color: var(--color-warning-border); background: var(--color-warning-bg); }
.pv-panel { padding: .9rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.pv-panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .35rem; font-size: var(--text-base); }
.pv-panel-head span { color: var(--color-text-muted); font-size: var(--text-sm); }
.pv-row { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .6rem 0; border-top: 1px solid var(--color-border); font-size: var(--text-sm); }
.pv-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-when { color: var(--color-text-muted); white-space: nowrap; }
.pub-caption { margin: .9rem 0 0; color: var(--color-text-muted); font-size: var(--text-md); text-align: center; }

/* Pricing */
.pub-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.pub-plan { display: flex; flex-direction: column; padding: 1.9rem 1.75rem; border: 1px solid var(--color-border); border-radius: var(--radius-2xl); background: var(--color-surface); box-shadow: var(--shadow-md); }
.pub-plan h3 { margin: 0; font-size: var(--text-2xl); }
.pub-plan-fit { margin: .4rem 0 1.25rem; color: var(--color-text-2); font-size: var(--text-base); min-height: 3em; }
.pub-price { display: flex; align-items: baseline; gap: .35rem; margin: 0 0 1rem; }
.pub-price strong { font-size: 2.6rem; letter-spacing: -.03em; line-height: 1; }
.pub-price span { color: var(--color-text-muted); }
.pub-plan-limit { display: flex; align-items: center; gap: .5rem; margin: 0 0 .75rem; padding: .7rem .85rem; border-radius: var(--radius-md); background: var(--color-primary-50); color: var(--color-text); font-weight: 650; }
.pub-plan-limit svg.i { color: var(--color-primary); }
.pub-plan .pub-checks { margin-bottom: 1.5rem; }
.pub-plan .btn { justify-content: center; margin-top: auto; }
.pub-checks { display: flex; flex-direction: column; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.pub-checks li { display: flex; gap: .6rem; align-items: flex-start; color: var(--color-text-2); font-size: var(--text-base); }
.pub .pub-checks svg.i { width: var(--size-icon-md); height: var(--size-icon-md); margin-top: .2rem; color: var(--color-success); }
.pub-note { display: flex; gap: .6rem; align-items: flex-start; max-width: 760px; margin: 1.75rem 0 0; color: var(--color-text-muted); font-size: var(--text-base); }
.pub .pub-note svg.i { width: var(--size-icon-md); height: var(--size-icon-md); margin-top: .2rem; }
.pub-table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-xl); background: var(--color-surface); box-shadow: var(--shadow-md); }
.pub-table { min-width: 560px; }
.pub-table th, .pub-table td { padding: .9rem 1.2rem; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.pub-table tbody tr:last-child th, .pub-table tbody tr:last-child td { border-bottom: 0; }
.pub-table thead th { color: var(--color-text); font-size: var(--text-base); text-transform: none; letter-spacing: 0; }
.pub-table tbody th { font-weight: 600; }
.pub-table td, .pub-table thead th:not(:first-child) { text-align: center; }
.pub-yes { display: inline-grid; place-items: center; color: var(--color-success); }

/* Features page */
.pub-page-head { position: relative; isolation: isolate; overflow: hidden; padding: 72px 0 64px; border-bottom: 1px solid var(--color-navy-2); color: var(--color-sidebar-text);
  background: linear-gradient(165deg, var(--color-navy) 0%, var(--color-navy-2) 55%, var(--color-primary-pressed) 130%); }
.pub-page-head::before { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(34rem 20rem at 90% 0%, color-mix(in srgb, var(--color-primary) 80%, transparent) 0%, transparent 70%),
    radial-gradient(22rem 14rem at 72% 115%, color-mix(in srgb, var(--color-calc) 60%, transparent) 0%, transparent 72%),
    radial-gradient(24rem 16rem at 0% 0%, color-mix(in srgb, var(--color-sidebar-indicator) 35%, transparent) 0%, transparent 70%); }
.pub-page-head::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--color-sidebar-line) 1px, transparent 1px), linear-gradient(90deg, var(--color-sidebar-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(60% 100% at 80% 20%, var(--color-text) 0%, transparent 75%); mask-image: radial-gradient(60% 100% at 80% 20%, var(--color-text) 0%, transparent 75%); }
.pub-page-head h1 { max-width: 820px; margin: 0 0 1rem; color: var(--color-on-primary); font-size: clamp(2.1rem, 4.5vw, 3.1rem); letter-spacing: -.03em; line-height: 1.1; }
.pub-page-head .pub-lead { max-width: 720px; color: var(--color-sidebar-text); }
.pub-page-head .pub-eyebrow { padding: .3rem .85rem; border: 1px solid var(--color-sidebar-indicator); border-radius: var(--radius-full); background: var(--color-sidebar-active-bg); color: var(--color-on-primary); margin-bottom: 1.1rem; }
.pub-page-head a { color: var(--color-sidebar-indicator); }
.pub-page-head .pub-legal-meta dt { color: var(--color-on-primary); }
.pub-page-head .pub-legal-meta dd { color: var(--color-sidebar-text); }
.pub-page-head .pub-wrap > * { animation: pub-hero-rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.pub-page-head .pub-wrap > :nth-child(2) { animation-delay: .08s; }
.pub-page-head .pub-wrap > :nth-child(3) { animation-delay: .16s; }
.pub-page-head .pub-wrap > :nth-child(4) { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .pub-page-head .pub-wrap > * { animation: none; } }

/* Legal pages (Privacy Policy, Terms of Service): readable text column with a table of contents. */
.pub-legal-meta { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin: 1.6rem 0 0; font-size: var(--text-base); }
.pub-legal-meta div { display: flex; gap: .45rem; }
.pub-legal-meta dt { color: var(--color-text); font-weight: 600; }
.pub-legal-meta dd { margin: 0; color: var(--color-text-muted); }
.pub-legal-sec { padding: 64px 0 88px; }
.pub-legal { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.pub-legal-toc { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow-y: auto; font-size: var(--text-md); }
.pub .pub-legal-toc h2 { margin: 0 0 .7rem; color: var(--color-text-muted); font-size: var(--text-sm); letter-spacing: .08em; text-transform: uppercase; }
.pub-legal-toc ol { display: grid; gap: .4rem; margin: 0; padding-left: 1.3rem; color: var(--color-text-muted); }
.pub .pub-legal-toc a { color: var(--color-text-muted); text-decoration: none; }
.pub .pub-legal-toc a:hover { color: var(--color-primary); }
.pub-legal-body { max-width: 760px; min-width: 0; }
.pub-legal-body > section { scroll-margin-top: 88px; margin-bottom: 2.2rem; padding-bottom: 2.2rem; border-bottom: 1px solid var(--color-border); }
.pub-legal-body > section:last-child { margin-bottom: 0; border-bottom: 0; }
.pub .pub-legal-body h2 { margin: 0 0 1rem; font-size: 1.4rem; }
.pub .pub-legal-body h3 { margin: 1.5rem 0 .45rem; font-size: var(--text-xl); }
.pub-legal-body p, .pub-legal-body li { color: var(--color-text-2); line-height: 1.7; }
.pub-legal-body p { margin: 0 0 .9rem; }
.pub-legal-body ul { margin: 0 0 .9rem; padding-left: 1.3rem; }
.pub-legal-body li { margin-bottom: .4rem; }
.pub-legal-body code { padding: .05rem .3rem; border-radius: var(--radius-xs); background: var(--color-bg-soft); font-size: .88em; }
.pub-legal-body .pub-table-wrap { margin: 1rem 0 1.2rem; }
.pub-legal-body .pub-table { width: 100%; min-width: 560px; font-size: var(--text-md); }
.pub-legal-body .pub-table th, .pub-legal-body .pub-table td, .pub-legal-body .pub-table thead th:not(:first-child) { padding: .75rem 1rem; text-align: left; vertical-align: top; line-height: 1.55; }
.pub-todo { padding: .05rem .3rem; border-radius: var(--radius-xs); background: var(--color-warning-bg); color: var(--color-warning-strong); font-weight: 600; }
.pub-legal-review { margin: 1rem 0; padding: .8rem 1rem; border: 1px solid var(--color-warning-border); border-left: 4px solid var(--color-warning-accent); border-radius: var(--radius-md); background: var(--color-warning-bg); color: var(--color-warning-strong); font-size: var(--text-base); }
.pub-legal-review strong { display: block; margin-bottom: .2rem; font-size: var(--text-sm); letter-spacing: .08em; }
@media (max-width: 900px) {
  .pub-legal { grid-template-columns: 1fr; gap: 2rem; }
  .pub-legal-toc { position: static; max-height: none; padding: 1rem 1.2rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-bg-soft); }
}
.pub-features { display: flex; flex-direction: column; gap: 1.25rem; }
.pub-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 2rem; padding: 2rem; border: 1px solid var(--color-border); border-radius: var(--radius-2xl); background: var(--color-surface); box-shadow: var(--shadow-md); }
.pub-feature-head { display: flex; align-items: center; gap: .9rem; }
.pub-feature-head h2 { margin: 0; font-size: 1.35rem; }
.pub-feature-lead { margin: 0 0 1rem; color: var(--color-text); font-size: var(--text-xl); font-weight: 600; }
.pub-sec-topic .pub-feature-head { margin-bottom: 1.1rem; }
.pub-sec-topic .pub-feature-head h2 { font-size: var(--text-2xl); }

/* Final CTA */
.pub-final { padding: 88px 0; position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(36rem 20rem at 85% 0%, color-mix(in srgb, var(--color-primary) 70%, transparent) 0%, transparent 70%), radial-gradient(30rem 18rem at 0% 100%, color-mix(in srgb, var(--color-calc) 55%, transparent) 0%, transparent 72%), linear-gradient(165deg, var(--color-navy) 0%, var(--color-navy-2) 100%); color: var(--color-sidebar-text); text-align: center; }
.pub-final-inner { max-width: 720px; }
.pub .pub-final h2 { margin: 0 0 .9rem; color: var(--color-on-primary); font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
.pub-final p { margin: 0 0 2rem; font-size: var(--text-xl); }

/* Footer */
.pub-foot { border-top: 1px solid var(--color-border); background: var(--color-bg-soft); color: var(--color-text-muted); font-size: var(--text-base); }
.pub-foot-grid { display: grid; grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); gap: 2rem; padding-top: 56px; padding-bottom: 40px; }
.pub-foot-brand p { max-width: 280px; margin: .8rem 0 0; }
.pub .pub-foot h2 { margin: 0 0 .8rem; font-size: var(--text-sm); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text); }
.pub-foot nav, .pub-foot-grid > div:not(.pub-foot-brand) { display: flex; flex-direction: column; gap: .5rem; }
.pub-foot nav a { color: var(--color-text-muted); text-decoration: none; }
.pub-foot nav a:hover { color: var(--color-primary); }
.pub-foot-base { padding-top: 1.2rem; padding-bottom: 1.6rem; border-top: 1px solid var(--color-border); font-size: var(--text-md); }

/* Log in / Sign up */
.pub-auth { padding: 72px 16px 88px; background: linear-gradient(180deg, var(--color-primary-50) 0%, var(--color-bg) 100%); }
.pub-auth-card { max-width: 440px; margin: 0 auto; padding: 2.2rem 2.2rem 2rem; border: 1px solid var(--color-border); border-radius: var(--radius-2xl); background: var(--color-surface); box-shadow: var(--shadow-lg); }
.pub-auth-card h1 { margin: 0 0 .4rem; font-size: 1.75rem; }
.pub-auth-intro { margin: 0 0 1.5rem; color: var(--color-text-2); }
.pub-auth-card .error { margin: 0 0 1.25rem; border-radius: var(--radius-md); }
.pub-form label { margin-bottom: 1rem; color: var(--color-text); font-size: var(--text-base); font-weight: 600; }
.pub-form input:not([type=hidden]) { margin-top: .35rem; padding: .7rem .8rem; border: 1px solid var(--color-border-input); border-radius: var(--radius-md); font-size: var(--text-lg); font-weight: 400; }
.pub-form input:focus { outline: var(--focus-width) solid var(--color-focus); outline-offset: 1px; border-color: var(--color-focus); }
.pub-form .hint { margin: -.4rem 0 1.25rem; font-size: var(--text-md); }
.pub-form .btn { margin-top: .4rem; }
.pub-form .pub-check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; line-height: 1.45; }
.pub-form .pub-check input[type=checkbox] { flex: none; width: 1.05rem; height: 1.05rem; margin: .15rem 0 0; padding: 0; }
.pub-form .pub-privacy-note { margin: 0 0 1.25rem; }
.pub-auth-foot { max-width: 440px; margin: 1.25rem auto 0; color: var(--color-text-muted); text-align: center; font-size: var(--text-base); }
.pub-auth-foot a { font-weight: 600; }
/* Support */
.pub-support { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.pub-support-form { padding: 2rem; }
.pub-support-form .error { margin: 0 0 1.25rem; border-radius: var(--radius-md); }
.pub-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.pub-form textarea { display: block; width: 100%; margin-top: .35rem; padding: .7rem .8rem; border: 1px solid var(--color-border-input); border-radius: var(--radius-md); font: inherit; font-size: var(--text-lg); font-weight: 400; line-height: 1.5; resize: vertical; min-height: 9rem; }
.pub-form textarea:focus { outline: var(--focus-width) solid var(--color-focus); outline-offset: 1px; border-color: var(--color-focus); }
.pub-form [aria-invalid="true"] { border-color: var(--color-danger); }
.pub-field-error { display: block; margin-top: .3rem; color: var(--color-danger); font-size: var(--text-md); font-weight: 500; }
.pub-support-form .hint { margin: 0 0 1.25rem; }
.pub-support-side { display: flex; flex-direction: column; gap: 1.25rem; }
.pub-sent h2 { margin: 1rem 0 .4rem; font-size: 1.35rem; }
.pub-sent p { margin: 0; color: var(--color-text-2); }
.pub-sent .pub-sent-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.25rem; }
.pub-sent-links a { font-weight: 600; }
@media (max-width: 860px) {
  .pub-support { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pub-form-row { grid-template-columns: 1fr; }
  .pub-support-form { padding: 1.4rem; }
}
.pub-link { padding: 0; border: 0; background: none; color: var(--color-primary); font: inherit; font-weight: 600; cursor: pointer; }
.pub-link:hover { text-decoration: underline; }

/* ===== Public site: shared premium surfaces (all public pages; the hero and page heads set the tone) ===== */
/* Header: solid white at every scroll position (no translucency or backdrop blur) */
.pub-head { background: var(--color-surface); }
/* Scroll progress: a 2px bar on the header's bottom edge grows with page scroll. Decorative and CSS-only; where
   scroll-driven animation is unsupported, or motion is reduced, the bar is simply not drawn. It sits behind the
   header content (z-index -1), takes no space and ignores the pointer. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .pub-head::after { content: ""; position: absolute; inset: auto 0 -1px 0; z-index: -1; height: 2px; pointer-events: none; transform: scaleX(0); transform-origin: 0 50%;
      background: linear-gradient(90deg, var(--color-primary), var(--color-sidebar-indicator));
      animation: pub-scroll-progress linear both; animation-timeline: scroll(root); }
  }
}
@keyframes pub-scroll-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.pub-hero + .pub-sec { background: radial-gradient(56rem 12rem at 50% 0%, var(--color-primary-100) 0%, transparent 72%), var(--color-surface); }
.pub-foot { background: linear-gradient(180deg, var(--color-primary-50) 0, var(--color-bg-soft) 140px); }
/* Product section: a blue light behind the preview window */
#product { background: radial-gradient(60rem 24rem at 50% 78%, var(--color-primary-100) 0%, transparent 70%), var(--color-surface); }
/* Homepage security band: the one dark content section; cards become glass */
.pub-sec[aria-labelledby="security-title"] { position: relative; isolation: isolate; overflow: clip; color: var(--color-sidebar-text);
  background: var(--color-navy);
  background: radial-gradient(40rem 22rem at 90% 0%, color-mix(in srgb, var(--color-primary) 60%, transparent) 0%, transparent 70%), radial-gradient(30rem 20rem at 0% 100%, color-mix(in srgb, var(--color-calc) 45%, transparent) 0%, transparent 72%), linear-gradient(165deg, var(--color-navy) 0%, var(--color-navy-2) 100%); }
.pub-sec[aria-labelledby="security-title"] .pub-eyebrow { color: var(--color-sidebar-indicator); }
.pub-sec[aria-labelledby="security-title"] .pub-sec-head h2 { color: var(--color-on-primary); }
.pub-sec[aria-labelledby="security-title"] .pub-sec-head p { color: var(--color-sidebar-text); }
.pub-sec[aria-labelledby="security-title"] .pub-card { border-color: var(--color-sidebar-label); background: var(--color-navy-2); box-shadow: var(--shadow-lg); }
.pub-sec[aria-labelledby="security-title"] .pub-card { border-color: color-mix(in srgb, var(--color-on-primary) 18%, transparent); background: color-mix(in srgb, var(--color-on-primary) 7%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.pub-sec[aria-labelledby="security-title"] .pub-card h3 { color: var(--color-on-primary); }
.pub-sec[aria-labelledby="security-title"] .pub-card p { color: var(--color-sidebar-text); }
.pub-sec[aria-labelledby="security-title"] .pub-ic { background: var(--color-sidebar-active-bg); color: var(--color-on-primary); box-shadow: inset 0 0 0 1px var(--color-sidebar-indicator); }
.pub-sec[aria-labelledby="security-title"] .pub-more a { color: var(--color-on-primary); }
/* Features and Security topics: a blue accent edge and layered surface */
.pub-feature, .pub-sec-topic, .pub-plan { position: relative; overflow: hidden; }
.pub-feature::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-sidebar-indicator) 100%); }
.pub-sec-topic::before, .pub-plan::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-sidebar-indicator) 100%); }
.pub-feature { background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg-soft) 100%); box-shadow: var(--shadow-lg); }
.pub-feature .pub-ic { width: 48px; height: 48px; }
.pub-feature-lead { letter-spacing: -.01em; }
.pub-features > .pub-feature:nth-child(even) { background: linear-gradient(180deg, var(--color-primary-50) 0%, var(--color-surface) 100%); }
/* Pricing */
.pub-plan { box-shadow: var(--shadow-lg); padding-top: calc(1.9rem + 4px); }
.pub-price strong { color: var(--color-navy); }
.pub-table thead th { background: var(--color-primary-50); }
.pub-table tbody tr:nth-child(even) { background: var(--color-bg-soft); }
.pub-yes { width: 1.7rem; height: 1.7rem; border-radius: var(--radius-full); background: var(--color-success-bg); }
/* Support form: dimensional card, clear field states (the controls are never animated or hidden) */
.pub-support-form { border-top: 3px solid var(--color-primary); box-shadow: var(--shadow-lg); }
.pub-form input:not([type=hidden]), .pub-form textarea { background: var(--color-surface); transition: border-color .15s, box-shadow .15s; }
.pub-form input:not([type=hidden]):hover, .pub-form textarea:hover { border-color: var(--color-text-muted); }
.pub-form input:not([type=hidden]):focus, .pub-form textarea:focus { box-shadow: 0 0 0 4px var(--color-primary-100); }
.pub-support-side .pub-card { animation: pub-hero-rise .8s cubic-bezier(.2, .7, .2, 1) .3s both; }
.pub-support-side .pub-card + .pub-card { animation-delay: .45s; }
@media (prefers-reduced-motion: reduce) { .pub-support-side .pub-card { animation: none; } .pub-form input, .pub-form textarea { transition: none; } }

/* Scroll reveals (progressive enhancement, CSS-only). Without animation-timeline support, or with reduced
   motion, none of these rules apply and everything is simply visible. Public marketing pages only: the home page and the
   Features, Pricing and Security pages; never the support form or the legal pages. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .pub-main:has(.pub-hero, .pub-page-head):not(:has(.pub-support, .pub-legal-body)) :is(.pub-sec-head, .pub-principle, .pub-steps .pub-card, .pub-grid3 .pub-card, .pub-grid4 .pub-card, .pub-grid2 .pub-card, .pub-feature, .pub-table-wrap, .pub-plan, .pub-final-inner) {
      animation: pub-reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 55%;
    }
    .pub-main:has(.pub-hero, .pub-page-head):not(:has(.pub-support, .pub-legal-body)) .pv-window { animation-name: pub-reveal-tilt; transform-origin: 50% 100%; }
    /* Home page section headings: blur-fade instead of the plain rise. The range runs from the moment the heading
       appears at the bottom edge until it is about 40% of the way through its pass over the viewport (roughly
       mid-screen), so the blur is seen while the heading is actually on screen. */
    .pub-main:has(.pub-hero) .pub-sec > .pub-wrap > .pub-sec-head { animation-name: pub-reveal-blur; animation-range: entry 0% cover 25%; }
    .pub-main:has(.pub-hero, .pub-page-head):not(:has(.pub-support, .pub-legal-body)) :is(.pub-steps, .pub-grid3, .pub-grid4, .pub-grid2, .pub-plans) > :nth-child(2) { animation-range: entry 8% entry 63%; }
    .pub-main:has(.pub-hero, .pub-page-head):not(:has(.pub-support, .pub-legal-body)) :is(.pub-steps, .pub-grid3, .pub-grid4, .pub-plans) > :nth-child(3) { animation-range: entry 16% entry 71%; }
    .pub-main:has(.pub-hero, .pub-page-head):not(:has(.pub-support, .pub-legal-body)) .pub-grid4 > :nth-child(4) { animation-range: entry 24% entry 79%; }
    /* Problem: six cards rise in sequence (columns offset within each row; the second row enters later by position).
       translate/scale are animated, not transform, so the hover lift still works afterwards. */
    .pub-main:has(.pub-hero, .pub-page-head):not(:has(.pub-support, .pub-legal-body)) .pub-risks > li { animation: pub-reveal-card linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
    .pub-main:has(.pub-hero, .pub-page-head):not(:has(.pub-support, .pub-legal-body)) .pub-risks > :nth-child(3n + 2) { animation-range: entry 8% entry 68%; }
    .pub-main:has(.pub-hero, .pub-page-head):not(:has(.pub-support, .pub-legal-body)) .pub-risks > :nth-child(3n) { animation-range: entry 16% entry 76%; }
  }
}
@keyframes pub-reveal { from { opacity: 0; transform: translateY(40px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes pub-reveal-tilt { from { opacity: 0; transform: perspective(1400px) rotateX(9deg) translateY(48px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pub-reveal-blur { from { opacity: .85; transform: none; filter: blur(2px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes pub-reveal-card { from { opacity: 0; translate: 0 36px; scale: .96; } to { opacity: 1; translate: 0 0; scale: 1; } }

/* Responsive */
@media (max-width: 1020px) {
  .pub-hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .pub-hero-card { max-width: 520px; }
  .pub-grid4, .pub-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pub-grid3, .pub-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pub-feature { grid-template-columns: 1fr; gap: 1.25rem; }
  .pub-foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pub-foot-brand { grid-column: 1 / -1; }
  .pv-app { grid-template-columns: 1fr; }
  .pv-side { display: none; }
}
@media (max-width: 860px) {
  .pub-nav, .pub-ctas { display: none; }
  .pub-menu { display: block; }
  .pub-sec { padding: 64px 0; }
  .pub-hero { padding: 56px 0 64px; }
  .pv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .pub-wrap { padding: 0 16px; }
  .pub-grid2, .pub-grid3, .pub-grid4, .pub-flow, .pub-steps, .pub-plans { grid-template-columns: 1fr; }
  .pub-actions .btn { flex: 1 1 100%; justify-content: center; }
  .pub-feature, .pub-card, .pub-plan { padding: 1.4rem; }
  .pub-auth { padding: 40px 16px 56px; }
  .pub-auth-card { padding: 1.6rem 1.35rem; }
  .pv-main { padding: 1rem; }
  .pv-head .pv-add { display: none; }
  .pv-row { grid-template-columns: 1fr; gap: .15rem; }
  .pv-when { white-space: normal; }
  .pub-foot-grid { grid-template-columns: 1fr; padding-top: 40px; }
}
@media (max-width: 1020px) and (min-width: 641px) {
  .pub-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
