/* VESPERA — shared stylesheet
   Spec: docs/superpowers/specs/2026-09-17-vespera-site-design.md
   One family (Piazzolla, self-hosted), paper + ink + one red, rules not cards.
   Structure is a broadsheet page: running heads on rules, uneven ruled
   columns, dense text, one button per page. No heroes, no kickers, no
   three-up grids, no stat strips, no arrows, no live dots. */

@font-face {
  font-family: 'Piazzolla';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/piazzolla-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Piazzolla';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/piazzolla-italic-latin.woff2') format('woff2');
}
/* Metric-matched fallback so the swap does not reflow the page */
@font-face {
  font-family: 'Piazzolla Fallback';
  src: local('Georgia'), local('Times New Roman');
  size-adjust: 94%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}

:root {
  --paper: #F3EFE6;
  --paper-2: #EAE4D6;
  --ink: #161411;
  --ink-2: #5E5952;
  --rule: #C9C2B3;
  --accent: #9E2B1A;
  --serif: 'Piazzolla', 'Piazzolla Fallback', Georgia, 'Times New Roman', serif;
  --wrap: 1180px;
  --gutter: 20px;
  --col-gap: 26px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.45;
  font-feature-settings: 'kern', 'liga';
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
b, strong { font-weight: 600; }
p { margin: 0 0 0.85em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: -0.005em; }
h3 { font-size: 19px; }
h3 + p { margin-top: 0.35em; }
ol, ul { margin: 0 0 0.85em; padding-left: 1.25em; }
li { margin-bottom: 0.35em; }
li p { margin: 0; }
.num, [data-rate], [data-updated], td.n, .calc-out { font-variant-numeric: tabular-nums lining-nums; }
.sc { font-variant-caps: small-caps; letter-spacing: 0.08em; font-weight: 500; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--ink-2); }
.small { font-size: 15px; }

/* Running head: a section title sitting on an ink rule, as in a newspaper page */
.head {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  padding-bottom: 6px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--ink);
}
.head .sub { font-weight: 400; color: var(--ink-2); font-size: 15px; margin-left: 10px; }
h2.head { margin-top: 0; }
.head-page { font-size: 30px; font-weight: 500; padding-bottom: 8px; margin-bottom: 20px; }

/* ---------- Masthead ---------- */
.masthead { border-top: 3px solid var(--ink); }
.mh-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: var(--col-gap);
  padding: 20px 0 14px;
  border-bottom: 1px solid var(--ink);
}
.mh-date, .mh-updated { font-size: 15px; color: var(--ink-2); line-height: 20px; white-space: nowrap; }
.mh-updated { text-align: right; }
.mh-updated b { color: var(--ink); font-weight: 500; }
.mh-logo { display: block; line-height: 0; }
.mh-logo img { height: 36px; width: auto; display: block; }
.mh-nav {
  display: flex; justify-content: center; gap: 34px; flex-wrap: wrap;
  padding: 9px 0 8px;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
}
.mh-nav a { text-decoration: none; }
.mh-nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; }

/* ---------- Ticker rule ---------- */
.ticker { border-bottom: 1px solid var(--ink); font-size: 15px; padding: 7px 0; }
.ticker .wrap { display: flex; align-items: baseline; gap: 0 10px; flex-wrap: wrap; }
.ticker .tk-rate { font-weight: 600; }
.ticker .tk-sep { color: var(--rule); }

/* ---------- Page body ---------- */
main { padding: 26px 0 10px; }
.band { padding: 0 0 26px; margin-bottom: 26px; border-bottom: 1px solid var(--ink); }
.band:last-child { border-bottom: 0; margin-bottom: 0; }
.cols { display: grid; gap: 0; }
.cols > * { padding: 0 var(--col-gap); min-width: 0; }
.cols > *:first-child { padding-left: 0; }
.cols > *:last-child { padding-right: 0; }
.cols > * + * { border-left: 1px solid var(--rule); }
.c-8-4 { grid-template-columns: 8fr 4fr; }
.c-7-5 { grid-template-columns: 7fr 5fr; }
.c-6-6 { grid-template-columns: 1fr 1fr; }
.c-5-7 { grid-template-columns: 5fr 7fr; }

