/* House Regrets: the metro sheet. Loaded after base.css on the redesigned metro
   and year pages only; every rule is scoped to body.t-sheet or to the chart and
   answer row, which appear nowhere else. */

/* header: one line on a phone, links behind Menu */
.t-sheet .site-head { position: relative; display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 1rem; min-height: 48px; padding: 0.125rem 1.25rem; }
/* the wordmark is a 44px tap target; line-height rather than flex, so the badge
   keeps its measured offset from the wordmark's baseline */
.t-sheet .brand { white-space: nowrap; font-size: 1.1rem; line-height: var(--tap); }
.t-sheet .site-head .nav-wide { display: none; }
.nav-menu { margin-left: auto; }
.nav-menu summary { list-style: none; display: flex; align-items: center; min-height: var(--tap); min-width: var(--tap); padding: 0 0.85rem; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-weight: 700; font-size: 0.95rem; cursor: pointer; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu[open] summary { border-color: var(--ink); }
.t-sheet .site-head .nav-drop { position: absolute; right: 1.25rem; top: calc(100% - 0.2rem); z-index: 30; display: flex; flex-direction: column; gap: 0; min-width: 12rem; margin: 0; padding: 0.35rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 20px rgba(23, 25, 28, 0.12); }
.t-sheet .site-head .nav-drop a { display: flex; align-items: center; min-height: var(--tap); padding: 0 0.8rem; color: var(--ink); font-size: 1rem; border-radius: 6px; }
.t-sheet .site-head .nav-drop a:hover { background: var(--panel-soft); text-decoration: none; }
@media (min-width: 760px) {
  .t-sheet .site-head .nav-wide { display: flex; gap: 1.2rem; margin-left: auto; }
  .nav-menu { display: none; }
}

/* the sheet: phone order is the document order */
.t-sheet .hero { padding: 1rem 0 0.2rem; }
.t-sheet .hero .sub { font-size: 1rem; margin: 0.45rem 0; }
.t-sheet .hero .fine { margin: 0.3rem 0; font-size: 0.75rem; line-height: 1.45; }
.t-sheet .rail .card, .t-sheet #results { margin: 1rem 0; }
.t-sheet .rail .card h2 { margin-bottom: 0.2rem; }
.t-sheet .lede { font-size: 0.88rem; color: var(--ink-soft); margin: 0.2rem 0 0.2rem; line-height: 1.45; }
.t-sheet .rail .field { margin: 0.75rem 0; }
.method-link { font-size: 0.92rem; color: var(--ink-soft); margin: 1.4rem 0; }
.t-sheet .readout .mono { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); }
.t-sheet .readout .cell { min-width: 0; padding: 0.8rem 1rem; }

