/* flow: the welcome page, the needs finder (split window, live panel, work field, choice cards, amounts, offers) and the green moment.
   Loaded first of the area files, so buy, overview and messages reuse these parts. */

/* =================================================================
   The welcome page
   ================================================================= */
.bare-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); height: 72px; padding: 0 var(--page-x); }
.bare-top .logo, .gm-top .logo { flex: none; }
@media (max-width: 399px) { .bare-top .langs a[aria-current] { display: none; } }   /* the globe stays, so the two words read as languages */
.bare .qfoot-wide > nav { max-width: none; }
.bare-top .rail-lang { padding: 0; }
.welcome { max-width: 640px; margin: 0 auto; padding: var(--s-9) var(--page-x) 0; text-align: center; }
.welcome:focus { outline: none; }
.welcome h1 { font-size: var(--fs-display); line-height: var(--lh-display); color: var(--green); }
.welcome .lead { max-width: 48ch; margin: var(--s-4) auto 0; }
.welcome .btns { margin-top: var(--s-6); display: flex; justify-content: center; }
.welcome .pair { justify-content: center; }
/* The two buttons stack with the primary on top at every width; the faded overview peek under them is gone (17 October 2026) */
.welcome .pair { flex-direction: column; align-items: center; }
.welcome { padding-bottom: var(--s-9); }
.bare:has(> .welcome) { min-height: 100vh; display: flex; flex-direction: column; }   /* the footer at the window's foot */
.bare:has(> .welcome) > .welcome { flex: 1 0 auto; width: 100%; }
@media (max-width: 479px) { .welcome .pair { width: 100%; align-items: stretch; } .welcome .pair .btn { width: 100%; } }

/* =================================================================
   The needs finder
   ================================================================= */
.flow { display: grid; grid-template-columns: minmax(0, 1fr) var(--live-w); min-height: 100vh; }
.flow-left { position: relative; display: flex; flex-direction: column; padding: 0 var(--flow-x) 40px; min-width: 0; }
.flow-head { position: absolute; top: 40px; left: var(--flow-x); width: min(var(--flow-max), calc(100% - 2 * var(--flow-x))); display: flex; align-items: center; gap: var(--s-4); height: 32px; }
.flow-head .logo { flex: none; }
.progress { margin-left: auto; display: flex; align-items: center; gap: var(--s-3); white-space: nowrap; }
.progress ol { display: flex; gap: 4px; }
.progress li { width: 20px; height: 4px; border-radius: 2px; background: var(--line-2); }
.progress li.done { background: var(--green); }
.progress li.now { background: var(--ink); }
.progress .pt { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.progress .pt-short { display: none; }
.flow-head .icon-btn { margin-right: -8px; }
.flow-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.flow-main:focus { outline: none; }
.flow-body { width: 100%; max-width: var(--flow-max); padding-top: var(--flow-top); }
.flow-body:focus { outline: none; }
.flow-body h1 { color: var(--green); text-box: trim-both cap alphabetic; }
.flow-body h1 .soft { color: var(--ink-2); }
.flow-body .lead { margin-top: var(--s-4); max-width: 54ch; }
.flow-body > .lead + *, .flow-body > h1 + *:not(.lead) { margin-top: var(--s-6); }
.flow-foot { margin-top: auto; padding-top: var(--s-7); width: 100%; max-width: var(--flow-max); display: flex; align-items: center; gap: var(--s-3) var(--s-5); flex-wrap: wrap; }
.flow-foot { justify-content: space-between; }
/* The side group is .ff-side (flow.js's flowFoot(); it was .fl, which the Payments year list's .fl rule also hit) */
.flow-foot .ff-side { display: flex; align-items: center; gap: var(--s-3) var(--s-5); flex-wrap: wrap; }
.flow-foot .ff-side:empty { display: none; }
.ob-sum { display: none; margin-top: var(--s-7); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--sunk); max-width: var(--flow-max); }
.ob-sum a { display: inline-block; }
@media (max-width: 1279px) { .progress .pt-full { display: none; } .progress .pt-short { display: inline; } }
/* push: also answers to the page area's width (branch ai-drawer README, the push layout) */
@container app (max-width: 1279px) { .progress .pt-full { display: none; } .progress .pt-short { display: inline; }}
@media (max-width: 1023px) {
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow-left { padding: 32px var(--flow-x) 32px; }
  .flow-head { position: static; width: auto; max-width: 640px; }
  .flow-body { padding-top: var(--s-6); max-width: 640px; }
  .flow-foot { max-width: 640px; }
  .ob-sum { display: block; max-width: 640px; }
}
@media (max-width: 639px) {
  .flow-body { padding-top: var(--s-5); }
  .flow-foot { width: auto; max-width: none; position: sticky; bottom: 0; z-index: 10; margin: var(--s-6) calc(-1 * var(--flow-x)) -32px; padding: var(--s-4) var(--flow-x) calc(var(--s-4) + env(safe-area-inset-bottom)); background: var(--canvas); border-top: 1px solid var(--line); flex-direction: column; align-items: stretch; }
  .flow-foot { gap: var(--s-3); padding-top: var(--s-3); }
  .flow-foot .ff-side { flex-direction: row; justify-content: space-between; align-items: center; width: 100%; }
  .flow-foot .ff-side .btn { width: auto; }
  .flow-foot .ff-side .link { min-height: 44px; order: 2; }
  .flow-foot .btn { width: 100%; }
  .progress ol { display: none; }
}

