/* Oma Fennia for business: the redesign prototype, version 4 (28 September 2026).
   Built on ../old/explore/DIRECTION-v4.md over version 3's "Quiet" direction (../old/explore/DIRECTION.md):
   white pages, a light side menu, the flat type ramp (15 body; titles and figures Regular; Bold
   only at 18 and 15), a gray-stroke container per object, Fennia's green hover, mint icon tiles,
   Fennia's illustrations, light green charts, and lime for the one thing that needs you (plus the
   part of a coverage bar a change would cover). Departures from Fennia's DS: ../CLAUDE.md.

   Seven area files follow this one, in this order, so a later file wins a tie:
     css/flow.css       the welcome page, the needs finder, the live panel, the green moment
     css/overview.css   the overview, its doors and their visuals
     css/insights.css   Your coverage, How you compare, Lower your risk
     css/policies.css   Policies and a policy page: policy cards, dashed slots, the spend bar
     css/buy.css        Choose, and Check and buy
     css/claims.css     claims and invoices
     css/messages.css   the inbox, threads, notices, Write to us
   This file holds the tokens, the base, the shell, the layout, and every component shared across
   areas. Who owns what, and what is still version 3: ../old/explore/v4/BUILD-CSS.md.

   Version 6 (../old/explore/DIRECTION-v6.md) adds the hero panel's check for a confirmation and the side
   menu's rhythm on short windows. The claim flow's drop zone and the answers' verdicts live with their
   one user each (css/claimflow.css, css/covered.css). "Motion: off" (html[data-motion="off"]) stops every
   CSS transition and animation, as reduced motion does; css/motion.css holds the rest.
   Four more area files load after the seven above: covered, certs, claimflow, motion.

   House rules: no label above a number or a heading, no font-size inside a media or container
   query, nothing under 14px (the prototype switcher excepted), colors only as tokens, status
   never by color alone, no em-dashes in copy. */

