/* Credit starts from Taper's stylesheet and keeps its variables, so the two apps read as one family.
   Colours: the chart's three series are slots 1 to 3 of the validated data-viz palette (blue, orange, aqua),
   one for each bureau, checked against both page colours with validate_palette.py --pairs all. They keep
   Taper's names: --bar is Equifax, --limit is Experian, --avg is TransUnion. The model is told apart by the
   line's dash pattern, never by a fourth colour. The app's own blue (--accent) is the blue of the buttons. */
:root {
  color-scheme: light dark;
  --page: #f5f5f7;
  --bar-bg: rgba(245, 245, 247, 0.82);
  --ink: #1c1c1e;
  --ink-2: #5c5c62;
  --muted: #8a8a8e;
  --grid: #e3e3e8;
  --axis: #c7c7cc;
  --hair: rgba(60, 60, 67, 0.16);
  --bar: #2a78d6;
  --limit: #eb6834;
  --avg: #1baf7a;
  --track: #d6e6fa;
  --over: #ec835a;
  --good: #1a7f37;
  --danger: #d03b3b;
  --danger-tint: #fbe7e7;
  --accent: #1f6bc7;
  --accent-ink: #ffffff;
  --tint: #e2edfb;
  --tint-ink: #1a5aa8;
  --tip: #2c2c2e;
  --tip-ink: #ffffff;
  --field: #ffffff;
  --field-line: #c7c7cc;
  --press: rgba(0, 0, 0, 0.06);
  --seg-on: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #000000;
    --bar-bg: rgba(0, 0, 0, 0.78);
    --ink: #f2f2f7;
    --ink-2: #aeaeb2;
    --muted: #8a8a8e;
    --grid: #26262a;
    --axis: #3a3a3f;
    --hair: rgba(235, 235, 245, 0.16);
    --bar: #3987e5;
    --limit: #d95926;
    --avg: #199e70;
    --track: #17304f;
    --over: #ec835a;
    --good: #30c75a;
    --danger: #ff6b6b;
    --danger-tint: #3a1717;
    --accent: #2f80e0;
    --accent-ink: #ffffff;
    --tint: #142c4a;
    --tint-ink: #7ab3f5;
    --tip: #e5e5ea;
    --tip-ink: #1c1c1e;
    --field: #1c1c1e;
    --field-line: #3a3a3f;
    --press: rgba(255, 255, 255, 0.08);
    --seg-on: #48484e;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; background: var(--page); }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 17px/1.45 -apple-system, system-ui, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

.sprite { position: absolute; }
/* words for screen readers only */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* App bar: the icon and the name, pinned at the top under the status bar. On a wide screen it carries the sections. */
.appbar {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: calc(env(safe-area-inset-top) + 10px) 20px 10px;
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hair);
}
.appbar-inner { max-width: 560px; width: 100%; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; display: block; }
.brand span { font-size: 18px; font-weight: 650; }
.topnav { display: none; }

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 20px calc(env(safe-area-inset-bottom) + 150px);
}

/* One section shows at a time. boot.js names it on <html> before the page draws. The address names the section
   by its id, so the browser scrolls to it; the margin keeps its heading clear of the app bar. */
main > section { display: none; padding: 8px 0 0; scroll-margin-top: 140px; }
.g-sec { scroll-margin-top: 76px; }
html[data-view="scores"] #scores,
html[data-view="reports"] #reports,
html[data-view="utilization"] #utilization,
html[data-view="learn"] #learn,
html[data-view="protect"] #protect,
html[data-view="fix"] #fix,
html[data-view="settings"] #settings { display: block; }

h1 { font-size: 34px; font-weight: 750; line-height: 1.1; margin: 0 0 16px; }
h2 { font-size: 28px; font-weight: 700; line-height: 1.15; margin: 0 0 14px; }
h3 { font-size: 20px; font-weight: 650; line-height: 1.25; margin: 30px 0 12px; padding-top: 22px; border-top: 1px solid var(--hair); }
h4 { font-size: 17px; font-weight: 650; margin: 0 0 4px; }
p { margin: 0; }
main p + p { margin-top: 10px; }

.note { color: var(--ink-2); font-size: 15px; }
.error { color: var(--danger); font-size: 15px; }
.lead { font-size: 18px; line-height: 1.5; color: var(--ink-2); margin: 0 0 14px; }

/* ---------- buttons ----------
   Main: solid blue, for the one thing each screen is for. Tinted: light blue, for the other actions.
   Plain: blue text, for small ones. Danger: red. Each carries an icon where it helps (.ic, inline SVG). */
