/* ComputeHatch v2 legacy bridge (2 Dec 2026).
   Restyles pages whose body markup still uses the 27 Nov classes, using the
   design-system.css tokens. Every rule is scoped to .legacy so it cannot leak
   into rebuilt pages. Delete a page's dependency by rebuilding it on the v2 template. */
.legacy { padding-bottom: 8px; }
.legacy .page-intro { padding: 20px 0 8px; }
.legacy .page-intro h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.8rem); margin-top: 6px; }
.legacy .kicker { display: inline-flex; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 4px; }
.legacy .lede { font-size: var(--fs-lg); color: var(--ink-2); max-width: 66ch; margin: 0 0 16px; }
.legacy .byline { display: block; margin: 0 0 18px; font-size: var(--fs-sm); color: var(--muted); }
.legacy .byline a { color: var(--muted); }
.legacy .legacy-qa { margin: 8px 0 24px; max-width: 900px; }
.legacy .legacy-qa .qa-label { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 4px; }
.legacy .legacy-qa p { margin: 0; }

/* calculator block */
.legacy .layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: var(--gap); align-items: start; margin: 8px 0 36px; }
.legacy .layout > form.card { box-shadow: var(--sh-2); display: grid; gap: 4px; }
.legacy .field { margin-bottom: 12px; display: grid; gap: 6px; }
.legacy .field label { font-weight: 650; font-size: var(--fs-sm); }
.legacy .hint { font-size: var(--fs-xs); color: var(--muted); }
.legacy .field input[type="number"], .legacy .field input[type="text"], .legacy .field select {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font: 600 var(--fs-md)/1.2 var(--font); font-variant-numeric: tabular-nums; }
.legacy .field select { appearance: none; padding-right: 40px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%235a6780' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; }
.legacy .field input:focus, .legacy .field select:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent); }
.legacy .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.legacy .check { display: flex; align-items: center; gap: 10px; font-weight: 600; min-height: 44px; }
.legacy .check input { width: 20px; height: 20px; accent-color: var(--navy-900); }

/* results panel (#out is filled by the per-tool JS) */
.legacy .layout > aside.card { position: sticky; top: 84px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-top: 4px solid var(--accent); box-shadow: var(--sh-2); border-radius: var(--r-lg); overflow: hidden; }
.legacy .layout > aside.card .kicker { color: var(--accent-ink); }
.legacy .layout > aside.card p { color: var(--ink-2); }
.legacy .layout > aside.card a { color: var(--navy-600); }
.legacy .figure { font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.1rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; margin: 2px 0 8px; font-variant-numeric: tabular-nums; color: var(--navy-900); }
.legacy .figure small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.legacy .splits { list-style: none; margin: 14px 0 0; padding: 0; }
.legacy .splits li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; font-size: var(--fs-sm); color: var(--ink-2); }
.legacy .splits li strong { color: var(--navy-900); }
.legacy .splits li:last-child { border-top: 2px solid var(--accent); font-weight: 800; }
.legacy .splits li:last-child strong { color: var(--good); font-size: 1.05rem; }
.legacy .note { margin: 14px 0 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--muted) !important; font-size: var(--fs-xs); line-height: 1.5; }
.legacy .good { background: var(--good-wash); color: var(--good); }

/* cards & grids */
.legacy .grid-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; margin: 10px 0 28px; }
.legacy .tool-card .where { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.legacy .tool-card h2, .legacy .tool-card h3 { font-size: 1.08rem; margin: 0; }
.legacy .related-block, .legacy .related { margin: 24px 0; }
.legacy .subhead { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin: 20px 0 8px; }
.legacy .block-intro { color: var(--muted); max-width: 68ch; }
.legacy .state-fold, .legacy .country-block, .legacy .home-section { scroll-margin-top: 90px; }

/* prose */
.legacy .prose { max-width: 760px; padding-bottom: 12px; }
.legacy .prose h2 { font-size: var(--fs-xl); }
.legacy .prose p, .legacy .prose li { color: var(--ink-2); }
.legacy .ill { margin: 8px 0 24px; }
.legacy .ill img { display: block; width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.legacy .ill figcaption { color: var(--muted); font-size: var(--fs-sm); margin-top: 8px; }
.legacy .faq { margin: 28px 0; }
.legacy .faq > h2 { margin-bottom: 6px; }
.legacy .faq details > p { padding: 0 20px 18px; margin: 0; color: var(--ink-2); }
.legacy .sources { margin-top: 24px; font-size: var(--fs-sm); }
.legacy .sources h2 { font-size: var(--fs-lg); }
.legacy .prose .table-wrap { margin: 1.2em 0; }
.legacy table.data td, .legacy table.data th { white-space: normal; }
.legacy table.data td:not(:first-child) { white-space: nowrap; }

@media (max-width: 960px) {
  .legacy .layout { grid-template-columns: minmax(0, 1fr); }
  .legacy .layout > aside.card { position: static; }
}
@media (max-width: 520px) { .legacy .row2 { grid-template-columns: 1fr; gap: 0; } }
