/* Escape Velocity — phone and tablet layout
 *
 * Loaded last. Found by going through every page at phone and tablet sizes (13 Oct 2026): rows of buttons that wrapped
 * mid-label, grids with one tile left over, a top bar that grew on short pages. Each rule says what it fixes.
 * 860px and under is the layout with the tab bar at the bottom; 600px and under is a phone.
 */

/* a label that looks like a button (Import a CSV) centres its words the way a real button does */
label.btn { display: inline-flex; align-items: center; justify-content: center; }

@media (max-width: 860px) {
  /* the top bar keeps its own height on a short page: the page takes the spare room, and the window is not made taller than
     the screen just to hold the tab bar */
  .app { grid-template-rows: auto minmax(0, 1fr); min-height: calc(100vh - var(--tabbar-space)); min-height: calc(100dvh - var(--tabbar-space)); }
  .sidebar { flex-wrap: nowrap; }
  .sidebar .brand { min-width: 0; }
  .sidebar .brand b { white-space: nowrap; }
  .sidebar .search-btn { flex: none; }


  /* More: the padlock and the dot sit in the corner of a tile, so they never squeeze its name onto a second line */
  .sheet-grid a { position: relative; min-height: 3.5rem; }
  .sheet-grid a > span:not(.due-dot) { min-width: 0; line-height: 1.25; }
  .sheet-grid a .lock-ic, .sheet-grid a .due-dot { position: absolute; top: .5rem; right: .55rem; margin: 0; }
  .sheet-grid a .lock-ic { width: .85rem; height: .85rem; }
  .sheet-grid a:last-child:nth-child(odd) { grid-column: 1 / -1; }          /* an odd tile out takes the whole last row */
  /* the long "Not financial advice…" entry has a row to itself, so it reads on one line (two on the smallest phone) and
     does not stretch its neighbour; a tile left alone just above it takes its whole row too */
  .sheet-grid a[href="#/disclaimer"], .sheet-grid a:nth-child(odd):has(+ a[href="#/disclaimer"]) { grid-column: 1 / -1; }
  /* More: search, text size, theme and secret mode as four even buttons, two rows of two */
  .sheet-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet-tools > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .sheet-tools > .btn, .sheet-fs .btn { width: 100%; min-height: 2.6rem; justify-content: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sheet-fs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
}
@media (max-width: 400px) {
  .sheet-grid a { padding: .8rem .7rem; gap: .55rem; font-size: .95rem; }
}

/* ---------- phones ---------- */
@media (max-width: 600px) {
  /* "Two quick steps": the words get the full width and Got it sits under them, on one line */
  .intro { flex-direction: column; gap: .8rem; }
  .intro .btn { white-space: nowrap; flex: none; align-self: flex-start; }

  /* 1M 3M 6M YTD 1Y All (and the other switches) stay on one row, in even steps */
  .seg { display: flex; width: 100%; }
  .seg button { flex: 1 1 auto; padding-inline: .4rem; white-space: nowrap; text-align: center; }   /* a long set still wraps, and each row fills the width */

  /* three or more buttons under a page title fill their rows edge to edge (two to a row, a third on its own) */
  .head-actions:has(> :nth-child(3)) > * { flex: 1 1 40%; padding-inline: .5rem; white-space: nowrap; }

  /* Update values: the name gets more of the row (the value box was wider than any amount needs) */
  .money:has(> .upd-in) { min-width: 0; width: 8.4rem; }
  .upd-in { width: 100%; }

  /* themes: two to a row, so the list is half as long */
  .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .theme-card small { font-size: .85rem; }

  /* share designs: three to a row (21 designs, seven full rows) and names in full */
  .share-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 359px) {
  .theme-grid { grid-template-columns: minmax(0, 1fr); }
  .share-grid { gap: .3rem; }
  .share-thumb { padding: .1rem; }
  .share-thumb span { font-size: .7rem; }
}

/* the calendar buttons: one under the other until there is room for two whole labels side by side */
@container remind (max-width: 27rem) { .remind-cal { grid-template-columns: minmax(0, 1fr); } }

/* small phones: the tab names fit their tabs, and the search button shrinks to its icon so the top bar stays one row */
@media (max-width: 380px) {
  #tabbar { padding-inline: .2rem; gap: .1rem; }
  #tabbar > * { font-size: .7rem; padding-inline: .1rem; letter-spacing: -.01em; }
  .start-steps .lbl { font-size: .78rem; overflow-wrap: normal; }
  .head-actions:has(> :nth-child(3)) > * { font-size: .94rem; }
}
@media (max-width: 340px) {
  #tabbar > * { font-size: .58rem; letter-spacing: -.02em; }
  .sidebar .search-btn > span { font-size: 0; }
  .sidebar .search-btn > span > span { font-size: 1.15rem; }
  .start-steps .lbl { font-size: .7rem; }
}

/* share designs: a name may take three lines before it is cut short ("My progress so far" lost its end) */
.share-thumb span { -webkit-line-clamp: 3; }

/* ---------- tablets (and wide phones on their side) ---------- */
/* share designs: seven to a row on a tablet (three full rows of 21), six where seven would cut the names short, and wide
   enough everywhere above that for the longest word in a name ("performers", "Checkpoint") */
@media (min-width: 601px) and (max-width: 733px) { .share-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 734px) and (max-width: 860px) { .share-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
@media (min-width: 861px) { .share-grid { grid-template-columns: repeat(auto-fill, minmax(5.6rem, 1fr)); } }
/* report tiles: two by two until four fit across (three across left one alone on the second row) */
@media (min-width: 561px) and (max-width: 1250px) {
  .templates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* "Somewhere else" closes the list of countries on a row of its own, whatever the number of columns */
.flag-grid > [data-act="startElsewhere"] { grid-column: 1 / -1; }

/* ---------- the way in (sign up, log in) on a small phone: the name and the button each stay on one line ---------- */
.auth-top .btn { white-space: nowrap; flex: none; }
.auth-brand { min-width: 0; }
.auth-brand b { white-space: nowrap; }
@media (max-width: 420px) {
  .auth-top { gap: .5rem; padding-inline: .9rem; }
  .auth-brand { gap: .5rem; }
  .auth-brand small { display: none; }
  .auth-brand svg { width: 2.1rem; height: 2.1rem; }
  .auth-brand b { font-size: 1rem; }
  .auth-top .btn { padding-inline: .7rem; }
}

/* the account page fills the width like every other page until the screen is wide (it stopped a little short of the right
   edge on a tablet, which read as a crooked margin) */
@media (max-width: 1250px) { .acct-stack, .acct-grid { max-width: none; } }

/* tablets held upright (and phones on their side): the investments and entries tables use the phone's short form (name with
   its type under it, value with its change under it), so the value is never off the side of the screen */
@media (min-width: 601px) and (max-width: 860px) {
  table.tbl-main .hide-sm { display: none; }
  table.tbl-main .show-sm-i { display: inline; }
  table.tbl-main .show-sm-i.nobr { white-space: nowrap; }
  table.tbl-main td .show-sm, table.tbl-main .show-sm { display: block; white-space: nowrap; }
  table.tbl-main td .show-sm.wrap-ok { white-space: normal; }
  table.tbl-main td:not(.r) { white-space: normal; }
}

/* Entries: the wide first column is for a name; here the first column is the date, so the room goes to the name next to it */
table.tbl-main:has(thead th:first-child[data-k="d"]) :is(th, td):first-child { min-width: 0; white-space: nowrap; }
table.tbl-main:has(thead th:first-child[data-k="d"]) :is(th, td):nth-child(2) { min-width: 11rem; white-space: normal; }
@media (max-width: 860px) { table.tbl-main:has(thead th:first-child[data-k="d"]) :is(th, td):nth-child(2) { min-width: 0; } }
table.tbl-main:has(thead th:first-child[data-k="d"]) td:first-child .nm { white-space: nowrap; }

/* ---------- "Better on a computer": the note across the top of a phone (mobile.js), shown once every three days ---------- */
:root { --desk-hint-h: 0px; }
.desk-hint { position: relative; z-index: 1; display: flex; align-items: center; gap: .8rem; padding: .6rem .9rem; padding-top: calc(.6rem + env(safe-area-inset-top, 0px));
  background: var(--card-solid); color: var(--ink); border-bottom: 1px solid var(--line); box-shadow: inset 0 -3px 0 var(--brand); }
.desk-hint p { margin: 0; flex: 1 1 auto; min-width: 0; font-size: .92rem; line-height: 1.35; }
.desk-hint .btn { flex: none; white-space: nowrap; min-height: 2.6rem; }
body.display-mode .desk-hint, body.booting .desk-hint { display: none; }
@media (max-width: 860px) { .app { min-height: calc(100vh - var(--tabbar-space) - var(--desk-hint-h)); min-height: calc(100dvh - var(--tabbar-space) - var(--desk-hint-h)); } }
body.gated .auth-shell { min-height: calc(100vh - var(--desk-hint-h)); min-height: calc(100dvh - var(--desk-hint-h)); }

/* Animations off (Settings) also stops the star field and the moving grid: they are drawn on the page itself, which the
   rule for "everything inside the page" did not reach */
body.no-anim::before, body.no-anim::after { animation: none !important; }

/* a long email address wraps inside its box instead of pushing the page wider than the screen (Settings, the account page
   and the way in all show it; with bigger text even a short address did this on a phone) */
.page-head p, .set-row b, .acct-card b, .acct-card p, .acct-stack b, .acct-stack p, .remind-email b, .sub b, .desk-hint p { overflow-wrap: anywhere; }
/* a dropdown never sticks out of its row, however long its longest choice and however big the text */
select { max-width: 100%; min-width: 0; }
label.field, .row-btns, .row-btns > *, .share-ctl-row > *, .f-row > * { max-width: 100%; min-width: 0; }

.share-ctl { grid-template-columns: minmax(0, 1fr); }      /* its rows wrap inside the card instead of setting the card's width */

/* ---------- the biggest text sizes on a small phone ---------- */
/* the top bar may use two rows again (the name on one line was made for normal text) */
@media (max-width: 860px) { .bigtext .sidebar { flex-wrap: wrap; } }      /* (on a wide screen the menu is a tall column: letting it wrap pushed the whole menu out of sight at the biggest size) */
.bigtext .sidebar .brand b, .bigtext .auth-brand b { white-space: normal; }
.bigtext .auth-top { flex-wrap: wrap; }
@media (max-width: 400px) {
  .bigtext .g-tiles, .bigtext .g-tiles[style], .bigtext .summary { grid-template-columns: minmax(0, 1fr) !important; }     /* one tile to a row: two no longer fit */
  .bigtext .seg { flex-wrap: wrap; }
  .bigtext .head-actions:has(> :nth-child(3)) > * { white-space: normal; }
}
.lv-risk > *, .lv-risk input[type=range] { min-width: 0; max-width: 100%; }

/* the list of investments just added, as cards on a phone: a tapped row lights up as one card, not as four separate boxes
   (the table's row highlight is drawn per cell, and here the cells are scattered around a grid) */
@media (max-width: 640px) {
  .start-table tbody tr:hover td, .start-table-wrap tbody tr:hover td:first-child { background: none; }
  .start-table tbody tr:hover { background: var(--brand-soft); }
}

/* Save as report: when Cancel has wrapped onto its own row (tablets), the "Give the report a name" message that floats
   under the name box no longer lands on top of it */
.save-rep:has(.field-err.float) { row-gap: 2.9rem; }

/* Donate on a phone: two short bricks fit side by side, and the QR code sits in the middle */
@media (max-width: 600px) {
  .brick.s { flex-basis: 7.5rem; }
  .brick.first .brick-msg { font-size: 1.18rem; }
  .brick.ghost ~ .brick.ghost ~ .brick.ghost { display: none; }      /* two empty bricks are enough to say there is room */
  .don-qr-box { margin-inline: auto; }
}

/* What changed most: the percentage sits beside the amount; on a narrow screen it goes under it so the name keeps its room */
.mv { display: inline-flex; align-items: baseline; justify-content: flex-end; gap: .6rem; }
.mv .mv-pct { font-size: .92em; font-weight: 600; }
@media (max-width: 480px) { .mv { flex-direction: column; align-items: flex-end; gap: 0; } }
.bigtext .mv { flex-direction: column; align-items: flex-end; gap: 0; }

/* ---------- Explanations are text now, and they differ in length: rows of fields and of figures keep their order ----------
   A row of fields: each label starts at the top of the row and each box ends on its bottom edge, so a longer explanation in one
   field never leaves its neighbours' boxes out of line. A row of figures: the label, then the figure, then the explanation. */
.f-row, .goal-form, .wish, .share-ctl-row, .gf-sel { align-items: stretch; }
label.field > :is(input, select, textarea, .money, .seg) { margin-top: auto; }
.f-row > :is(.btn, button, .linkbtn), .goal-form .gf-add, .wish .wish-btns, .share-ctl-row > :is(.btn, button) { align-self: flex-end; }
.f-row > div:has(> .f-label), .share-ctl-row > div:has(> .f-label) { display: flex; flex-direction: column; }
.f-row > div:has(> .f-label) > :is(.seg, .chips, select, .field), .share-ctl-row > div:has(> .f-label) > :is(.seg, .chips, select) { margin-top: auto; }
.f-label .tip-sub { font-weight: 500; }
.goal-form > .f-sm, .goal-form > .f-md { flex: 1 1 11rem; max-width: 16rem; }
.wish-share .gf-sel, .gf-share .gf-sel { align-items: flex-end; }

/* the page's own words under its title: the explanation of the title and the line the page adds read as one sub-heading */
.page-head h1 small.tip-sub[role] { font-size: 1.05rem; line-height: 1.5; margin: .25rem 0 0; font-weight: 400; max-width: 60ch; }
.page-head h1 + p, .page-head h1 + .tip-sub { margin-top: .2rem; }

/* switches (Progress cards options): two to a row, each explanation lined up under the words of its own switch */
.share-opts2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); gap: .8rem 1.6rem; }
label.switch:has(> small.tip-sub) { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .55rem; row-gap: .1rem; align-items: center; align-content: start; justify-items: start; }
label.switch:has(> small.tip-sub) > small.tip-sub[role] { grid-column: 2; flex: none; margin: 0; max-width: 42ch; }
.f-row > label.switch { align-self: flex-start; }
/* a Progress cards switch: its explanation, or why it is greyed out, lined up under its words, then a button when one can free it */
.share-sw { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .55rem; row-gap: .15rem; align-content: start; }
.share-sw > label.switch { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; }
.share-sw > .share-why { grid-column: 2; display: grid; justify-items: start; gap: .45rem; min-width: 0; }
.share-why small.tip-sub[role] { margin: 0; max-width: 42ch; }
.share-sw.is-off > label.switch { color: var(--muted); cursor: not-allowed; }
.share-sw.is-off > label.switch input { opacity: .55; }

/* the row of three figures on the dashboard's net worth card, and the four figures of a Die with zero verdict */
.hero-stats { grid-template-rows: auto auto auto; row-gap: 0; }
.hero-stats > div { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: .25rem; align-content: start; padding-bottom: .7rem; }
.hero-stats .hs-v { align-self: start; }
.hero-stats small.tip-sub[role] { margin: .1rem 0 0; font-size: .88rem; }
.kpis4 { grid-template-rows: auto auto auto; }
.kpis4 > div { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: .15rem; align-content: start; container-type: normal; }   /* (a container would stop the rows lining up across the tiles) */
.kpis4 > div > small:first-child { grid-row: 1; }
.kpis4 > div > b { grid-row: 2; }
.kpis4 > div > .kpi-rest { grid-row: 3; }
.kpi-rest > small.kpi-note { display: block; }
.kpi-rest > small.tip-sub[role] { margin: .35rem 0 0; font-size: .88rem; }
.kpi-rest > small.kpi-note + small.tip-sub[role] { margin-top: .25rem; }
/* the tiles (dashboard, Escape velocity): the label, the figure and then the note with its explanation each have a row that the tiles of one
   row share, so the figures line up however the labels wrap and the words under a figure follow it with no gap */
.g-tiles > .tile { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: .15rem; align-content: start; container-type: normal; }
.g-tiles > .tile > .t-label { display: block; grid-row: 1; }
.g-tiles > .tile > .t-num { grid-row: 2; margin-top: 0; }
.g-tiles > .tile > .t-note, .g-tiles > .tile > .t-rest { grid-row: 3; }
.t-rest > .t-note { margin-top: .15rem; }
.t-rest > small.tip-sub[role] { margin: .55rem 0 0; font-size: .88rem; }
.g-tiles > .tile .t-num { font-size: clamp(1.15rem, 1.8vw, 1.9rem); }      /* (the tile is no container: its figure is sized from the window) */
@media (max-width: 860px) { .g-tiles > .tile .t-num { font-size: clamp(1.05rem, 4.8vw, 1.9rem); } }
@media (max-width: 560px) { .kpis4 b.num { font-size: clamp(1rem, 4.6vw, 1.3rem); } }

/* a card's title with its explanation and then the line the card adds: both read as one sub-heading, in the same size */
h2 small.tip-sub[role] { font-size: 1.05rem; line-height: 1.5; font-weight: 400; margin: .3rem 0 0; max-width: 64ch; }
.card h2 + .sub, .card h2 small.tip-sub[role] + .sub { margin-top: .2rem; }

/* Escape velocity: the goal card is shorter than the forecast settings beside it, so it stays in view while the settings scroll past */
@media (min-width: 1101px) { #escSettings > .card:first-child { position: sticky; top: 1rem; } }
/* Investments: the same for the insight card beside your risk mix */
@media (min-width: 1180px) { .hold-top > .card:last-child { position: sticky; top: 1rem; } }

/* Feedback: the form has room between its parts (it was one block of lines with nothing between them) */
#fbForm h2 { margin-bottom: .9rem; }
#fbForm [data-submit="fbSend"] { display: grid; gap: 1rem; }
#fbForm [data-submit="fbSend"] > p { margin: 0; }
#fbForm [data-submit="fbSend"] .chips { margin: 0; }
#fbForm [data-submit="fbSend"] > .btn { justify-self: start; }

/* a card's title and the paragraph straight after it (no sub-heading in between) have a little room */
.card > h2 + p:not(.sub) { margin-top: .55rem; }

/* the birth date (day, month, year) is one tidy row wherever it sits, and the four spending steps are four across or two by two, never three and one */
.dob { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) 7rem; gap: .6rem; max-width: 28rem; }
.dob select, .dob input { width: 100%; min-width: 0; }
.shape-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shape-note { container-type: inline-size; }
.shape-note .shape-drop { max-width: 18rem; margin: 0; }
.shape-note p { margin: .6rem 0 0; }
@container (max-width: 34rem) { .shape-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 14rem) {     /* one under the other where two would cut a figure (a small phone, big text), each figure inside its tile */
  .shape-steps { grid-template-columns: minmax(0, 1fr); }
  .shape-steps > div { padding: .5rem .6rem; }
  .shape-steps b { font-size: 1rem; }
}
.f-label small.tip-sub[role] { font-size: .9rem; }

/* bucket list rows on a phone: the title and its small print get the whole width, and the cost and the two buttons sit on a line under them */
@media (max-width: 560px) {
  .goal-row:not(.idea-row)[style] { grid-template-columns: 1.1rem minmax(0, 1fr) auto auto !important; grid-template-areas: "dot text text text" ". cost edit del"; row-gap: .15rem; }
  .goal-row:not(.idea-row)[style] > :nth-child(1) { grid-area: dot; align-self: start; margin-top: .3rem; }
  .goal-row:not(.idea-row)[style] > :nth-child(2) { grid-area: text; }
  .goal-row:not(.idea-row)[style] > :nth-child(3) { grid-area: cost; text-align: left !important; }
  .goal-row:not(.idea-row)[style] > :nth-child(4) { grid-area: edit; }
  .goal-row:not(.idea-row)[style] > :nth-child(5) { grid-area: del; }
}

/* Settings: a short card (Account) is no taller than what is in it, instead of a tall box with nothing in its lower half */
.set-grid:has(> #notifyCard) { align-items: start; }

/* ---------- words wrap kindly ----------
   A line never leaves one word on its own at the end, short blocks (headings, the words under a figure) break into even lines, and a
   figure with its unit ("6% a year", "$34,200/mo", "31 Dec 2027") is kept together. The explanation under a page title is as wide as the
   line under it (it was held to a narrower column, which wrapped it early and left a word on a line of its own). */
p, li, .sub, small.tip-sub[role], .note-box, label.field, .mv, .ms .m { text-wrap: pretty; }
h1, h2, h3, .t-label, .t-note, .tile .t-rest, .kpi-rest, .scn .sm { text-wrap: balance; }
.nb { white-space: nowrap; }
.page-head h1 small.tip-sub[role], h2 small.tip-sub[role], h3 small.tip-sub[role] { max-width: none; }

/* the goal line when everything is saved: the button sits right beside the words (it wraps under them when there is no room) */
.esc-summary { flex-direction: row; align-items: center; justify-content: flex-start; gap: .6rem 1.4rem; }

/* Possible futures: the dot sits level with the name, and the line under it breaks evenly */
.scn .badge { align-items: center; }

/* Path to your goal: the groups of lines sit side by side, each with its own words and its own chips (stacked, they took half the screen
   before the chart began). It follows the width of the card, not the window: three columns when the card is wide, two, then one. */
.line-wrap { container-type: inline-size; }
.line-pick { display: grid; gap: .9rem 1.8rem; align-items: start; margin: .2rem 0 1.1rem; }
.line-pick > .f-label { margin: 0; }
.line-pick .line-group { margin-top: 0; min-width: 0; }
.line-pick .line-group > b small.tip-sub[role] { margin-top: .25rem; }
.line-pick .chips { margin-top: .5rem; }
.line-chip { white-space: normal; text-align: left; justify-content: flex-start; }
/* The groups sit in three stacks (always shown + target date; your speed + the Wealth accelerator; yearly growth), each stack closing up on
   its own, so a tall group beside one never opens a gap under it (the accelerator used to sink to the bottom of a shared row). On a narrow card
   the stacks dissolve and the groups follow one another in the order below. */
.line-col { display: contents; }
.g-always { order: 1; } .g-grow { order: 2; } .g-accel { order: 3; } .g-ret { order: 4; } .g-need { order: 5; }
@container (min-width: 34rem) {
  .line-pick { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .line-pick > .f-label { grid-column: 1 / -1; }
  .line-col { display: grid; gap: .9rem; align-content: start; min-width: 0; }
  .line-col.lc-3 { grid-column: 1 / -1; }
}
@container (min-width: 52rem) {
  .line-pick { grid-template-columns: minmax(11rem, .8fr) minmax(0, 1.4fr) minmax(0, 1.2fr); }
  .line-col.lc-3 { grid-column: auto; }
}

/* ---------- Die with zero: Your life in weeks ----------
   The grid of weeks has half of a wide card, and never less than its own size (36rem), with the figures and the key in the other
   half (it had a third of the card on a wide screen). It follows the width of the card, not the window: when the card is too narrow
   for both side by side (a smaller laptop window, a tablet, a phone) the grid sits above them, as wide as the card up to 46rem. The
   grid keeps its shape at every width and is drawn sharp at its size (dwzWeeksCanvas in dwz.js). */
.weeks-card { container: weeks / inline-size; }
.weeks-wrap { grid-template-columns: minmax(0, 1fr); }
.weeks-side { position: static; }
.weeks-wrap canvas { display: block; width: 100%; max-width: 46rem; height: auto; }
@container weeks (min-width: 50rem) {
  .weeks-wrap { grid-template-columns: minmax(36rem, 1fr) minmax(0, 1fr); }
  .weeks-wrap canvas { max-width: none; }
  .weeks-side { position: sticky; top: 1rem; }
}
/* its four figures: tiles side by side are the same height and each figure sits at the foot of its tile, so the figures line up
   however the labels wrap (the tiles stay size containers, which their figures' size needs) */
.weeks-side .kpis > div { display: flex; flex-direction: column; justify-content: space-between; gap: .15rem; }
.weeks-side .legend-line, #weekInfo { text-wrap: pretty; }
/* the key: each category is a short bar through its shades, darkest to lightest */
.legend-line i.shade-key { width: 1.6rem; border-radius: 999px; }

/* every experience has its own shade of its category's colour: a thin ring keeps the palest and the deepest shades clear on every
   theme, and the line under the activity choices shows the shade the experience gets as they are chosen */
.goal-row .dot { box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent); }
.goal-form .share-prev::before, .wish .share-prev::before { content: ''; display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; margin-right: .45rem;
  vertical-align: -.05em; background: var(--shade, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent); }
/* the month an experience starts: room for the longest month name beside the age */
.wish > .f-mon { flex: 0 0 9.5rem; }
/* an experience's private link: a line of its own under the title (in the form and on the wish list), and on each row a small
   link with the site's name, tall enough to tap */
.goal-form > .gf-link, .wish > .f-link { flex: 1 1 100%; min-width: 0; }
.wish > .f-link { display: flex; flex-direction: column; gap: .2rem; }
.goal-link { display: inline-block; align-self: flex-start; max-width: 100%; padding: .2rem 0; font-size: .92rem; font-weight: 650; line-height: 1.4;
  color: var(--brand-text); text-decoration: underline dotted; text-underline-offset: 3px; overflow-wrap: anywhere; }
.goal-link:hover { text-decoration-style: solid; }
/* a link typed without https:// is fine here (the app adds it), so the browser's own red "not a web address" glow stays off;
   the app's own error state (label.field.has-error) is more specific and still shows */
.gf-link input:user-invalid { box-shadow: none; }


/* ---------- the joined Community page on the smallest phone at the biggest text size ----------
 * The stop working bars and the "That's you" line in the feed kept their fixed columns, so at 320px with text at 150% the page
 * scrolled sideways. The columns now give way (the label is cut with an ellipsis) and the tag drops under the words. */
@media (max-width: 700px) {
  .sb, .stop-bars.ctry .sb, .stop-bars.band .sb { grid-template-columns: minmax(0, 6rem) minmax(0, 1fr) auto; }
}
@media (max-width: 420px) {
  .feed .ev.mine { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .feed .ev.mine > .tag-soft { grid-column: 2; justify-self: start; white-space: normal; }
}

/* ---------- Die with zero: the spending a year, by age (the chart's hover says the same) ---------- */
.dwz-spend { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.dwz-spend .tbl-h { margin: 0 0 .2rem; }
.dwz-spend .sub { margin: 0 0 .7rem; }
/* The table is as wide as its figures need (40rem), not as wide as the card: on a big screen its ages and its two columns were a hand's breadth apart. The
   notes under it go to its right when the card is wide enough for both, and under it when it is not. */
.dwz-spend { container: dsp / inline-size; }
.dwz-spend-body { display: grid; gap: 0 2.6rem; align-items: start; }
.dwz-spend-body > * { min-width: 0; }
.dwz-spend-tbl { display: grid; max-width: 40rem; }
.dwz-spend-notes { max-width: 40rem; }
@container dsp (min-width: 62rem) {
  .dwz-spend-body:has(.dwz-spend-notes) { grid-template-columns: minmax(0, 40rem) minmax(0, 36rem); }
  .dwz-spend-notes > .dwz-inh:first-child { margin-top: 0; }
}
.dwz-spend-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); gap: .8rem; align-items: baseline; padding: .55rem 0; border-top: 1px solid var(--line); }
.dwz-spend-row:first-child { border-top: 0; }
.dwz-spend-row.head { color: var(--muted); font-size: .92rem; font-weight: 600; padding-top: 0; }
.dwz-spend-row .r { text-align: right; }
.dwz-spend-row .span2 { grid-column: 2 / -1; text-align: right; }
.dwz-spend-row .dwz-lbl { display: none; }
/* on a phone the three columns are too narrow for the amounts: each age becomes a small heading with its two figures under it, each on its own line with its
   name on the left and the figure on the right (Your plan first, then the most you can spend), so which figure is which is never a guess */
@media (max-width: 560px) {
  .dwz-spend-row { grid-template-columns: minmax(0, 1fr); gap: .15rem; padding: .65rem 0; }
  .dwz-spend-row.head { display: none; }
  .dwz-spend-row > span:first-child { font-weight: 700; }
  .dwz-spend-row .span2 { grid-column: auto; text-align: left; }
  .dwz-spend-row .dwz-lbl { display: block; font-weight: 500; font-size: 1rem; color: var(--muted); white-space: normal; text-align: left; min-width: 0; overflow-wrap: anywhere; }      /* (the name gives way, the figure never does) */
  .dwz-spend-row > b.r { display: flex; align-items: baseline; justify-content: space-between; gap: .1rem .5rem; text-align: right; }
  .dwz-spend-row > b.r .dwz-amt { margin-left: auto; white-space: nowrap; flex: none; }
}

/* the "how to fix it" cards: a column is never wider than the space there is, so the biggest text on the smallest phone does not push the page sideways */
.fix-list { grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); }
.why-steps { grid-template-columns: repeat(auto-fit, minmax(min(11.5rem, 100%), 1fr)); }
.why-total { grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr)); }
.kpis4 b.num { white-space: normal; overflow-wrap: anywhere; }

