:root {
  /* Paper: a warm off-white with a fine grain (generated noise: faint dark
     specks), the page, the band and the cards all on it, outlined in stone
     gray. Colors after heronaiapp.com. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.16  0 0 0 0 0.16  0 0 0 0 0.15  0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --bg: #F5F5EE;
  /* The band is a see-through shade, so the page's grain shows through it */
  --bg-band: rgba(40, 40, 30, 0.035);
  --card-border: #B3B3AF;
  --card: #FFFFFF;
  --ink: #282828;
  --ink-2: #3A3A38;
  --muted: #72726F;
  --disabled: #B3B3AF;
  --surface: #ECECE5;
  --line: #E2E2DA;
  --border: #C8C8C0;
  --band: #8A8A84;
  --up: #0B6B43;
  --down: #B03A14;
  --marker: #282828;
  --marker-dark: #000000;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  /* The accents:
     color-1 charcoal: controls you've chosen (1Y, Nominal, Save, switches),
       and Congressional bills markers
     color-2 red-orange: where you are (current page, the chip and Prices-menu
       item of the card showing)
     color-4 red-orange: World events markers */
  --color-1: #282828;
  --color-2: #FA3600;
  --slate: #4F6A86;     /* item icons, Democrats on Congress */
  --color-4: #FA3600;
  --color-2-tint: color-mix(in srgb, var(--color-2) 10%, #F5F5EE);
  /* Navigation bar: on the same paper, a thin line under it */
  --nav-bg: #F5F5EE;
  --nav-ink: #282828;
  --nav-muted: #72726F;
  --nav-fill: #ECECE5;
  --nav-hover: #E2E2DA;
  --nav-active: var(--color-2-tint);
  --nav-line: #D3D3CB;
}

* { box-sizing: border-box; }
/* Links to a spot on the page (sections, the Glossary's "On this page")
   glide there instead of jumping, unless the device asks for less motion */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg) var(--grain);
  color: var(--ink);
  font-family: var(--sans);
}
/* The light gray band behind the top of each page, under the nav bar */
body::before {
  content: ""; position: absolute; left: 0; right: 0; top: 60px; height: 260px; z-index: -1;
  background: var(--bg-band); border-bottom: 1px solid var(--card-border);
}

button { font-family: inherit; }
/* Read by screen readers, not shown */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Top navigation bar ---------- */
.topnav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  height: 60px; padding: 0 16px 0 20px;
  background: var(--nav-bg) var(--grain); color: var(--nav-ink); border-bottom: 1px solid var(--nav-line);
}
.topnav-logo {
  display: flex; align-items: center; gap: 10px; flex: none;
  color: var(--nav-ink); text-decoration: none;
  font-size: 15px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap;
}
/* The name is in capitals: a touch smaller, with room between the letters */
.topnav-name { font-size: 14px; letter-spacing: 0.1em; }
.topnav-links { display: flex; gap: 2px; flex: none; }
.topnav-links > a, .topnav-links > button, .nav-prices > button {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px;
  border: 0; border-radius: 8px; background: transparent; text-decoration: none; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--nav-muted);
  transition: color 0.15s ease, background 0.15s ease;
}
.topnav-links > a:hover, .topnav-links > button:hover, .nav-prices > button:hover,
.nav-prices > button[aria-expanded="true"] { color: var(--nav-ink); background: var(--nav-fill); }
/* On Finances and Glossary, the same dropdown lists the page's sections */
.section-link {
  display: block; padding: 10px 12px; border-radius: 0;
  font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none;
}
/* Hover: in the Prices menu, a soft shadow under the item only, as if it
   lifts a little; other menus' items stay flat */
.section-link { position: relative; }
.price-row { position: relative; transition: box-shadow 0.15s ease; }
.price-row:hover { box-shadow: 0 8px 8px -7px rgba(27, 26, 23, 0.2); }
/* ...and a slate line on its left that grows out from the middle, like
   the red-orange one on the item showing */
.section-link::before, .price-row::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1.5px;
  background: var(--slate); transform: scaleY(0); transition: transform 0.35s ease-out;
}
.section-link:hover::before, .price-row:hover::before { transform: scaleY(1); }
.prices-menu .section-link:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
/* Prices dropdown: every tracked price, grouped by category */
.nav-prices { position: relative; display: flex; align-items: center; }
/* The page name and its arrow are two buttons: the name opens the site's
   pages, the arrow opens this page's sections */
