/* Page styles of the rate-scenario tools. MOVED verbatim from web/rate-scenario.html (git tag checkpoint-before-split) by
   scripts/split/rate_scenario.py when every tool became its own page (2026-09-20). */
@font-face{font-family:"Aaux Next";src:url("../../fonts/AAUXNEXT-RG.OTF") format("opentype");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Aaux Next";src:url("../../fonts/AAUXNEXT-RGIT.OTF") format("opentype");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"Aaux Next";src:url("../../fonts/AAUXNEXT-BD.OTF") format("opentype");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"Aaux Next";src:url("../../fonts/AAUXNEXT-BDIT.OTF") format("opentype");font-weight:700;font-style:italic;font-display:swap}
  :root{
    --navy:#003366;--red:#BB3D32;--warm-red:#D04438;--red-deep:#7A0C1E;--paper:#EAF1F8;--panel:#FFFFFF;
    --line:#E8EAED;--mute:#758D99;--teal:#2A7D4F;--ice:#EAF3FA;
    --shadow:0 1px 2px rgba(11,31,58,.06),0 8px 24px rgba(11,31,58,.06);
  }
  *{box-sizing:border-box}html,body{margin:0}
  body{background:transparent;color:var(--navy);font-family:"Aaux Next",'Source Sans 3',system-ui,sans-serif;line-height:1.5;-webkit-font-smoothing:antialiased}
  .wrap{max-width:1140px;margin:0 auto;padding:0 22px}
  /* nav */
  .fmnav{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:30}
  .fmnav .in{max-width:1140px;margin:0 auto;padding:0 22px;height:64px;display:flex;align-items:center;gap:28px}
  .fmnav .logo{font-weight:800;font-size:27px;color:var(--navy);text-decoration:none;font-style:italic;letter-spacing:.5px}
  .fmnav .logo i{color:var(--red);font-style:italic}
  .fmnav .menu{display:flex;gap:24px}
  .fmnav .menu a{color:var(--navy);text-decoration:none;font-size:15px;font-weight:600}
  .fmnav .menu a:hover{color:var(--red)} .fmnav .menu .car{color:var(--red);font-size:8px;vertical-align:2px}
  .fmnav .sp{flex:1}
  .fmnav .contact{background:var(--warm-red);color:#fff;text-decoration:none;font-weight:600;font-size:15px;padding:9px 30px;border-radius:32px}
  @media(max-width:860px){.fmnav .menu{display:none}}
  .asof{font-size:13px;color:var(--mute);margin:20px 0 8px;font-weight:600}
  .asof .live{color:#2A7D4F;font-weight:700} .asof .offline{color:#D04438;font-weight:700}
  /* tabs — same shape as tips.html / inflation-tools.html */
  .tabs{display:flex;gap:4px;margin:22px 0 0;border-bottom:1px solid var(--line);flex-wrap:wrap;overflow-x:auto}
  .tab{appearance:none;background:none;border:0;cursor:pointer;
    font-family:inherit;font-weight:700;font-size:14.5px;color:var(--mute);
    padding:12px 14px;border-bottom:3px solid transparent;margin-bottom:-1px;letter-spacing:-.01em;white-space:nowrap}
  .tab:hover{color:var(--navy)}
  .tab[aria-selected="true"]{color:var(--navy);border-bottom-color:var(--red)}
  .tab:focus-visible{outline:2px solid var(--red);outline-offset:2px;border-radius:6px}
  .view{display:none;padding:2px 0 10px}
  .view.active{display:block}
  /* slider ⇄ editable date box (site convention) */
  .sliderrow{display:flex;gap:10px;align-items:center;flex-wrap:wrap}   /* wraps on a phone: the step buttons and the comparison day's box (labs-59) */
  .sliderrow input[type=range]{width:190px;accent-color:var(--navy)}
  /* yield-curve tab */
  .chartbox{position:relative;height:400px;border:1px solid var(--line);border-radius:12px;background:var(--panel);box-shadow:var(--shadow);padding:14px 16px;margin-bottom:14px}
  .cvmsg{padding:36px 18px;font-size:13.5px;color:var(--mute);text-align:center}
  /* controls */
  .controls{display:flex;flex-wrap:wrap;gap:22px;align-items:flex-end;margin:18px 0 14px}
  .fld{border:1px solid var(--line);border-radius:10px;background:var(--panel);padding:7px 12px;font-family:inherit;font-size:14px;font-weight:600;color:var(--navy)}
  .fld:focus{outline:2px solid var(--navy);outline-offset:-1px}
  input[type=number].fld{width:96px}
  .hz-custom{width:70px;margin-left:8px;font-family:Roboto Mono}  /* "Other…" horizon box (as tips.html) */
  .readout{display:flex;flex-wrap:wrap;gap:26px;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:14px 18px;margin-bottom:16px;box-shadow:var(--shadow)}
  /* As-of merged stat card (mirrors tips.html): ONE grid, "As of" row above
     the "End of horizon" row; each metric's before/after share a column so
     they stack vertically (2Y over 2Y, curve over end curve, etc.). The first
     six columns are max-content; the last (Fed funds) takes the remaining
     width and right-aligns, so the stat sits at the card's right edge like
     every other page's .stat.ff. */
  .readout.asof-card{display:grid;grid-template-columns:repeat(6,max-content) 1fr;gap:4px 26px}
  .readout.asof-card .stat.end{border-top:1px solid var(--ice);padding-top:8px;margin-top:4px}
  .stat .k{font-size:10.5px;text-transform:uppercase;letter-spacing:.12em;color:var(--mute);font-weight:600}
  .stat .v{font-family:Roboto Mono;font-weight:600;font-size:18px;color:var(--navy)}
  .stat .v small{font-size:11px;color:var(--mute);font-weight:500}
  .stat .s{font-size:11px;color:var(--mute);font-weight:500;line-height:1.3}   /* sub-line: "as of <date>" under the data-bar curve */
  .stat.ff{margin-left:auto;text-align:right} .stat.ff .v{color:var(--teal)}
  .readout.asof-card .stat.ff{margin-left:0;text-align:right;justify-self:stretch}
  /* ON A PHONE THE MERGED CARD WRAPS (Phase 8, section 4: in the legacy comparison view, ?test=legacy, its seven
     max-content columns ran to x=654 at 390px and the page scrolled sideways by 264px): the cells flow in rows, and the
     End-of-horizon row starts on a line of its own under a rule */
  @media(max-width:600px){
    .readout.asof-card{display:flex;flex-wrap:wrap;gap:8px 18px}
    .readout.asof-card .stat.end{border-top:0;padding-top:0;margin-top:0}
    .readout.asof-card .stat:not(.end) + .stat.end{flex-basis:100%;border-top:1px solid var(--ice);padding-top:8px;margin-top:4px}
    .readout.asof-card .stat.ff{text-align:left}
  }
  /* grid — fminvest scenario table look */
  .gridwrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px;background:var(--panel);box-shadow:var(--shadow)}
  table.heat{border-collapse:collapse;width:100%;font-size:14px;min-width:880px}
  table.heat caption{caption-side:top;text-align:left;padding:18px 16px 6px;font-size:13px;color:var(--mute)}
  table.heat th,table.heat td{text-align:center}
  thead th{position:sticky;top:0;background:#0e2236;z-index:2;font-weight:600;color:#fff;font-size:13px;padding:14px 12px;border-right:1px solid #1c3450}
  thead th.corner{text-align:center;vertical-align:middle;background:var(--ice);color:var(--navy);font-size:12px;text-transform:uppercase;letter-spacing:.06em;border-right:1px solid var(--line);font-weight:700}
  thead th.spanhead{background:#13344f;color:#fff;font-size:11px;text-transform:uppercase;letter-spacing:.1em;font-weight:600}
  thead th.realized{background:#13344f}
  tbody th{position:sticky;left:0;background:var(--ice);z-index:1;text-align:left;font-weight:600;color:#00182B;padding:13px 16px;white-space:nowrap;border-right:1px solid var(--line)}
  tbody th small{display:block;font-size:11px;color:var(--mute);font-weight:500}
  tbody tr:nth-child(even) th{background:#dfeaf3}
  td.cell{font-weight:500;color:#00182B;padding:14px 12px;border-bottom:1px solid var(--line);border-right:1px solid var(--line);font-variant-numeric:tabular-nums}
  td.cell.realized{font-weight:700;border-left:2px solid #0e2236}
  td.cell.strong{font-weight:700}
  td.cell.ended{outline:2px solid var(--navy);outline-offset:-2px}
  /* the grid's one row when no benchmark lasts the horizon (Phase 5, section 3 item 3): one cell across the grid, the
     label then the sentence; the sentence block sticks to the left of the scroll box, so on a phone it stays in view
     and wraps inside the screen while the box scrolls sideways */
  table.heat tbody tr.norows th{white-space:normal;max-width:none;font-weight:400;color:#54707F;line-height:1.45;padding:14px 16px}
  tr.norows th .hd{display:block;font-weight:700;color:#00182B;margin-bottom:4px}
  tr.norows th .nt{display:block;position:sticky;left:16px;max-width:calc(100vw - 44px - 32px)}
  @media(max-width:600px){table.heat tbody tr.norows th{min-width:0;max-width:none;padding:10px 12px} tr.norows th .nt{left:12px;max-width:calc(100vw - 44px - 24px)}}
  /* THE GRID ON A PHONE (2026-10-02, Phase 3: plan 1c L6; the same rule as the tips family's, tips.css). At 390px the
     scenario grid showed one of its seven columns beside a 231px row label, and its caption ran past the screen inside
     the scroll box. On a phone: smaller type and padding, the row labels wrap and stay in view as the grid scrolls
     sideways (the corner with them), the spanning heading starts at the first data column, and the caption stays in
     view. */
  @media(max-width:600px){
    table.heat{min-width:0;font-size:11.5px}
    td.cell{padding:8px 4px}
    table.heat thead th{padding:8px 4px;font-size:10.5px}
    table.heat tbody th{padding:8px 6px;font-size:11px;white-space:normal;min-width:104px;max-width:124px}
    table.heat thead th.corner{position:sticky;left:0;z-index:3;padding:8px 6px;font-size:9.5px;letter-spacing:.03em}
    table.heat thead th.spanhead{text-align:left;padding-left:8px}
    /* the band's words stay in view beside the sticky corner while the grid scrolls sideways, wrapped to the width left
       of the screen (Phase 8, section 4: at 390px "Parallel shift in the Treasury par curve" was cut at the box edge);
       --sh-left is the sticky corner's width plus the heading's padding, set by the page as it draws the grid;
       --sh-right is the Realized column's width plus a margin (0 when it is not shown): a sticky block cannot leave
       its heading cell, so a band wider than the shift columns' visible span slid under the corner once the grid was
       scrolled to the Realized column at a past as-of date */
    table.heat thead th.spanhead .sh{display:inline-block;position:sticky;left:var(--sh-left,150px);max-width:calc(100vw - 52px - var(--sh-left,150px) - var(--sh-right,0px));white-space:normal;line-height:1.35}
    table.heat caption{position:sticky;left:0;box-sizing:border-box;max-width:calc(100vw - 44px);padding:14px 12px 6px}
  }
  .view .axislabel{margin-bottom:0}
  .axislabel b{color:var(--navy)}
  footer{margin-top:30px;border-top:1px solid var(--line);background:var(--panel)}
  footer .wrap{padding:22px 22px 40px}
  footer h4{font-size:11px;text-transform:uppercase;letter-spacing:.14em;margin:0 0 8px}
  footer p{font-size:11.5px;color:var(--mute);margin:0 0 10px;max-width:980px}
  code{font-family:Roboto Mono;font-size:11px;background:#EEF2F6;padding:1px 5px;border-radius:4px;color:var(--navy)}
  /* the Treasury Yield Curve's sections (labs-59, 2026-10-28): the spread between two maturities and the on-the-run
     table under the curve, each opened by a section heading; the spread chart's own title
     (the export engine names the chart from it) sits above its panel */
  h2.sec{font-size:16px;color:var(--navy);margin:30px 0 4px;font-weight:700}
  h3.cvsub{font-size:13.5px;color:var(--navy);margin:8px 0 6px;font-weight:600}
