/* ===========================================================================================
   MOS HUB -- THE BRAND PACKAGE. One palette, two themes, every calculator.

   WHY THIS FILE EXISTS. The same reason shared/mos-calc.js exists: the Hub had five copies of
   everything. Four calculators carried a byte-identical 14-token :root block and the landing page
   carried a 9-token subset of it, so a palette change meant five edits and a change that reached
   four of them was invisible. One formula in two files already shipped wrong for six days
   (torontoMLTT); a colour would do the same more quietly.

   AND FOR A YEAR THAT SENTENCE WAS ONLY TRUE OF THE TOKENS, which is a fault this file caused.
   The paragraph above says "five copies of everything" and reads as though the duplication was
   ended. It was ended for COLOUR. The base screen chrome -- the reset, the body type, the header
   lockup, the panel, the rows, the buttons, the footer -- stayed in five page <style> blocks, and
   renewal-review was then written page-local-only on the strength of this header, shipping with
   NO base chrome at all: body in Times, the wordmark untracked, the print button square. Its gold
   fill was correct by accident, from the dark override in section 2 with no base rule beneath it.
   Section 9 exists so the claim and the file agree. tools/ADDING_A_TOOL.md now states the split
   explicitly rather than leaving the next tool to infer it from this comment.

   LIGHT IS THE BASE, AND THAT IS NOT AN AESTHETIC CHOICE. It is how the printed sheet stays
   printable. Everything dark lives inside `@media screen`, which print never evaluates, so a
   client's sheet is free of gradients, blur and light-on-dark text BY CONSTRUCTION rather than by
   remembering to reset each rule. A reset list falls behind the thing it resets; a rule print never
   sees cannot. This mirrors regular-mortgage's own architecture, which already worked this way and
   said so.

   THE DARK THEME IS GLASS, NOT A FLAT PALETTE, which is why this file holds structural rules and
   not only token values. Translucent white panels over a fixed navy gradient, with backdrop blur,
   cannot be expressed as a colour swap -- so the surfaces, the blur and the shadows are here too.
   Anything genuinely page-specific stays in its page.

   CONTRAST IS MEASURED, NOT EYEBALLED. The text ramp is 0.92 for figures and body copy and 0.78 for
   every label, hint and caption, with nothing lighter than 0.78 anywhere. Gold text on dark is
   #E8D3A6, brightened from #B8935A specifically to clear 4.5:1 on the composite; the ACCENT gold is
   unchanged, because a rule or a border is not text that has to be read.
   =========================================================================================== */

/* -------------------------------------------------------------------------------------------
   1. THE TOKENS. Light values, which are also the print values.
   The first fourteen were identical in all four calculators before this file existed. The rest
   were HARDCODED in those pages -- #8C6A34 fifteen times, #9AA3B2 nineteen -- which is why a dark
   theme could not simply flip the tokens: two thirds of the colour was not in a token at all.
   ------------------------------------------------------------------------------------------- */
:root{
  --ink:#14181F;
  --ink-soft:#4A5160;
  --paper:#F5F5F2;
  --panel:#FFFFFF;
  --navy:#0D1B2E;
  --navy-soft:#1B2D45;
  --gold:#B8935A;
  --gold-soft:#DCC9A3;
  --line:#E2E0DA;
  --line-soft:#EEEDE8;
  --green:#1E7F4B;
  --amber:#B8860B;
  --red:#B23B3B;
  --radius:6px;

  /* Text that sits ON the navy header. Three weights, all previously hardcoded. */
  --on-navy:#EDEEF0;
  --on-navy-soft:#B8BEC9;
  --on-navy-mute:#9AA3B2;

  /* GOLD AS TEXT IS NOT GOLD AS ACCENT. #B8935A measures 2.71:1 on white, which fails AA for body
     text, so anything READ in gold uses this darker brown instead. The accent token above is for
     rules, borders and fills, where contrast does not apply the same way. */
  --gold-text:#8C6A34;

  /* NAVY AS TEXT IS NOT NAVY AS SURFACE, and this is the same distinction as the gold above --
     borrowed from it, because the original authors had already solved exactly this problem once.
     --navy is the header background and the primary button fill. It was ALSO the colour of every
     headline figure and section heading, which is fine on cream and invisible on glass: the dark
     theme rendered a $3,951 payment at #0D1B2E on a #0A1422 ground, about 1.2:1, the single most
     important number on the page effectively unreadable. Caught by looking at it, not by a test.
     One token doing two jobs cannot invert, so the text job gets its own. */
  --navy-text:var(--navy);

  --hint:#8A8F99;
  --input-bg:#FCFCFB;
  --fill-subtle:#FBFAF8;
  --print-border:#CCCCCC;

  --pill-ok-bg:#E4F2E9;
  --pill-warn-bg:#FBF1DC;
  --pill-bad-bg:#FBEAEA;
  /* A FOURTH STATE, BECAUSE THERE WERE ONLY THREE AND ALL OF THEM MEAN SOMETHING.
     ok is a pass, warn is a caution, bad is a refusal -- so "this does not apply to your deal" had
     nowhere to go and was being rendered in the pass colour. See .status-pill.neutral below. */
  --pill-neutral-bg:#EEEDE8;
  --badge-bg:#F5EBD8;
  --print-negative:#E8A0A0;

  /* One hairline for every CONTROL -- buttons, segment dividers, inputs, selects. Panels keep
     their own, because a panel is a surface and not a control. Light mode borrows --line. */
  --ctl-line:var(--line);
}

/* -------------------------------------------------------------------------------------------
   2. THE DARK GLASS. Screen only, and only when the theme is explicitly dark.
   data-theme is set on <html> by shared/mos-theme.js before first paint.
   ------------------------------------------------------------------------------------------- */