.nav-prices > #nav-page-btn { padding-right: 6px; border-radius: 8px 0 0 8px; }
.nav-prices > .nav-arrow { padding: 0 10px 0 6px; border-radius: 0 8px 8px 0; }
/* A page without a sections menu (the Glossary) has no arrow */
.nav-prices:has(> .nav-arrow[hidden]) > #nav-page-btn { padding-right: 12px; border-radius: 8px; }
.pages-menu { width: 220px; }
/* In the pages list the hover line is charcoal rather than slate */
.pages-menu .section-link::before { background: var(--ink); }
/* Other pages are gray and lighter, turning charcoal when pointed at */
.pages-menu .section-link:not([aria-current="page"]) { font-weight: 400; color: var(--muted); transition: color 0.15s ease; }
.pages-menu .section-link:not([aria-current="page"]):hover { color: var(--ink); }
.pages-menu [aria-current="page"] { position: relative; font-weight: 700; }
.pages-menu [aria-current="page"]::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1.5px; background: var(--color-2);
  transform: none;
}
.nav-chevron { transition: transform 0.15s ease; }
.nav-prices > button[aria-expanded="true"] .nav-chevron { transform: rotate(180deg); }
.prices-menu {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 30;
  width: 340px; max-height: min(70vh, 520px); overflow-y: auto; padding: 8px;
  border-radius: 14px; background: var(--card); color: var(--ink);
  box-shadow: 0 2px 4px rgba(27, 26, 23, 0.08), 0 12px 32px rgba(27, 26, 23, 0.18);
}
.price-group + .price-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
/* WAGE's row with its › for pay by industry and job */
/* A group of sections (Calculators): a row with a › that opens them */
.section-parent {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 0; background: none; font-family: inherit; text-align: left; cursor: pointer;
}
.section-parent svg { flex: none; color: var(--muted); transition: transform 0.15s ease; }
.section-parent:hover svg, .section-parent[aria-expanded="true"] svg { color: var(--ink); }
.section-parent[aria-expanded="true"] { background: var(--nav-fill); }
.section-parent:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.topnav-mobile .section-parent[aria-expanded="true"] svg { transform: rotate(90deg); }
.pay-flyout.section-flyout { width: 240px; }
.price-row-wrap { display: flex; align-items: stretch; }
.price-row-wrap .price-row { flex: 1; min-width: 0; }
.price-sub-btn {
  flex: none; width: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.price-sub-btn:hover, .price-sub-btn[aria-expanded="true"] { background: var(--nav-fill); color: var(--ink); }
.price-sub-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
/* The side menu beside the Prices menu */
.pay-flyout {
  position: absolute; z-index: 31; width: 340px; max-width: calc(100vw - 16px);
  max-height: min(70vh, 520px); overflow-y: auto; padding: 8px;
  border-radius: 14px; background: var(--card); color: var(--ink);
  box-shadow: 0 2px 4px rgba(27, 26, 23, 0.08), 0 12px 32px rgba(27, 26, 23, 0.18);
}
.pay-flyout :focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.pay-flyout-soon { margin: 0; padding: 4px 10px 8px; font-size: 12px; color: var(--muted); }
/* On phones: the same rows, in place under WAGE */
.price-sub-inline { margin: 0 0 4px 18px; padding-left: 8px; border-left: 1.5px solid var(--line); }
.topnav-mobile .price-sub-btn svg { transition: transform 0.15s ease; }
.topnav-mobile .price-sub-btn[aria-expanded="true"] svg { transform: rotate(90deg); }
.price-group-title {
  padding: 8px 10px 4px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
}
.price-row {
  width: 100%; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px;
  border: 0; border-radius: 0; background: transparent; color: var(--ink);
  text-align: left; cursor: pointer;
}
/* The card that's showing */
.price-row[aria-current="true"] { position: relative; }
/* A straight bar on its left, kept clear of the rounded corners */
.price-row[aria-current="true"]::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1.5px; background: var(--color-2);
  transform: none;
}
/* Item icons are slate; the one you're viewing turns red-orange */
.price-row[aria-current="true"] .price-row-icon svg { stroke: var(--color-2); }
.price-row-icon {
  flex: none; width: 24px; height: 36px;
  display: flex; align-items: center; justify-content: center;
}
.price-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.price-row-name { font-size: 14px; font-weight: 700; }
/* The full name after the ticker code, kept in one piece so a long one
   moves to the next line whole */
.price-row-label { font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.price-row-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price-row-nums { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-family: var(--mono); }
.price-row-value { font-size: 14px; font-weight: 500; }
.price-row-chg { font-size: 12px; }
.price-row-chg.up { color: var(--up); }
.price-row-chg.down { color: var(--down); }
.prices-menu :focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

/* Takes the room left after the links; the chips scroll inside it */
.topnav-right { margin-left: auto; min-width: 0; display: flex; align-items: center; gap: 10px; }
.ticker {
  display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border-radius: 999px;
  border: 0; background: transparent; color: var(--nav-ink);
  font-family: var(--mono); font-size: 13px; white-space: nowrap; cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.ticker:hover { background: var(--nav-hover); }
/* The chip whose card is showing */
.ticker[aria-pressed="true"] { background: var(--nav-active); box-shadow: inset 0 0 0 1.5px var(--color-2); }
.ticker-sym { color: var(--nav-muted); }
.ticker-chg.up { color: var(--up); }
.ticker-chg.down { color: var(--down); }
/* + : choose which prices have a chip */
.nav-add { position: relative; flex: none; }
.topnav-add {
  width: 34px; height: 34px; border: 1px dashed var(--border); border-radius: 999px;
  background: transparent; color: var(--nav-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.topnav-add:hover, .topnav-add[aria-expanded="true"] { color: var(--nav-ink); background: var(--nav-hover); border-style: solid; }
.chips-menu {
  position: absolute; top: calc(100% + 13px); right: 0; z-index: 30;
  width: 300px; max-width: calc(100vw - 24px); max-height: min(70vh, 520px); overflow-y: auto;
  padding: 12px 8px 8px; border-radius: 14px; background: var(--card); color: var(--ink);
  box-shadow: 0 2px 4px rgba(27, 26, 23, 0.08), 0 12px 32px rgba(27, 26, 23, 0.18);
}
.chips-menu-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 0 8px 4px; }
.chips-menu-title { font-size: 14px; font-weight: 700; }
.chips-menu-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.chips-reset {
  flex: none; padding: 4px 8px; border: 0; border-radius: 6px; background: transparent;
  font-size: 13px; font-weight: 500; color: var(--color-1); cursor: pointer;
}
.chips-reset:hover { background: var(--nav-fill); }
.chips-group + .chips-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
.chips-option {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 8px;
  border-radius: 8px; font-size: 14px; cursor: pointer;
}
.chips-option:hover { background: var(--nav-fill); }
.chips-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--color-2); cursor: pointer; }
.chips-option-sym { width: 44px; font-family: var(--mono); font-size: 13px; font-weight: 500; }
.chips-option-name { flex: 1; color: var(--muted); }
/* Every page fills at least the screen, so the footer starts below it */
main { min-height: calc(100vh - 60px); }

/* Footer, at the bottom of every page (nav.js) */
.site-footer {
  margin-top: 48px; padding: 32px 20px 28px;
  background: var(--bg-band); border-top: 1px solid var(--card-border);
  font-size: 13px; line-height: 1.6; color: var(--muted);
}
.footer-inner {
  max-width: 1040px; margin: 0 auto;
  display: grid; grid-template-columns: 1.2fr 0.8fr 2fr; gap: 24px 40px;
}
.footer-name { font-size: 14px; font-weight: 700; letter-spacing: 0.1em; color: var(--ink); }
.footer-brand p, .footer-data p { margin: 6px 0 0; }
.footer-title {
  margin-bottom: 6px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2);
}
.footer-col { display: flex; flex-direction: column; align-items: flex-start; }
.footer-col > a { padding: 2px 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.footer-bottom {
  max-width: 1040px; margin: 24px auto 0; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 12px;
}
.footer-links { display: flex; gap: 16px; }
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* Back, under the bar on the left (nav.js adds it only after another page
   of this site) */
.back-row { padding: 10px 16px 0 14px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 10px 0 6px;
  border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--muted); transition: color 0.15s ease, background 0.15s ease;
}
.back-btn:hover { color: var(--ink); background: var(--nav-fill); }
.back-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Wider screens: it floats in the space under the bar instead of taking a
   row, so pages don't move down */