@font-face { font-family: "Fennia Sans"; src: local("FenniaSans-Regular"), url("/fonts/FenniaSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fennia Sans"; src: local("FenniaSans-Bold"), url("/fonts/FenniaSans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* Surfaces */
  --canvas: #FFFFFF;
  --sunk: #F7F7F7;
  --fill: #F2F2F2;
  --wash: #F1F9F2;
  --mint: #E6FAE7;
  --mint-2: #D5F7D7;

  /* Lines */
  --line: #EBEBEB;
  --line-2: #DEDEDE;
  --field: #8B8B8B;

  /* Ink */
  --ink: #333333;
  --ink-2: #6B6B6B;

  /* Fennia green */
  --green: #008A28;
  --green-strong: #004C07;
  --green-text: #00700B;
  --green-line: #8ADC94;

  /* The one thing that needs you */
  --attn: #E9F368;
  --attn-ink: #333333;

  /* The dark live panel */
  --inverse: #333333;
  --inverse-ink: #FFFFFF;
  --inverse-ink-2: #DDDDDD;
  --inverse-line: rgba(255, 255, 255, 0.14);

  /* Errors only */
  --error: #D63D29;
  --error-wash: #F9E3E0;

  /* Charts: one mode, green is you (the chart switch is retired, 1.5) */
  --data-you: var(--green);
  --data-other: var(--g-40);     /* other salons, paid months, claim causes: light green */
  --data-due: var(--green);
  --data-target-fill: var(--g-10);
  --data-target-edge: var(--g-50);
  --data-grid: var(--line);

  /* Focus */
  --focus: var(--green-strong);

  /* Type: Fennia Sans, two weights, the same sizes on every width */
  --font: "Fennia Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-display: 44px;  --lh-display: 52px;
  --fs-title: 28px;    --lh-title: 36px;
  --fs-lead: 20px;     --lh-lead: 28px;
  --fs-section: 18px;  --lh-section: 26px;
  --fs-body: 15px;     --lh-body: 24px;   --lh-ui: 22px;
  --fs-small: 14px;    --lh-small: 20px;
  --track-tight: -0.01em;

  /* Space, a 4 base */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --row-y: 20px;
  --section-gap: 56px;
  --col-gap: 64px;
  --panel-y: 24px;  --panel-x: 32px;

  /* Radii */
  --r-sm: 6px;  --r-md: 12px;  --r-lg: 16px;  --r-pill: 999px;

  /* Elevation, only for things that float */
  --shadow-pop: 0 1px 2px rgba(0, 0, 0, 0.05), 0 12px 32px rgba(0, 0, 0, 0.08);
  --scrim: rgba(51, 51, 51, 0.40);
  --scrim-soft: rgba(51, 51, 51, 0.15);
  --shadow-thumb: 0 1px 3px rgba(0, 0, 0, 0.15);   /* a slider's thumb */
  /* Near-opaque white for the bars that sit over the page under 1024, and white at 0 for a fade into the canvas */
  --topbar-bg: rgba(255, 255, 255, 0.97);
  --tabbar-bg: rgba(255, 255, 255, 0.98);
  --canvas-clear: rgba(255, 255, 255, 0);
  --price-rule: rgba(0, 76, 7, 0.16);   /* the price card's hairline: --green-strong at 16% */

  /* Shell */
  --rail-w: 256px;
  --rail-bg: #F9F9F9;           /* the side menu's column (Compound's soft gray; Fennia's DS rail is #F9F9F9): --ink 11.6, --ink-2 4.87 */
  --rail-line: #E3E3E3;         /* hairlines on the rail and the current tab's edge */
  --topbar-h: 60px;
  --tabbar-h: 64px;
  --item-h: 40px;
  --icon: 20px;
  --icon-lg: 24px;
  --btn-h: 40px;  --btn-h-lg: 48px;
  --field-h: 48px;
  --content-max: 1120px;
  --page-x: 64px;
  --page-top: 56px;

  /* The needs finder */
  --flow-top: 144px;
  --flow-x: 96px;
  --flow-max: 560px;
  --live-w: 600px;
  --live-x: 72px;
  --live-align: 0px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* ---------- Version 4 (DIRECTION-v4.md 2.1). --mint and --mint-2 stay: they equal --g-10 and --g-20 ---------- */
  /* Fennia's green steps (DS primary/10 to /50) and one lime step */
  --g-10: #E6FAE7;              /* icon tiles, current menu item, door scenes, date tiles, fit band, unread count, your message bubbles */
  --g-20: #D5F7D7;              /* the green hover wash (DS interaction/accent-subtle) */
  --g-30: #B8EABB;              /* pressed (DS interaction/pressed); the fifth policy's share */
  --g-40: #8ADC94;              /* light green data; the inner line of the green edge. Graphics only: 1.65:1 on white */
  --g-50: #2EAA4A;              /* the fit band's edge (3.02:1 on white); the third policy's share */
  --l-20: #FFFFD2;              /* DS secondary/20: the needs-you panel. --ink 12.33, --ink-2 5.20 */
  --l-20-edge: #EEF0B4;
  --attn-edge: rgba(51, 51, 51, 0.16);   /* the lime chip's edge on pale lime and on the wash (1.17:1 and 1.04:1 without it) */

  /* Containers and hover */
  --stroke: #DDDDDD;            /* DS border/neutral-subtle: every container's 1px edge (decorative, 1.36:1) */
  --edge: inset 0 0 0 1px var(--stroke);
  --edge-hover: inset 0 0 0 1px var(--green), inset 0 0 0 2px var(--g-40);
  --hover: var(--g-20);         /* --ink 10.90, --ink-2 4.60, --green-text 5.45. Never --green text on it (3.88) */
  --pressed: var(--g-30);       /* --ink-2 fails here (3.94): use --ink-2-press */
  --ink-2-press: #5E5E5E;       /* 4.79 on --pressed */
  --pad-card: 32px;             /* DS padding/panel/md */
  --pad-tile: 24px;             /* DS padding/panel/sm */
  --gap-cards: 32px;            /* DS gap/stack/md */
  --t-hover: 120ms;             /* Figma defines no timing; color only, no movement */

  /* The case bar (If something went wrong tomorrow) */
  --case-pay: var(--green);     /* we'd pay */
  --case-change: var(--attn);   /* a change would cover this */
  --case-left: var(--canvas);   /* left with you */
  --case-edge: var(--field);    /* the bar's outline, 3.41:1 */

  /* One color per policy, for the spend bar and "What it's for" */
  --pol-accident: var(--green-strong);
  --pol-liability: var(--green);
  --pol-property: var(--g-50);
  --pol-legal: var(--g-40);
  --pol-interruption: var(--g-30);
  --pol-extra: var(--g-20);     /* a sixth policy (health insurance, or another bought from the catalog): the palest step, edged in --g-40 */

  /* The prototype switcher (a reviewer's tool, not part of the design): its pill's height and its gap above the tab bar */
  --proto-h: 36px;
  --proto-gap: 12px;
  --proto-bg: #1F1F1F;
  --proto-hover: #333333;
  --proto-ink-2: #BDBDBD;
}

/* Spacing and layout respond; type never does */
@media (max-width: 1359px) { :root { --flow-x: 64px; --live-w: 520px; --live-x: 56px; } }
@media (max-width: 1279px) { :root { --page-x: 48px; --col-gap: 48px; } }
@media (max-width: 1023px) { :root { --page-x: 32px; --page-top: 32px; --section-gap: 48px; --flow-x: 32px; --live-x: 32px; --pad-card: 24px; --gap-cards: 24px; } }
@media (max-width: 639px)  { :root { --page-x: 16px; --page-top: 24px; --panel-x: 20px; --panel-y: 20px; --flow-x: 16px; --live-x: 16px; --row-y: 16px; --pad-card: 16px; --pad-tile: 16px; --gap-cards: 16px; } }
@supports not (text-box: trim-both cap alphabetic) { :root { --live-align: 1px; } }

/* The prototype's body-size switch, set on <html> (not a media query) */
html[data-base="16"] { --fs-body: 16px; --lh-body: 24px; --lh-ui: 24px; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
/* Under 1024 a focused control scrolls clear of the tab bar and of the prototype switcher sitting --proto-gap above it */
@media (max-width: 1023px) { html { scroll-padding-top: calc(var(--topbar-h) + 16px); scroll-padding-bottom: calc(var(--tabbar-h) + var(--proto-gap) + var(--proto-h) + var(--s-2) + env(safe-area-inset-bottom)); } }
@media (max-width: 639px) { html:has(.flow-foot) { scroll-padding-bottom: 140px; } }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font); font-size: var(--fs-body); line-height: var(--lh-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure, fieldset, legend { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ol, ul { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
img { display: block; max-width: 100%; }
a { color: var(--green-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
a:not([class]):hover { color: var(--green-strong); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.on-dark :focus-visible { outline-color: var(--inverse-ink); }
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: var(--fs-small); line-height: var(--lh-small); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 8px 16px; background: var(--ink); color: var(--inverse-ink); border-radius: var(--r-md); text-decoration: none; }
.skip:focus { top: 16px; }
svg.i { width: var(--icon); height: var(--icon); flex: none; display: block; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: square; stroke-linejoin: miter; }
svg.i.f { fill: currentColor; stroke: none; }
svg.i.ui { stroke-width: 1.5; }
p, li { text-wrap: pretty; }
h1, h2, .t-display, .t-title { text-wrap: balance; }

/* Type roles */
h1, .t-title { font-size: var(--fs-title); line-height: var(--lh-title); font-weight: 400; letter-spacing: var(--track-tight); }
.t-display { font-size: var(--fs-display); line-height: var(--lh-display); font-weight: 400; letter-spacing: var(--track-tight); }
.t-lead { font-size: var(--fs-lead); line-height: var(--lh-lead); font-weight: 400; }
h2, .t-section { font-size: var(--fs-section); line-height: var(--lh-section); font-weight: 700; }
h3, .t-label { font-size: var(--fs-body); line-height: var(--lh-ui); font-weight: 700; }
.t-small { font-size: var(--fs-small); line-height: var(--lh-small); }
.sub { color: var(--ink-2); max-width: 62ch; margin-top: var(--s-1); }
.measure { max-width: 66ch; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--btn-h); padding: 0 20px; border-radius: var(--r-pill); border: 0; font-size: var(--fs-body); line-height: var(--lh-ui); font-weight: 400; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color .15s var(--ease), box-shadow .15s var(--ease), transform .1s var(--ease); }
.btn svg.i { width: 18px; height: 18px; }
.btn:has(> svg.i:first-child) { padding-left: 16px; }
.btn:active { transform: scale(.98); }
.btn-lg { min-height: var(--btn-h-lg); padding: 0 24px; }
.btn-primary { background: var(--green); color: var(--inverse-ink); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--green-strong); color: var(--inverse-ink); }
.btn-secondary { background: var(--canvas); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-secondary:hover { background: var(--canvas); box-shadow: inset 0 0 0 1px var(--green-strong); color: var(--green-strong); }
.btn-secondary:active { box-shadow: inset 0 0 0 2px var(--green-strong); }
.btn-block { width: 100%; }
.btn.pending { cursor: progress; background: var(--green-strong); }
.link { display: inline-flex; align-items: center; gap: 0; color: var(--green-text); text-decoration: none; font-size: var(--fs-body); line-height: var(--lh-ui); font-weight: 400; cursor: pointer; }
.link:hover { color: var(--green-strong); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.link svg.i { width: 16px; height: 16px; margin-left: 4px; }   /* no icon gap (3.11): the one icon a text action keeps is the trailing external icon, 4 after the words */
.link.small { font-size: var(--fs-small); line-height: var(--lh-small); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-pill); color: var(--ink); flex: none; text-decoration: none; }
.icon-btn:hover { background: var(--hover); }
.pair { display: inline-flex; gap: var(--s-3); flex-wrap: wrap; }

/* ---------- Chips, tags, counts ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-pill); font-size: var(--fs-small); line-height: var(--lh-small); white-space: nowrap; color: var(--ink); background: var(--fill); vertical-align: middle; }
.chip svg.i { width: 16px; height: 16px; }
.chip.attn { background: var(--attn); color: var(--attn-ink); }
.chip.outline { background: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.chip .dot.off { background: none; box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.ok { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink); white-space: nowrap; }
.ok svg.i { width: 16px; height: 16px; color: var(--green); stroke-width: 1.75; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: var(--r-sm); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); white-space: nowrap; font-weight: 400; vertical-align: middle; }
.tag.strong { background: var(--ink); color: var(--inverse-ink); box-shadow: none; }
.tag.plain { box-shadow: none; padding: 0; color: var(--ink-2); }
.count { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: var(--r-pill); font-size: var(--fs-small); line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--green-strong); background: var(--g-10); }   /* unread: a mint pill (4.1) */
.count.attn { background: var(--attn); color: var(--attn-ink); font-weight: 400; padding: 0 8px 0 6px; }
.count svg.i { width: 14px; height: 14px; stroke-width: 1.5; }
/* Lime keeps its shape on the pale lime panel, on the green wash and pressed, and on the current menu item's mint (2.2, 3.3):
   the chip, the Claims count, a command bar option's chip and a Coming up deadline */
.task.attn .chip.attn, a:hover .chip.attn, .row:hover .chip.attn,
.cmdk-item:is(:hover, :active, [aria-selected="true"]) .chip.attn,
a.when:is(:hover, :active) .dtile.attn,
.nav-item:is(:hover, :active, [aria-current="page"]) .count.attn { box-shadow: inset 0 0 0 1px var(--attn-edge); }
kbd { font-family: var(--font); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); background: var(--fill); border-radius: var(--r-sm); padding: 1px 6px; }

/* ---------- The side menu (1024 and wider) ----------
   Version 5, after Compound: a soft gray column with no edge line, beside the white page. The logo sits on
   the page title's line. Two groups: the five sections (Overview's three pages under it) and, under an inset
   hairline, buying, search and help; the profile at the foot. Items are 40 high, 2 apart. The current item is
   a white tab, the color of the page it shows, with a hairline edge, a Bold label and a green icon, so it reads
   by shape and weight, not by color alone */
.shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: var(--page-top) var(--s-4) var(--s-4); background: var(--rail-bg); overflow-y: auto; z-index: 20; }
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { width: 131px; height: 24px; }
.rail .logo { height: var(--lh-title); margin: 0 var(--s-3); align-self: flex-start; }   /* as tall as the h1's line, so the logo centers on the page title */
.nav { display: grid; gap: 2px; margin-top: var(--s-7); }
.nav-2 { position: relative; margin-top: var(--s-4); padding-top: var(--s-4); }
.nav-2::before { content: ""; position: absolute; top: 0; left: var(--s-3); right: var(--s-3); height: 1px; background: var(--rail-line); }
.nav-item { position: relative; display: flex; align-items: center; gap: var(--s-3); width: 100%; height: var(--item-h); padding: 0 var(--s-2) 0 var(--s-3); border-radius: var(--r-md); color: var(--ink); text-decoration: none; font-size: var(--fs-body); line-height: var(--lh-ui); text-align: left; transition: background-color var(--t-hover); }
.nav-item svg.i { flex: none; color: var(--ink-2); }
.nav-item .lb { flex: 1; display: inline-grid; }
.nav-item .lb::after { content: attr(data-t); font-weight: 700; visibility: hidden; height: 0; overflow: hidden; }
.nav-item:hover { background: var(--hover); text-decoration: none; }
.nav-item:hover svg.i { color: var(--ink); }
.nav-item:active { background: var(--pressed); --ink-2: var(--ink-2-press); }
.nav-item[aria-current], .nav-item[aria-current]:hover { background: var(--canvas); box-shadow: inset 0 0 0 1px var(--rail-line); font-weight: 700; }   /* "page", or "true" for the current section of a page with no item (version 6: Policies on the new stage's certificates) */
.nav-item[aria-current] svg.i, .nav-item.in-section svg.i { color: var(--green-text); }
.nav-item:focus-visible { outline-offset: -2px; }
.nav-item kbd { flex: none; background: var(--canvas); box-shadow: inset 0 0 0 1px var(--rail-line); }
/* Overview's pages (3.10): always shown under Overview (hidden in the new stage), their labels on the parent's label line,
   no icons and no tree line. The current one is the same white tab; Overview then keeps a green icon (.in-section) */
.nav-sub { display: grid; gap: 2px; margin: 2px 0 var(--s-2); padding: 0; list-style: none; }
.nav-sub a { display: flex; align-items: center; height: 36px; padding: 0 var(--s-2) 0 44px; border-radius: var(--r-md); color: var(--ink-2); text-decoration: none; transition: background-color var(--t-hover); }
.nav-sub a:hover { background: var(--hover); color: var(--ink); }
.nav-sub a:active { background: var(--pressed); color: var(--ink); }
.nav-sub a[aria-current="page"] { background: var(--canvas); box-shadow: inset 0 0 0 1px var(--rail-line); color: var(--ink); font-weight: 700; }
.nav-sub a:focus-visible { outline-offset: -2px; }
.nav-sub .lb { display: inline-grid; }
.nav-sub .lb::after { content: attr(data-t); font-weight: 700; visibility: hidden; height: 0; overflow: hidden; }   /* the hidden Bold copy stops the width shifting */

/* Under 1024 the four Overview routes get a strip of pills right under the page head (3.10); the tab bar keeps Overview current */
.subnav { display: none; }
.page-in > .head + .subnav + * { margin-top: var(--s-6); }   /* the head's 32 carries past the strip, shown or hidden */
@media (max-width: 1023px) {
  .subnav { display: flex; gap: var(--s-2); margin-inline: calc(-1 * var(--page-x)); padding-inline: var(--page-x); overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 var(--page-x); scrollbar-width: none; }
}
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex: none; display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); text-decoration: none; white-space: nowrap; scroll-snap-align: start; }
.subnav a:hover { background: var(--hover); }
.subnav a:active { background: var(--pressed); }
.subnav a[aria-current="page"] { background: var(--g-10); box-shadow: inset 0 0 0 1px var(--green); font-weight: 700; }
.subnav a:focus-visible { outline-offset: -2px; }   /* the strip scrolls, so a ring outside the pill would be clipped */
.rail-foot { margin-top: auto; padding-top: var(--s-5); display: grid; gap: var(--s-2); }   /* the language row, then the profile */
.rail-lang { display: flex; align-items: center; gap: var(--s-3); height: var(--item-h); padding: 0 var(--s-3); color: var(--ink); }
.rail-lang svg.i { color: var(--ink); }
.langs { display: flex; gap: var(--s-3); }
.langs a { color: var(--ink); text-decoration: none; padding-bottom: 2px; }
.langs a:hover { text-decoration: underline; }
.langs a[aria-current] { font-weight: 700; box-shadow: inset 0 -2px 0 var(--green); }
.profile { display: flex; align-items: center; gap: var(--s-3); width: 100%; padding: var(--s-2) var(--s-3) var(--s-2) var(--s-2); border-radius: var(--r-md); text-align: left; }
.profile:hover { background: var(--hover); }
.profile:active { background: var(--pressed); --ink-2: var(--ink-2-press); }
.profile .who { flex: 1; display: grid; min-width: 0; }
.profile .who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile .chev svg.i { color: var(--ink-2); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--mint); color: var(--green-strong); font-size: var(--fs-small); line-height: 1; font-weight: 700; flex: none; }
/* Short windows (version 6): "Get a certificate" made the menu 806px tall, and a 1440 by 900 laptop gives Chrome's window about
   795, so the profile at the foot was cut off. On short windows the menu tightens its rhythm, never its type: the gaps between
   the groups first (768 fits), then the rows (36 high, 720 fits). Shorter than that, the menu scrolls, as it did before */
@media (min-width: 1024px) and (max-height: 860px) {
  .rail .nav { margin-top: var(--s-6); }
  .rail .nav-2 { margin-top: var(--s-3); padding-top: var(--s-3); }
  .rail .nav-sub { margin-bottom: var(--s-1); }
  .rail .rail-foot { padding-top: var(--s-4); gap: var(--s-1); }
}
@media (min-width: 1024px) and (max-height: 767px) {
  :root { --item-h: 36px; }
  .rail .nav-sub a { height: calc(var(--item-h) - var(--s-1)); }
}

/* The profile menu (a disclosure) */
.pmenu { position: fixed; z-index: 70; width: 288px; padding: var(--s-2); background: var(--canvas); border-radius: var(--r-lg); box-shadow: var(--shadow-pop), 0 0 0 1px var(--line); }
.pmenu[hidden] { display: none; }
.pmenu .co { padding: var(--s-3); display: grid; gap: 2px; }
.pmenu .co span { color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.pmenu hr { border: 0; height: 1px; background: var(--line); margin: var(--s-2) 0; }
.pmenu button { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 44px; padding: 0 var(--s-3); border-radius: var(--r-md); color: var(--ink); text-decoration: none; }
.pmenu button:hover { background: var(--hover); }
.pmenu button:active { background: var(--pressed); }
.pmenu .rail-lang { padding: 0 var(--s-3); }
.pmenu .pm-narrow { display: none; }

/* ---------- Under 1024: a top bar and the tab bar ---------- */
.topbar, .tabbar { display: none; }
@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--s-1); height: var(--topbar-h); padding: 0 var(--s-2) 0 var(--page-x); background: var(--topbar-bg); border-bottom: 1px solid transparent; transition: border-color .2s; }
  .topbar.scrolled { border-bottom-color: var(--line); }
  .topbar .logo { margin-right: auto; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom); background: var(--tabbar-bg); border-top: 1px solid var(--line); }
  .pmenu .pm-narrow { display: block; }
  .col { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
}
.tabbar a { position: relative; display: grid; justify-items: center; align-content: center; gap: 4px; color: var(--ink-2); text-decoration: none; font-size: var(--fs-small); line-height: var(--lh-small); }
.tabbar a .ico { position: relative; display: block; }
.tabbar a .lb { display: inline-grid; justify-items: center; }
.tabbar a .lb::after { content: attr(data-t); font-weight: 700; visibility: hidden; height: 0; overflow: hidden; }
.tabbar a[aria-current] { color: var(--ink); font-weight: 700; }            /* "page", or "true" for Overview on its sub-pages */
.tabbar a[aria-current] svg.i { color: var(--green-text); }
.tabbar a:focus-visible { outline-offset: -4px; border-radius: var(--r-md); }
.tabbar .count { position: absolute; top: -6px; left: calc(50% + 4px); min-width: 20px; height: 20px; padding: 0 6px; box-shadow: 0 0 0 2px var(--canvas); }
.tabbar .count.attn { gap: 2px; padding: 0 6px 0 4px; }
.tabbar .count svg.i { width: 12px; height: 12px; }