/* The dark live panel */
.live { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: var(--flow-top) var(--live-x) 40px; background: var(--inverse); color: var(--inverse-ink); }
.live:focus { outline: none; }
.live:focus-visible { outline: 2px solid var(--inverse-ink); outline-offset: -6px; }
.live { container-type: inline-size; }
@container (max-width: 399px) { .risk .lvl { grid-column: 2 / -1; grid-row: 2; justify-self: start; } .risk .s { grid-row: 3; } }
.live h2 { font-size: var(--fs-lead); line-height: var(--lh-lead); font-weight: 400; max-width: 26ch; text-box: trim-both cap alphabetic; margin-top: var(--live-align); }
.live h2 .soft { color: var(--inverse-ink-2); }
.live .live-sub { margin-top: var(--s-3); color: var(--inverse-ink-2); max-width: 44ch; }
.live-rows { margin-top: 40px; border-top: 1px solid var(--inverse-line); }
.risk { display: grid; grid-template-columns: var(--icon-lg) minmax(0, 1fr) auto; gap: 4px 20px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--inverse-line); }
.risk > svg.i { width: 24px; height: 24px; color: var(--inverse-ink-2); }
.risk .t { font-weight: 700; line-height: var(--lh-ui); }
.risk .lvl { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--inverse-ink-2); white-space: nowrap; }
.risk .s { grid-column: 2 / -1; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--inverse-ink-2); max-width: 52ch; }
.risk.unknown .t { color: var(--inverse-ink-2); font-weight: 400; }
.meter { display: inline-flex; gap: 3px; }
.meter i { width: 16px; height: 6px; border-radius: 3px; box-shadow: inset 0 0 0 1px var(--inverse-ink-2); }
.meter i.on { background: var(--green-line); box-shadow: none; }
.cbar { padding: 20px 0; border-bottom: 1px solid var(--inverse-line); }
.cbar .h { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); }
.cbar .n { line-height: var(--lh-ui); }
.cbar .p { white-space: nowrap; }
.cbar .p b { font-weight: 700; }
.cbar .p i { font-style: normal; font-size: var(--fs-small); color: var(--inverse-ink-2); }
.cbar .tr { height: 4px; margin-top: 10px; border-radius: 2px; background: var(--green-line); }
.cbar.off .n { color: var(--inverse-ink-2); }
.cbar.off .p { font-size: var(--fs-small); color: var(--inverse-ink-2); }
.cbar.off .tr { background: none; box-shadow: inset 0 0 0 1px var(--inverse-ink-2); }
.live .price { margin-top: 40px; }
.live-safe { margin-top: auto; padding-top: var(--s-5); display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--inverse-ink-2); }
.live-safe svg.i { width: 16px; height: 16px; }
@media (max-width: 1023px) { .live { position: static; height: auto; padding: 40px var(--flow-x) 48px; } }