@media (min-width: 721px) {
  .back-row { position: absolute; top: 63px; left: 14px; z-index: 5; padding: 0; }
  .back-row .back-btn { min-height: 28px; }
}
/* ☰ at the far left: the site's pages and prices, on phones only (wider
   screens use the page name and its arrow instead) */
.topnav-toggle {
  display: none; flex: none; width: 40px; height: 40px; margin-right: -8px; border: 0; border-radius: 999px;
  background: transparent; color: var(--nav-ink); cursor: pointer;
  align-items: center; justify-content: center;
}
.topnav-toggle:hover, .topnav-toggle[aria-expanded="true"] { background: var(--nav-fill); }
.topnav :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* The ☰ menu: a small list under the ☰ on wide screens, the full width on
   phones */
.topnav-mobile {
  position: absolute; left: 12px; top: calc(100% + 8px); width: 240px; max-width: calc(100vw - 24px);
  display: flex; flex-direction: column; padding: 8px; border-radius: 16px;
  background: var(--card);
  box-shadow: 0 2px 4px rgba(27, 26, 23, 0.08), 0 12px 32px rgba(27, 26, 23, 0.16);
}
.topnav-mobile a, .topnav-mobile button {
  padding: 12px 14px; border: 0; border-radius: 10px; background: transparent; text-align: left;
  font-size: 15px; font-weight: 500; color: var(--ink-2); text-decoration: none; cursor: pointer;
}
.topnav-mobile a:hover { background: var(--nav-fill); }
/* The page you're on: bold, with the purple bar like the Prices menu */
.topnav-mobile [aria-current="page"] { position: relative; color: var(--ink); font-weight: 700; }
.topnav-mobile [aria-current="page"]::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 1.5px; background: var(--color-2);
}
.topnav-mobile-prices { display: none; flex-direction: column; min-height: 0; margin-top: 4px; border-top: 1px solid var(--line); }
.topnav-mobile-title {
  padding: 8px 14px 4px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
}
/* The grouped price list in the phone menu scrolls on its own */
.topnav-mobile-items { max-height: 55vh; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 4px; }
.topnav-mobile { max-height: calc(100vh - 80px); }
/* Phones: the Prices menu folds into the ☰ menu, the name gets smaller,
   and the price chips keep their labels but show only the ▲/▼ arrow (screen
   readers still get the full figure) */
@media (max-width: 720px) {
  .topnav { gap: 8px; padding: 0 6px 0 6px; }
  .topnav-links { display: none; }
  .topnav-toggle { display: flex; }
  .topnav-name { font-size: 12px; letter-spacing: 0.08em; }
  .topnav-right, .tickers { gap: 4px; }
  .topnav-mobile { right: 12px; width: auto; }
  .topnav-mobile-prices { display: flex; }
  .ticker-pct { display: none; }
  .ticker { gap: 5px; padding: 0 9px; font-size: 12px; }
}
/* The chips chosen with +. With more than fit, they scroll sideways and
   slide out of sight at the strip's edges (no scrollbar shown). The small
   padding keeps a focused chip's outline from being cut off. */
.tickers {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px 3px;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
}
.tickers::-webkit-scrollbar { display: none; }
.tickers .ticker { flex: none; }
/* Copies used while the strip glides round can't be clicked */
.tickers .ticker-copy { pointer-events: none; }