/* ---------- The rate (lead figure) ---------- */
.rate-label { font-size: 17px; color: var(--ink-2); margin: 0 0 2px; }
.rate-big {
  font-size: clamp(60px, 8.6vw, 120px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  min-height: 1em;                 /* slot reserved: no shift when the price lands */
  margin: 0;
}
.rate-big .cur { font-size: 0.5em; vertical-align: 0.55em; margin-right: 0.06em; font-weight: 300; color: var(--ink-2); }
.rate-big .per { font-size: 0.24em; font-weight: 400; color: var(--ink-2); letter-spacing: 0; margin-left: 0.3em; }
.rate-big.is-updating { animation: reink 400ms ease-out; }
@keyframes reink { from { opacity: 0.35; } to { opacity: 1; } }
.rate-caption { font-size: 15px; color: var(--ink-2); margin: 6px 0 18px; }

/* ---------- Button (one per page) ---------- */
.btn {
  display: inline-block;
  font: 500 17px/1 var(--serif);
  padding: 13px 22px 12px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
th { padding-right: 14px; }
th { font-weight: 400; color: var(--ink-2); }
thead th { font-size: 14px; border-bottom: 1px solid var(--ink); }
th.n, td.n { text-align: right; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 1px solid var(--ink); }
.table-cond th { width: 40%; }
.table-cond td { font-weight: 500; }

/* Calculator as a ruled table inside the lead */
.calc { margin-top: 4px; }
.calc th { width: 34%; }
.calc td { text-align: right; }
.calc input {
  width: 9ch; max-width: 100%;
  font: 500 22px/1.2 var(--serif); font-variant-numeric: tabular-nums;
  text-align: right;
  background: var(--paper-2); border: 1px solid var(--rule);
  padding: 2px 8px; color: var(--ink); outline: none;
}
.calc input:focus { border-color: var(--ink); }
.calc input::placeholder { color: var(--rule); }
.calc .unit { color: var(--ink-2); margin-left: 6px; }
.calc-out { font-size: 22px; font-weight: 600; }
.calc-out .cur { font-weight: 300; color: var(--ink-2); margin-right: 0.15em; }
.calc-note { font-size: 14px; color: var(--accent); min-height: 20px; margin: 6px 0 0; }
.calc-actions { margin-top: 16px; display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }

/* ---------- Lists ---------- */
.index-list { list-style: none; margin: 0; padding: 0; }
.index-list li { margin: 0; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.index-list li:last-child { border-bottom: 0; }
.index-list a { text-decoration: none; }
.index-list a:hover { text-decoration: underline; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 12px 0; margin: 0; border-bottom: 1px solid var(--rule); counter-increment: step; }
.steps li:last-child { border-bottom: 0; }
.steps li::before { content: counter(step) "."; font-weight: 600; line-height: 1.45; }
.steps h3 { font-size: 17px; font-weight: 600; margin-bottom: 2px; }
.steps p { margin: 0; }

/* Boxed notice, as a newspaper sets a notice to readers */
.notice { border: 1px solid var(--ink); padding: 14px 18px 16px; }
.notice .head { font-size: 17px; margin-bottom: 8px; }
.notice ul { margin-bottom: 0; }

/* ---------- FAQ ---------- */
.faq-list { margin: 0; padding: 0; }
.faq-list dt { font-weight: 600; padding-top: 12px; scroll-margin-top: 16px; }
.faq-list dd { margin: 3px 0 12px; border-bottom: 1px solid var(--rule); padding-bottom: 12px; }
.faq-list dd:last-child { border-bottom: 0; }
.faq-group { margin-bottom: 24px; }

.phone { font-size: 26px; font-weight: 500; letter-spacing: 0.01em; margin: 0 0 4px; }

/* ---------- Footer ---------- */
.footer { border-top: 3px solid var(--ink); padding: 26px 0 34px; margin-top: 20px; font-size: 15px; color: var(--ink-2); }
.footer-row { display: grid; grid-template-columns: auto 1fr auto; gap: 40px; align-items: center; }
.footer img { height: 18px; width: auto; display: block; }
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer nav a { text-decoration: none; }
.footer-fine { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--rule); }
.footer-fine p { margin: 0 0 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .c-8-4, .c-7-5, .c-6-6, .c-5-7 { grid-template-columns: 1fr; }
  .cols > * { padding: 22px 0; }
  .cols > *:first-child { padding-top: 0; }
  .cols > *:last-child { padding-bottom: 0; }
  .cols > * + * { border-left: 0; border-top: 1px solid var(--rule); }
  .footer-row { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 640px) {
  .mh-row { grid-template-columns: 1fr 1fr; padding: 14px 0 12px; row-gap: 12px; }
  .mh-date { grid-row: 1; grid-column: 1; }
  .mh-updated { grid-row: 1; grid-column: 2; }
  .mh-logo { grid-row: 2; grid-column: 1 / -1; justify-self: center; }
  .mh-logo img { height: 26px; }
  .mh-date, .mh-updated { font-size: 13px; }
  .mh-nav { gap: 16px; font-size: 14px; }
  .ticker .tk-hours, .ticker .tk-sep { display: none; }
  .rate-big { font-size: clamp(52px, 14vw, 76px); }
  .head-page { font-size: 26px; }
  .btn { width: 100%; text-align: center; }
  .calc th { width: 30%; }
}
@media (prefers-reduced-motion: reduce) {
  .rate-big.is-updating { animation: none; }
}