/* ---------- Feedback: what is happening with an idea, and "Built from your ideas" (onboard.js) ----------
 * An idea with a status has a small pill with the word (Planned, Building) and the team's line beside it, under the title; an
 * idea with none looks as it always did. A shipped idea is at the bottom of the page, with a tick and the word Built where its
 * vote button was. The words carry the meaning; the colours are the theme's own. */
.idea-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .55rem; margin: .3rem 0 0; }
.pill.idea-pill { font-size: .82rem; padding: .12rem .6rem; font-weight: 700; flex: none; }
.pill.idea-pill.planned { background: var(--brand-soft); color: var(--brand-text, var(--ink)); }
.pill.idea-pill.building { background: var(--warn-soft); color: var(--warn-ink); }
.pill.idea-pill.shipped { background: var(--pos-soft); color: var(--pos-ink); }
.idea-note { min-width: 0; overflow-wrap: anywhere; }
/* a title with one very long word (an address, a pasted link) wraps instead of pushing the list off a small screen */
.idea-vote-list { grid-template-columns: minmax(0, 1fr); }
.idea-vote-list li > div { min-width: 0; }
.idea-vote-list li > div > b { overflow-wrap: anywhere; }
.idea-built { margin-top: 1.2rem; }
.idea-built .sub { margin-bottom: .2rem; }
.idea-built-list { grid-template-columns: repeat(auto-fill, minmax(min(24rem, 100%), 1fr)); }
.idea-built-list li { min-width: 0; }
.idea-built-list li > div { min-width: 0; }
.idea-built-list b { overflow-wrap: anywhere; }
.built-mark { display: grid; justify-items: center; align-content: center; gap: .05rem; min-width: 3.4rem; min-height: 3rem; padding: .4rem .5rem; border-radius: 12px; background: var(--pos-soft); color: var(--pos-ink); flex: none; }
.built-mark b { font-size: .85rem; }
.built-tick { font-size: 1.05rem; font-weight: 800; line-height: 1; }
.idea-meta { margin: .2rem 0 0; color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
.idea-built .idea-note { margin: .3rem 0 0; }
/* the biggest text sizes on a phone: a slimmer vote button and smaller gaps leave the words more room (the button stays big enough to tap) */
@media (max-width: 520px) {
  .bigtext .idea-vote-list li { padding: .65rem .7rem; gap: .6rem; }
  .bigtext .idea-vote-list .vote-btn, .bigtext .idea-vote-list .built-mark { min-width: 2.6rem; padding: .3rem .35rem; }
}

/* ---------- the announcement banner (banner.js), set on the admin side's Controls tab ----------
   One thin line between the menu and the page: a word for its kind and an icon (Note, Good news, Heads up), so colour is never
   the only cue, then the message, a link when there is one, and Dismiss. It sits outside the page (#main), so a redraw never
   moves it. On a wide screen the menu is a column on the left, so the banner heads the page's column; on a phone it sits under
   the top bar. The colours come from the theme: a tint of the kind's colour on the theme's solid card colour, the theme's own ink. */
.ev-banner { --tone: var(--brand); --tone-ink: var(--brand-text); position: relative; z-index: 1; min-width: 0; color: var(--ink);
  background: color-mix(in srgb, var(--tone) 13%, var(--card-solid)); border-bottom: 1px solid color-mix(in srgb, var(--tone) 45%, var(--line)); box-shadow: inset 4px 0 0 var(--tone); }
.ev-banner[data-tone="good"] { --tone: var(--pos); --tone-ink: var(--pos-ink); }
.ev-banner[data-tone="warn"] { --tone: var(--warn); --tone-ink: var(--warn-ink); }
.ev-banner-in { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .9rem; padding: .5rem clamp(1rem, 2.4vw, 2.4rem); }
.ev-banner-ic { flex: none; width: 1.3rem; height: 1.3rem; fill: none; stroke: var(--tone-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ev-banner-msg { flex: 1 1 9rem; min-width: 0; margin: 0; font-size: .98rem; line-height: 1.45; overflow-wrap: anywhere; }
.ev-banner-tone { color: var(--tone-ink); font-weight: 750; }
.ev-banner-link { display: inline-block; max-width: 100%; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }   /* (it moves to the next line whole, and breaks only when it is longer than a line) */
.ev-banner-x { flex: none; display: inline-flex; align-items: center; gap: .35rem; min-height: 2.6rem; white-space: nowrap; color: var(--ink); }
.ev-banner .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (min-width: 861px) {
  body.has-banner .app { grid-template-rows: auto minmax(0, 1fr); }
  body.has-banner .app > .sidebar { grid-row: 1 / span 2; }
  body.has-banner .app > .ev-banner { grid-column: 2; grid-row: 1; }
  body.has-banner .app > main { grid-column: 2; grid-row: 2; }
}
@media (max-width: 860px) { body.has-banner .app { grid-template-rows: auto auto minmax(0, 1fr); } }
body.admin-view #evBanner, body.display-mode #evBanner { display: none; }
@media (prefers-reduced-motion: no-preference) { .ev-banner.ev-banner-new { animation: ev-banner-in .3s ease-out both; } }
body.no-anim .ev-banner { animation: none !important; }
@keyframes ev-banner-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Die with zero: an inheritance or other lump sum (Edit my plan, More options) ----------
   Each row is an amount and an age with a remove button. The boxes of a row share their bottom edge whatever their labels do. When the
   rows are narrow (a phone, big text) the amount takes a line of its own, and the age and its button stay together on the line under it.
   A row the plan leaves out says why under it. The rows keep a sensible width on a wide card: an amount box across the whole form is
   hard to read. */
/* The lump sums and how spending changes with age: side by side when the card is wide (the right half of the form was empty), one under the other when
   it is not. Beside the lump sums the four spending buttons are a square of two by two. */
.two-up { container: two-up / inline-size; min-width: 0; }
.two-up-in { display: grid; gap: .9rem 2.4rem; align-items: start; min-width: 0; }
.two-up-in > * { min-width: 0; }
@container two-up (min-width: 64rem) {
  .two-up-in { grid-template-columns: minmax(0, 34rem) minmax(0, 40rem); }
  .two-up-in .shape-note .drop-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.inh-block { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; min-width: 0; }
.inh-block > .f-label { margin-bottom: 0; max-width: 100%; }
.inh-rows { container: inh / inline-size; display: grid; gap: .9rem; width: 100%; max-width: 34rem; }
.inh-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(4.5rem, 7rem) auto; grid-template-areas: "name name name" "amt age del" "note note note"; gap: .5rem .8rem; align-items: stretch; min-width: 0; }
.inh-row + .inh-row { padding-top: .9rem; border-top: 1px solid var(--line); }
.inh-row > .inh-amt { grid-area: amt; }
.inh-row > .inh-age { grid-area: age; }
.inh-row > .inh-age input { width: 100%; }
.inh-row > .inh-del { grid-area: del; align-self: end; min-width: 2.75rem; min-height: var(--ctl-h); }
.inh-row > .inh-note { grid-area: note; margin-top: -.15rem; color: var(--muted); font-size: .92rem; font-weight: 500; line-height: 1.45; }
@container inh (max-width: 24rem) {
  .inh-row { grid-template-columns: minmax(0, 9rem) auto minmax(0, 1fr); grid-template-areas: "name name name" "amt amt amt" "age del ." "note note note"; }
}
/* the rest of the plan form on the smallest phone at the biggest text sizes: the birth date's month has a line of its own above the
   day and the year, and "Spend more early, less later" may wrap inside its button (both pushed the page sideways at 320px with text at 150%) */
@media (max-width: 420px) {
  .bigtext .dob { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .bigtext .dob > [data-dob="m"] { grid-column: 1 / -1; grid-row: 1; }
  .bigtext .dob > * { padding-inline: .55rem; }                 /* so a four-digit year fits its box */
  .bigtext .form-grid .seg button { white-space: normal; }
}
/* under the chart: what the inheritance does to the most you can spend; in the verdict: when the plan only works with it */
.dwz-spend .dwz-inh { margin: .9rem 0 0; line-height: 1.55; }
.verdict p.dwz-assume { color: var(--muted); font-size: .95rem; }
.verdict p.inh-verdict, .verdict p.dwz-dip { padding-left: .8rem; border-left: 3px solid color-mix(in srgb, var(--vc) 70%, transparent); }

/* the chart's readout on a narrow screen (dwz.js): what the floating box says, written under the chart where it fits */
.dwz-readout { margin: .7rem 0 0; padding: .8rem 1rem; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--brand) 7%, transparent); line-height: 1.45; overflow-wrap: anywhere; }
.dwz-readout[hidden] { display: none; }
.dwz-readout p { margin: 0; }
.dwz-ro-age { display: block; font-size: 1.1rem; font-weight: 750; margin-bottom: .35rem; }
.dwz-ro-item { display: flex; gap: .6rem; align-items: flex-start; margin-top: .45rem; }
.dwz-ro-item > i { flex: 0 0 auto; width: .85rem; height: .85rem; margin-top: .3rem; border-radius: 3px; border: 1px solid var(--line); }
.dwz-ro-item > div { min-width: 0; }
.dwz-ro-main { font-weight: 650; }
.dwz-ro-sub { color: var(--ink); font-weight: 500; }
.dwz-ro-hint { color: var(--ink); font-weight: 500; }

/* Escape velocity: what the Die with zero plan needs, beside the goal */
.dwz-number { margin-top: 1rem; padding: .8rem 1rem; border-radius: 14px; border: 1px solid var(--line); background: var(--chip); display: grid; gap: .45rem; }
.dwz-number .dn-head b { font-size: 1.5rem; letter-spacing: -.02em; }
.dwz-number p { margin: 0; }
.dwz-number .calc-btns { margin-top: .2rem; }

/* Escape velocity: the goal and forecast cards. A locked card has clear ways in (coloured buttons, and fields that open it when pressed); a card
   that has been unlocked is picked out, so it is plain which one is being changed. The number helper is a button, and so is each suggestion. */
.btn.danger-ghost { background: var(--neg-soft); color: var(--neg-ink); border-color: color-mix(in srgb, var(--neg) 55%, var(--line)); }
.btn.danger-ghost:hover { background: color-mix(in srgb, var(--neg) 24%, transparent); }
.drw-name { display: flex; align-items: center; flex-wrap: wrap; gap: .2rem .8rem; }
.drw-name h2 { min-width: 0; }
.card.editing { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--card));
  box-shadow: 0 0 0 1px var(--brand), 0 0 0 6px color-mix(in srgb, var(--brand) 22%, transparent), var(--shadow); }