.page {
  min-height: calc(100vh - 60px);
  padding: 40px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The typed tagline and facts, in the band to the right of the card. Only
   on screens wide enough to have room beside it. */
.page { position: relative; }
.typer {
  position: absolute; top: 72px; left: calc(50% + 240px); right: 32px; max-width: 420px;
  display: none; flex-direction: column; gap: 14px;
}
@media (min-width: 1080px) { .typer:not([hidden]) { display: flex; } }
.typer-tagline { min-height: 2.5em; font-size: 30px; font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; color: var(--ink); }
.typer-fact { min-height: 3em; font-family: var(--mono); font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.typer-fact strong { font-weight: 700; color: var(--ink); }
/* The blinking cursor after the text being typed */
.typer-caret {
  display: inline-block; width: 2px; height: 1em; margin-left: 3px; vertical-align: -0.12em;
  background: var(--color-2); animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

.card {
  width: 400px;
  max-width: 100%;
  background: var(--bg) var(--grain);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border: 1px solid var(--card-border);
}

/* Header */
/* A grid. Top row: icon, title and buttons, all centred on one line.
   Below: the description and date, running under the buttons so each fits
   on one line. The icon and buttons overhang the top row a little so it
   stays only as tall as the title and the lines below sit close to it. */
.header {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 12px; row-gap: 2px; align-items: center;
}
.header-left, .title-block { display: contents; }
.icon { grid-column: 1; grid-row: 1; }
.title { grid-column: 2; grid-row: 1; }
.header .subtitle { grid-column: 2 / span 2; }
.header-right { grid-column: 3; grid-row: 1; margin-block: -6px; }
/* The item's icon, drawn in its group's color with no box behind it */
.icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
.title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
/* The full name after the ticker code: "EGGS (Eggs)" */
/* Kept in one piece: on narrow cards a long name moves to the next line
   whole rather than breaking mid-name */
.title-name { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); white-space: nowrap; }
/* One line each; a description too long for a narrow card ends in … */
.subtitle { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px;
}

/* Menu */
.header-right { display: flex; align-items: center; gap: 4px; }
.menu-wrap { position: relative; }
.menu-btn {
  width: 44px; height: 44px; margin-right: -10px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--surface); }
.menu {
  position: absolute; top: 48px; right: -21px; z-index: 10;
  width: 356px; max-width: calc(100vw - 32px);
  max-height: min(75vh, 620px); overflow-y: auto; overflow-x: hidden;
  /* Room for the scrollbar is kept even when it isn't showing, so the
     content never shifts or gets pushed sideways when it appears */
  scrollbar-gutter: stable;
  background: var(--card); border-radius: 14px; padding: 14px;
  box-shadow: 0 2px 4px rgba(27, 26, 23, 0.08), 0 12px 32px rgba(27, 26, 23, 0.16);
}
.menu-title { font-size: 14px; font-weight: 700; }
.menu-sub { font-size: 12px; color: var(--muted); margin: 2px 0 6px; }
/* With room beside the card, the menu opens to its right instead of over it */
.card { position: relative; }
.card.menu-side .menu-wrap { position: static; }
.card.menu-side .menu { top: 0; left: calc(100% + 12px); right: auto; }
.menu-section {border-top: 1px solid var(--line); padding-top: 6px; margin-top: 6px; }
.menu-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.section-toggle {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 0 6px; border: 0; border-radius: 8px; background: transparent;
  color: var(--ink-2); text-align: left; cursor: pointer;
}
.section-toggle:hover { background: var(--surface); }
.chevron { flex: none; transition: transform 0.15s ease; }
.section-toggle[aria-expanded="true"] .chevron { transform: rotate(90deg); }
.marker-search {
  position: relative; display: flex; align-items: center;
  margin: 4px 0 4px; color: var(--muted);
}
.marker-search svg { position: absolute; left: 10px; pointer-events: none; }
.marker-search input {
  width: 100%; min-height: 40px; padding: 0 10px 0 30px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--card);
  font-family: inherit; font-size: 13px; color: var(--ink);
}
.marker-search input:focus { outline: 2px solid var(--marker); outline-offset: -1px; border-color: transparent; }
.marker-search input::placeholder { color: var(--muted); }
.marker-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 4px; }
.selected-toggle {
  display: flex; align-items: center; gap: 8px; min-height: 36px;
  font-size: 13px; color: var(--ink-2); cursor: pointer;
}
.filter-btn {
  display: flex; align-items: center; gap: 6px; min-height: 36px;
  padding: 0 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); color: var(--ink-2); font-size: 13px; font-weight: 500; cursor: pointer;
}
.filter-btn:hover, .filter-btn[aria-expanded="true"] { background: var(--surface); }
.filter-btn.active { border-color: var(--marker); color: var(--marker); }
.filter-btn .chevron-down { transition: transform 0.15s ease; }
.filter-btn[aria-expanded="true"] .chevron-down { transform: rotate(180deg); }
.filter-panel {
  max-height: 240px; overflow-y: auto; margin-bottom: 6px; padding: 0 8px 8px;
  border: 1px solid var(--border); border-radius: 8px;
}
/* Pinned at the top of the dropdown while its list scrolls. It starts at the
   very top edge (the dropdown has no top padding), so scrolled options
   can't show through above it. */
.filter-search {
  position: sticky; top: 0; z-index: 1;
  margin: 0 -8px; padding: 8px 8px 6px; background: var(--card);
  border-bottom: 1px solid var(--line);
}
.filter-search input { min-height: 36px; }
.filter-group-title {
  margin: 8px 0 2px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
}
.filter-option {
  display: flex; align-items: center; gap: 8px; min-height: 32px;
  font-size: 13px; color: var(--ink-2); cursor: pointer;
}
.filter-more { padding: 4px 0 2px 26px; font-size: 12px; color: var(--muted); }
.filter-count { margin-left: auto; padding-left: 8px; font-size: 12px; color: var(--muted); }
.filter-clear { margin-top: 6px; padding: 0; }

/* Every checkbox in the menu: one size, never squeezed by long text */
.menu input[type="checkbox"] {
  flex: none; width: 18px; height: 18px; margin: 0;
  accent-color: var(--marker); cursor: pointer;
}

/* Dates at the top of the menu, shared by every section */
/* The date range is a setting for the whole menu, so it's a shaded panel
   rather than another divided section row */