/* ---------- The page ---------- */
.col { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.col > main { flex: 1; }
.page { padding: var(--page-top) var(--page-x) var(--s-9); min-width: 0; }
.page:focus { outline: none; }
.page-in { max-width: var(--content-max); margin: 0 auto; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-5) var(--s-6); flex-wrap: wrap; }
.head > .ht { display: flex; align-items: flex-start; gap: var(--s-3); min-width: 0; flex: 1 1 420px; }
.head > .ht > div { min-width: 0; }
.head .dateline { margin-top: var(--s-1); color: var(--ink-2); display: flex; align-items: center; gap: var(--s-2) var(--s-3); flex-wrap: wrap; }
.head-actions { display: flex; align-items: center; gap: var(--s-3) var(--s-5); flex-wrap: wrap; }
.back-btn { margin: -2px 0 0 0; flex: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.back-btn:hover { box-shadow: inset 0 0 0 1px var(--field); }
.page-in > .head + * { margin-top: var(--s-6); }
.page-in > * + .blk { margin-top: var(--section-gap); }
.page-in > .blk + .blk { padding-top: var(--section-gap); border-top: 1px solid var(--line); }
.page-in > .head + .blk, .page-in > .infobox + .blk { margin-top: var(--s-6); }
.page-in > .task + .blk { margin-top: var(--s-7); }   /* 48 between groups after the needs-you panel, with no hairline (3.1), as on the overview */
.mt-xl { margin-top: var(--s-6); }
.sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4) var(--s-5); flex-wrap: wrap; }
.sec-head > div:first-child { min-width: 0; flex: 1 1 320px; }
.sec-head + * { margin-top: var(--s-5); }
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--col-gap); align-items: start; }
.duo.side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack > * + * { margin-top: var(--section-gap); padding-top: var(--section-gap); border-top: 1px solid var(--line); }
.stack.tight > * + * { margin-top: var(--s-7); padding-top: 0; border-top: 0; }
@media (max-width: 1279px) {
  .duo, .duo.side { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .duo > * + * { margin-top: var(--section-gap); padding-top: var(--section-gap); border-top: 1px solid var(--line); }
}
/* push: also answers to the page area's width (branch ai-drawer README, the push layout) */
@container app (max-width: 1279px) {
  .duo, .duo.side { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .duo > * + * { margin-top: var(--section-gap); padding-top: var(--section-gap); border-top: 1px solid var(--line); }}
.gap-t { margin-top: var(--s-5); }
.mt-xs { margin-top: var(--s-1); } .mt-sm { margin-top: var(--s-2); } .mt-md { margin-top: var(--s-4); } .mt-lg { margin-top: var(--s-5); }

/* ---------- Rows ---------- */
.rows > * { border-top: 1px solid var(--line); }
.rows > :first-child { border-top: 0; }
.row { position: relative; display: grid; grid-template-columns: var(--icon) minmax(0, 1fr) auto; align-items: center; gap: var(--s-4); padding: var(--row-y) 0; color: var(--ink); text-decoration: none; }
.row.noicon { grid-template-columns: minmax(0, 1fr) auto; }   /* v4: no go column; .nogo now equals the default */
.row.nogo { grid-template-columns: var(--icon) minmax(0, 1fr) auto; }
.row.doc { grid-template-columns: minmax(0, 1fr) auto var(--icon); }   /* the download icon stays (3.11); before the 480 container query, which narrows it */
.row > svg.i:first-child { align-self: start; margin-top: 2px; }
.row .t { color: var(--ink); }
.row .s { color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); margin-top: 2px; }
.row .v { text-align: right; }
.row .vd { margin-top: var(--s-2); display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.row .go { color: var(--ink-2); }
a.row, button.row { width: 100%; text-align: left; }
a.row:hover, button.row:hover { text-decoration: none; }
a.row::before, button.row::before { content: ""; position: absolute; inset: 1px -12px; border-radius: var(--r-md); background: var(--hover); opacity: 0; transition: opacity var(--t-hover); z-index: -1; }
a.row:hover::before, button.row:hover::before { opacity: 1; }
a.row:active::before, button.row:active::before { background: var(--pressed); opacity: 1; }
:is(a.row, button.row):active { --ink-2: var(--ink-2-press); }   /* --ink-2 is 3.94:1 on --pressed */
a.row:focus-visible, button.row:focus-visible { outline-offset: 4px; border-radius: var(--r-md); }
.rows { position: relative; z-index: 0; container-type: inline-size; }
@container (max-width: 480px) {
  .row { grid-template-columns: var(--icon) minmax(0, 1fr); }
  .row .v { grid-column: 2; grid-row: 2; text-align: left; }
  .row .v .price-pair { justify-items: start; }
  .row.nogo { grid-template-columns: var(--icon) minmax(0, 1fr); }
  .row.noicon { grid-template-columns: minmax(0, 1fr); }
  .row.doc { grid-template-columns: minmax(0, 1fr) var(--icon); }
  .row.noicon > span:empty { display: none; }
  .row.doc .go { grid-column: 2; grid-row: 1; }
}
.price-pair { display: grid; justify-items: end; gap: 2px; }
.price-pair b { font-weight: 700; font-variant-numeric: tabular-nums; }
.price-pair .yr { color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.price-pair i, .per { font-style: normal; color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 400; }
/* Arrows (3.11): no trailing arrows. A row's go cell (span.go, scoped to spans so it never touches a
   container class) shows only on touch, as a 16 chevron in --ink-2, since a touch screen has no hover
   to say "this opens". A document row's download icon is an action and stays. hover: none is an
   input query, not a width query. */
span.go { display: none; }
.row.doc > span.go { display: grid; place-items: center; }
@media (hover: none) {
  span.go { display: grid; place-items: center; }
  span.go svg.i { width: 16px; height: 16px; color: var(--ink-2); }
  .row.doc > span.go svg.i { width: var(--icon); height: var(--icon); }
  :is(.row:not(.doc), .when) > span.go { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
  :is(.row:not(.doc), .when):has(> span.go) { padding-right: calc(16px + var(--s-3)); }
}
.brk { word-break: break-all; }
.kv.tight > * { min-width: 0; }

/* ---------- The needs-you panel (3.8) ---------- */
/* White with the stroke and a 40 mint tile (a confirmation, the biggest gap, contact); pale lime with a
   lime tile, the lime chip and the primary when the task waits for her. One primary per zone. */
.task { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: var(--panel-y) var(--panel-x); border-radius: var(--r-lg); box-shadow: var(--edge); background: var(--canvas); }
.task.attn { background: var(--l-20); box-shadow: inset 0 0 0 1px var(--l-20-edge); }
.task h2 { font-size: var(--fs-body); line-height: var(--lh-ui); font-weight: 700; }
.task h2:focus { outline: none; }
.task .tx { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin-top: 6px; color: var(--ink-2); }
.task .tx p { flex: 1 1 280px; }
.task .tx .chip { max-width: 100%; height: auto; min-height: 28px; padding-block: var(--s-1); white-space: normal; }   /* at 320 "Waiting for you, by 30 Sep" wraps inside the text instead of spilling */
.task .acts { display: flex; align-items: center; gap: var(--s-3) var(--s-5); flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 767px) {
  .task { grid-template-columns: 40px minmax(0, 1fr); }
  .task > .it { align-self: start; }   /* with the text running to several lines, the tile stays with the title */
  .task .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .task .acts .btn { width: 100%; }
}
/* The overview's hero (version 5): the one focal point of the page. No tile; the title and its line read as one
   two-tone sentence at Lead size (ink, then gray), the chip under it, the action at the right. --ink-2 on the
   pale lime is 5.20:1 */
.task.hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-5) var(--s-7); padding: var(--pad-card); }
.task.hero .hx { flex: 1 1 440px; min-width: 0; }   /* when the sentence and the button don't both fit, the button drops under the sentence */
.task.hero .acts { flex: none; justify-content: flex-start; }
.task.hero h2 { font-size: var(--fs-lead); line-height: var(--lh-lead); font-weight: 400; max-width: 48ch; text-wrap: pretty; }
.task.hero .t2 { color: var(--ink-2); }
.task.hero .hc { margin-top: var(--s-4); }
.task.hero .hc .chip { max-width: 100%; height: auto; min-height: 28px; padding-block: var(--s-1); white-space: normal; }
/* A confirmation (version 6: a claim sent, the note uploaded, an order placed): a check on a 40 mint tile before the sentence, the
   sentence's first line on the tile's middle, so done reads as done by its shape and not only by the panel being white */
.task.hero .hx.mk { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: var(--s-4); align-items: start; }
.task.hero .hx.mk > :not(.it) { grid-column: 2; }
.task.hero .hx.mk > h2 { padding-top: calc((40px - var(--lh-lead)) / 2); }
@media (max-width: 767px) {
  .task.hero .acts { flex: 1 1 100%; }
  .task.hero:has(> .hx.mk) .acts { padding-left: calc(40px + var(--s-4)); }   /* under a confirmation's check, the text action starts where the sentence does */
  .task.hero .acts .btn { white-space: normal; height: auto; min-height: var(--btn-h); padding-block: var(--s-2); text-align: center; }   /* a long label ("Buy business interruption insurance") wraps at 320 instead of spilling */
}

/* ---------- Info boxes (3.17) ---------- */
/* Neutral (infobox("info", …)): a white box with the stroke; a 40 mint tile with the icon, or a 48
   illustration where 3.5 names one; the title (Label), the text, the actions as text actions; the dismiss button */
.infobox, .infobox.box { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: var(--s-4); align-items: start; padding: 20px var(--s-5); border-radius: var(--r-lg); background: var(--canvas); box-shadow: var(--edge); }   /* markup: div.infobox.box (core.js infobox()); .box.infobox beats .box's padding */
.infobox:has(> img) { grid-template-columns: 48px minmax(0, 1fr) auto; }
.infobox > img { width: 48px; height: 48px; }
.infobox > .it + div { padding-top: 9px; }    /* the title's first line centers on the 40 tile */
.infobox > img + div { padding-top: 13px; }   /* and on the 48 illustration */
.infobox .ttl { font-weight: 700; line-height: var(--lh-ui); }
.infobox .ttl:focus { outline: none; }
.infobox .txt { margin-top: 2px; }
.infobox .acts { margin-top: var(--s-3); display: flex; gap: var(--s-5); flex-wrap: wrap; }
.infobox .x { display: grid; place-items: center; width: 32px; height: 32px; margin: -6px -8px 0 0; border-radius: 50%; color: var(--ink); }
.infobox .x:hover { background: var(--hover); }
.infobox .x svg.i { width: 16px; height: 16px; }
/* Success stays on --wash (with a checkBadge), error as version 3 */
.infobox--success, .infobox--error { grid-template-columns: var(--icon) minmax(0, 1fr) auto; gap: var(--s-3); padding: var(--s-4) 20px; border-radius: var(--r-md); box-shadow: none; }
.infobox--success { background: var(--wash); }
.infobox--success > svg.i { margin-top: 1px; color: var(--green); stroke-width: 1.75; }
.infobox--error { background: var(--error-wash); }
.infobox--error > svg.i { margin-top: 1px; color: var(--error); }
.infobox.gone { display: none; }

/* ---------- Errors and fields ---------- */
.err { display: flex; align-items: flex-start; gap: var(--s-2); margin-top: var(--s-2); color: var(--error); }
.err svg.i { width: 16px; height: 16px; margin-top: 4px; stroke-width: 1.5; }
.err[hidden] { display: none; }
.field { display: grid; gap: var(--s-2); }
.field label { font-weight: 700; line-height: var(--lh-ui); }
.field input, .field textarea { width: 100%; min-height: var(--field-h); padding: 12px 16px; border: 0; border-radius: var(--r-md); background: var(--canvas); box-shadow: inset 0 0 0 1px var(--field); font-size: var(--fs-body); line-height: var(--lh-ui); color: var(--ink); resize: vertical; }
.field input:hover, .field textarea:hover { box-shadow: var(--edge-hover); }
.field input:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--green); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--error); }
.field input[aria-invalid="true"]:focus, .field textarea[aria-invalid="true"]:focus { box-shadow: inset 0 0 0 2px var(--error), 0 0 0 2px var(--canvas), 0 0 0 4px var(--focus); }