/* The Price card (Fennia's Price component) */
.price { padding: var(--s-5) 28px; border-radius: var(--r-lg); background: var(--mint); color: var(--green-strong); }
.price .est { display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; }
.price .est b { font-size: var(--fs-title); line-height: var(--lh-title); font-weight: 400; letter-spacing: var(--track-tight); font-variant-numeric: tabular-nums; }
.price .est-sub { margin-top: var(--s-1); font-size: var(--fs-small); line-height: var(--lh-small); }
.price .line { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); padding: 6px 0; }
.price .line b { font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price .line.total { font-weight: 700; }
.price .line.total b { font-size: var(--fs-title); line-height: var(--lh-title); letter-spacing: var(--track-tight); font-weight: 400; }
.price .line.other { font-size: var(--fs-small); line-height: var(--lh-small); }
.price hr { border: 0; height: 1px; background: var(--price-rule); margin: var(--s-3) 0; }
.price .acts { margin-top: var(--s-4); display: flex; justify-content: flex-end; }

/* Company step */
.found { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-5); flex-wrap: wrap; padding-bottom: var(--row-y); border-bottom: 1px solid var(--line); }
.found .t { font-weight: 700; line-height: var(--lh-ui); }
.found .meta { color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); margin-top: 2px; }
.form { display: grid; gap: var(--s-5); }
.flow-body .found + .kv { margin-top: 0; }