.menu-dates { margin: 4px 0 10px; padding: 4px; background: var(--surface); border-radius: 12px; }
.menu-dates-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.dates-toggle {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px;
  padding: 0 8px; border: 0; border-radius: 8px; background: transparent;
  color: var(--ink-2); text-align: left; cursor: pointer;
}
.dates-toggle:hover { background: var(--bg-band); }
.dates-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dates-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.dates-summary { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-dates.active .dates-summary { color: var(--marker); font-weight: 500; }
.dates-chevron { flex: none; transition: transform 0.15s ease; }
.dates-toggle[aria-expanded="true"] .dates-chevron { transform: rotate(180deg); }
.dates-body { padding: 4px 8px 6px; }
.dates-body .date-field input { background: var(--card); }
#dates-clear { font-weight: 700; }
.date-row { display: flex; flex-direction: column; gap: 6px; }
.date-field {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
}
.date-field input {
  width: 100%; min-width: 0; min-height: 36px; padding: 0 8px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--card);
  font-family: inherit; font-size: 13px; color: var(--ink);
}
.date-field input:focus { outline: 2px solid var(--marker); outline-offset: -1px; border-color: transparent; }
/* Each section's rows scroll inside the section, not the whole menu */
.marker-scroll {
  max-height: 300px; overflow-y: auto;
  overscroll-behavior: contain; /* reaching the end doesn't scroll the menu */
  margin: 0 -6px; padding: 0 6px;
  border-top: 1px solid var(--line);
}
.marker-more {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px;
  padding: 8px 6px 2px; font-size: 12px; color: var(--muted);
}
.marker-more .link-btn { min-height: 28px; padding: 0 6px; font-size: 12px; }
.link-btn:disabled { color: var(--disabled); cursor: not-allowed; background: transparent; }
.marker-empty { padding: 10px 6px; font-size: 13px; color: var(--muted); }
.menu-section-count {
  flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--marker); color: #FFFFFF; font-size: 11px; font-weight: 700;
  line-height: 20px; text-align: center; white-space: nowrap;
}
.menu-section-title { white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.menu-section-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
}
.menu-actions { display: flex; gap: 2px; }
.link-btn {
  min-height: 32px; padding: 0 8px; border: 0; border-radius: 6px;
  background: transparent; color: var(--marker); font-size: 13px; font-weight: 500; cursor: pointer;
}
.link-btn:hover { background: var(--surface); }
.marker-option {
  display: flex; align-items: center; gap: 10px; min-height: 48px;
  padding: 4px 6px; border-radius: 8px; cursor: pointer;
}
.marker-option:hover { background: var(--surface); }
.marker-n {
  flex: none; width: 22px; height: 22px; border-radius: 999px; background: var(--marker);
  color: #FFFFFF; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.marker-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.marker-title { font-size: 13px; font-weight: 500; }
.marker-date { font-size: 12px; color: var(--muted); }

/* Price */
.price-block { display: flex; flex-direction: column; gap: 6px; }
.price { font-family: var(--mono); font-size: 44px; font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.change {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px;
  font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--up);
}
.change.down { color: var(--down); }
.change-period { color: var(--muted); font-weight: 400; font-family: var(--sans); }
/* "4.2 min of work at average pay · was 4.8 min in Sep 2025" */
.work-time { display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 18px; color: var(--muted); }
/* The clock stays beside the text; a long line wraps under its own start,
   with the clock centred on the first line */
.work-row { display: flex; align-items: flex-start; gap: 6px; }
.work-row svg { flex: none; margin-top: 2.5px; }
.work-row span { min-width: 0; }
.work-time b { font-family: var(--mono); font-weight: 500; color: var(--ink-2); }
/* Your own pay's line stands out a little more */
#work-mine { color: var(--ink-2); }
#work-mine b { color: var(--ink); }
/* Card settings (the cog): minutes of work on/off and your own pay.
   Anchored to the header so it lines up with the card edge like the menu */
.header-right { position: relative; }
/* The cog sits closer to the ⋮ than to the USD pill: both buttons are
   narrower than the usual 44px (still 44px tall) and their edges overlap a
   little, the ⋮ on top */
.settings-wrap { margin: 0 -12px 0 0; }
/* Share sits between the unit pill and the cog, as narrow as the cog */
.share-wrap { margin-left: 4px; }
.share-wrap .menu-btn { width: 36px; margin-right: 0; }
.share-panel {
  position: absolute; top: 48px; right: -10px; z-index: 11;
  width: 320px; max-width: calc(100vw - 32px);
  background: var(--card); border-radius: 14px; padding: 14px;
  box-shadow: 0 2px 4px rgba(27, 26, 23, 0.08), 0 12px 32px rgba(27, 26, 23, 0.16);
}
.share-title { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.share-sub { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.share-link-row { display: flex; gap: 6px; }
.share-url {
  flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--ink-2); font: 12px var(--mono);
}
.share-url:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.share-action {
  flex: none; height: 36px; padding: 0 14px; border: 0; border-radius: 8px;
  background: var(--color-1); color: #FFFFFF; font: 500 13px var(--sans); cursor: pointer;
}
.share-action:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.share-option {
  width: 100%; display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px;
  border: 1px solid var(--border); border-radius: 10px; background: transparent; color: var(--ink);
  font: 500 14px var(--sans); text-align: left; cursor: pointer;
}
.share-option:hover { background: var(--surface); }
.share-option:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.share-option[disabled] { cursor: progress; opacity: 0.6; }
.share-status { min-height: 18px; margin-top: 8px; font-size: 12px; color: var(--up); }
.share-status.error { color: var(--down); }
.settings-wrap .menu-btn { width: 36px; margin-right: 0; }
#menu-btn { width: 28px; margin-right: -2px; }
.settings-panel {
  position: absolute; top: 48px; right: -10px; z-index: 11;
  width: 320px; max-width: calc(100vw - 32px);
  background: var(--card); border-radius: 14px; padding: 14px;
  box-shadow: 0 2px 4px rgba(27, 26, 23, 0.08), 0 12px 32px rgba(27, 26, 23, 0.16);
}
.settings-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--line); cursor: pointer;
}
.switch-text { display: flex; flex-direction: column; gap: 2px; }
.switch-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.switch-help { font-size: 12px; color: var(--muted); }
/* An on/off switch drawn from a checkbox */
.switch {
  flex: none; appearance: none; -webkit-appearance: none; margin: 0;
  position: relative; width: 40px; height: 24px; border-radius: 999px;
  background: var(--border); cursor: pointer; transition: background 0.15s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}