/* The DS checkbox */
.cbox { appearance: none; -webkit-appearance: none; display: inline-grid; place-items: center; width: 24px; height: 24px; margin: 0; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--field); background: var(--canvas); cursor: pointer; flex: none; color: var(--inverse-ink); }
.cbox:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.cbox:checked { background: var(--green); box-shadow: none; }
input.cbox:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E"); background-size: 20px; background-position: center; background-repeat: no-repeat; }
.cbox[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--error); }
.agree { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-4) 0; cursor: pointer; }
.agree .cbox { margin-top: -1px; }
.agree a svg.i { display: inline; width: 16px; height: 16px; margin-left: 4px; vertical-align: -2px; }   /* 4 after the words by margin, not a space, so the underline stops at the last word */

/* Empty states (3.17), div.box.empty from core.js emptyState(): a white container, centered: the section's 64 illustration, 16 under it one line, 24 under that the primary. No gray */
.empty, .box.empty { display: grid; justify-items: center; padding: var(--s-7) var(--s-6); border-radius: var(--r-lg); background: var(--canvas); box-shadow: var(--edge); text-align: center; }
.empty > img { width: 64px; height: 64px; }
.empty > :is(img, svg.i) + p { margin-top: var(--s-4); }
.empty p { max-width: 44ch; }
.empty p + :is(.btn, .pair, .link) { margin-top: var(--s-5); }
@media (max-width: 639px) { .empty, .box.empty { padding: var(--s-6) var(--s-4); } .empty .btn { white-space: normal; width: 100%; min-height: 48px; } }