button { font: inherit; color: inherit; cursor: pointer; -webkit-user-select: none; user-select: none; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--bar);
  outline-offset: 2px;
}
input, select, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: 10px;
  padding: 9px 12px;
  min-height: 44px;
}
textarea { display: block; resize: vertical; line-height: 1.4; }

.ic { width: 1.15em; height: 1.15em; flex: none; display: block; }

.primary, .solid, .link, .tinted, .danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  text-decoration: none;
  transition: transform 0.12s ease, opacity 0.12s ease, background-color 0.12s ease;
}
.primary:active, .solid:active, .tinted:active, .danger:active { transform: scale(0.97); opacity: 0.85; }
.link:active { opacity: 0.55; }

.primary {
  display: flex;
  width: 100%;
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 19px;
  font-weight: 650;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(31, 107, 199, 0.28);
}
.primary .ic { width: 24px; height: 24px; }

.solid {
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.tinted {
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--tint-ink);
  font-weight: 600;
}

.link {
  padding: 10px 2px;
  background: none;
  color: var(--tint-ink);
  font-weight: 500;
}

.danger {
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--danger-tint);
  color: var(--danger);
  font-weight: 600;
}

.buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 16px; }

/* ---------- forms ---------- */
.field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.entry-form { display: grid; gap: 12px; max-width: 520px; margin: 16px 0 0; padding: 0 0 18px; }
.row-item .entry-form { margin-top: 2px; }
.stack { display: grid; gap: 6px; min-width: 0; }
.stack > span { color: var(--ink-2); font-size: 15px; }
.stack input, .stack select, .stack textarea { width: 100%; min-width: 0; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.entry-form .f-hint { margin-top: -4px; }
.entry-form .buttons { margin-top: 4px; }
.f-score { font-variant-numeric: tabular-nums; }

/* ---------- reminders at the top of a page ---------- */
.nudge { display: flex; gap: 12px; margin: 0 0 6px; padding: 4px 0 10px; border-bottom: 1px solid var(--hair); }
.nudge > .ic { color: var(--limit); width: 22px; height: 22px; margin-top: 1px; }
.nudge .tinted { margin: 10px 0 8px; }
.nudge .link { min-height: 36px; padding: 4px 0; }
.nudge .link .ic { width: 16px; height: 16px; }
/* the backup reminder sits under the page's main button, as it does in Taper */
.nudge.below { margin: 22px 0 0; padding: 16px 0 0; border-top: 1px solid var(--hair); border-bottom: 0; }
/* above sections that bring their own rule */
.nudge.flat { margin: 0; padding: 4px 0 0; border-bottom: 0; }
.nudge .note { color: var(--ink); font-size: 16px; }
.nudge .note + .note { color: var(--ink-2); font-size: 15px; margin-top: 4px; }

/* ---------- Scores ---------- */
/* With no scores yet the page says what the app is; the class is set on <html> before the page draws. */
.no-scores #scores-h, .no-scores #latest, .no-scores #scores-over-time, .no-scores #scores-history { display: none; }
html:not(.no-scores) #welcome, html:not(.no-scores) #free-score { display: none; }
.welcome-icon { width: 76px; height: 76px; border-radius: 17px; display: block; margin: 18px 0 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(31, 107, 199, 0.25); }
.install-hint { display: flex; gap: 10px; margin: 6px 0 8px; padding: 12px 0 0; border-top: 1px solid var(--hair); }
.install-hint .ic { color: var(--tint-ink); margin-top: 2px; }

/* Get a score free: the button under Add a score, and the list of free places it opens. Each row is the place,
   what it shows, its link out and the way back into the form. */
#score-get { display: flex; width: 100%; margin-top: 10px; }
#score-get .ic { width: 18px; height: 18px; }
.sources { margin-top: 26px; }
.sources h3 { margin: 0 0 6px; }
.sources > .note { margin: 0; }
.sources .rows { margin: 10px 0 14px; border-top: 1px solid var(--hair); }
.place { padding: 12px 0 6px; }
.place-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0 22px; margin-top: 4px; }
.place-acts .link { min-height: 40px; padding: 6px 0; }
.sources .source { margin: 10px 0 0; }
.sources .buttons { margin-top: 6px; }
.install-hint p { margin: 0; }

