/* Bravendal portal -- the Home screen (HOD-578, Home v2: Saga's approved v2 spec). Loaded after portal.css by the Home page alone
   (<html class="v2">). Fraunces for the headings and the figures, Inter for the rest, both served from this directory (font-src
   'self'; SIL OFL 1.1, OFL-fonts.txt): no other host is asked for anything. A light theme and a dark one (html[data-theme="dark"], set
   by home.js and its button; the masthead stays the portal's ink bar in both), and the rise and fall tokens: a rise is the accent
   blue, never green (Saga 1). Every named text and background pair meets WCAG AA in both themes, and every slice colour, Other's
   dim tone included, is 3:1 against its card. Classes only (CSP style-src 'self'). */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fraunces-latin.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("inter-variable.woff2") format("woff2"); }
html.v2 {
  --bg: #f6f1e4; --surface: #fffdf8; --text: #0c2240; --muted: #4f5b6b; --line: #d9cfb8; --accent2: #7a5c14; --on-accent: #fffdf8;
  --blue: #1f5c99; --rise: var(--blue); --fall: #a8361a; --track: #ece4d0; --dim: #7d828b;
  --s0: #0c2240; --s1: #7a5c14; --s2: #2f6f8f; --s3: #9c4f2e; --s4: #a33f6e; --s5: #6b5b95;
  --nfy-act: #e3895b; --nfy-watch: #7a5a12;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --face: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
html.v2[data-theme="dark"] {
  --bg: #0c2240; --surface: #132d52; --text: #f3ecd8; --muted: #c9c1ab; --line: #2a4466; --accent2: #d8b25c; --on-accent: #04080f;
  --blue: #8cc4f0; --fall: #f2a283; --track: #0a1a33; --dim: #8d99ab;
  --s0: #f3ecd8; --s1: #d8b25c; --s2: #7fb8d6; --s3: #e3895b; --s4: #f09ac0; --s5: #b9a8e3;
  --nfy-watch: #d8b25c;
}
html.v2 body { background: var(--bg); color: var(--text); font-family: var(--face); }
html.v2 .wordmark { font-family: var(--display); font-weight: 600; }
html.v2 main { max-width: 74rem; }
html.v2 main h1, html.v2 main h2, html.v2 main h3 { color: var(--text); font-family: var(--display); }
html.v2 main h1 { font-size: 2.3rem; letter-spacing: -.01em; margin-bottom: .5rem; }
html.v2 main a:focus, html.v2 summary:focus, html.v2 .scroll:focus { outline-color: var(--text); }
html.v2 footer { color: var(--muted); border-top-color: var(--line); }
html.v2 footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); }
html.v2 .notice { background: var(--surface); color: var(--text); border-left-color: var(--accent2); }
/* DEMO DATA (Ragnar 8): the bar portal.preview puts at the top of every page of a database whose amounts are not real (role=note),
   in the Home's own look: a calm strip, not a stripe */
html.v2 .demo-data { position: static; margin: 0; padding: .55rem 1rem; text-align: center; font: 700 .875rem/1.4 var(--face); letter-spacing: .06em;
  color: var(--text); background: var(--surface); border: 0; border-bottom: 3px solid var(--accent2); }
/* the header (Ragnar 5): the wordmark, the theme button and Menu on one row; the tabs, Methodology and Sign out under it on a desk,
   in Menu on a phone (home.js; without it they stay shown) */
html.v2 .masthead { margin-bottom: .7rem; }
html.v2 .menu { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
html.v2 .menu .tabs { flex: 1 1 auto; }
html.v2 .menu .method { margin: 0; }
html.v2 .menu .method a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ivory); text-underline-offset: .2em; }
html.v2 .menu .method a:focus-visible { outline: 3px solid var(--ivory); outline-offset: 3px; }
html.v2 .menu form button { min-width: 44px; min-height: 44px; }
html.v2 .menu form button:focus-visible { outline: 3px solid var(--ivory); outline-offset: 3px; }
.menu-btn { display: none; }
/* the theme button, in the masthead before Menu; under 30rem its words are visually hidden, never display:none, so its name stays */
.theme { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; margin-left: auto; border-radius: 999px; color: var(--ivory); }
.theme[aria-pressed="true"] { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.theme .glyph { font-size: 1.15rem; line-height: 1; }
.theme[hidden] { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0);
  clip-path: inset(50%); white-space: nowrap; }
/* the freshness strip (Ragnar 8) and the hero (Ragnar 4) */
.fresh { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; margin: 0 0 1.1rem; padding: 0; color: var(--muted); font-size: .8125rem; }
.fresh li::before { content: "\25CF" / ""; margin-right: .4rem; color: var(--accent2); font-size: .75rem; }
.hero { margin: 0 0 1.25rem; padding: 1.3rem 1.4rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent2);
  border-radius: 14px; }