/* The work field: a search combobox with chips */
.wf-labelrow { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-2); }
.wf-labelrow label { font-weight: 700; line-height: var(--lh-ui); }
.wf-labelrow .small { color: var(--ink-2); }
.wf-anchor { position: relative; }
.wf-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: var(--field-h); padding: 6px 8px 6px 12px; border-radius: var(--r-md); background: var(--canvas); box-shadow: inset 0 0 0 1px var(--field); cursor: text; }
.wf-box:hover { box-shadow: var(--edge-hover); }
.wf-box:focus-within { box-shadow: inset 0 0 0 2px var(--green); }
.wf-box.invalid { box-shadow: inset 0 0 0 2px var(--error); }
.wf-box.invalid:focus-within { box-shadow: inset 0 0 0 2px var(--error), 0 0 0 2px var(--canvas), 0 0 0 4px var(--focus); }
.wf-box { position: relative; padding-left: 40px; }
.wf-box > svg.i { position: absolute; left: 12px; top: 14px; color: var(--ink-2); }
.wf-chips { display: contents; }
.wf-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 4px 0 10px; border-radius: var(--r-pill); background: var(--fill); font-size: var(--fs-small); line-height: var(--lh-small); white-space: nowrap; max-width: 100%; }
.wf-chip > span { overflow: hidden; text-overflow: ellipsis; }
.wf-chip > svg.i { width: 16px; height: 16px; }
.wf-x { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--ink); flex: none; }
.wf-x:hover { background: var(--line-2); }
.wf-x svg.i { width: 16px; height: 16px; }
.wf-box input { flex: 1 1 200px; min-width: 190px; height: 36px; border: 0; outline: 0; background: none; padding: 0 4px; font-size: var(--fs-body); line-height: var(--lh-ui); color: var(--ink); }
.wf-box input::placeholder { color: var(--ink-2); opacity: 1; }
.wf-box input[hidden] { display: none; }
.wf-pop { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40; padding: 6px; background: var(--canvas); border-radius: var(--r-lg); box-shadow: var(--shadow-pop), 0 0 0 1px var(--line-2); }
.wf-scroll { max-height: 312px; overflow-y: auto; }
.wf-pop[hidden] { display: none; }
.wf-opt { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); min-height: 52px; padding: 8px 12px; border-radius: var(--r-md); cursor: pointer; }
.wf-opt:hover, .wf-opt.on { background: var(--hover); }   /* the pointer's option and the keyboard's look the same */
.wf-txt { display: grid; min-width: 0; }
.wf-opt[aria-disabled="true"] { cursor: default; }
.wf-tile { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--v8-r-sm); box-shadow: inset 0 0 0 1px var(--line-2); }
.wf-tile svg.i { width: 20px; height: 20px; }
.wf-opt .n { line-height: var(--lh-ui); }
.wf-opt .n b { font-weight: 700; }
.wf-opt .g { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.wf-opt .end { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.wf-opt:not(.on) .end.hint { visibility: hidden; }
.wf-opt .end.added { color: var(--green-text); }
.wf-opt .end svg.i { width: 16px; height: 16px; }
.wf-sep { height: 1px; background: var(--line); margin: 6px 0; }
.wf-written .wf-tile { background: var(--wash); box-shadow: none; color: var(--green); }
.wf-written .n { color: var(--green-text); }
.wf-notes { margin-top: var(--s-3); display: grid; gap: var(--s-2); }
.wf-notes:empty { display: none; }
.wf-notes .note { display: flex; gap: var(--s-2); color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.wf-notes .note svg.i { width: 16px; height: 16px; margin-top: 2px; }

/* Choice cards: an icon on the left, no radio */
.choices { display: grid; gap: var(--s-2); }
.choices.row2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.choice { position: relative; display: grid; grid-template-columns: var(--icon-lg) minmax(0, 1fr); align-items: center; gap: var(--s-3); min-height: 56px; padding: 12px 16px; border-radius: var(--r-md); background: var(--canvas); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; }
.choice.noicon { grid-template-columns: minmax(0, 1fr); }
.choice > svg.i { width: 24px; height: 24px; }
.choice:hover { box-shadow: var(--edge-hover); }
.choice:has(input:checked) { background: var(--wash); box-shadow: inset 0 0 0 2px var(--green); font-weight: 700; }
.choice:has(input:checked) > svg.i { color: var(--green-text); }
.choice:has(input:focus-visible) { outline: var(--v8-focus); outline-offset: 0; box-shadow: var(--v8-focus-glow); }
.qset legend { font-weight: 700; line-height: var(--lh-ui); margin-bottom: var(--s-3); }
.qset + .qset { margin-top: var(--s-6); }
@media (max-width: 639px) { .choices.row2 { grid-template-columns: minmax(0, 1fr); } }

/* Amounts: a field and the DS slider */
.amount-q + .amount-q { margin-top: var(--s-7); }
.amount-q .top { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: var(--s-4); align-items: center; }
.amount-q .q { font-weight: 700; line-height: var(--lh-ui); display: block; }
.amount-q .s { display: block; color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); margin-top: 2px; }
.amount-q .field input { text-align: right; font-variant-numeric: tabular-nums; }
.amount-q input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; margin: var(--s-4) 0 0; background: none; cursor: pointer; --p: 50%; }
.amount-q input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(to right, var(--green) var(--p), var(--line) var(--p)); }
.amount-q input[type="range"]::-moz-range-track { height: 8px; border-radius: 4px; background: var(--line); }
.amount-q input[type="range"]::-moz-range-progress { height: 8px; border-radius: 4px; background: var(--green); }
.amount-q input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; background: var(--canvas); box-shadow: inset 0 0 0 2px var(--green), var(--shadow-thumb); }
.amount-q input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--canvas); box-shadow: inset 0 0 0 2px var(--green), var(--shadow-thumb); }
.amount-q input[type="range"]:focus-visible { outline: none; }
.amount-q input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: inset 0 0 0 2px var(--green), 0 0 0 2px var(--canvas), 0 0 0 4px var(--focus); }
.amount-q input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: inset 0 0 0 2px var(--green), 0 0 0 2px var(--canvas), 0 0 0 4px var(--focus); }
.scale-l { display: flex; justify-content: space-between; margin-top: 4px; color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.well { margin-top: var(--s-7); padding: var(--s-5); border-radius: var(--r-lg); background: var(--sunk); }
.well .bars { margin-top: var(--s-4); display: grid; gap: var(--s-3); }
.well .b { display: grid; grid-template-columns: 170px minmax(0, 1fr) 72px; align-items: center; gap: var(--s-3); }
.well .b .tr { height: 8px; border-radius: 0 4px 4px 0; background: var(--data-other); }
.well .b .tr.g { background: var(--data-you); }
.well .b .n { text-align: right; font-variant-numeric: tabular-nums; }
.well .foot-l { margin-top: var(--s-4); display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); }
@media (max-width: 479px) { .well .b { grid-template-columns: 110px minmax(0, 1fr) 64px; } .amount-q .top { grid-template-columns: minmax(0, 1fr) 128px; } }

