
      :root {
        
        
        
        
        
        
        
        --c30: var(--site-primary);
        --c30-soft: var(--site-primary-soft);
        --c15: var(--site-secondary);
        --c15-soft: var(--site-secondary-soft);
        --accent: var(--site-primary);
        
      }
      @media (prefers-color-scheme: dark) {
        :root {
          
          
          
          
          
          
          
          --c30: var(--site-primary);
          --c30-soft: var(--site-primary-soft);
          --c15: var(--site-secondary);
          --c15-soft: var(--site-secondary-soft);
          --accent: var(--site-primary);
          
        }
      }
      * {  }
      html { scrollbar-gutter: stable both-edges; }
      body {
        margin: 0;
        background: var(--bg);
        color: var(--ink);
        font-family: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
        font-size: 16px;
        line-height: 1.5;
        -webkit-font-smoothing: antialiased;
      }
      .wrap {    }
      .mono { font-family: "IBM Plex Sans", system-ui, sans-serif; }

      header.page-head { margin-bottom: 22px; }
      header.page-head h1 {
        
        
        font-weight: 700;
        letter-spacing: -0.01em;
        margin: 0 0 10px;
      }
      header.page-head p { margin: 0;  color: var(--ink-2); }
      header.page-head p strong { color: var(--ink); font-weight: 600; }

      /* ---------- stat tiles ---------- */
      .tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0 26px; }
      .tile {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 10px;
        padding: 14px 16px 12px;
        box-shadow: var(--shadow);
      }
      .tile .k { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
      .tile .v { font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 27px; font-weight: 600; line-height: 1.1; }
      .tile .v small { font-size: 15px; font-weight: 500; color: var(--ink-2); }
      .tile .n { font-size: 13.5px; color: var(--ink-2); margin-top: 5px; line-height: 1.4; }
      .tile.green .v { color: var(--c30); }
      .tile.rust .v { color: var(--c15); }

      /* ---------- cards ---------- */
      .card {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 12px;
        box-shadow: var(--shadow);
        padding: 20px 22px 16px;
        margin-bottom: 20px;
      }
      .card h2 {   margin: 0 0 4px; letter-spacing: -0.005em; }
      .card .sub { color: var(--ink-2);  margin: 0 0 6px; }
      .chart-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 18px; }

      .chart-box { position: relative; margin-top: 8px; }
      .chart-box svg { display: block; width: 100%; height: auto; }
      .tooltip {
        position: absolute; pointer-events: none; opacity: 0; transition: opacity 0.12s;
        background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
        padding: 8px 11px; font-size: 13.5px; line-height: 1.45; white-space: nowrap; z-index: 5;
      }
      .tooltip .d { font-weight: 700; margin-bottom: 2px; }
      .tooltip .r { font-family: "IBM Plex Sans", system-ui, sans-serif; font-weight: 600; }
      .legend { display: flex; gap: 18px; flex-wrap: wrap;  color: var(--ink-2); margin-top: 8px; }
      .legend .sw { display: inline-block; width: 18px; height: 3px; border-radius: 2px; margin-right: 7px; vertical-align: middle; }
      .legend .swd { display: inline-block; width: 18px; border-top: 2px dashed var(--ink-3); margin-right: 7px; vertical-align: middle; }

      /* ---------- calculator ---------- */
      .calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 34px; align-items: start; }
      .calc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-top: 12px; }
      .calc-field label { display: block;  font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
      .calc-field input, .calc-field select {
        width: 100%; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink);
        background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
      }
      .calc-field input { font-family: "IBM Plex Sans", system-ui, sans-serif; }
      .calc-field input:focus-visible, .calc-field select:focus-visible { outline: 2px solid var(--c30); outline-offset: 1px; }
      .stay-row { margin-top: 16px; }
      .stay-row .stay-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
      .stay-row label {  font-weight: 600; color: var(--ink-2); }
      .stay-big { font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 26px; font-weight: 600; line-height: 1.1; }
      .slider-row { margin: 6px 0 2px; }
      .slider-row input[type="range"] { width: 100%; accent-color: var(--accent); height: 28px; }
      .adv-toggle {
        display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 8px 0 2px;
        font: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; margin-top: 10px;
      }
      .adv-toggle .chev { width: 18px; height: 18px; color: var(--ink-3); transition: transform 0.2s; }
      .adv-toggle[aria-expanded="false"] .chev { transform: rotate(-90deg); }
      .verdict { border-radius: 10px; padding: 13px 16px; margin-bottom: 12px; font-size: 15px; line-height: 1.45; }
      .verdict strong { display: block; font-size: 17px; margin-bottom: 2px; }
      .verdict.ok { background: var(--c30-soft); }
      .verdict.ok strong { color: var(--c30); }
      .verdict.rent { background: var(--c15-soft); }
      .verdict.rent strong { color: var(--c15); }
      .pay-out { background: var(--surface-2); border-radius: 10px; padding: 16px 18px; }
      .pay-out .row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 5px 0; }
      .pay-out .row + .row { border-top: 1px solid var(--line); }
      .pay-out .k { font-size: 14px; color: var(--ink-2); }
      .pay-out .val { font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 17px; font-weight: 600; text-align: right; }
      .pay-out .val.big { font-size: 26px; }
      .pay-out .val.buy { color: var(--c30); }
      .pay-out .val.rent { color: var(--c15); }
      .pay-note {  color: var(--ink-2); margin-top: 10px; line-height: 1.5; }

      /* ---------- collapsible sections ---------- */
      .collapse-head {
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        width: 100%; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit; text-align: left;
      }
      .collapse-head h2 { margin: 0; }
      .chev { flex: none; width: 22px; height: 22px; color: var(--ink-3); transition: transform 0.2s; }
      .collapsed .chev { transform: rotate(-90deg); }
      .collapse-body { margin-top: 10px; }
      .collapsed .collapse-body { display: none; }

      /* ---------- table ---------- */
      .tbl-wrap { overflow-x: auto; }
      table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
      th, td { padding: 6px 10px; text-align: right; }
      th:first-child, td:first-child { text-align: left; }
      thead th {  text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); border-bottom: 2px solid var(--line); }
      tbody td { border-bottom: 1px solid var(--line); font-family: "IBM Plex Sans", system-ui, sans-serif; }
      tbody td.y { font-family: "IBM Plex Sans", sans-serif; font-weight: 600; }
      tbody tr:last-child td { border-bottom: 0; }
      tbody tr.stay-row-hl td { background: var(--c30-soft); font-weight: 600; }
      td.pos { color: var(--c30); font-weight: 600; }
      td.neg { color: var(--c15); font-weight: 600; }

      /* ---------- explainers ---------- */
      .expl h3 {   margin: 18px 0 4px; }
      .expl h3:first-child { margin-top: 4px; }
      .expl p { margin: 0 0 8px; color: var(--ink-2);  }
      .expl p strong { color: var(--ink); }

      /* ---------- source ---------- */
      .source-toggle {
        display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 6px 0;
        font: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink-2); cursor: pointer;
      }
      .source-toggle .chev { width: 18px; height: 18px; transition: transform 0.2s; }
      .source-toggle[aria-expanded="false"] .chev { transform: rotate(-90deg); }
      .source-body {  color: var(--ink-2); line-height: 1.6; padding-bottom: 8px; }
      .source-body a { color: var(--accent); }
      footer { margin-top: 26px; font-size: 13px; color: var(--ink-3); }
      @media (max-width: 560px) { }
      .settings-btn {
           
          
           
          
      }
      @media (prefers-color-scheme: dark) { }

      @media (max-width: 760px) {
        .tiles { grid-template-columns: repeat(2, 1fr); }
        .calc-grid { grid-template-columns: 1fr; }
        .card { padding: 16px 16px 12px; }
      }
    
/* Trial: scroll the annual comparison inside its card, with frozen headings. */
#tableCard .tbl-wrap {
  max-height: 360px;
  max-height: min(360px, 55vh);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior: none;
  border: 1px solid var(--site-line);
  border-radius: 8px;
}
#tableCard .tbl-wrap:focus-visible { outline: 2px solid var(--site-primary); outline-offset: 3px; }
#tableCard table { border-collapse: separate; border-spacing: 0; min-width: 520px; }
#tableCard thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--site-surface);
  color: var(--site-muted);
  box-shadow: 0 1px 0 var(--site-line);
}
@media (max-width: 640px) {
  #tableCard .tbl-wrap { max-height: min(320px, 55vh); }
}

/* Hide the scrollbars without disabling touch, wheel or keyboard scrolling. */
#tableCard .tbl-wrap::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* Extra separation between the scroll area and its navigation hint. */
#yearTableScrollHint { padding-top: 4px; }