.switch:checked { background: var(--color-1); }
.switch:checked::after { transform: translateX(16px); }
.switch:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }
.work-link {
  padding: 2px 4px; border: 0; border-radius: 4px; background: transparent;
  font-family: inherit; font-size: 13px; font-weight: 500; color: var(--ink-2);
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.work-link:hover { color: var(--ink); background: var(--surface); }

/* Your pay, in Card settings */
.pay-form { padding-top: 12px; }
.pay-optional { font-weight: 400; color: var(--muted); }
.pay-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.pay-status { font-size: 13px; color: var(--muted); }
.pay-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--ink); }
.pay-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pay-input {
  display: flex; align-items: center; gap: 4px; width: 130px; min-height: 40px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--card);
  font-family: var(--mono); color: var(--muted);
}
.pay-input:focus-within { outline: 2px solid var(--ink-2); outline-offset: -1px; border-color: transparent; }
.pay-input input {
  width: 100%; min-width: 0; border: 0; outline: none; background: transparent;
  font-family: var(--mono); font-size: 15px; color: var(--ink); text-align: right;
  appearance: textfield; -moz-appearance: textfield;
}
.pay-input input::-webkit-outer-spin-button,
.pay-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pay-row select {
  flex: 1;
  min-height: 40px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); font-family: inherit; font-size: 14px; color: var(--ink); cursor: pointer;
}
.pay-save {
  min-height: 40px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--color-1);
  color: #FFFFFF; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.pay-note { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.pay-note.error { color: var(--down); }

/* Selected range bar */
.sel-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 4px; padding: 4px 4px 4px 12px;
  background: var(--surface); border-radius: 10px;
  font-size: 13px; color: var(--ink-2);
}
.sel-clear {
  display: flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 12px; border: 0; border-radius: 8px;
  background: var(--card); color: var(--ink); font-size: 13px; font-weight: 500; cursor: pointer;
  box-shadow: 0 1px 2px rgba(27, 26, 23, 0.14);
}
.sel-clear:hover { background: var(--bg-band); }

/* Toggles */
.controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.segmented { display: flex; gap: 4px; background: var(--surface); border-radius: 12px; padding: 4px; }
.seg-btn {
  min-height: 44px; padding: 0 16px; border: 0; border-radius: 9px;
  background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 500; cursor: pointer;
}
.seg-btn[aria-pressed="true"] {
  background: var(--card); color: var(--ink); font-weight: 700;
  box-shadow: 0 1px 2px rgba(27, 26, 23, 0.14);
}
.chip {
  min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px;
  background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 500; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--color-1); color: #FFFFFF; font-weight: 700; }