/* the newest score of each bureau and model: a ruled list, the number at the right */
.latest-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.latest-row p { margin: 0; }
.latest-names { min-width: 0; overflow-wrap: anywhere; }
.latest-bureau { font-size: 19px; font-weight: 650; }
.latest-names .band { margin-top: 6px; }
.latest-nums { flex: none; text-align: right; }
.latest-score { font-size: 42px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.change { display: flex; align-items: center; justify-content: flex-end; gap: 4px; color: var(--ink-2); font-size: 15px; margin-top: 2px; }
.change .ic { width: 14px; height: 14px; }
.change.up { color: var(--good); }

/* the range picker is an iOS segmented control; the guide's page picker on a phone is the same thing made of links */
.range { display: flex; padding: 2px; margin: 0 0 18px; border-radius: 10px; background: var(--grid); }
.range button, .range a {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 4px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.range button[aria-checked="true"], .range a[aria-current="page"] { background: var(--seg-on); font-weight: 650; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14); }
.guide-nav { display: none; margin-bottom: 20px; }
html[data-view="learn"] .guide-nav, html[data-view="protect"] .guide-nav, html[data-view="fix"] .guide-nav { display: flex; }

.chart { margin: 0; }
figcaption { margin-bottom: 10px; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; color: var(--ink-2); font-size: 14px; }
.legend li { display: flex; align-items: flex-start; gap: 6px; }

.plot { position: relative; }
.plot svg { display: block; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.plot svg:focus { outline: none; }
.plot svg:focus-visible { outline: 2px solid var(--bar); outline-offset: 2px; }
.plot text { font: 11px system-ui, -apple-system, sans-serif; fill: var(--muted); font-variant-numeric: tabular-nums; }
.plot .end-label { font-size: 12px; fill: var(--ink-2); }
.grid { stroke: var(--grid); stroke-width: 1; }
.baseline { stroke: var(--axis); stroke-width: 1; }
.cross { stroke: var(--axis); stroke-width: 1; }
.hit { fill: transparent; }

/* one line for each bureau and model: the colour is the bureau, the dash pattern is the model */
.series .s-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.series .s-dot { stroke: var(--page); stroke-width: 2; }
.series.dense .s-dot:not(.newest):not(.on) { visibility: hidden; }
.series .s-dot.on { stroke: var(--ink); }
.series.b-equifax .s-line { stroke: var(--bar); }
.series.b-equifax .s-dot { fill: var(--bar); }
.series.b-experian .s-line { stroke: var(--limit); }
.series.b-experian .s-dot { fill: var(--limit); }
.series.b-transunion .s-line { stroke: var(--avg); }
.series.b-transunion .s-dot { fill: var(--avg); }
.series.m-fico9 .s-line { stroke-dasharray: 7 4; }
.series.m-fico10 .s-line { stroke-dasharray: 1 5; }
.series.m-vantage3 .s-line { stroke-dasharray: 10 4 2 4; }
.series.m-vantage4 .s-line { stroke-dasharray: 14 5; }
.series.m-other .s-line { stroke-dasharray: 3 4; }
/* the sample of a line sits beside the first line of its words, in the legend and in the tooltip (14px type) */
.key-line { display: block; flex: none; overflow: visible; margin-top: 5px; }
.key-line .s-dot { stroke-width: 1.5; }

.tip {
  position: absolute;
  top: 0;
  z-index: 2;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--tip);
  color: var(--tip-ink);
  font-size: 14px;
  line-height: 1.4;
  /* as wide as its words, and never wider than the chart: a long model name wraps inside it */
  box-sizing: border-box;
  width: max-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.tip p { margin: 0; }
.tip-title { opacity: 0.72; }
.tip-row { display: flex; align-items: flex-start; gap: 6px; }
.tip-row strong { flex: none; font-weight: 650; white-space: nowrap; }
.tip .s-dot { stroke: var(--tip); }

details { margin-top: 8px; font-size: 15px; }
summary { color: var(--ink-2); padding: 6px 0; cursor: pointer; }
table { width: 100%; border-collapse: collapse; margin-top: 4px; font-variant-numeric: tabular-nums; }
th, td { padding: 6px 0 6px 12px; text-align: right; border-bottom: 1px solid var(--hair); }
th:first-child, td:first-child { padding-left: 0; text-align: left; }
th { color: var(--ink-2); font-weight: 600; }
#score-table { font-size: 14px; }
#score-table th:nth-child(-n+3), #score-table td:nth-child(-n+3) { text-align: left; }
#score-table td:first-child { white-space: nowrap; }

/* ---------- ruled lists: history, pulls, cards ---------- */
.rows { list-style: none; margin: 8px 0 0; padding: 0; }
.row-item { border-bottom: 1px solid var(--hair); }
.row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 12px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
}
.row.top { align-items: flex-start; }
button.row:active { opacity: 0.55; }
.row.picked .row-title { color: var(--tint-ink); }
.row-main { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.row-title { font-weight: 600; overflow-wrap: anywhere; }
.row-sub { color: var(--ink-2); font-size: 15px; overflow-wrap: anywhere; }
.row-value { flex: none; font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.row-value.small { color: var(--ink-2); font-size: 15px; font-weight: 500; }
.due-tag { display: inline-flex; flex: none; align-items: center; gap: 5px; color: var(--ink); font-size: 15px; font-weight: 600; }
.due-tag .ic { color: var(--limit); }
.over-text { color: var(--danger); }
#history-more { margin-top: 4px; }

/* ---------- Utilization ---------- */
.date { color: var(--ink-2); font-size: 15px; font-weight: 500; }
.hero { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 2px 0 10px; }
.hero-num { font-size: 64px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-note { color: var(--ink-2); font-size: 19px; }
.total { margin: 16px 0 6px; padding-bottom: 16px; border-bottom: 1px solid var(--hair); }
.total p { margin: 0; }
.total .marks { margin: 0 0 8px; }
.total .left-out { margin-top: 8px; }
/* A card: its name and percentage share the first line, and everything under them runs the full width, so
   every card's bar is the same length whatever its percentage reads. */
.row.card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: start; }
.row.card .row-main { display: contents; }
.row.card .row-title { grid-column: 1; grid-row: 1; align-self: center; }
.row.card .row-value { grid-column: 2; grid-row: 1; line-height: 1.2; }
.row.card .row-sub, .row.card .meter { grid-column: 1 / -1; }
.meter { display: block; margin: 6px 0 4px; }
.m-track { fill: var(--track); }
.m-fill { fill: var(--bar); }
.meter.over .m-fill { fill: var(--over); }
.m-mark { stroke: var(--page); stroke-width: 2; }

/* ---------- the guide: Learn, Protect, Fix errors, and the explanations on the other pages ---------- */
.guide p { margin: 0 0 12px; }
.g-sec > :last-child { margin-bottom: 0; }
.g-list { margin: 0 0 14px; padding-left: 24px; }
.g-list li { margin: 0 0 8px; padding-left: 2px; }
.g-list li.termed { display: grid; gap: 2px; margin: 0 0 0 -24px; padding: 10px 0; list-style: none; border-top: 1px solid var(--hair); }
.g-list li.termed:last-child { border-bottom: 1px solid var(--hair); }
.g-list li.termed strong { font-weight: 650; }
.g-list li.termed span { color: var(--ink-2); }
ol.g-list li.termed { margin-left: 0; }

.qa { margin: 0; border-bottom: 1px solid var(--hair); font-size: inherit; }
.qa summary { padding: 12px 0; color: var(--ink); font-weight: 600; }
.qa-body { padding: 2px 0 6px; }

.source { color: var(--ink-2); font-size: 15px; }
a.out { color: var(--tint-ink); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
a.out .ic { display: inline-block; width: 0.8em; height: 0.8em; margin-left: 3px; vertical-align: -0.04em; }

.contacts { margin: 4px 0 14px; }
.contact { padding: 12px 0; border-top: 1px solid var(--hair); }
.contact:last-child { border-bottom: 1px solid var(--hair); }
.contact h4 { margin: 0 0 6px; }
.contact dl { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 15px; }
.contact dt { color: var(--ink-2); }
.contact dd { margin: 0; overflow-wrap: anywhere; }
.address span { display: block; }

.bands { margin: 0 0 22px; }
.bands figcaption { margin-bottom: 4px; }
.bands figcaption p { margin: 0; }
.bands table { margin: 6px 0 10px; font-size: 15px; }

.g-toc { margin: 4px 0 0; padding: 14px 0 6px; border-top: 1px solid var(--hair); }
.g-toc-title { color: var(--ink-2); font-size: 15px; margin: 0 0 4px; }
.g-toc ul { list-style: none; margin: 0; padding: 0; }
.g-toc a { display: block; padding: 7px 0; color: var(--tint-ink); font-weight: 500; text-decoration: none; }
.disclaimer, .guide .disclaimer { margin: 30px 0 0; padding-top: 18px; border-top: 1px solid var(--hair); }

/* the dispute letter: a plain white sheet, the way it will print */
.letter { margin: 18px 0 4px; padding: 28px 24px; background: #ffffff; color: #1c1c1e; font: 15px/1.5 Georgia, "Times New Roman", serif; overflow-wrap: anywhere; }
.letter p { margin: 0; }
.l-part { margin: 0 0 18px; }
.l-part:last-child { margin-bottom: 0; }
.l-blank { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 8px; padding-top: 6px; }
.l-rule { flex: 1 1 140px; min-width: 140px; height: 1.4em; border-bottom: 1px solid #1c1c1e; }
.l-typed { white-space: pre-wrap; }
.letter-form { max-width: none; }

/* ---------- Settings ---------- */
#backup-status { margin-top: 10px; }

/* ---------- the tab bar: the sections, along the bottom of a phone ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 4px 4px calc(env(safe-area-inset-bottom) + 4px);
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--hair);
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 50px;
  padding: 4px 2px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
}
.tabbar .ic { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--tint-ink); font-weight: 650; }
.tabbar a:active { opacity: 0.55; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 74px);
  transform: translateX(-50%);
  width: min(520px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--tip);
  color: var(--tip-ink);
  font-size: 16px;
  z-index: 10;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}
.toast button { display: inline-flex; flex: none; align-items: center; gap: 6px; min-height: 40px; padding: 4px 0; border: 0; background: none; color: inherit; font-weight: 650; }

/* ---------- a computer: the sections move into the app bar and the pages use two columns ---------- */
@media (min-width: 900px) {
  .appbar { padding-left: 32px; padding-right: 32px; }
  .appbar-inner, main { max-width: 1080px; }
  main { padding: 30px 32px 110px; }
  .tabbar, .guide-nav { display: none !important; }
  .toast { bottom: 24px; }
  .topnav { display: flex; gap: 2px; margin-left: auto; }
  .topnav a { padding: 7px 12px; border-radius: 8px; color: var(--ink-2); font-size: 15px; font-weight: 500; text-decoration: none; }
  .topnav a:hover { background: var(--press); }
  .topnav a[aria-current="page"] { background: var(--tint); color: var(--tint-ink); font-weight: 650; }

  h2 { font-size: 32px; margin-bottom: 18px; }
  .primary { display: inline-flex; width: auto; min-width: 300px; }
  #score-get { display: inline-flex; width: auto; min-width: 300px; margin: 10px 0 0; }
  .sources { max-width: 640px; }
  .cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); column-gap: 72px; align-items: start; }
  .cols > div > h3:first-child, .cols > .guide > .g-sec:first-child > h3 { margin-top: 12px; }
  .cols-reports { grid-template-areas: "main top" "main foot"; grid-template-rows: auto 1fr; }
  .cols-reports .area-top { grid-area: top; }
  .cols-reports .area-main { grid-area: main; }
  .cols-reports .area-foot { grid-area: foot; }

  .no-scores #scores { max-width: 640px; }
  .latest { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); column-gap: 56px; }
  .cols-scores { margin-top: 14px; }
  /* the chart stays in view beside a long history, unless its table of numbers is open and makes it tall */
  #scores-over-time:not(:has(details[open])) { position: sticky; top: 64px; }

  .guide-page { display: grid; grid-template-columns: 220px minmax(0, 700px); column-gap: 72px; align-items: start; }
  .g-head { grid-column: 1 / -1; max-width: 700px; }
  .g-toc { position: sticky; top: 84px; margin: 12px 0 0; }
  .g-body > .g-sec:first-child > h3 { margin-top: 12px; }
  .contacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact { padding: 2px 18px 2px; border-top: 0; border-left: 1px solid var(--hair); }
  .contact:first-child { padding-left: 0; border-left: 0; }
  .contact:last-child { border-bottom: 0; }
  .contact dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .contact dd { margin-bottom: 6px; }
  .letter { padding: 44px 48px; }
}

/* ---------- on paper ---------- */
@media print {
  .appbar, .tabbar, .toast, .guide-nav, .g-toc { display: none !important; }
  html, body { background: #ffffff; }
  main { max-width: none; padding: 0; }
  /* Print on the letter prints the letter alone */
  html.print-letter .g-head,
  html.print-letter .g-body > :not(.letter-builder),
  html.print-letter .letter-builder > :not(.letter) { display: none !important; }
  html.print-letter .letter { margin: 0; padding: 0; font-size: 12pt; }
}