.edit-banner { margin: 0 0 1.1rem; padding: .7rem .95rem; border-radius: 12px; font-size: 1rem; line-height: 1.4;
  background: color-mix(in srgb, var(--brand) 22%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 55%, var(--line)); }
.edit-banner b { color: var(--ink); }
.is-locked [data-act].field, .is-locked div[data-act] { cursor: pointer; }
.is-locked [data-act] input:disabled, .is-locked [data-act] .seg button:disabled { pointer-events: none; }
.is-locked [data-act].field:hover :is(.money, input) { border-color: var(--brand); }
.calc-open { display: grid; gap: .1rem; width: 100%; margin-top: 1rem; padding: .75rem 1rem; text-align: left; border-radius: 12px; cursor: pointer; font-weight: 700; color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--brand) 55%, var(--line)); background: var(--brand-soft); }
.calc-open:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 24%, transparent); }
.calc-open .co-s { font-weight: 500; color: color-mix(in srgb, var(--ink) 82%, transparent); }       /* (not --muted: that is too faint on the tinted button in a few themes) */
.calc-goal { margin-top: 1rem; }
.calc-goal > summary { display: flex; align-items: center; gap: .6rem; margin: 0; padding: .75rem 1rem; border-radius: 12px; cursor: pointer; font-weight: 700; color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--brand) 55%, var(--line)); background: var(--brand-soft); }
.calc-goal > summary:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 24%, transparent); }
.calc-goal > summary::after { content: "▾"; margin-left: auto; font-size: 1.1rem; line-height: 1; transition: transform .2s; }
.calc-goal[open] > summary::after { transform: rotate(180deg); }
body.no-anim .calc-goal > summary::after { transition: none; }
.calc-goal[open] { background: none; border: 0; padding: 0; margin-top: 1rem; }
.calc-goal[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.calc-goal[open] > .calc-body { padding: 1rem; background: var(--card); border: 1px solid color-mix(in srgb, var(--brand) 55%, var(--line)); border-top: 0; border-radius: 0 0 12px 12px; }
.calc-goal .dwz-number { margin-top: 1.2rem; }
.dwz-number .book-link { white-space: normal; }
.avg-btns { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.field .avg-btns { margin-top: .4rem; }
.save-merge { margin-bottom: 1.2rem; }
.save-merge .avg-btns { margin-top: .6rem; }
/* a lump sum can be given a name: it sits above the amount and the age, and the chart marks the age with it */
.inh-row > .inh-name { grid-area: name; }
.inh-row > .inh-name input { width: 100%; }

/* a chart's legend is a row of buttons: each name shows or hides its line, with a tick while it is shown (chartLegend, core.js) */
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .8rem; }       /* (no scroll box of its own: a long list of names just makes the card longer) */
.chart-legend .cl-hint { flex: 1 1 100%; color: var(--muted); font-size: .95rem; }
.chart-legend .chip { max-width: 100%; }
.chart-legend .cl-note { font-weight: 500; }       /* (the dollars a line stands for, after its name: the chip's own text colour, so it reads as well as the name does) */
/* Reports: "Change filters" on the key's first line (beside the hint), and on a line of its own under a chart that has no key */
.chart-legend .cl-top { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; min-width: 0; }
.chart-legend .cl-top .cl-hint { flex: 0 1 auto; min-width: 0; }
.rep-under { display: flex; margin-top: .8rem; }
.rep-chg { white-space: nowrap; }
.card-head.rep-tbl-head { flex-direction: row; justify-content: space-between; align-items: flex-start; }       /* (the table's button sits at the right of its heading while there is room; with none it drops under the words, on the left, like every other card header) */

/* how fast spending falls with age: four buttons, each with what it means, the standard one marked */
.drop-pick { margin-bottom: .8rem; }
.drop-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .6rem; margin-top: .5rem; }
.drop-opt { display: grid; align-content: start; gap: .2rem; text-align: left; padding: .7rem .85rem; border-radius: 12px; border: 1px solid var(--line); background: var(--chip); color: var(--ink); font: inherit; cursor: pointer; }
.drop-opt:hover { border-color: var(--brand); }
.drop-opt.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.drop-opt.on b::after { content: " ✓"; font-weight: 800; }
.drop-opt .num { font-weight: 700; white-space: normal; }                  /* (.num is one line by default: at big text on a small phone this one has to wrap) */
.drop-opt { min-width: 0; }
.drop-opt small { color: var(--muted); font-size: .9rem; line-height: 1.4; }
.drop-opt .drop-tag { justify-self: start; margin-top: .2rem; padding: .05rem .5rem; border-radius: 999px; font-style: normal; font-size: .82rem; font-weight: 700; background: var(--chip); border: 1px solid var(--line); color: var(--ink); }
.drop-opt.own { cursor: default; }