.seg-btn:disabled, .chip:disabled { color: var(--disabled); cursor: not-allowed; }
.hint { font-size: 12px; color: var(--muted); }
/* Compare: a chip that opens a list of items to tick */
.compare-wrap { position: relative; }
#compare-btn[aria-pressed="true"] { background: #4F6A86; color: #FFFFFF; font-weight: 700; }
#compare-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.compare-count { margin-left: 6px; font-family: var(--mono); }
.compare-panel {
  position: absolute; top: 52px; left: 0; z-index: 12; width: 300px; max-width: calc(100vw - 32px);
  background: var(--card); border-radius: 14px; padding: 12px 12px 8px;
  box-shadow: 0 2px 4px rgba(27, 26, 23, 0.08), 0 12px 32px rgba(27, 26, 23, 0.16);
}
.compare-head { display: flex; align-items: center; justify-content: space-between; }
.compare-title { font-size: 14px; font-weight: 700; }
.compare-clear { border: 0; background: none; padding: 2px 4px; color: var(--ink); font: 500 13px var(--sans); text-decoration: underline; cursor: pointer; }
.compare-sub { margin: 2px 0 8px; font-size: 12px; color: var(--muted); }
.compare-list { max-height: min(360px, 50vh); overflow-y: auto; overscroll-behavior: contain; }
.compare-list .price-group-title { padding: 8px 4px 4px; }
.compare-option {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 6px; border-radius: 8px;
  font-size: 13px; cursor: pointer;
}
.compare-option:hover { background: var(--nav-fill); }
.compare-option input { margin: 0; accent-color: var(--color-1); }
.compare-option b { font-family: var(--mono); font-weight: 500; color: var(--ink); }
.compare-option span { color: var(--muted); }
.compare-option.off { cursor: default; opacity: 0.45; }
.compare-option.off:hover { background: none; }
/* The line each ticked item gets */
.compare-option .swatch { margin-left: auto; width: 18px; height: 3px; border-radius: 2px; background: var(--key); }
.compare-option .swatch.dash, .compare-note .key.dash::before, .cv-readout .cv-key.dash::before {
  background: repeating-linear-gradient(90deg, var(--key) 0 5px, transparent 5px 8px);
}
.compare-option :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.compare-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13px; color: var(--ink-2); }
.compare-note b { font-family: var(--mono); font-weight: 500; }
.compare-note .key { display: inline-flex; align-items: center; gap: 6px; }
.compare-note .key::before { content: ""; width: 14px; height: 3px; border-radius: 2px; background: var(--key); }
.compare-note .when { width: 100%; font-size: 12px; color: var(--muted); }
/* Expand: at the end of the row */
.chart-expand { margin-left: auto; width: 44px; padding: 0; display: flex; align-items: center; justify-content: center; }
.chart-expand:hover { color: var(--ink); background: var(--line); }
.chart-expand:focus-visible, .cv-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- The large chart view ---------- */
.cv-dim { position: fixed; inset: 0; z-index: 90; background: rgba(40, 40, 30, 0.38); }
.chart-view {
  position: fixed; z-index: 91; inset: 32px max(32px, calc((100vw - 1240px) / 2));
  display: flex; flex-direction: column; gap: 12px; padding: 22px 24px 16px;
  background: var(--bg) var(--grain); border: 1px solid var(--card-border); border-radius: 20px;
  box-shadow: 0 20px 50px rgba(27, 26, 23, 0.28);
}
.chart-view:focus { outline: none; }
body.view-open { overflow: hidden; }
.cv-head { display: flex; align-items: flex-start; gap: 16px; }
.cv-name { min-width: 0; }
.cv-title { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.cv-title span { font-size: 16px; font-weight: 500; color: var(--muted); }
.cv-sub { margin-top: 2px; font-size: 13px; color: var(--muted); }
.cv-figures { margin-left: auto; display: flex; align-items: baseline; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; font-family: var(--mono); }
.cv-price { font-size: 30px; font-weight: 500; letter-spacing: -0.03em; color: var(--ink); }
.cv-change { font-size: 14px; font-weight: 500; }
.cv-change .cv-period { font-family: var(--sans); font-weight: 400; color: var(--muted); }
.cv-close {
  flex: none; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 50%;
  background: transparent; color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer;
}
.cv-close:hover { background: var(--surface); }
.cv-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cv-ranges { margin-left: auto; min-width: 260px; }
.cv-readout {
  min-height: 24px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px;
  font-size: 14px; color: var(--ink-2);
}
.cv-readout b { font-family: var(--mono); font-weight: 500; color: var(--ink); }
.cv-readout .up { color: var(--up); }
.cv-readout .down { color: var(--down); }
.cv-readout a { color: var(--ink); font-weight: 500; }
.cv-readout .cv-key { display: inline-flex; align-items: center; gap: 6px; }
.cv-readout .cv-key::before { content: ""; width: 14px; height: 3px; border-radius: 2px; background: var(--key); }
.cv-readout .cv-badge {
  flex: none; width: 22px; height: 22px; border-radius: 50%; color: #FFFFFF;
  font-size: 12px; font-weight: 700; line-height: 22px; text-align: center;
}
.cv-chart { position: relative; flex: 1; min-height: 0; touch-action: none; }
/* Zoom: − and + buttons, the months on screen, and Reset */
.cv-zoom { display: flex; align-items: center; gap: 4px; }
.cv-zoom-btn {
  width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--surface);
  color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer;
}
.cv-zoom-btn:hover:not(:disabled) { background: var(--line); }
.cv-zoom-btn:disabled { color: var(--disabled); cursor: default; }
.cv-zoom-btn:focus-visible, .cv-zoom-reset:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cv-zoom-text { margin-left: 6px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.cv-zoom-reset {
  border: 0; background: none; padding: 4px 6px; color: var(--ink); font: 500 13px var(--sans);
  text-decoration: underline; cursor: pointer;
}
.cv-chart svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.cv-chart text { font-family: var(--mono); font-size: 12px; fill: var(--muted); }
.cv-marker { cursor: pointer; }
.cv-chart text.cv-tag { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.cv-tags { pointer-events: none; }
.cv-marker:focus { outline: none; }
.cv-marker:focus-visible circle.cv-badge-circle { stroke: var(--ink); stroke-width: 2.5; }
.cv-marker text { font-family: var(--sans); font-size: 12px; font-weight: 700; fill: #FFFFFF; }
.cv-hint { margin: 0; font-size: 12px; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .chart-view:not([hidden]) { animation: menu-in 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
}
/* Phones: the whole screen */
@media (max-width: 720px) {
  .chart-view { inset: 0; border: 0; border-radius: 0; padding: 14px 14px 10px; gap: 10px; }
  .cv-head { flex-wrap: wrap; gap: 6px 12px; }
  .cv-figures { order: 3; margin-left: 0; width: 100%; justify-content: flex-start; }
  .cv-close { margin-left: auto; }
  .cv-price { font-size: 24px; }
  .cv-ranges { margin-left: 0; width: 100%; min-width: 0; }
  .cv-hint { display: none; }
}

/* Chart */
.chart-block { display: flex; flex-direction: column; gap: 8px; }
.chart-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
  padding-bottom: 8px;
}
.chart-inner {
  position: relative; width: 699px; cursor: crosshair;
  user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none; /* no iOS long-press menu */
}
.scrub-line { stroke: var(--band); stroke-width: 1; }
#chart { display: block; }
.grid { stroke: var(--line); stroke-width: 1; }
.band-area { fill: var(--band); }
.band-edge { fill: none; stroke: var(--band); stroke-width: 1; }
.open-line { stroke: var(--band); stroke-width: 1; stroke-dasharray: 3 4; }
.price-line { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.real-line { stroke-dasharray: 6 4; }

.axis {
  position: relative; height: 18px; margin-top: 6px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.axis span { position: absolute; top: 0; white-space: nowrap; }

/* Chart markers. Only the numbered badge takes clicks: markers in the same
   month share a column, with their badges stacked, so each badge has to be
   clickable on its own. */
.marker {
  position: absolute; top: 0; width: 44px; height: 160px;
  padding: 0; border: 0; background: transparent; pointer-events: none;
}
.marker-badge { pointer-events: auto; cursor: pointer; }
.marker:focus-visible { outline: none; }
.marker:focus-visible .marker-badge { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Pointing at a badge: a ring pulses out from it */
.marker-badge::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  border: 2px solid var(--marker); opacity: 0; pointer-events: none;
}
@keyframes marker-pulse {
  from { transform: scale(1); opacity: 0.7; }
  to { transform: scale(1.8); opacity: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .marker-badge:hover::after { animation: marker-pulse 1.1s ease-out infinite; }
}
/* With reduced motion, a still ring instead */
@media (prefers-reduced-motion: reduce) {
  .marker-badge:hover::after { opacity: 0.6; transform: scale(1.35); }
}
.marker-line {
  position: absolute; left: 21px; top: 20px; width: 2px; height: 130px;
  background: color-mix(in srgb, var(--marker) 35%, transparent);
}
.marker-badge {
  position: absolute; left: 11px; top: 0; width: 22px; height: 22px; border-radius: 999px;
  background: var(--marker); color: #FFFFFF; font-size: 12px; font-weight: 700;
  line-height: 22px; text-align: center;
}
.marker-dot {
  position: absolute; left: 16px; width: 12px; height: 12px; border-radius: 999px;
  background: #FFFFFF; border: 2px solid var(--marker);
}
.marker.selected .marker-line { background: var(--marker); }
.marker.selected .marker-badge { background: var(--marker-dark); box-shadow: 0 0 0 3px color-mix(in srgb, var(--marker) 28%, transparent); }

/* Legend and notes under the chart */
.legend {
  min-height: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
  font-size: 12px; color: var(--ink-2);
}
/* Nothing to show (no Real line, range or markers): no empty row */
.legend:not(:has(> :not([hidden]))) { display: none; }
.muted { color: var(--muted); }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-markers { display: contents; }
.band-status { font-size: 13px; color: var(--ink-2); }

.event-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface); border-radius: 12px; padding: 12px 14px;
}
.event-badge {
  flex: none; width: 22px; height: 22px; border-radius: 999px; background: var(--marker);
  color: #FFFFFF; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.event-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.event-title { font-size: 14px; font-weight: 700; }
.event-date { font-size: 12px; color: var(--muted); }
.event-price { font-family: var(--mono); font-size: 13px; }
.event-link { font-size: 13px; font-weight: 500; color: var(--marker); }
.event-link:hover { color: var(--marker-dark); }

/* Range tabs */
.tabs { display: flex; gap: 6px; background: var(--surface); border-radius: 12px; padding: 4px; }
.tab {
  flex: 1; min-height: 44px; border: 0; border-radius: 9px;
  background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 500; cursor: pointer;
}
.tab[aria-pressed="true"] { background: var(--color-1); color: #FFFFFF; font-weight: 700; }

/* Stats */
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  border-top: 1px solid var(--line); padding-top: 16px;
}
.real-stats {
  display: flex; flex-direction: column; gap: 12px;
  border-top: 1px solid var(--line); padding-top: 16px;
}
.real-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-family: var(--mono); font-size: 14px; font-weight: 500; }
.stat-value.big { font-size: 16px; }
.stat-value.strong { font-weight: 700; color: var(--up); }
.stat-value.strong.down { color: var(--down); }
.verdict { font-size: 13px; color: var(--ink-2); }

.note { font-size: 12px; color: var(--muted); }
.card-votes { display: inline-block; margin-top: 6px; font-size: 12.5px; font-weight: 500; color: var(--color-1); }
.card-votes:hover { text-decoration-thickness: 2px; }

/* Menus and panels ease in as they open: a quick fade while they drop a few
   pixels into place. (Opening removes [hidden], which starts the animation.)
   Off for people whose device asks for less motion. */
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
/* Closing reverses it, a little quicker (nav.js hides them after) */
@keyframes menu-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(-4px) scale(0.98); }
}
/* A quick shake of an item's icon when pointed at: in the Prices menu
   when pointing at its row, on the card when pointing at the icon */
@keyframes icon-shake {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-12deg); }
  40% { transform: rotate(10deg); }
  60% { transform: rotate(-6deg); }
  80% { transform: rotate(3deg); }
}
@media (prefers-reduced-motion: no-preference) {
  .price-row:hover .price-row-icon svg, .icon:hover svg { animation: icon-shake 0.45s ease-in-out; }
  .prices-menu, .topnav-mobile, .chips-menu, .menu, .settings-panel, .share-panel, .pay-flyout {
    transform-origin: top center;
    animation: menu-in 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .prices-menu.closing, .topnav-mobile.closing, .chips-menu.closing, .menu.closing, .settings-panel.closing, .share-panel.closing, .pay-flyout.closing {
    animation: menu-out 0.14s ease-in forwards;
    pointer-events: none;
  }
}

/* ---------- The preview picture for links (?share-card) ----------
   The bar, then the page's heading band at its own size, centred in the
   1200 x 630 picture, its words larger and its band filling the rest (the
   Prices page, with no band, shows its top as it is); scripts/share-cards.js
   pictures each page this way */
html.share-card, html.share-card body { overflow: hidden; }
html.share-card .back-row, html.share-card .site-footer { display: none !important; }
html.share-card main:has(> header) { display: flex; flex-direction: column; justify-content: center; min-height: calc(630px - 60px); padding-top: 0; padding-bottom: 0; box-sizing: border-box; }
html.share-card main:has(> header) > :not(header) { display: none !important; }
html.share-card main > header { clip-path: none; }
html.share-card main > header::before, html.share-card main > header::after { display: none; }
html.share-card body:has(main > header) { min-height: 630px; box-shadow: inset 0 0 0 2000px var(--bg-band); }
html.share-card main > header h1 { font-size: 54px; line-height: 1.1; }
html.share-card main > header > p { font-size: 19px; line-height: 1.55; }