@media screen{
  :root[data-theme="dark"]{
    color-scheme:dark;

    --ink:rgba(255,255,255,0.92);
    --ink-soft:rgba(255,255,255,0.78);
    --paper:#0A1422;
    --panel:rgba(255,255,255,0.10);
    --line:rgba(255,255,255,0.14);
    --line-soft:rgba(255,255,255,0.10);
    --ctl-line:rgba(255,255,255,0.18);

    --on-navy:rgba(255,255,255,0.92);
    --on-navy-soft:rgba(255,255,255,0.78);
    --on-navy-mute:rgba(255,255,255,0.68);

    --gold-text:#E8D3A6;
    /* Figures and headings invert to the 0.92 text weight. regular-mortgage already renders its
       headline payment this way; this makes the other four agree with it. */
    --navy-text:var(--ink);
    --hint:rgba(255,255,255,0.78);
    --input-bg:rgba(255,255,255,0.06);
    --fill-subtle:rgba(255,255,255,0.05);

    /* THE STATUS PILLS KEEP THEIR MEANING AND LOSE THEIR PASTEL. A pale mint fill carrying dark
       green text is unreadable on glass, so the fill becomes a translucent tint of the same hue and
       the text becomes the light end of it. The three hues do not change -- a green pill is still
       green, which is the whole point of a pill. */
    --pill-ok-bg:rgba(30,127,75,0.28);
    --pill-warn-bg:rgba(184,134,11,0.28);
    --pill-bad-bg:rgba(178,59,59,0.30);
    --pill-neutral-bg:rgba(255,255,255,0.12);
    --badge-bg:rgba(232,211,166,0.18);
    --green:#6FD39B;
    --amber:#E8C06A;
    --red:#E0756F;
  }

  /* THE GRADIENT. Fixed, so panels and content move across it rather than carrying it along.
     The palette is the Hub's own: navy from the header, the deeper navy-soft, gold and sand from
     the existing accents. No blue-purple glass pasted on top. */
  :root[data-theme="dark"] body{
    background-color:var(--paper);
    background-image:
      radial-gradient(62vw 54vw at 8% -6%,  rgba(42,104,178,0.40) 0%, rgba(42,104,178,0) 62%),
      radial-gradient(54vw 48vw at 96% 6%,  rgba(184,147,90,0.16) 0%, rgba(184,147,90,0) 60%),
      radial-gradient(70vw 60vw at 78% 92%, rgba(58,76,116,0.60) 0%, rgba(58,76,116,0) 64%),
      radial-gradient(48vw 44vw at 14% 96%, rgba(24,58,92,0.62) 0%, rgba(24,58,92,0) 60%);
    background-attachment:fixed;
    background-repeat:no-repeat;
    color:var(--ink);
  }

  /* PINNING THE HEADER IS STRUCTURE AND BELONGS TO BOTH THEMES, so it is NOT gated. I made exactly
     this mistake in regular-mortgage and fixed it there, then left the same three declarations
     inside the gated rule HERE -- so on the four pages that get their header from this file, the
     header was pinned in dark and scrolled away in light.
     The layout guard did not catch it because the guard only walked the five HTML pages and not
     shared/. It walks this file now too. A guard that checks four of five places is a guard that
     will be trusted about the fifth. */
  header.top{
    position:sticky;
    top:0;
    z-index:30;
  }

  /* THE HEADER'S APPEARANCE. Frost earns its keep here because content passes behind it, which
     needs it pinned. Content, proportions and the gold rule are untouched. */
  :root[data-theme="dark"] header.top{
    background:rgba(255,255,255,0.07);
    backdrop-filter:blur(24px) saturate(1.5);
    -webkit-backdrop-filter:blur(24px) saturate(1.5);
    border-bottom:3px solid var(--gold);
    box-shadow:0 1px 2px rgba(0,0,0,0.30), 0 8px 24px rgba(0,0,0,0.28),
               inset 0 1px 0 rgba(255,255,255,0.22);
  }

  /* THE PANELS. 0.10 for an output column, 0.06 for input blocks -- the subject reads as the most
     solid thing on the page, and 0.10 is the ceiling so the blur always has work to do. */
  :root[data-theme="dark"] .panel,
  :root[data-theme="dark"] .tile{
    background:var(--panel);
    backdrop-filter:blur(24px) saturate(1.5);
    -webkit-backdrop-filter:blur(24px) saturate(1.5);
    border:1px solid var(--line);
    box-shadow:0 1px 2px rgba(0,0,0,0.30), 0 8px 24px rgba(0,0,0,0.28),
               inset 0 1px 0 rgba(255,255,255,0.22);
  }
  :root[data-theme="dark"] .input-col .panel{ background:rgba(255,255,255,0.06); }

  /* THE INPUTS READ AS RECESSED, which is the opposite of the panels and is what stops a form
     looking like a stack of cards. */
  :root[data-theme="dark"] .field input[type=text],
  :root[data-theme="dark"] .field input[type=number],
  :root[data-theme="dark"] .field input[type=date],
  :root[data-theme="dark"] .field select{
    background:var(--input-bg);
    border-color:var(--ctl-line);
    color:var(--ink);
  }

  /* SEGMENTED CONTROLS. The inactive face is the control hairline over glass; the active face
     keeps the solid navy it has in light mode, because an active segment is a statement. */
  :root[data-theme="dark"] .seg,
  :root[data-theme="dark"] .mode-seg{ border-color:var(--ctl-line); }
  :root[data-theme="dark"] .seg button,
  :root[data-theme="dark"] .mode-seg button{
    background:rgba(255,255,255,0.04);
    color:var(--ink-soft);
    border-right-color:var(--ctl-line);
  }
  :root[data-theme="dark"] .seg button.active,
  :root[data-theme="dark"] .mode-seg button.active{
    background:var(--gold);
    color:#14181F;
  }

  :root[data-theme="dark"] button.primary{ background:var(--gold); color:#14181F; }
  :root[data-theme="dark"] button.primary:hover{ background:var(--gold-soft); }
  :root[data-theme="dark"] button.ghost{ border-color:var(--ctl-line); color:var(--ink-soft); }
  :root[data-theme="dark"] .nav-back{ color:var(--gold-soft); border-color:var(--ctl-line); }

  /* Tables and stripes: the subtle fill becomes a lighter pane rather than a cream wash. */
  :root[data-theme="dark"] .schedule-table{ background:var(--panel); border-color:var(--line); }
  :root[data-theme="dark"] .schedule-table th{ background:var(--fill-subtle); border-bottom-color:var(--line); }
  :root[data-theme="dark"] .schedule-table tr:nth-child(even){ background:rgba(255,255,255,0.04); }
  :root[data-theme="dark"] .schedule-section{ background:transparent; }
}

/* -------------------------------------------------------------------------------------------
   3. THE HEADER HIERARCHY. Which name is loudest.

   THE BRAND WAS OUTSHOUTING THE TOOL, in all five calculators, identically:

       .wordmark .mos        15px   weight 800   uppercase   0.22em tracking
       .wordmark .tool-name  13px   weight 400   muted grey  0.02em tracking

   So "MOS HUB" -- which the broker already knows, having just clicked it -- was the largest,
   boldest, most-tracked text in the header, and "Buy & Sell Estimate" was a grey caption beside it.
   The one thing a header has to answer is WHICH TOOL AM I IN, and that was the quietest thing on it.

   The brand keeps its lockup; it reads as a logo and should. The tool name becomes the largest and
   highest-contrast text instead: --on-navy is the full-strength header text in both themes, where
   --on-navy-soft is the deliberately quiet one it used to borrow.

   DEFINED HERE AND NOWHERE ELSE. The per-page copies are removed -- four were byte-identical and
   regular-mortgage carried a dark-theme override that would otherwise have won on specificity and
   put the name back to 0.78 in dark mode. That override is gone with them.
   ------------------------------------------------------------------------------------------- */
.wordmark .tool-name{
  font-size:16px;
  font-weight:600;
  color:var(--on-navy);
  letter-spacing:0.01em;
}

/* -------------------------------------------------------------------------------------------
   4. THE TOGGLE ITSELF. Lives in the header on every page, so it is defined once here.
   ------------------------------------------------------------------------------------------- */
.theme-toggle{
  font-size:11px;
  letter-spacing:0.04em;
  text-transform:uppercase;
  color:var(--on-navy-soft);
  background:transparent;
  border:1px solid var(--ctl-line);
  padding:4px 10px;
  border-radius:4px;
  cursor:pointer;
  font-family:inherit;
  margin-left:10px;
  line-height:1.6;
}
.theme-toggle:hover{ border-color:var(--gold); color:var(--gold); }
.theme-toggle:focus-visible{ outline:2px solid var(--gold); outline-offset:1px; }
@media screen{
  :root[data-theme="dark"] .theme-toggle{ color:var(--gold-soft); border-color:var(--ctl-line); }
}
/* A control is not part of a client's sheet. */
@media print{ .theme-toggle{ display:none; } }

/* -------------------------------------------------------------------------------------------
   5. THE HEADER ACTION GROUP. Print, Save and Open live up here on every calculator.

   They were at the BOTTOM of the input column on four of the five, under every field, so printing
   meant scrolling past the whole form to reach the button. regular-mortgage already had them in the
   header; this is that pattern, moved into shared so all five agree.
   ------------------------------------------------------------------------------------------- */
.hdr-actions{ display:flex; gap:8px; align-items:center; }
.hdr-actions button{ white-space:nowrap; }
@media print{ .hdr-actions{ display:none; } }

/* THE HEADER HAS TO FOLD ON A NARROW SCREEN, and until 2026-11-12 it did not: at a 430px viewport
   every calculator scrolled sideways by 313px, because header.top is a three-child flex row --
   wordmark group, action buttons, brand line -- with no wrap, and the buttons simply ran off the
   edge and dragged the page with them. Found while measuring an unrelated change; the figures
   were never affected, but the page would not sit still on a phone.

   THE BRAND LINE STAYS. Hiding it would have saved a row, and it carries the FSRA licence number,
   which appears NOWHERE ELSE on screen -- only here and on the printed sheet. A licence number is
   a regulatory display, not decoration, so the header gets taller instead.

   ONLY PROPERTIES NOTHING ELSE SETS. flex-wrap, row-gap and width are declared in no page and in
   no other rule in this file, so they apply from here and cannot be beaten.
   WHEN THIS WAS WRITTEN the caveat was that every page declared its own header.top with padding,
   display, align-items and justify-content, and the page's <style> comes AFTER this file's <link>,
   so at equal specificity the page won and setting padding from here did nothing. Section 9 now
   owns header.top for six of the seven pages; regular-mortgage still declares its own, so the
   caveat still holds for THAT page and nowhere else. Either way this rule sets none of them. */
@media (max-width:820px){
  header.top{ flex-wrap:wrap; row-gap:10px; }
  .wordmark{ flex-wrap:wrap; row-gap:8px; }
  /* Full width puts the buttons on their own line rather than squeezing them beside the wordmark. */
  .hdr-actions{ width:100%; flex-wrap:wrap; }

  /* AND IT STOPS BEING PINNED, because folding made it three rows and 191px -- 21% of a phone
     screen, held there permanently while the broker scrolls a long form. Pinning is worth it on a
     desktop, where the header is one row and content genuinely passes behind it; at this width the
     cost is a fifth of the viewport for a brand line and four buttons that are a short scroll
     away. Overriding the pin set in section 3 above, which this rule follows in the file. */
  header.top{ position:static; }
}

/* -------------------------------------------------------------------------------------------
   5b. THE MEASURE, AND THE DENSITY OF A FORM ROW.

   MEASURED BEFORE CHANGING, on buy-sell at 1920x1080:
       content width   1180px, leaving 740px of dead space -- 39% of the screen unused
       input column    420px, with 27 fields averaging 69px each
       field height    1855px total, which is 83% of the whole document
       scroll          2.07 screens for one deal

   So the page was using three fifths of the display while making the broker scroll twice to read
   one estimate. The 1180 measure was right when these were forms; it stopped being right when they
   became a form beside a dashboard.

   1500 RATHER THAN FULL WIDTH. A line of text past about 90 characters is harder to read, and the
   right column is mostly label/figure rows that would stretch into unreadable runs. 1500 takes back
   roughly 320px of the 740 without turning the breakdowns into a spreadsheet.

   480 RATHER THAN 420 for the inputs, because the money fields at half width were the tightest
   thing on the page -- "Debts (payout from proceeds)" wrapped its label at 420.

   THE ROW METRICS ARE TRIMMED, NOT CRUSHED. Three small cuts rather than one big one: the input
   padding, the gap under the label, and the gap between fields. A 34px control is still comfortably
   above the 32px that starts to feel cramped at this font size.

   ALL OF IT IS HERE AND NOT IN FIVE STYLESHEETS, which is the same reason the palette is here: the
   five pages carried byte-identical copies of every one of these declarations.
   ------------------------------------------------------------------------------------------- */
/* THE WHOLE GRID LIVES HERE, not just the measure, and that was not the first attempt.
   Putting only the desktop split in shared left the pages declaring `grid-template-columns:1fr`
   in their own stylesheet -- which loads AFTER this file, so on equal specificity the page won and
   the two-column layout silently never applied. The result measured 1,880px wide and 2.7 screens
   tall: one column at full width, worse than before the change. Media queries carry no extra
   specificity, so the single-column default has to be here too or the override cannot win. */
/* THE GRID IS SCOPED TO main.calc, AND THAT IS A FIX -- 2026-11-11.
   It was plain `main`, which also matched the LANDING PAGE. That page is a tile board, not a
   calculator: its main holds .intro, .grid and .note, so a two-column rule dealt the intro into the
   480px column and crushed five tiles into what was left of its 900px measure. It shipped in
   build .2 and was live until Cleve saw it.

   THE STRUCTURE CHECK DID NOT CATCH IT because it excludes index.html by name as "a tile page and
   has no such grid" -- true of the markup, and no longer true of the CSS reaching it. A page
   excluded from a check is a page that has to be right by construction, so the selector now names
   what it is for and a page without the class simply gets ordinary block layout. */
main{
  max-width:1500px;
  margin:0 auto;
  padding:28px 20px 60px;
}
main.calc{
  display:grid;
  grid-template-columns:1fr;
  gap:24px;
}
@media (min-width:960px){
  main.calc{ grid-template-columns:480px 1fr; align-items:start; }
}

.field{ margin-bottom:9px; }
.field label{ margin-bottom:3px; font-size:12px; }
.field input[type=text],
.field input[type=number],
.field input[type=date],
.field select{ padding:7px 10px; }

/* -------------------------------------------------------------------------------------------
   6. REPORT DETAILS, ACROSS THE TOP.

   It was the first card in the 420px input column, stacking its rows vertically and pushing the
   deal itself below the fold. It spans both columns now and lays its fields out side by side.

   grid-column:1/-1 IS WHAT MAKES THE THIRD GRID CHILD SAFE. main is a two-column grid, and an
   unplaced third child is dealt into a later row -- which is precisely the fault hub_screen's
   "main holds exactly input-col, output-col" check exists to catch. Spanning is the deliberate
   version of the same thing, so the guard permits this one element by name and nothing else.

   auto-fit RATHER THAN A FIXED THREE COLUMNS, so the row collapses to two and then to one on a
   narrow screen instead of squeezing three fields into a phone width.
   ------------------------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------------------------
   A NEUTRAL STATUS PILL, because "does not apply" is not a pass.

   The three states on these pages are ok (green), warn (amber) and bad (red), and every one of them
   is a VERDICT. Insurance status had none that fitted: on a conventional deal, or with a B lender,
   insurance simply does not enter the calculation -- and with nowhere else to go it was rendered
   green, the same colour as MEETS MINIMUM and WITHIN CAP. A broker glancing at a column of pills
   reads green as "this one is fine", so the page was quietly scoring a non-event as a pass.

   Grey says what it is: nothing happened here. Defined here rather than per page, so the fourth
   state is available to all five the moment one of them needs it.
   ------------------------------------------------------------------------------------------- */
.status-pill.neutral{ background:var(--pill-neutral-bg); color:var(--ink-soft); }

.report-details{
  grid-column:1 / -1;
  /* TIGHTER THAN A NORMAL PANEL, because it is not one. A panel's 22px/20px padding is sized for a
     heading and a stack of rows; this holds a single row of two inputs and nothing else, so the
     same padding read as a mostly-empty box across the full width. */
  padding:14px 22px 16px;
}
/* The label-to-input rhythm is the only thing in here, so the field's own bottom gap would add a
   second gap under the row on top of the card's padding. */
.report-details .rd-row .field:last-child{ margin-bottom:0; }
.report-details .rd-row{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:14px 20px;
  align-items:end;
}
/* The fields lose the stacked margin: the grid gap spaces them now, and keeping both gives a row
   that is taller than its contents for no reason. */
.report-details .rd-row .field{ margin-bottom:0; }
/* DATE PREPARED IS A FIGURE, NOT A FIELD. It keeps the kv-row treatment and sits on the baseline of
   the inputs beside it rather than floating above them. */
.report-details .rd-row .rd-date{ border-bottom:none; padding:0 0 9px; }

/* A DATE INPUT IS INTRINSICALLY 2px TALLER THAN A TEXT ONE -- 36px against 34px at these metrics,
   from the browser's own calendar control inside it, not from anything in this stylesheet. Setting
   line-height does not touch it; only an explicit height does.
   It went unnoticed while dates lived in a card of their own, where there was nothing to compare
   them with. Putting them beside "Prepared for" on 2026-11-12 made the mismatch visible: the row
   is align-items:end, so the inputs' bottoms lined up and their LABELS sat 2px apart.

   34px IS DERIVED FROM THE FIELD RULE ABOVE, not chosen: 7px padding top and bottom, an 18px line
   box at 15px, and a 1px border each side. If that padding changes, this changes with it. */
.field input[type=date]{ height:34px; }

/* -------------------------------------------------------------------------------------------
   7. BROKER NOTES.

   THE BOX IS IN THE WIDE COLUMN, not the 420px input column, by Cleve's instruction: a note is
   prose and a narrow box makes prose unreadable while it is being written. It is the full width of
   the output column, which is the widest thing on the page.
   ------------------------------------------------------------------------------------------- */
.notes-field textarea{
  width:100%;
  min-height:110px;
  resize:vertical;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:4px;
  background:var(--input-bg);
  color:var(--ink);
  font-family:inherit;
  font-size:14px;
  line-height:1.5;
}
.notes-field textarea:focus{ outline:2px solid var(--gold); outline-offset:1px; }

/* THE INPUT PANEL NEVER PRINTS, on any page, regardless of how that page prints.
   Three calculators swap a screen summary for a separate print sheet, so a panel inside the screen
   summary is hidden for them already. regular-mortgage and private-mortgage print their real output
   panels instead -- so without this, those two would print a textarea containing the note AND the
   rendered note below it. The rule is unconditional rather than per-page for that reason. */
@media print{ .notes-panel{ display:none; } }
@media screen{
  :root[data-theme="dark"] .notes-field textarea{
    background:var(--input-bg); border-color:var(--ctl-line); color:var(--ink);
  }
}

/* THE PRINTED NOTE. Hidden on screen always, and printed ONLY when something was typed -- the
   `has-notes` class is put on by shared/mos-notes.js. An empty heading on a client's sheet reads as
   something the broker forgot rather than something they chose not to write. */
.print-notes{ display:none; }
@media print{
  .print-notes{ display:none; }

  /* A BOXED AREA WITH ROOM AROUND IT, not two lines of fine print above the disclaimer.
     Cleve, 2026-11-10, reading the first printed sheet: "the print out needs more breathing room
     and maybe a border for more of a noticeable area for notes". It was a 10px top margin and
     nothing else, so the heading sat hard against the figures above it and the note ran straight
     into the grey disclaimer box below -- the one part of the sheet in the broker's own voice read
     as the smallest thing on it.

     BORDERED, BUT NOT FILLED, which is what separates it from the disclaimer. That box is a grey
     fill carrying boilerplate nobody reads; this is white with a rule around it, so the two cannot
     be mistaken for each other at a glance.

     NO GOLD RULE ON THIS ONE, deliberately. The sheet carries exactly three 3px gold rules --
     #printHeader, .print-foot and the signature -- and hub_screen counts them by name. A fourth
     would read as brand furniture rather than as content, and would fail that count. The heading
     takes the gold instead, which is how the rest of the sheet marks a derived total. */
  .print-notes.has-notes{
    display:block;
    break-inside:avoid;
    margin:18px 0 16px;
    padding:13px 16px 14px;
    border:1px solid var(--line);
    border-radius:6px;
    background:#fff;
  }
  .print-notes h3{
    font-size:10.5px; text-transform:uppercase; letter-spacing:0.12em;
    color:var(--gold-text); margin:0 0 7px; font-weight:700;
  }
  .print-notes p{
    font-size:12.5px; color:var(--ink); line-height:1.6; margin:0;
    white-space:pre-wrap;        /* the broker's own line breaks survive onto the sheet */
  }
}

/* -------------------------------------------------------------------------------------------
   7. SAVED CALCULATIONS. The list is closed until asked for -- see shared/mos-store.js for why.
   ------------------------------------------------------------------------------------------- */
.saves-wrap{ position:relative; }
.saves-panel{
  display:none;
  position:absolute; right:0; top:calc(100% + 6px); z-index:40;
  min-width:280px; max-width:360px; max-height:50vh; overflow-y:auto;
  background:var(--panel); border:1px solid var(--line); border-radius:6px;
  box-shadow:0 8px 24px rgba(0,0,0,0.18); padding:10px;
}
.saves-panel.open{ display:block; }
.saves-row{ display:flex; align-items:center; gap:8px; padding:3px 0; }
.saves-open{
  flex:1; text-align:left; background:transparent; border:none; cursor:pointer;
  font-family:inherit; font-size:13.5px; color:var(--ink); padding:5px 6px; border-radius:4px;
}
.saves-open:hover{ background:var(--fill-subtle); color:var(--gold-text); }
.saves-del{
  background:transparent; border:1px solid var(--line); color:var(--ink-soft);
  font-family:inherit; font-size:11px; padding:3px 7px; border-radius:4px; cursor:pointer;
}
.saves-del:hover{ border-color:var(--red); color:var(--red); }
.saves-empty{ font-size:12.5px; color:var(--hint); padding:6px; }
.saves-msg{ font-size:11.5px; color:var(--hint); padding:4px 6px 0; }
@media screen{
  :root[data-theme="dark"] .saves-panel{
    background:rgba(16,28,46,0.98); border-color:var(--ctl-line);
    backdrop-filter:blur(24px) saturate(1.5);
    -webkit-backdrop-filter:blur(24px) saturate(1.5);
  }
}
/* Neither the control nor its list is part of a client's sheet. */
@media print{ .saves-wrap, .saves-panel{ display:none; } }

/* -------------------------------------------------------------------------------------------
   8. THE BUILD STAMP. Quiet, present, and on every page -- see shared/mos-version.js.

   Deliberately understated: it exists so a deploy can be verified, not to be read during a client
   meeting. It sits on its own line under the brand footer, at the smallest size on the page.
   ------------------------------------------------------------------------------------------- */
.build-stamp{
  display:block;
  margin-top:4px;
  font-size:10.5px;
  letter-spacing:0.06em;
  color:var(--hint);
  font-variant-numeric:tabular-nums;
}
/* IT DOES NOT PRINT, AND NOT BY CHOICE. The stamp lives inside footer.brand-footer, which every
   page sets to display:none in print -- and a child cannot un-hide itself inside a hidden parent, so
   a rule here claiming otherwise would be decorative. An earlier draft of this comment asserted that
   it prints; it did not, and the assertion was the only thing making it look as though it did.

   WORTH REVISITING, as its own decision rather than as a side effect of where the span happens to
   sit: a client sheet carrying the build that produced it is how a figure queried six months later
   gets traced back to the arithmetic behind it, and the Hub keeps no record of what it calculated,
   so the printed sheet is the only artifact that exists. Putting it on the sheet means a span inside
   each print block, not a rule here. */

/* -------------------------------------------------------------------------------------------
   9. THE BASE SCREEN CHROME. The reset, the body type, the header lockup, the panel, the form
   label, the row helper, the buttons and the footer -- once, instead of in five page <style>
   blocks.

   IT IS LAST IN THIS FILE ON PURPOSE, AND THAT IS NOT TIDINESS. These rules used to sit in each
   page's <style>, which is the LAST thing the browser reads, so they beat every equal-specificity
   rule in this file. Moving them to the top of this file would have moved them to the FRONT of
   that queue and quietly handed two arguments to the other side. Both were caught by measuring,
   not by reading:

     .panel vs .report-details (section 6). That section sets padding:14px 22px 16px and its
       comment explains at length why a report-details card is tighter than a panel. On buy-sell
       that has never been in effect: the page's own .panel came later and won, so the card ships
       at 22px/20px -- measured. Put .panel at the top of this file and section 6 finally wins,
       and buy-sell's card loses 12px of height. The intent in section 6 may well be right, but
       making it true is a visual change to a live tool and therefore its own decision, not a side
       effect of a de-duplication. Last position keeps it exactly as it ships.
     .wordmark gap vs .wordmark row-gap (section 5, below 820px). `gap:10px` is a shorthand that
       sets row-gap, and the fold rule sets row-gap:8px. The page copy won; from the top of this
       file it would lose. Same shape of defeated intent, same ruling.

   SO THE RULE FOR ANYTHING ADDED HERE: this block keeps the page block's old seat in the cascade.
   Add to the END of it, and if a declaration here collides with an earlier section of this file,
   that is the collision the pages were already winning.

   WHAT WENT WRONG WITHOUT IT. renewal-review carries no base chrome, because section 1's header
   said the duplication was over and it was over for tokens only. Measured on the live file in
   Chrome at 1440x900: body font-family resolved to Times, the wordmark to 0px tracking, and the
   print button to border-radius 0. The button's GOLD was right, which is the part that made it
   look finished -- :root[data-theme="dark"] button.primary in section 2 painted the fill with no
   base rule under it to supply the shape. A page can inherit half a control and look deliberate.

   WHAT IS HERE IS WHAT WAS THE SAME IN EVERY COPY, compared declaration by declaration across all
   six existing pages before anything moved. Where a page's copy differed it KEEPS ITS OWN, and
   this file does not try to win that argument:

     regular-mortgage keeps every one of its base rules, and it is the only page that does.
       Twelve of them carry different values -- body background #FFFFFF not --paper, header text
       and brand line hardcoded to #EDEEF0/#9AA3B2, a tighter .panel, its own .hint, .row2,
       .headline-figure, .kv-row .v.gold, button.ghost:hover, .disclaimer and footer colour. Those
       are decisions, not drift to be merged away by a lane doing a different job.
       AND ITS BUTTONS CANNOT BE MOVED EVEN THOUGH THEY ARE IDENTICAL. That page declares
       `.mode-seg button, .seg button, .hdr-actions button, ...` with the --btn-h spec BEFORE its
       own button.primary, at equal specificity, so button.primary currently wins on padding,
       radius and font-size for the header Print button. Delete the page copy and the spec rule
       starts winning instead, because this file loads earlier than both -- a 11px/18px button
       becomes a 0/15px one. Byte-identical was not sufficient; source order decided it.
     THE .headline-figure FAMILY STAYS IN ALL FIVE PAGES, and it is the one candidate that failed
       the measurement rather than the reading. Four pages declare it with display:flex,
       align-items:baseline and justify-content:space-between; regular-mortgage declares the same
       selector with padding, border and margin ONLY, because on that page the flex row is an
       inner .hf-row. Keeping a page copy protects a page from a value it disagrees with -- it
       cannot protect it from a declaration it never makes. Collected here, the three flex
       declarations reached regular-mortgage unopposed and turned its headline block into a flex
       container, measured as .hf-row collapsing from 854px wide to 71px. A rule is only movable
       when every page that keeps its own version declares EVERY property the shared one sets.
       The two children (.label, .value) are movable by that test, but they are left with the
       parent: renewal-review has no .headline-figure at all, so splitting the family across two
       files would buy nothing.
     extra-payment keeps .num, which carries the SANS stack where the other four carry mono.
       That looks like a bug in a class whose whole job is the mono stack, but it is a value
       change on a shipped page and belongs to whoever decides it.
     The .field input / :focus family stays in all five pages. The four selector lists genuinely
       differ -- pi text+number, private number+select, sell text+number+date+select, regular an
       eight-selector list of its own -- and extra-payment's own client-name text input sits
       OUTSIDE its page's list, unstyled. Any union rule here would restyle that input. Moving
       `button:focus-visible` would also hand the saved-calculations buttons in section 7, which
       have no focus rule of their own, a gold ring they do not have today.
     The .status-pill and .seg families stay. Four pages use pills, three use segments, and
       renewal-review uses neither, so there is nothing to collect and regular's values differ.
     body line-height:1.4 stays in the five calculators. The landing page has never had it --
       measured `normal` -- so a rule here would change a page this work must leave alone.
     Every @media print rule stays in its page. A print block is that tool's report layout, and
       renewal-review's is the one thing it does have in full.

   THE CASCADE IS THE WHOLE RISK AND IT RUNS ONE WAY BETWEEN THE FILES. This file is a <link> and
   every page's <style> follows it, so at equal specificity the page wins -- which is what lets a
   page keep its own copy and what makes a deletion safe only when the page had nothing else to
   say. Nothing here can override a page. Inside this file the order is the ordinary one, which is
   why this block sits at the bottom.

   HOW THIS WAS CHECKED, since no suite in the repo can see a computed style. hub_screen_v1.mjs
   drives a DOM stub with no layout engine and no CSS. The worktree was served over local HTTP and
   Chrome headless driven over CDP with Emulation.setDeviceMetricsOverride, and every element on
   all seven pages had 68 computed properties plus all 30 custom properties recorded in both
   themes, at 1440x900 and again at 430px, before the move and after it. The five existing tools
   and the landing page come back identical on every cell. That is the gate; it lives outside the
   repo, so re-measure rather than trust this paragraph.
   ------------------------------------------------------------------------------------------- */
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
/* line-height is deliberately NOT here. See the landing-page note above. */
body{
  background:var(--paper); color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
.num{
  font-family:"SF Mono","IBM Plex Mono",ui-monospace,"Courier New",monospace;
  font-variant-numeric:tabular-nums; letter-spacing:-0.01em;
}

/* THE HEADER. Section 2 pins it and tints it; section 5 folds it; this is the thing they act on.
   The 820px fold rule's own comment used to say padding could not be set from this file because
   "each page declares its own header.top" -- true then, true of regular-mortgage now, and no
   longer true of the rest. The fold rule still sets only flex-wrap, row-gap and width, so nothing
   there changes; the note is corrected where it sits. */
header.top{
  background:var(--navy); color:var(--on-navy); padding:18px 24px;
  display:flex; align-items:center; justify-content:space-between;
  border-bottom:3px solid var(--gold);
}
.wordmark{ display:flex; align-items:baseline; gap:10px; }
.wordmark .mos{ font-weight:800; font-size:15px; letter-spacing:0.22em; text-transform:uppercase; }
.wordmark .hub{ font-weight:400; font-size:15px; letter-spacing:0.22em; text-transform:uppercase; color:var(--gold-soft); }
.wordmark .divider{ width:1px;height:14px;background:rgba(255,255,255,0.25); }
.brand-line{ text-align:right; font-size:11px; color:var(--on-navy-mute); line-height:1.5; }
.nav-back{
  font-size:11px; color:var(--gold-soft); text-decoration:none;
  letter-spacing:0.04em; border:1px solid rgba(255,255,255,0.2);
  padding:4px 10px; border-radius:4px; margin-left:14px;
}
.nav-back:hover{ border-color:var(--gold); color:var(--gold); }

/* THE PANEL. Section 2 gives it glass and section 5b trims the field rhythm inside it. */
.panel{ background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:22px 22px 20px; }
.panel + .panel{ margin-top:18px; }
.panel h2{
  font-size:12px; text-transform:uppercase; letter-spacing:0.12em; color:var(--ink-soft);
  margin:0 0 16px; display:flex; align-items:center; justify-content:space-between;
}
/* The label's own margin and size are set in section 5b, with the measurements that chose them. */
.field label{ display:block; color:var(--ink-soft); }

/* -------------------------------------------------------------------------------------------
   THE CONTROL ITSELF. Collected 2026-11-20, and the note above this block said for a day that it
   could not be -- so here is why that was right then and wrong now.

   WHAT THE FIVE LISTS ACTUALLY WERE, and the measurement that settled them. Each page named the
   input types it believed it had, and no two agreed:

     pi         text, number
     private    number, select
     regular    number, text, select
     extra      number, select
     buy-sell   text, number, date, select      <- already the full union

   The DECLARATION BODY was byte-identical in four of the five. Only regular-mortgage differed, on
   one declaration, and not in effect: background:#FCFCFB where the others write var(--input-bg),
   and #FCFCFB IS the light value of that token. It also carries its own dark override at higher
   specificity, so the hardcoded literal is never the value in dark either. Byte-different, pixel-
   identical, measured in both themes -- which is why its copy is gone and the twelve other
   hardcoded rules listed above are not.

   THE CASE THAT BLOCKED THIS, AND WHAT CHANGED. extra-payment's client-name input is a
   `.field input[type=text]` and its page's list stopped at number and select, so it has been
   rendering as a raw browser control -- 2px inset border, white fill, Arial, 169px -- beside
   neighbours with the house treatment. Last time that was read as "a union rule would restyle a
   live page", which was true, and the conclusion drawn was "so do not union", which was the wrong
   half. The right reading is that extra-payment has a bug the union fixes, and the thing to do
   about a visible change on a shipped page is to flag it and have somebody look, not to keep five
   copies of a rule to avoid mentioning it. It is flagged in DEPLOY_INTENT.md with before and after
   values. Nothing else moves: every other in-field control on all six pages was already reached by
   its own page's list, which was checked by asking the browser el.matches(<that page's literal
   list>) on all 104 controls rather than by reading the CSS again.

   WHAT IS DELIBERATELY NOT IN THIS SELECTOR. Checkboxes -- regular's four and buy-sell's one -- sit
   in .checkline, not .field, and are sized 15px square by their own rule; they are not controls you
   type into and a 100%-width checkbox would be absurd. The textarea is not here either: it has its
   own rule in section 7, keyed on .notes-field, and the same seven properties would fight it.
   ------------------------------------------------------------------------------------------- */
.field input[type=text],
.field input[type=number],
.field input[type=date],
.field select{
  width:100%; border:1px solid var(--line); border-radius:4px;
  background:var(--input-bg); font-size:15px; color:var(--ink); font-family:inherit;
}

/* THE FOCUS RING, AND A CORRECTION TO MY OWN REASONING. The note above this block also said moving
   `button:focus-visible` here would hand the saved-calculations buttons in section 7 "a gold ring
   they do not have today". That was a reading of the CSS and it was simply false: every page
   already declared `button:focus-visible` page-locally, which matches every button on that page,
   those two included. Measured by focusing all 153 focusable elements across the seven pages and
   reading the computed outline: on pi 11 of 12 already had the gold ring, private 18 of 19, extra
   18 of 19, buy-sell 29 of 31. The only element missing it on those pages is a.nav-back, which is
   an anchor and is reached by no page's rule -- unchanged here, and noted in DEPLOY_INTENT.md as
   its own question rather than folded into this one.

   renewal-review had 1 of 36, the one being the theme toggle from section 4. Every input, select,
   button and the textarea showed the browser's default blue 1px auto ring.

   THE LIST IS THE UNION AND IT REACHES NOTHING NEW on the five. `.field input:focus` is broader
   than regular's `[type=text]:focus, [type=number]:focus` pair, but the extra it reaches is
   `[type=date]` and regular has none. `.seg button:focus-visible` was declared by private, extra
   and regular and is inert on the two pages without a segmented control. regular's own
   `.mode-seg button:focus-visible` is navy rather than gold, at higher specificity, and keeps
   winning. Checkboxes and the anchor are untouched, because neither is reached. */
.field input:focus,
.field select:focus,
button:focus-visible,
.seg button:focus-visible{
  outline:2px solid var(--gold); outline-offset:1px;
}
/* TWO FIELDS ABREAST. renewal-review's stylesheet already referred to "the shared row2 and row3
   helpers" -- which did not exist anywhere, so its two .row2 blocks laid out as plain stacked
   divs. row3 is NOT here: only buy-sell declares it, with a 420px breakpoint of its own. */
.row2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.hint{ font-size:11.5px; color:var(--hint); margin-top:4px; }

/* .headline-figure IS NOT HERE. See the note above -- regular-mortgage declares the selector
   without display, so it could not defend itself against a flex container arriving from here. */

.kv-row{
  display:flex; justify-content:space-between; align-items:center;
  padding:7px 0; border-bottom:1px solid var(--line-soft); font-size:13.5px;
}
.kv-row:last-child{ border-bottom:none; }
.kv-row .k{ color:var(--ink-soft); }
.kv-row .v{ font-weight:600; color:var(--ink); }
.kv-row .v.gold{ color:var(--gold-text); }

/* .actions WAS ALREADY DEAD IN ALL FIVE COPIES and is kept rather than quietly dropped. No page
   has an element with the class -- the buttons moved into .hdr-actions in section 5 -- but three
   print blocks still hide `.actions`, so the name is still referred to. Collecting it here makes
   that visible in one place instead of five; deleting it is a separate decision from this one. */
.actions{ display:flex; gap:10px; margin-top:4px; }
/* THE PRIMARY BUTTON, AND THE RULE RENEWAL-REVIEW WAS MISSING. Section 2 repaints the fill gold on
   dark at higher specificity; the shape comes from here. regular-mortgage overrides the dark fill
   again, more specifically still, to an outlined transparent -- that is its own decision and it is
   untouched by this. */
button.primary{
  background:var(--navy); color:#fff; border:none; padding:11px 18px; border-radius:4px;
  font-size:13.5px; font-weight:600; cursor:pointer; letter-spacing:0.01em;
}
button.primary:hover{ background:var(--navy-soft); }
button.ghost{
  background:transparent; border:1px solid var(--line); color:var(--ink-soft);
  padding:11px 16px; border-radius:4px; font-size:13.5px; cursor:pointer;
}
button.ghost:hover{ border-color:var(--gold); color:var(--gold-text); }

.disclaimer{
  font-size:11.5px; color:var(--hint); line-height:1.6; margin-top:26px;
  padding-top:16px; border-top:1px solid var(--line);
}
footer.brand-footer{ text-align:center; font-size:11.5px; color:var(--on-navy-mute); padding:20px; }