/* Wealth accelerator: the years sooner come first, on the far left, with an asterisk, and the title follows (people read from the left). */
.lever { grid-template-columns: minmax(8.5rem, 12rem) minmax(0, 1fr); align-items: start; }
.lever .lv-gain { text-align: left; white-space: normal; font-size: 1.15rem; line-height: 1.25; }
.lever .lv-star { margin-left: .1rem; font-weight: 800; }
.lever .lv-gain b { font-weight: 750; }
@media (max-width: 560px) { .lever { grid-template-columns: minmax(0, 1fr); } }
.line-group > small.muted { display: block; margin-top: .35rem; font-size: .9rem; line-height: 1.4; }
.accel-note { margin: .8rem 0 0; padding: .65rem .9rem; border-radius: 12px; background: var(--chip); font-size: .98rem; line-height: 1.5; }
.accel-note .al-key { display: inline-block; width: .8rem; height: .8rem; margin-right: .45rem; border-radius: 50%; vertical-align: baseline; }
.accel-note .al-key ~ .al-key { margin-left: .7rem; }       /* (the second key: your forecast, drawn thin to compare with) */
/* the risk slider heats up: green at Safe, amber at Balanced, red at Aggressive, in every theme (the theme's own three colours) */
.lv-risk { --lvc: var(--pos); }
.lv-risk[data-level="balanced"] { --lvc: var(--warn); }
.lv-risk[data-level="bold"] { --lvc: var(--neg); }
.lv-risk input[type=range]::-webkit-slider-runnable-track { background: linear-gradient(90deg, transparent 0 calc(.95rem + (100% - 1.9rem) * var(--f, .5)), color-mix(in srgb, var(--ink) 22%, transparent) 0), linear-gradient(90deg, var(--pos), var(--warn), var(--neg)); }
.lv-risk input[type=range]::-moz-range-progress { background: var(--lvc); }
.lv-risk input[type=range]::-webkit-slider-thumb { border-color: var(--lvc); }
.lv-risk input[type=range]::-moz-range-thumb { border-color: var(--lvc); }          /* (two rules: a browser drops a whole rule when one of its selectors is one it does not know) */
.lv-risk input[type=range]:focus-visible { outline-color: var(--lvc); }
.lv-ticks span { display: inline-flex; align-items: center; gap: .4rem; }
.lv-ticks span::before { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: var(--tc); }
.lv-t-safe { --tc: var(--pos); } .lv-t-balanced { --tc: var(--warn); } .lv-t-bold { --tc: var(--neg); }
.avg-note { display: block; }
.avg-note > small.avgline { display: block; }
.field .avg-use { color: var(--ink); font-weight: 600; }