.hero .cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.5rem; }
.hero .cell { min-width: 0; }
.hero .k { margin: 0; color: var(--muted); font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.hero .big { margin: .1rem 0 .2rem; font-family: var(--display); font-size: 2.9rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums lining-nums; }
.hero .big .of { font-size: 1.3rem; color: var(--muted); }
.hero .sub { margin: .2rem 0; color: var(--muted); font-size: .875rem; }
.hero .plain { margin: 1rem 0 0; font-family: var(--display); font-size: 1.2rem; line-height: 1.45; }
.timeline { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 0; margin: 1.1rem 0 0; padding: 0; counter-reset: none; }
.timeline li { position: relative; flex: 1 1 8rem; min-width: 0; padding: 1.1rem .75rem 0 0; font-size: .875rem; border-top: 3px solid var(--line); }
.timeline li::before { content: ""; position: absolute; top: -9px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--surface);
  border: 3px solid var(--accent2); box-sizing: border-box; }
.timeline li.today::before { background: var(--accent2); }
.timeline .what { display: block; font-weight: 600; }
.timeline .when { color: var(--muted); }
/* the four tiles: two to a row on a desk, one on a phone */
.home-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: stretch; }
.tile2 { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.2rem 1.35rem 1.1rem; }
.tile2 h2 { display: flex; align-items: center; gap: .55rem; margin: 0 0 .3rem; font-family: var(--face); font-size: .8125rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tile2 h2 .glyph { color: var(--accent2); font-size: 1.05rem; letter-spacing: 0; }
.tile2 p { margin: .3rem 0; }
.tile2 .v { margin: .1rem 0 .3rem; font-family: var(--display); font-size: 2.6rem; font-weight: 600; line-height: 1.1; color: var(--text);
  font-variant-numeric: tabular-nums lining-nums; }
.tile2 .v .of { font-size: 1.3rem; color: var(--muted); }
.tile2.state-empty .v, .tile2.state-unknown .v { font-size: 1.7rem; color: var(--muted); }
.tile2 .sub { color: var(--muted); font-size: .875rem; }
/* Manual (Saga D5): a solid 2px chip with the date the figure was entered; the capitals are this stylesheet's, not the words' */
.tag2 { display: inline-block; align-self: flex-start; margin: .2rem 0; padding: .1rem .7rem; border: 2px solid var(--accent2); border-radius: 999px;
  color: var(--accent2); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
/* Amount unknown (HOD-604): the same words, a dotted border. The border style carries the meaning; colour does not. */
.tag2.unknown { border-style: dotted; }
.unknowns { list-style: none; margin: .4rem 0; padding: 0; }
.unknowns li { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .7rem; margin: .15rem 0; font-size: 1rem; }
.marker-summary { margin: 0 0 1rem; }
.marker-summary a { display: inline-flex; align-items: center; min-height: 44px; font-size: 1rem; font-weight: 600; color: var(--accent2); }
.marker-legend { margin: 1.25rem 0 0; padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-size: 1rem; }
.marker-legend h2 { margin: 0 0 .4rem; font-size: 1.25rem; }
.marker-legend ul { margin: 0; padding-left: 1.2rem; }
.marker-legend li { margin: .35rem 0; }
/* Empty household (HOD-604): the hero is the setup list, one Start link, and what fills the chart. */
.setup { margin: .2rem 0 0; padding-left: 1.3rem; font-size: 1.05rem; line-height: 1.45; }
.setup li { margin: .45rem 0; }
.chart-empty { margin: 1rem 0 0; padding: .9rem 1rem; border: 2px dashed var(--line); border-radius: 10px; font-size: 1rem; line-height: 1.45; }
.hero.setup .go { display: flex; max-width: 100%; }
.hero.setup .go a.start { flex: 1 1 auto; max-width: 100%; justify-content: center; text-align: center; white-space: normal; line-height: 1.3; }
.tile2 .who { color: var(--text); }
.change { font-weight: 600; font-variant-numeric: tabular-nums; }
.change.rise { color: var(--rise); }
.change.fall { color: var(--fall); }
.change.flat { color: var(--muted); }
.change .glyph { margin-right: .3rem; }
.change .sub { font-weight: 400; }
/* the allocation: one bar of slices, the shares in tenths adding up to 100.0%; debt is never a slice; Other is last, in the dim tone */
.alloc { margin: .9rem 0 0; }
.allocbar { display: block; width: 100%; height: 28px; border-radius: 6px; background: var(--track); }
.allocbar rect { stroke: var(--surface); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.s0 { fill: var(--s0); background: var(--s0); }
.s1 { fill: var(--s1); background: var(--s1); }
.s2 { fill: var(--s2); background: var(--s2); }
.s3 { fill: var(--s3); background: var(--s3); }
.s4 { fill: var(--s4); background: var(--s4); }
.s5 { fill: var(--s5); background: var(--s5); }
.dim { fill: var(--dim); background: var(--dim); }
.legend2 { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin: .6rem 0 0; padding: 0; font-size: .875rem; }
.legend2 li { display: flex; align-items: center; gap: .4rem; }
.legend2 .sw { flex: none; width: .85rem; height: .85rem; border-radius: 3px; }
html.v2 details > summary, html.v2 details > summary:hover { color: var(--accent2); border-color: var(--accent2); }
html.v2 details[open] > summary { background: var(--accent2); color: var(--on-accent); border-color: var(--accent2); }
html.v2 details > summary:focus-visible { outline-color: var(--text); }
html.v2 details > summary::before { content: "\25B8" / ""; }
html.v2 details[open] > summary::before { content: "\25BE" / ""; }
html.v2 .scroll { border-color: var(--line); }
html.v2 .scroll thead th { background: var(--surface); color: var(--text); box-shadow: inset 0 -1px 0 var(--line); }
html.v2 caption { color: var(--text); }
html.v2 th, html.v2 td { border-bottom-color: var(--line); }
/* what is owed: one row per liability type the reader returns, then the net worth (assets - debt) */
.debt { margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.debt h3 { margin: 0 0 .35rem; font-size: 1.1rem; }
.debt dl { display: grid; gap: .1rem; margin: 0; }
.debt dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; border-bottom: 1px dotted var(--line); }
.debt dl > div.nwline { margin-top: .2rem; border-top: 2px solid var(--text); border-bottom: 0; font-weight: 700; }
.debt dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.go { margin: auto 0 0; padding-top: .8rem; }
.go a { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: 0 1.1rem; border: 2px solid var(--accent2); border-radius: 999px;
  color: var(--accent2); font-weight: 600; text-decoration: none; }
.go a:hover { background: var(--accent2); color: var(--on-accent); }
.go a:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
/* Next for you (HOD-585 C2): the ranked rows after the hero, before the tiles. The left rule alone carries severity colour
   (Act now #e3895b; Watch and Check the warmer gold on dark, the deeper one on light); every row still says its severity in a
   word, so colour is never the only cue. Text stays var(--text)/var(--muted), which meet AA in both themes; rows are at least
   44px tall for a touch target. */
html.v2 section[aria-labelledby="nfy-h"] { margin: 0 0 1.25rem; padding: 1rem 1.2rem 1.1rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; }
html.v2 section[aria-labelledby="nfy-h"] h2 { margin: 0 0 .5rem; font-family: var(--face); font-size: .8125rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
html.v2 section[aria-labelledby="nfy-h"] ol { list-style: none; margin: 0; padding: 0; }
.nfy-item { margin: 0 0 .5rem; padding-left: .9rem; border-left: 4px solid var(--nfy-watch); }
.nfy-item:last-child { margin-bottom: 0; }
.nfy-item.liquidity_bounce { border-left-color: var(--nfy-act); }
.nfy-link { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; min-height: 44px; padding: .35rem 0;
  color: var(--text); text-decoration: none; font-size: 1rem; }
.nfy-link:hover .nfy-head { text-decoration: underline; text-underline-offset: .2em; }
.nfy-link:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.nfy-tag { font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.nfy-head { font-family: var(--display); font-size: 1.1rem; font-weight: 600; color: var(--text); }
.nfy-action { display: inline-flex; align-items: center; gap: .35rem; color: var(--accent2); font-size: .9375rem; font-weight: 600; }
.nfy-stale { margin: .15rem 0 0; color: var(--muted); font-size: .875rem; }
@media (max-width: 48rem) {
  .home-tiles, .hero .cells { grid-template-columns: minmax(0, 1fr); }
  html.v2 main h1 { font-size: 1.9rem; }
  html.js .menu-btn { display: inline-flex; align-items: center; }
  html.js.v2 .menu:not(.open) { display: none; }
  html.v2 .menu { flex-direction: column; align-items: stretch; }
  html.v2 .menu .tabs, html.v2 .menu .tabs ul { width: 100%; }
}
@media (max-width: 30rem) {
  html.v2 header { padding-left: 1rem; padding-right: 1rem; }
  html.v2 main { padding: 1rem; }
  html.v2 .masthead { gap: .5rem; }
  html.v2 .wordmark { font-size: 1rem; letter-spacing: .05em; }
  html.v2 .masthead button { padding: .4rem .75rem; }
  .theme { width: 44px; padding: 0; }
  .theme .theme-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0);
    clip-path: inset(50%); white-space: nowrap; }
  .tile2, .hero { padding: 1rem 1.05rem; }
  .tile2 .v, .hero .big { font-size: 2.2rem; }
}
@media print { .theme, .menu-btn { display: none; } html.v2 .menu { display: flex; } }