/* answer row */
.answer-row { margin: 0.8rem 0 0.4rem; }
.answer-row dl { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--ink); }
.ans { padding: 0.5rem 0.6rem 0.55rem 0; border-bottom: 1px solid var(--line); min-width: 0; }
.ans:nth-child(even) { padding-left: 0.75rem; border-left: 1px solid var(--line); }
.ans dt { font-family: var(--mono); font-size: 0.66rem; font-weight: 700; line-height: 1.25; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.ans dd { margin: 0; }
.ans dd b { display: block; font-size: 1.5rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; margin: 0.15rem 0 0.1rem; }
.ans dd > span { display: block; font-size: 0.72rem; line-height: 1.35; color: var(--ink-faint); }
.ans .nw { white-space: nowrap; }
@media (min-width: 640px) {
  .answer-row dl { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ans, .ans:nth-child(even) { padding: 0.55rem 0.8rem 0.6rem; border-left: 1px solid var(--line); }
  .ans:first-child { padding-left: 0; border-left: 0; }
}

/* the price chart: lines in SVG, every word in HTML */
.hr-chart { margin: 1rem 0 0.6rem; }
.hr-mode { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.hr-mode + label { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 0.85rem; border: 1px solid var(--ink); font-family: var(--mono); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink); background: transparent; cursor: pointer; }
.hr-mode + label + .hr-mode + label { border-left: 0; }
.hr-mode:checked + label { background: var(--ink); color: var(--paper); }
.hr-mode:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }
.hr-plot { position: relative; height: 140px; margin: 0.9rem 0 1.5rem; border-bottom: 1px solid var(--ink); }
.hr-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hr-grid { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hr-line { fill: none; stroke: var(--accent); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hr-deed { fill: none; stroke: var(--ink-soft); stroke-width: 1.25; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.hr-bust { position: absolute; top: 0; bottom: 0; border-left: 1px solid rgba(179, 38, 30, 0.55); border-right: 1px solid rgba(179, 38, 30, 0.55); background: repeating-linear-gradient(135deg, rgba(179, 38, 30, 0.2) 0 1.5px, transparent 1.5px 6px); }
.hr-bust > span { position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bad); background: var(--paper); padding: 0 2px; }
.hr-y, .hr-end, .hr-x, .hr-pinl { position: absolute; font-family: var(--mono); font-size: 0.68rem; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hr-y { left: 0; transform: translateY(-125%); color: var(--ink-faint); }
.hr-end { left: 88.8%; transform: translateY(-50%); font-weight: 700; color: var(--accent); }
.hr-x { top: 100%; transform: translateX(-50%); padding-top: 4px; color: var(--ink-faint); }
.hr-pin { position: absolute; width: 12px; height: 12px; transform: translate(-50%, -60%); background: var(--accent); clip-path: polygon(50% 0, 100% 45%, 100% 100%, 0 100%, 0 45%); }
.hr-pinl { transform: translate(calc(-100% - 10px), -50%); font-weight: 700; color: var(--ink); background: var(--paper); padding: 1px 3px; }
.hr-pinl-r { transform: translate(10px, -50%); }
.hr-chart figcaption { font-size: 0.75rem; line-height: 1.45; color: var(--ink-faint); max-width: 70ch; }
.hr-chart .hr-real { display: none; }
.hr-m-real:checked ~ .hr-plot .hr-nom, .hr-m-real:checked ~ figcaption .hr-nom { display: none; }
.hr-m-real:checked ~ .hr-plot .hr-real, .hr-m-real:checked ~ figcaption .hr-real { display: inline; }
@media (min-width: 640px) { .hr-plot { height: 220px; } .hr-y, .hr-end, .hr-x, .hr-pinl { font-size: 0.74rem; } }

/* the ledger: the one table, folded */
.ledger { margin: 1.8rem 0 1rem; border-top: 2px solid var(--ink); }
.ledger summary { list-style: none; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.2rem 1rem; min-height: var(--tap); padding: 0.6rem 2rem 0.6rem 0; position: relative; cursor: pointer; }
.ledger summary::-webkit-details-marker { display: none; }
.ledger summary h2 { margin: 0; font-size: 1.2rem; }
.ledger-n { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-faint); }
.ledger summary::after { content: "+"; position: absolute; right: 0.2rem; top: 0.5rem; font-family: var(--mono); font-size: 1.3rem; color: var(--accent); }
.ledger[open] summary::after { content: "\2013"; }

/* wide screens: the form rides in a right-hand rail */
@media (min-width: 1024px) {
  .t-sheet main { max-width: 1180px; }
  .t-sheet .site-head, .t-sheet .site-footer { max-width: 1180px; }
  .sheet { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; column-gap: 2.75rem;
    grid-template-areas: "hero rail" "answer rail" "chart rail" "results rail" "ledger rail" "related rail" "method rail" "faq rail"; }
  .sheet > .hero { grid-area: hero; }
  .sheet > .answer-row { grid-area: answer; }
  .sheet > .hr-chart { grid-area: chart; }
  .sheet > .rail { grid-area: rail; align-self: start; }
  .sheet > #results { grid-area: results; }
  .sheet > .ledger { grid-area: ledger; }
  .sheet > .related { grid-area: related; }
  .sheet > .method-link { grid-area: method; }
  .sheet > section[aria-label="Frequently asked questions"] { grid-area: faq; }
  .hr-plot { height: 280px; }
  .t-sheet .hero { padding-top: 1.6rem; }
}
/* the rail rides along only where the whole form fits on the screen */
@media (min-width: 1024px) and (min-height: 760px) { .sheet > .rail { position: sticky; top: 1rem; } }