/* the effect of every accelerator choice at once, under the slider */
.lv-all { margin: .9rem 0 .4rem; line-height: 1.5; }
.lv-all .btn { margin-left: .4rem; vertical-align: baseline; }

/* What changed between two dates (the Dashboard, and after a save on Update values): two dates and a button, quick choices under them, and the written summary */
.chg-card { margin-bottom: 1.2rem; }
.chg-card .card-head { margin-bottom: 1.2rem; }
.chg-label { margin: 0 0 .35rem; font-size: .85rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.upd-done { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; }
.chg-bar { margin-bottom: 1.2rem; }
.chg-bar-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.2rem; margin-bottom: .5rem; }
.chg-bar .ins-p { margin: .45rem 0; line-height: 1.55; }
.chg-dates { align-items: flex-end; }
.chg-dates .field { flex: 1 1 10rem; max-width: 16rem; }
.chg-quick { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.3rem 0 1.4rem; }
#chgOut { outline: none; }
.chg-out { margin-top: .4rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.chg-short { margin-bottom: .4rem; }
.chg-short .ins-p { font-size: 1.08rem; line-height: 1.55; }
.chg-out h3 { font-size: 1.05rem; margin: 1.4rem 0 .4rem; }
.chg-list { margin: .3rem 0 .6rem; padding-left: 1.2rem; }
.chg-list li { margin: .55rem 0; line-height: 1.5; overflow-wrap: anywhere; }
.chg-note { margin: .9rem 0 .2rem; }