/* ---------- Toast ---------- */
.toast { position: fixed; top: 16px; left: 50%; z-index: 90; display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: stretch; width: max-content; max-width: min(520px, calc(100vw - 32px)); background: var(--canvas); border-radius: var(--r-md); box-shadow: var(--shadow-pop), 0 0 0 1px var(--line); overflow: hidden; opacity: 0; transform: translate(-50%, -8px); transition: opacity .2s var(--ease), transform .2s var(--ease); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast:not(.on) { visibility: hidden; transition: opacity .2s, transform .2s, visibility 0s .2s; }
.toast .strip { display: grid; place-items: center; background: var(--ink); color: var(--inverse-ink); }
.toast.success .strip { background: var(--green); }
.toast .strip svg.i { stroke-width: 1.75; }
.toast .tx { padding: 12px 8px 12px 14px; font-weight: 700; line-height: var(--lh-ui); }
.toast .x { display: grid; place-items: center; color: var(--ink); }
.toast .x:hover { background: var(--hover); }
@media (max-width: 1023px) { .toast { top: calc(var(--topbar-h) + 12px); } }

/* ---------- Tooltip for charts ---------- */
.tip { position: fixed; z-index: 90; pointer-events: none; min-width: 150px; max-width: 314px; padding: var(--s-2) var(--s-3); border-radius: var(--r-md); background: var(--canvas); box-shadow: var(--shadow-pop), 0 0 0 1px var(--line-2); font-size: var(--fs-small); line-height: var(--lh-small); opacity: 0; transition: opacity .12s; }
.tip.on { opacity: 1; pointer-events: auto; }
.tip .tv { font-weight: 700; font-size: var(--fs-body); line-height: var(--lh-ui); }
.tip .tl { color: var(--ink-2); }

/* ---------- The quiet footer ---------- */
.qfoot { padding: var(--s-5) 0 calc(var(--proto-h) + var(--s-4) * 2); border-top: 1px solid var(--line); }   /* at the page's end the last row sits 16 above the prototype switcher */
.qfoot-wide { border-top: 0; }
.qfoot-wide > nav { max-width: var(--content-max); margin: 0 auto; padding-top: var(--s-5); border-top: 1px solid var(--line); }
.qfoot ul { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.qfoot a { color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.qfoot a:hover { color: var(--ink); text-decoration: underline; }
.qfoot svg.i { width: 16px; height: 16px; }
.qfoot-wide { padding-inline: var(--page-x); }

/* ---------- Shared by several pages (moved here from their v3 sections, order kept) ---------- */
/* Key-value lists (the Company step, a claim, an invoice) */
.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); }
.kv > * { padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv > :nth-child(odd) { color: var(--ink-2); }
.kv > :nth-last-child(-n+2) { border-bottom: 0; }
@media (max-width: 479px) { .kv { grid-template-columns: 120px minmax(0, 1fr); } }
/* The chart container (the welcome peek, the overview, How you compare, Payments) */
.chart { position: relative; margin-top: var(--s-5); }
.chart svg { display: block; overflow: visible; }
.chart svg text { font-size: var(--fs-small); font-family: var(--font); }
.nw { white-space: nowrap; }
.sub-h { margin-top: var(--s-6); }
.sub-h + * { margin-top: var(--s-4); }

/* Checklists (Lower your risk, Finish setting up) */
.ring { display: flex; align-items: center; gap: var(--s-3); }
.ring svg { width: 40px; height: 40px; }
.ring .rn { font-weight: 700; line-height: var(--lh-ui); font-variant-numeric: tabular-nums; }
.ring .rt { color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.list > * + * { border-top: 1px solid var(--line); }
.check { display: grid; grid-template-columns: var(--icon-lg) minmax(0, 1fr) auto; gap: var(--s-4); align-items: start; padding: var(--row-y) 0; }
.check:first-child { padding-top: 0; }
.check:focus { outline: none; }
.check .t { line-height: var(--lh-ui); }
.check .s { margin-top: 4px; color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); max-width: 60ch; }

/* Coming up (3.12): a date tile, the title (Body) and the text (Small); link rows wash, no arrows.
   The tile is aria-hidden; screen readers get the long date ("30 September") in a .sr span */
.dtile { display: grid; place-content: center; width: 48px; height: 52px; border-radius: var(--r-md); background: var(--g-10); color: var(--green-strong); text-align: center; font-variant-numeric: tabular-nums; }
.dtile b { font-weight: 400; font-size: var(--fs-section); line-height: 20px; }   /* the day, 18 Regular */
.dtile span { font-size: var(--fs-small); line-height: 18px; }                    /* the month under it */
.dtile.attn { background: var(--attn); color: var(--ink); }                        /* the task's deadline */
.dtile.plain { background: var(--canvas); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); }  /* not a link */
.when { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: var(--s-4); align-items: center; padding: var(--s-3) 0; color: var(--ink); text-decoration: none; }
.when .t { line-height: var(--lh-ui); }
.when .s { color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); margin-top: 2px; }
a.when { isolation: isolate; }
a.when::before { content: ""; position: absolute; inset: 0 -12px; border-radius: var(--r-md); background: var(--hover); opacity: 0; transition: opacity var(--t-hover); z-index: -1; }
a.when:hover { text-decoration: none; }
a.when:hover::before { opacity: 1; }
a.when:hover .t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a.when:active::before { background: var(--pressed); opacity: 1; }
a.when:active { --ink-2: var(--ink-2-press); }
a.when:focus-visible { outline-offset: 4px; border-radius: var(--r-md); }