/* Offer rows (Policies step and the new-customer overview) */
.offers > .offer-row { border-top: 1px solid var(--line); }
.offers > .offer-row:first-of-type { border-top: 0; }
.offer-row { display: grid; grid-template-columns: var(--icon-lg) minmax(0, 1fr) auto; gap: var(--s-4); align-items: start; padding: var(--row-y) 0; }
.offer-row .t { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; font-weight: 700; line-height: var(--lh-ui); cursor: pointer; }
.offer-row .law { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: var(--fs-small); line-height: var(--lh-small); }
.offer-row .law svg.i { width: 16px; height: 16px; }
.offer-row .s { margin-top: 4px; color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); max-width: 56ch; }
.offers-wrap { margin-top: var(--s-6); }
.offer-cont { container-type: inline-size; }
@container (max-width: 479px) { .offer-row { grid-template-columns: var(--icon-lg) minmax(0, 1fr); } .offer-row .p { grid-column: 2; } .offer-row .p .price-pair { justify-items: start; } }

/* The green moment (Fennia's end-of-purchase screen) */
.gm-page { min-height: 100vh; display: flex; flex-direction: column; }
.gm-top { display: flex; align-items: center; height: 72px; padding: 0 var(--page-x); }
.gm { background: var(--mint); padding: 72px 0; }
.gm:focus { outline: none; }
.gm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px) minmax(0, 1fr); gap: var(--s-5); align-items: center; }
.gm-side { width: 100%; max-width: 496px; height: auto; }
.gm-side.l { justify-self: start; }
.gm-side.r { justify-self: end; }
.gm-pieces { display: none; justify-content: center; gap: var(--s-4); }
.gm-pieces img { width: 64px; height: 64px; }
/* Each piece in its own box, clipped at its bottom edge (room above for the rise's overshoot), so it rises out of it (motion.css) */
.gm-pieces .gm-b { display: block; clip-path: inset(-12px -12px 0 -12px); }
@media (max-width: 359px) { .gm-pieces { gap: var(--s-2); } .gm-pieces img { width: 56px; height: 56px; } }
.gm-list { container-type: inline-size; }
.gm-pieces.top { margin-bottom: var(--s-6); }
.gm-pieces.bottom { margin-top: var(--s-6); }
.gm-msg { padding: 0 var(--s-4); }
.gm-msg h1 { font-size: var(--fs-display); line-height: var(--lh-display); color: var(--green-strong); text-align: center; }
.gm-msg .gm-p { margin-top: var(--s-5); text-align: center; }
.gm-list { margin-top: var(--s-6); padding: 4px 20px; border-radius: var(--r-lg); background: var(--canvas); }
.gm-list .row { padding: 14px 0; }
.gm-list .tot { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); padding: 14px 0; border-top: 1px solid var(--line); font-weight: 700; }
/* The order's prices stay on the right, on the total's edge. The .rows phone collapse (a 480 container) would fire at every
   width here, since this list is never wider than 408, and drop each price under its name */
.gm-list .row { grid-template-columns: var(--icon) minmax(0, 1fr) auto; }
.gm-list .row .v { grid-column: auto; grid-row: auto; text-align: right; }
.gm-list .row .v .price-pair { justify-items: end; }
.gm-feedback { margin-top: var(--s-6); text-align: center; }   /* centred with the title, its line and the buttons */
.gm-feedback h2 { font-size: var(--fs-body); line-height: var(--lh-ui); color: var(--ink); }
.gm-feedback p { margin-top: 2px; }
.gm-feedback .link { margin-top: var(--s-2); }
.gm-acts { margin-top: 40px; display: flex; justify-content: center; }
@media (max-width: 1279px) {
  .gm-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: var(--s-6); }
  .gm-side { display: none; }
  .gm-pieces { display: flex; }
  .gm-msg { width: 100%; max-width: 480px; }
}
/* push: also answers to the page area's width (branch ai-drawer README, the push layout) */
@container app (max-width: 1279px) {
  .gm-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: var(--s-6); }
  .gm-side { display: none; }
  .gm-pieces { display: flex; }
  .gm-msg { width: 100%; max-width: 480px; }}
@media (max-width: 479px) { .gm-acts .pair { flex-direction: column; width: 100%; } .gm-acts .btn { width: 100%; } }

/* Forced colors (Windows High Contrast): a choice card's edge and its chosen state are a box-shadow and a fill, both dropped
   there, so the card takes a system border and the chosen one a Highlight outline (its Bold label stays too) */
@media (forced-colors: active) {
  .choice { border: 1px solid ButtonText; }
  .choice:has(input:checked) { outline: 2px solid Highlight; outline-offset: -3px; }
}