/* Accordions */
.faqs > .faq { border-top: 1px solid var(--line); }
.faqs > .faq:first-child { border-top: 0; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 56px; padding: var(--s-3) 0; cursor: pointer; list-style: none; line-height: var(--lh-ui); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .tg { display: grid; color: var(--ink-2); flex: none; }
.faq summary .tg svg.i { transition: transform .2s var(--ease); }
.faq[open] summary .tg svg.i { transform: rotate(180deg); }
.faq summary:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }   /* a disclosure: the name underlines, the chevron turns ink (3.3) */
.faq summary:hover .tg { color: var(--ink); }
.faq summary:focus-visible { outline-offset: 2px; border-radius: var(--r-sm); }
.faq > p { padding-bottom: var(--s-4); max-width: 70ch; }
.faq > .rows { padding-bottom: var(--s-2); }
.faq summary .meta { color: var(--ink-2); font-size: var(--fs-small); margin-left: var(--s-2); }
/* Usage and deductible bars (a policy, a claim) */
.usage { display: grid; gap: var(--s-5); }
.usage .line { display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.usage .line b { font-weight: 400; font-variant-numeric: tabular-nums; }
.usage .bar { height: 8px; margin-top: var(--s-2); border-radius: 4px; background: var(--g-10); overflow: hidden; }
.usage .bar i { display: block; height: 100%; background: var(--green); border-radius: 0 4px 4px 0; }

/* =================================================================
   Version 4's shared components (DIRECTION-v4.md section 3)
   ================================================================= */

/* 3.1 The gray-stroke container, one per object: a figure, a policy, a door, a step, a task, a message
   list. Lists of rows, charts and paragraphs stay open on white. The edge is an inset shadow, so the
   hover edge swaps it without moving anything; no container casts a shadow, only floating things do.
   Spacing: group title to its containers 16, between containers --gap-cards, between groups 48. */
.box { position: relative; background: var(--canvas); border-radius: var(--r-lg); box-shadow: var(--edge); padding: var(--pad-card); }
.box.tile { padding: var(--pad-tile); }
.box.flush { padding: 0; overflow: hidden; }                      /* a list of rows inside, rows edge to edge */
.box.dashed { box-shadow: none; border: 1px dashed var(--field); padding: calc(var(--pad-card) - 1px); }  /* something you don't have yet; 3.41:1 */
.box-head { display: flex; align-items: center; gap: var(--s-4); }
.box-head > img { width: 48px; height: 48px; flex: none; }         /* one DS illustration per container, on white */
.box-head h2, .box-head h3 { font-size: var(--fs-section); line-height: var(--lh-section); font-weight: 700; }
.boxes { display: grid; gap: var(--gap-cards); }

/* 3.2 The stat group: a Section title, the tiles 16 under it. Inside a tile: the figure (28 Regular),
   the label 4 under it (15 Bold), the note in its own zone under a hairline (14 gray, led by a 16 icon
   or made of a chip). The whole tile is one <a> with no control inside; lime never goes in a tile. */
.stat-group h2 { margin-bottom: var(--s-4); }
.tiles-wrap { container-type: inline-size; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-cards); list-style: none; margin: 0; padding: 0; }
.tile { display: flex; flex-direction: column; height: 100%; box-sizing: border-box; color: var(--ink); text-decoration: none; transition: background-color var(--t-hover); }
.tile .top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); }
.tile .fig { font-size: var(--fs-title); line-height: var(--lh-title); letter-spacing: var(--track-tight); font-variant-numeric: tabular-nums; }
.tile .art { width: 48px; height: 48px; flex: none; margin: -4px -4px 0 0; }
.tile .lbl { margin: 4px 0 var(--s-4); font-weight: 700; line-height: var(--lh-ui); max-width: 24ch; }
.tile .note { margin-top: auto; padding-top: var(--s-3); border-top: 1px solid var(--line); display: flex; align-items: center; gap: var(--s-2); min-height: calc(28px + var(--s-3) + 1px); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }   /* a 28 line (a chip's height), not 20, so the hairlines line up across a row; border-box, so the 12 above and the hairline are added */
.tile .note svg.i { width: 16px; height: 16px; color: var(--green-strong); stroke-width: 1.5; }
a.tile:hover { background: var(--hover); }
a.tile:hover .lbl { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a.tile:active { background: var(--pressed); }
a.tile:active .note { color: var(--ink-2-press); }
a.tile:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@container (max-width: 719px) { .tiles { grid-template-columns: minmax(0, 1fr); } }
/* Each tile takes three of its row's tracks (the top, the label, the note) as a subgrid, so the notes' hairlines line up across a
   row even when one label or note runs to two lines. The note then sits at the top of its track, not pushed down by margin-top: auto */
.tiles > li { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
.tiles > li > .tile { grid-row: span 3; display: grid; grid-template-rows: subgrid; row-gap: 0; height: auto; }
.tiles > li > .tile > .note { margin-top: 0; }
/* The band (version 5): the three tiles joined into one container, split by hairlines, so the numbers read as one
   quiet row. Each column is still its own link and washes on its own */
.tiles.band { gap: 0; border: 1px solid var(--stroke); border-radius: var(--r-lg); overflow: hidden; }   /* a border, not the inset edge: the tiles' white would paint over an inset shadow */
.tiles.band > li + li { border-left: 1px solid var(--line); }
.tiles.band .tile { border-radius: 0; box-shadow: none; }
.tiles.band a.tile:focus-visible { outline-offset: -2px; }
/* Joined, the three columns hold down to a 560 container (laptop widths keep the row), then stack */
@container (min-width: 560px) and (max-width: 719px) { .tiles.band { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 559px) { .tiles.band > li + li { border-left: 0; border-top: 1px solid var(--line); } }

/* 3.3 Hover, pressed and focus. Opens another page and holds one fact: the green wash across the whole
   target, the name underlines, pressed is --pressed with --ink-2 swapped for --ink-2-press. Holds a
   chart, a bar or a control: Fennia's green double edge (a wash would hide the light greens inside),
   the heading link underlines. In a washed target green words use --green-text or --green-strong,
   never --green. Color only, 120ms; nothing moves or lifts. Focus stays the 2px --focus ring. */
.box.wash { transition: background-color var(--t-hover); }
a.box.wash, button.box.wash { color: var(--ink); text-decoration: none; }
a.box.wash:hover, button.box.wash:hover { background: var(--hover); }
a.box.wash:active, button.box.wash:active { background: var(--pressed); --ink-2: var(--ink-2-press); }
.box.edged { transition: box-shadow var(--t-hover); }
.box.edged:hover { box-shadow: var(--edge-hover); }
.box.edged:has(.cover:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.box.edged .cover { color: var(--ink); text-decoration: none; }
.box.edged:hover .cover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.box.edged .cover:focus-visible { outline: none; }
.box.edged .cover::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }  /* the stretched link */
.box.edged .above { position: relative; z-index: 2; }                          /* a fix, a chip or a button inside */

/* 3.4 Icon tiles: a line icon gets a shape and a color without getting heavier. Decorative: the SVG is
   aria-hidden and the words beside it carry the meaning. 32 (.sm) step pips; 40 panels, rows, chips,
   buy cards, case rows (.round); 48 (.lg) policy cards, slots, claim-type and step cards, a policy's head */
.it { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); flex: none; background: var(--g-10); color: var(--green-strong); }
.it svg.i { width: 20px; height: 20px; stroke-width: 1.5; }
.it.sm { width: 32px; height: 32px; border-radius: 10px; }
.it.sm svg.i { width: 16px; height: 16px; }
.it.lg { width: 48px; height: 48px; border-radius: 14px; }
.it.lg svg.i { width: 24px; height: 24px; }
.it.round { border-radius: 50%; }                         /* a person (initials) or a risk area */
.it.attn { background: var(--attn); color: var(--ink); }  /* only the one task */
.it.ghost { background: var(--canvas); box-shadow: inset 0 0 0 1px var(--line-2); }  /* something you don't have yet */
.it.ended { background: var(--fill); color: var(--ink-2); }
.it .ini { font-size: var(--fs-small); line-height: 1; font-weight: 700; color: var(--green-strong); }

/* 3.5 Illustrations: only Fennia's own, always alt="", drawn by core.js art(name, size) as img.art with
   width and height attributes (48 in tiles, container heads and info boxes; 64 in empty states and
   notices), and piece(name) for the green-moment pieces. The spot art carries its own pale mint
   backdrop, so it sits on white only; the pieces sit on mint only. Never in rows, tables, charts, the
   needs finder's question column, or page heads (a policy page's tile excepted) */
img.art { flex: none; }
.piece-disc { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: var(--g-10); }   /* a piece on a 96 mint disc: the buy flow's all-waiting page */
.piece-disc > img { width: 64px; height: 64px; }

/* 3.6 Charts and bars. The case bar (If something went wrong tomorrow): its own width is the case's
   cost against the largest cost in the set; inside, .pay is pay / cost, .chg is change / cost, and the
   rest stays white. role="img" with a sentence; the legend is aria-hidden. Case rows never wash (a
   wash would hide the lime and the outline). */
.casebar { display: flex; height: 12px; border-radius: 3px; overflow: hidden; background: var(--case-left); outline: 1px solid var(--case-edge); outline-offset: -1px; }  /* outlines paint above the segments */
.casebar > i { display: block; height: 100%; flex: none; }
.casebar .pay { background: var(--case-pay); }
.casebar .chg { background: var(--case-change); border-left: 1px solid var(--canvas); }
.casebar.mini { height: 8px; border-radius: 2px; }
.casebar.lg { height: 16px; border-radius: 4px; }
.case-legend { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.legend-sw { display: inline-block; width: 16px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 1px; }
.legend-sw.pay { background: var(--case-pay); }
.legend-sw.chg { background: var(--case-change); }
.legend-sw.left { background: var(--case-left); outline: 1px solid var(--case-edge); outline-offset: -1px; }
/* One color per policy, as a class: the spend bar's shares and swatches, an invoice's "What it's for" bars */
.pol-accident { background: var(--pol-accident); }
.pol-liability { background: var(--pol-liability); }
.pol-property { background: var(--pol-property); }
.pol-legal { background: var(--pol-legal); }
.pol-interruption { background: var(--pol-interruption); }
.pol-extra { background: var(--pol-extra); box-shadow: inset 0 0 0 1px var(--g-40); }   /* 1.2:1 on white without the edge; the amount and name are printed under it */

/* 3.15 The file chip, button.file-chip from core.js fileChip() (a thread, a claim, a notice; white also
   inside a mint bubble): a 40 mint tile with the file icon, the name (.fc-n, one line, ellipsis) over
   "PDF, 210 KB" (.fc-m), a 20 download icon. Hover washes. Accessible name "Download Police report.pdf, PDF, 210 KB" */
.file-chip { display: inline-grid; grid-template-columns: 40px minmax(0, 1fr) 20px; align-items: center; gap: var(--s-3); max-width: 100%; padding: 8px var(--s-4) 8px 8px; border-radius: var(--r-md); background: var(--canvas); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); text-decoration: none; text-align: left; transition: background-color var(--t-hover); }
.file-chip .fc-t { display: grid; min-width: 0; }
.file-chip .fc-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: var(--lh-ui); }
.file-chip .fc-m { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
/* On a phone a file's name wraps instead of ending in "…" (up to four lines), and under 480 the decorative tile gives its room to
   the name, so "Certificate of insurance, liability insurance.pdf" reads whole inside a bubble at 320 */
@media (max-width: 639px) { .file-chip .fc-n { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; } }
@media (max-width: 479px) { .file-chip { grid-template-columns: minmax(0, 1fr) 20px; padding-left: var(--s-3); } .file-chip > .it { display: none; } }
.file-chip > svg.i { width: 20px; height: 20px; color: var(--ink); }
.file-chip:hover { background: var(--hover); }
.file-chip:hover .fc-n { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.file-chip:active { background: var(--pressed); --ink-2: var(--ink-2-press); }
.file-chips { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* =================================================================
   Floating: command bar, tour, prototype switcher
   ================================================================= */
.scrim { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 12vh var(--s-4) var(--s-4); background: var(--scrim-soft); }
.cmdk { width: 100%; max-width: 640px; background: var(--canvas); border-radius: var(--r-lg); box-shadow: var(--shadow-pop), 0 0 0 1px var(--line); overflow: hidden; display: flex; flex-direction: column; max-height: 76vh; }
.cmdk-in { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-4) var(--s-4) 20px; border-bottom: 1px solid var(--line); }
.cmdk-in:has(input:focus-visible) { box-shadow: inset 0 -2px 0 var(--focus); }
.cmdk-in > svg.i { color: var(--ink-2); }
.cmdk-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: var(--fs-lead); line-height: var(--lh-lead); color: var(--ink); }
.cmdk-in input::placeholder { color: var(--ink-2); opacity: 1; }
.cmdk-pop { display: flex; flex-wrap: wrap; gap: var(--s-2); padding: var(--s-4) 20px 0; }
.cmdk-pop button { min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.cmdk-pop button:hover { background: var(--hover); box-shadow: inset 0 0 0 1px var(--field); }
.cmdk-list { padding: var(--s-2); overflow-y: auto; }
.cmdk-list[hidden], .cmdk-empty[hidden] { display: none; }
.cmdk-item { display: grid; grid-template-columns: var(--icon) minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); width: 100%; min-height: 56px; padding: 8px 12px; border-radius: var(--r-md); text-align: left; }
.cmdk-item:hover, .cmdk-item[aria-selected="true"] { background: var(--hover); }
.cmdk-item:active { background: var(--pressed); --ink-2: var(--ink-2-press); }
.cmdk-item .t { display: block; line-height: var(--lh-ui); }
.cmdk-item .s { display: block; color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.cmdk-item .end { display: flex; align-items: center; gap: var(--s-3); }
.cmdk-item .enter { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); visibility: hidden; }
.cmdk-item[aria-selected="true"] .enter { visibility: visible; }
.cmdk-empty { margin: 0; padding: var(--s-6) var(--s-5); color: var(--ink-2); text-align: center; }
@media (max-width: 767px) {
  .scrim { padding: 0; }
  .cmdk { max-width: none; height: 100%; max-height: none; border-radius: 0; }
  .cmdk-list { flex: 1; }
  .cmdk-in kbd { display: none; }
  .cmdk-item .enter { display: none; }
}

.coach-hole { position: fixed; z-index: 84; border-radius: var(--r-lg); box-shadow: 0 0 0 9999px var(--scrim); pointer-events: none; transition: all .3s var(--ease); }
.coach { position: fixed; z-index: 85; width: 360px; max-width: calc(100vw - 32px); padding: var(--s-5); background: var(--canvas); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); transition: top .3s var(--ease), left .3s var(--ease); }
.coach h3 { font-size: var(--fs-section); line-height: var(--lh-section); }
.coach p { margin-top: var(--s-2); }
.coach .coach-note { margin-top: var(--s-3); padding: var(--s-2) var(--s-3); border-radius: var(--r-md); background: var(--sunk); color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.coach .acts { margin-top: var(--s-5); display: flex; align-items: center; gap: var(--s-4); }
.coach .count-t { margin-left: auto; color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); }

/* The prototype switcher (a tool for reviewers, not part of the design; its own small type is exempt) */
.proto { position: fixed; z-index: 60; right: 16px; bottom: 16px; font-size: 12px; line-height: 1.4; }
.proto > button { display: flex; align-items: center; gap: 8px; height: var(--proto-h); padding: 0 14px; border-radius: 999px; background: var(--proto-bg); color: var(--inverse-ink); box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.proto > button i { width: 8px; height: 8px; border-radius: 50%; background: var(--green-line); }
.proto > button:focus-visible { outline: 2px solid var(--inverse-ink); outline-offset: 0; box-shadow: 0 0 0 4px var(--focus); }
.proto-menu { position: absolute; right: 0; bottom: 44px; width: 280px; max-height: 76vh; overflow-y: auto; padding: 8px; border-radius: 12px; background: var(--proto-bg); color: var(--inverse-ink); box-shadow: 0 12px 32px rgba(0,0,0,.3); }
.proto-menu[hidden] { display: none; }
.proto-menu .g { padding: 10px 8px 4px; color: var(--proto-ink-2); }
.proto-menu a, .proto-menu button { display: flex; justify-content: space-between; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 6px; color: var(--inverse-ink); text-decoration: none; text-align: left; }
.proto-menu a:hover, .proto-menu button:hover { background: var(--proto-hover); }
.proto-menu button[aria-pressed="true"]::after { content: "on"; color: var(--green-line); }
.proto-menu :focus-visible { outline: 2px solid var(--inverse-ink); outline-offset: 0; }
.proto-menu .note { padding: 10px 8px 4px; color: var(--proto-ink-2); border-top: 1px solid var(--proto-hover); margin-top: 8px; }
@media (max-width: 1023px) { .proto.over-tabbar { bottom: calc(var(--tabbar-h) + var(--proto-gap)); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* The switcher's "Motion: off" (version 6, 2.4) does what reduced motion does; css/motion.css keeps its short cross-fade for page changes */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; transition: none !important; }

/* Forced colors (Windows High Contrast) drop box-shadow edges and background fills, which draw the shared controls' edges and
   states: checkboxes, fields, buttons and containers take a system-colored border, and a ticked checkbox keeps a Highlight fill
   (its white tick is an image, so it shows on it). Area files add their own controls (claimflow, covered, certs, flow) */
@media (forced-colors: active) {
  .cbox { border: 1px solid ButtonText; }
  input.cbox:checked { forced-color-adjust: none; background-color: Highlight; border-color: Highlight; }
  .field input, .field textarea { border: 1px solid CanvasText; }
  .btn { border: 1px solid ButtonText; }
  .box { border: 1px solid CanvasText; }
}
