/* Ledger, the FinancialRatios.guide design system. GENERATED by bin/build-ledger-css.py from
   brand/ledger/components/bundle.css and brand/ledger/site.css: edit those, then rebuild. */

@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-roman.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; unicode-range: U+20-7E, U+A0, U+A3, U+A5, U+A9, U+B0, U+B7, U+D7, U+F7, U+2013-2014, U+2018-2019, U+201C-201D, U+2022, U+2026, U+2032, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-roman-ext.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; unicode-range: U+A1-A2, U+A4, U+A6-A8, U+AA-AF, U+B1-B6, U+B8-D6, U+D8-F6, U+F8-FF, U+131, U+152-153, U+2BC, U+2C6, U+2DA, U+2DC, U+300-301, U+303-304, U+308-309, U+323, U+201A, U+201E, U+2033, U+2039-203A, U+2044, U+2215; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-italic-500.woff2") format("woff2"); font-weight: 400 600; font-style: italic; font-display: swap; unicode-range: U+20-7E, U+A0, U+A3, U+A5, U+A9, U+B0, U+B7, U+D7, U+F7, U+2013-2014, U+2018-2019, U+201C-201D, U+2022, U+2026, U+2032, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../fonts/schibsted-grotesk-wght.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
	--ledger: #eef5f0;
	--ledger-rule: #c6dccf;
	--ink-faint: #667283;
	--on-teal: #ffffff;
	--highlight: #ffe46b;
	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 24px;
	--space-6: 32px;
	--space-7: 48px;
	--space-8: 64px;
	--space-9: 96px;
	--radius-s: 6px;
	--radius-m: 10px;
	--radius-l: 16px;
	--radius-pill: 999px;
	--container: 1200px;
	--measure: 68ch;
	--header-height: 64px;
	--shadow-pop: 0 1px 2px rgba(15,27,45,0.06), 0 16px 40px rgba(15,27,45,0.14);
	--font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
	--font-sans: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
	--font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

/* FinancialRatios Ledger: every colour, size and space comes from tokens.css.
   Class prefix fr-. Motion: 120ms for hover, 200ms for state, 480ms for the one
   orchestrated moment per view; all of it off under prefers-reduced-motion. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html body {
	margin: 0;
	background: var(--surface);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 17px;
	line-height: 28px;
	-webkit-font-smoothing: antialiased;
	font-feature-settings: "tnum" 0;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
[hidden] { display: none !important; }
h1, h2 { text-wrap: balance; }
.fr-wrap { max-width: var(--container); margin: 0 auto; padding-left: max(var(--space-5), env(safe-area-inset-left, 0px)); padding-right: max(var(--space-5), env(safe-area-inset-right, 0px)); }
.fr-label { font-family: var(--font-sans); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.fr-label--teal { color: var(--accent); }
.fr-h1 { font-family: var(--font-display); font-size: 48px; line-height: 52px; font-weight: 600; letter-spacing: -0.015em; font-variation-settings: "opsz" 60; }
.fr-h2 { font-family: var(--font-display); font-size: 32px; line-height: 38px; font-weight: 600; letter-spacing: -0.01em; font-variation-settings: "opsz" 36; }
.fr-h3 { font-size: 20px; line-height: 28px; font-weight: 600; }
.fr-lead { font-size: 20px; line-height: 31px; color: var(--ink-muted); max-width: var(--measure); }
.fr-prose { max-width: var(--measure); }
.fr-prose p + p { margin-top: var(--space-4); }
.fr-small { font-size: 14px; line-height: 21px; color: var(--ink-muted); }
.fr-num { font-variant-numeric: lining-nums tabular-nums; }

/* Buttons */
.fr-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--paper); color: var(--ink); font: 600 15px/20px var(--font-sans); text-decoration: none; cursor: pointer; transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease; }
.fr-btn:hover { background: var(--ledger); color: var(--ink); }
.fr-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-teal); }
.fr-btn--primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-teal); }
.fr-btn--text { border-color: transparent; background: transparent; color: var(--accent); padding: 0 6px; }
.fr-btn--text:hover { background: transparent; color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.fr-btn svg { width: 18px; height: 18px; }

/* Chips */
.fr-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.fr-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: transparent; color: var(--ink); font: 600 14px/18px var(--font-sans); cursor: pointer; transition: background-color 120ms ease; }
.fr-chip:hover { background: var(--ledger); }
.fr-chip[aria-pressed="true"], .fr-chip[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.fr-chip--flag { cursor: default; border-style: dashed; color: var(--ink-muted); font-weight: 500; }
.fr-chip--flag:hover { background: transparent; }
.fr-chip b { font-variant-numeric: tabular-nums; }

/* Header */
.fr-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; height: var(--header-height); background: var(--surface); background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid var(--line); }
.fr-header .fr-wrap { display: flex; align-items: center; gap: var(--space-6); height: 100%; }
.fr-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; white-space: nowrap; }
.fr-logo:hover { color: var(--ink); }
.fr-logo svg { width: 30px; height: 30px; flex: none; }
.fr-logo em { font-style: normal; color: var(--accent); }
.fr-mark-bg { fill: var(--accent); }
.fr-mark-fg { fill: var(--on-teal); stroke: var(--on-teal); }
.fr-nav { display: flex; gap: var(--space-5); }
.fr-nav a { color: var(--ink-muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; transition: color 120ms ease; }
.fr-nav a:hover { color: var(--ink); }
.fr-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.fr-search-trigger { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; width: 300px; min-height: 40px; padding: 0 8px 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--paper); color: var(--ink-faint); font: 400 15px/20px var(--font-sans); cursor: pointer; }
.fr-search-trigger svg { width: 18px; height: 18px; color: var(--ink-muted); flex: none; }
.fr-search-trigger span { flex: 1; text-align: left; }
.fr-kbd { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border: 1px solid var(--line); border-radius: 5px; font: 500 12px/1 var(--font-mono); color: var(--ink-muted); background: var(--surface); }
.fr-icon-btn { display: none; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--radius-s); background: transparent; color: var(--ink); cursor: pointer; }
.fr-icon-btn svg { width: 22px; height: 22px; }
.fr-icon-btn:hover { background: var(--ledger); }
@media (max-width: 860px) {
	.fr-header .fr-wrap { gap: var(--space-2); padding-left: max(var(--space-4), env(safe-area-inset-left, 0px)); padding-right: max(var(--space-2), env(safe-area-inset-right, 0px)); }
	.fr-nav, .fr-search-trigger { display: none; }
	.fr-icon-btn { display: inline-grid; }
	.fr-icon-btn:first-of-type { margin-left: auto; }
	.fr-logo { font-size: 17px; }
}
/* The phone arrangement on demand, e.g. in a narrow container. */
.fr-header--compact .fr-wrap { gap: var(--space-2); padding-left: var(--space-4); padding-right: var(--space-2); }
.fr-header--compact .fr-nav, .fr-header--compact .fr-search-trigger { display: none; }
.fr-header--compact .fr-icon-btn { display: inline-grid; }
.fr-header--compact .fr-icon-btn:first-of-type { margin-left: auto; }
.fr-sheet { border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow-pop); }
.fr-sheet nav { display: grid; padding: var(--space-2) var(--space-4) var(--space-4); }
.fr-sheet a { display: grid; gap: 2px; padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 20px; line-height: 26px; font-weight: 600; }
.fr-sheet a:first-child { border-top: 0; }
.fr-sheet a span { color: var(--ink-muted); font-size: 14px; line-height: 20px; font-weight: 400; }
.fr-sheet a[aria-current="page"] { color: var(--accent); }

/* Breadcrumbs */
.fr-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; line-height: 21px; color: var(--ink-muted); }
.fr-crumbs a { color: var(--ink-muted); text-decoration: none; }
.fr-crumbs a:hover { color: var(--accent); text-decoration: underline; }
.fr-crumbs span[aria-hidden] { color: var(--ink-faint); }

/* Formula: a real fraction. Numerator teal, denominator ink, the bar is the rule. */
.fr-formula { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); margin: 0; font-family: var(--font-display); font-size: 30px; line-height: 38px; font-weight: 500; font-variation-settings: "opsz" 30; font-variant-numeric: lining-nums tabular-nums; color: var(--ink); }
.fr-formula__name { font-weight: 600; }
.fr-formula__eq, .fr-formula__op { color: var(--ink-muted); font-weight: 400; }
.fr-frac { display: inline-flex; flex-direction: column; align-items: center; text-align: center; }
.fr-frac__num { padding: 0 6px 6px; color: var(--accent); }
.fr-frac__den { padding: 6px 6px 0; border-top: 2px solid var(--ink); color: var(--ink); }
.fr-frac__num .fr-op, .fr-frac__den .fr-op { color: var(--ink-muted); font-weight: 400; padding: 0 4px; }
.fr-formula__scale { color: var(--ink-muted); font-size: 0.8em; }
.fr-formula--hero { font-size: 40px; line-height: 48px; font-variation-settings: "opsz" 40; }
.fr-formula--compact { font-size: 22px; line-height: 28px; font-variation-settings: "opsz" 22; }
.fr-formula__value { display: block; font-family: var(--font-sans); font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-muted); }
@media (max-width: 560px) { .fr-formula { font-size: 24px; line-height: 30px; } .fr-formula--hero { font-size: 28px; line-height: 34px; } }

/* Result: the figure on a highlighter stroke, closed by the accountant's double rule. */
.fr-result { display: grid; gap: var(--space-2); }
.fr-result__figure { justify-self: start; margin-top: var(--space-1); font-family: var(--font-display); font-size: 72px; line-height: 72px; font-weight: 500; letter-spacing: -0.02em; font-variation-settings: "opsz" 72; font-variant-numeric: lining-nums tabular-nums; color: var(--ink); padding-bottom: 6px; border-bottom: 4px double var(--ink); }
.fr-result__figure mark { color: inherit; padding: 0 0.06em; background: linear-gradient(176deg, transparent 0 40%, var(--highlight) 41% 86%, transparent 87%) no-repeat 0 0 / 100% 100%; transition: background-size 480ms cubic-bezier(.2,.7,.2,1); }
.fr-result.is-fresh .fr-result__figure mark { background-size: 0% 100%; transition: none; }
.fr-result__sentence { font-size: 17px; line-height: 26px; color: var(--ink); max-width: 36ch; }
.fr-result--empty .fr-result__figure mark { background: none; }
.fr-result--empty .fr-result__figure { color: var(--ink-faint); border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: var(--line); }
@media (max-width: 560px) { .fr-result__figure { font-size: 56px; line-height: 56px; } }

/* Tape: the calculation as an adding-machine roll. */
.fr-tape { margin: 0; padding: 22px var(--space-5) 20px; list-style: none; background: var(--ledger); font-family: var(--font-mono); font-size: 14px; line-height: 24px; color: var(--ink); font-variant-numeric: tabular-nums;
	-webkit-mask: radial-gradient(circle at 6px 0, transparent 4px, #000 4.5px) 0 0 / 12px 51% repeat-x, radial-gradient(circle at 6px 100%, transparent 4px, #000 4.5px) 0 100% / 12px 51% repeat-x;
	mask: radial-gradient(circle at 6px 0, transparent 4px, #000 4.5px) 0 0 / 12px 51% repeat-x, radial-gradient(circle at 6px 100%, transparent 4px, #000 4.5px) 0 100% / 12px 51% repeat-x; }
.fr-tape__title { margin-bottom: var(--space-2); font-family: var(--font-sans); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.fr-tape li { display: flex; justify-content: space-between; gap: var(--space-4); }
.fr-tape li span:first-child { color: var(--ink-muted); }
.fr-tape li b { font-weight: 500; }
.fr-tape__total { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--ink); }
.fr-tape__total span:first-child { color: var(--ink) !important; font-weight: 500; }
.fr-tape__total b { border-bottom: 3px double var(--ink); padding-bottom: 1px; }
.fr-tape li.is-new { animation: fr-feed 200ms cubic-bezier(.2,.7,.2,1) both; }
@keyframes fr-feed { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Fields and the calculator */
.fr-field { display: grid; gap: 6px; min-width: 0; }
.fr-field label { display: flex; align-items: center; gap: 8px; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink); }
.fr-role { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.fr-role--num { background: var(--accent); }
.fr-role--den { background: var(--ink); }
.fr-input { display: flex; align-items: stretch; min-height: 52px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--paper); transition: border-color 120ms ease, box-shadow 120ms ease; }
.fr-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.fr-input__unit { display: grid; place-items: center; padding: 0 12px; color: var(--ink-muted); font-size: 17px; border-right: 1px solid var(--line); }
.fr-input input { flex: 1; width: 100%; min-width: 0; padding: 0 14px; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 20px/1 var(--font-sans); font-variant-numeric: lining-nums tabular-nums; }
.fr-field__help { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.fr-calc { border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper); }
.fr-calc__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2) var(--space-5); padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--line); }
.fr-calc__title { font-size: 20px; line-height: 28px; font-weight: 600; }
.fr-calc__note { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.fr-calc__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.fr-calc__fields { display: grid; align-content: start; gap: var(--space-5); padding: var(--space-6); border-right: 1px solid var(--line); }
.fr-calc__out { display: grid; align-content: start; gap: var(--space-5); padding: var(--space-6); }
.fr-calc__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
@media (max-width: 760px) {
	.fr-calc__body { grid-template-columns: minmax(0, 1fr); }
	.fr-calc__fields { border-right: 0; border-bottom: 1px solid var(--line); padding: var(--space-5) var(--space-4); }
	.fr-calc__out { padding: var(--space-5) var(--space-4); }
	.fr-calc__head { padding: var(--space-4); }
}

/* Reading the result: a ruler with the example's position, then low and high. */
.fr-reading { display: grid; gap: var(--space-6); }
.fr-ruler { position: relative; height: 72px; margin: 0 8px; }
.fr-ruler__line { position: absolute; left: 0; right: 0; top: 40px; height: 2px; background: var(--ink); }
.fr-ruler__zone { position: absolute; top: 34px; height: 14px; background: repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 7px); }
.fr-ruler__tick { position: absolute; top: 34px; width: 1px; height: 14px; background: var(--ink); }
.fr-ruler__tick span { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); font: 500 13px/16px var(--font-mono); color: var(--ink-muted); white-space: nowrap; }
.fr-ruler__pin { position: absolute; top: 0; transform: translateX(-50%); display: grid; justify-items: center; gap: 2px; transition: left 480ms cubic-bezier(.2,.7,.2,1); }
.fr-ruler__pin b { padding: 2px 8px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-teal); font: 600 13px/18px var(--font-sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fr-ruler__pin i { width: 2px; height: 14px; background: var(--accent); }
.fr-reading__cols { display: grid; grid-template-columns: 1fr 1fr; }
.fr-reading__cols > section { padding: 0 var(--space-6); display: grid; gap: var(--space-2); align-content: start; }
.fr-reading__cols > section:first-child { padding-left: 0; border-right: 1px solid var(--line); }
.fr-reading__cols > section:last-child { padding-right: 0; }
@media (max-width: 640px) {
	.fr-reading__cols { grid-template-columns: 1fr; gap: var(--space-5); }
	.fr-reading__cols > section { padding: 0 !important; border: 0 !important; }
}

/* Ledger table: statements with subtotals ruled once and totals ruled twice. */
.fr-ledger { width: 100%; border-collapse: collapse; background: var(--ledger); font-size: 15px; line-height: 22px; font-variant-numeric: lining-nums tabular-nums; }
.fr-ledger caption { caption-side: top; text-align: left; padding: 0 0 var(--space-2); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.fr-ledger th, .fr-ledger td { padding: 9px 14px; border-bottom: 1px solid var(--ledger-rule); text-align: left; font-weight: 400; }
.fr-ledger td { width: 9.5em; text-align: right; border-left: 1px solid var(--ledger-rule); white-space: nowrap; }
.fr-ledger__group th { padding-top: 16px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-strong); }
.fr-ledger__sub th, .fr-ledger__sub td { font-weight: 600; }
.fr-ledger__sub td { box-shadow: inset 0 1px 0 var(--ink); }
.fr-ledger__total th, .fr-ledger__total td { font-weight: 700; }
.fr-ledger__total td { box-shadow: inset 0 1px 0 var(--ink), inset 0 -4px 0 var(--ledger), inset 0 -5px 0 var(--ink), inset 0 -7px 0 var(--ledger), inset 0 -8px 0 var(--ink); }
.fr-ledger tr.is-num th, .fr-ledger tr.is-den th { position: relative; padding-left: 30px; }
.fr-ledger tr.is-num th::before, .fr-ledger tr.is-den th::before { content: ""; position: absolute; left: 12px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 2px; }
.fr-ledger tr.is-num { background: var(--accent-soft); }
.fr-ledger tr.is-num th::before { background: var(--accent); }
.fr-ledger tr.is-den th::before { background: var(--ink); }
.fr-ledger .is-loss { color: var(--danger); }

/* Bars drawn to one scale */
.fr-bars { display: grid; gap: var(--space-4); }
.fr-bars__row { display: grid; gap: 6px; }
.fr-bars__head { display: flex; justify-content: space-between; gap: var(--space-4); font-size: 15px; line-height: 20px; }
.fr-bars__head b { font-variant-numeric: tabular-nums; }
.fr-bars__track { height: 12px; border-radius: 3px; background: var(--ledger); overflow: hidden; }
.fr-bars__fill { height: 100%; border-radius: 3px; background: var(--accent); transform-origin: left; transition: width 480ms cubic-bezier(.2,.7,.2,1); }
.fr-bars__row.is-den .fr-bars__fill { background: var(--ink); }
.fr-bars__note { font-size: 14px; line-height: 21px; color: var(--ink-muted); }

/* Index rows: lists of ratios read as a table of contents, not a wall of cards. */
.fr-index { display: grid; gap: var(--space-3); align-content: start; }
.fr-index__q { font-size: 20px; line-height: 28px; font-weight: 600; }
.fr-index ul { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.fr-index li a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--space-4); padding: 12px 6px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: background-color 120ms ease; }
.fr-index li a:hover { background: var(--ledger); color: var(--ink); }
.fr-index__name { font-weight: 600; font-size: 17px; line-height: 24px; }
.fr-index__formula { grid-column: 1; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.fr-index__go { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--accent); transition: transform 120ms ease; }
.fr-index li a:hover .fr-index__go { transform: translateX(4px); }

/* On this page */
.fr-toc { position: sticky; top: calc(var(--header-height) + var(--space-5)); display: grid; gap: var(--space-2); }
.fr-toc ol { margin: 0; padding: 0; list-style: none; }
.fr-toc a { display: block; padding: 6px 0 6px 14px; border-left: 2px solid var(--line); color: var(--ink-muted); text-decoration: none; font-size: 15px; line-height: 20px; }
.fr-toc a:hover { color: var(--ink); }
.fr-toc a[aria-current="true"] { border-left-color: var(--accent); color: var(--ink); font-weight: 600; }

/* Search palette */
.fr-palette { width: min(640px, 100%); border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper); box-shadow: var(--shadow-pop); overflow: hidden; }
.fr-palette__input { display: flex; align-items: center; gap: var(--space-3); padding: 0 var(--space-5); height: 60px; border-bottom: 1px solid var(--line); }
.fr-palette__input svg { width: 20px; height: 20px; color: var(--ink-muted); flex: none; }
.fr-palette__input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 400 19px/1 var(--font-sans); }
.fr-palette__group { padding: var(--space-3) var(--space-3) 0; }
.fr-palette__group .fr-label { padding: 0 var(--space-3) var(--space-2); }
.fr-palette__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 var(--space-4); padding: 10px var(--space-3); border-radius: var(--radius-s); color: var(--ink); text-decoration: none; }
.fr-palette__item small { grid-column: 1; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.fr-palette__item .fr-kind { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 13px; color: var(--ink-muted); }
.fr-palette__item[aria-selected="true"] { background: var(--ledger); }
.fr-palette__item mark { background: transparent; color: var(--accent-strong); font-weight: 700; }
.fr-palette__foot { display: flex; gap: var(--space-5); margin-top: var(--space-3); padding: 10px var(--space-5); border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-faint); }
.fr-palette__foot span { display: inline-flex; align-items: center; gap: 6px; }

/* Specimen: the homepage's live worked formula */
.fr-specimen { display: grid; gap: var(--space-5); padding: var(--space-6); border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--paper); }
.fr-specimen__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-muted); }

/* Notes */
.fr-note { display: flex; gap: var(--space-3); font-size: 14px; line-height: 21px; color: var(--ink-muted); }
.fr-note b { color: var(--ink); font-weight: 600; }
details.fr-more { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
details.fr-more summary { display: flex; justify-content: space-between; align-items: center; padding: var(--space-4) 0; cursor: pointer; font-weight: 600; list-style: none; }
details.fr-more summary::-webkit-details-marker { display: none; }
details.fr-more summary::after { content: "+"; font: 400 22px/1 var(--font-mono); color: var(--accent); }
details.fr-more[open] summary::after { content: "\2212"; }
details.fr-more > div { padding: 0 0 var(--space-5); }

/* Footer */
.fr-footer { background: var(--ink); color: var(--on-ink); padding: var(--space-8) 0 var(--space-6); font-size: 15px; line-height: 22px; }
.fr-footer a { color: var(--on-ink-muted); text-decoration: none; }
.fr-footer a:hover { color: var(--on-ink); text-decoration: underline; }
.fr-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-6); }
.fr-footer__grid ul { margin: var(--space-3) 0 0; padding: 0; list-style: none; display: grid; gap: var(--space-2); }
.fr-footer .fr-label { color: var(--on-ink-muted); }
.fr-footer .fr-logo { color: var(--on-ink); }
.fr-footer .fr-logo em { color: var(--on-ink-muted); }
.fr-footer__fine { margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid color-mix(in srgb, var(--on-ink) 18%, transparent); font-size: 13px; line-height: 20px; color: var(--on-ink-muted); }
@media (max-width: 760px) { .fr-footer__grid { grid-template-columns: 1fr 1fr; } .fr-footer__grid > :first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.fr-result.is-fresh .fr-result__figure mark { background-size: 100% 100%; }
}

/* ---------- Site layer: how Ledger sits in the Bricks templates ----------
   Appended to the generated ledger.css by bin/build-ledger-css.py. Bricks prints its theme
   styles after the plugin's stylesheets, so base rules here carry one extra type selector
   (html body, body h1) to win on specificity rather than on order. */

/* The header template is one shortcode; the sticky element is Bricks' own header element,
   #brx-header. (No literal tag names in comments: cPanel's Fileman reader rewrites them.) */
#brx-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; }
#brx-header > .brxe-shortcode { width: 100%; }
.fr-header { position: relative; top: auto; }
.fr-header .fr-wrap { max-width: none; width: min(var(--container), 100%); }
.fr-sheet { position: absolute; left: 0; right: 0; top: 100%; }

/* Base type on top of the Bricks theme style. */
html body { font-family: var(--font-sans); font-size: 1.7rem; line-height: 1.65; color: var(--ink); background: var(--surface); }
body h1, body h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
body h1 { font-size: clamp(3.6rem, 2.6rem + 2vw, 4.8rem); line-height: 1.08; font-variation-settings: "opsz" 60; }
body h2 { font-size: clamp(2.6rem, 2.2rem + 0.8vw, 3.2rem); line-height: 1.2; font-variation-settings: "opsz" 36; }
body h3, body h4 { font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; }
body h3 { font-size: 2rem; line-height: 1.4; }
.frg-section-title { font-size: clamp(2.6rem, 2.2rem + 0.8vw, 3.2rem); }
.frg-page-hero .brxe-post-excerpt, .frg-lede { font-size: 2rem; line-height: 1.55; max-width: 60ch; }
@media (max-width: 767px) {
	.frg-page-hero { padding-left: max(1.6rem, env(safe-area-inset-left, 0px)); padding-right: max(1.6rem, env(safe-area-inset-right, 0px)); }
	.frg-page-body { padding-left: max(1.6rem, env(safe-area-inset-left, 0px)); padding-right: max(1.6rem, env(safe-area-inset-right, 0px)); }
}

/* Search: the header trigger and the palette-style dialog. */
.fr-header .frg-search { margin-left: auto; }
.fr-header .frg-search__toggle.fr-search-trigger { margin-left: 0; }
.fr-header .frg-search__toggle-text { flex: 1; text-align: left; }
@media (max-width: 860px) {
	.fr-header .frg-search__toggle.fr-search-trigger { display: inline-grid !important; place-items: center; width: 44px; min-height: 44px; padding: 0; border-color: transparent; background: transparent; color: var(--ink); }
	.fr-header .frg-search__toggle.fr-search-trigger svg { width: 22px; height: 22px; color: var(--ink); }
	.fr-header .frg-search__toggle-text, .fr-header .frg-search__toggle .fr-kbd { display: none; }
	.fr-header .frg-search { margin-left: auto; }
	.fr-header .fr-menu-btn { display: inline-grid; margin-left: 0; }
}
.frg-search__dialog { width: min(64rem, calc(100vw - 3.2rem)); max-height: min(72vh, 64rem); margin: 12vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper); color: var(--ink); box-shadow: var(--shadow-pop); overflow: hidden; }
.frg-search__dialog::backdrop { background: rgba(15, 27, 45, 0.34); backdrop-filter: blur(2px); }
.frg-search__form { display: flex; align-items: center; gap: 1.2rem; height: 6rem; padding: 0 1.2rem 0 2rem; border-bottom: 1px solid var(--line); }
.frg-search__form:focus-within { border-bottom-color: var(--accent); box-shadow: inset 0 -1px 0 var(--accent); }
.frg-search__input:focus, .frg-search__input:focus-visible { outline: none !important; }
.frg-search__input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0 !important; outline: 0; box-shadow: none !important; background: transparent; color: var(--ink); font: 400 1.9rem/1 var(--font-sans); }
.frg-search__results { margin: 0; padding: 0.8rem; list-style: none; max-height: calc(min(72vh, 64rem) - 6rem); overflow-y: auto; }
.frg-search__results:empty { display: none; }
.frg-search__option { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 1.6rem; padding: 1rem 1.2rem; border-radius: var(--radius-s); border: 0; }
.frg-search__option a { padding: 0 !important; color: var(--ink); font-weight: 600; text-decoration: none !important; }
.frg-search__option a::after { content: ""; position: absolute; inset: 0; }
.frg-search__option { position: relative; }
.frg-search__formula { grid-column: 1; font-size: 1.4rem; line-height: 1.45; color: var(--ink-muted); }
.frg-search__type { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 1.3rem; color: var(--ink-muted); }
.frg-search__option[aria-selected="true"], .frg-search__option:hover { background: var(--ledger); }
.frg-search__option mark { background: transparent; color: var(--accent-strong); font-weight: 700; padding: 0; text-decoration: none; }
.frg-search__form .frg-btn { min-height: 36px; padding: 0 1rem; border: 0; background: transparent; color: var(--accent); font-weight: 600; }
.frg-search__empty { padding: 1.6rem 2rem 2rem; color: var(--ink-muted); }
.frg-search__hints { display: flex; flex-wrap: wrap; gap: 1.6rem; padding: 1rem 2rem; border-top: 1px solid var(--line); font-size: 1.3rem; color: var(--ink-faint); }
.frg-search__hints span { display: inline-flex; align-items: center; gap: 0.6rem; }
@media (max-width: 600px) { .frg-search__dialog { margin-top: 0.8rem; } .frg-search__hints { display: none; } }

/* ---------- Ratio and calculator pages ---------- */

/* Title band: breadcrumbs, label, h1 and lead on the left; the formula on the right. */
.brxe-container.frg-page-hero__inner--formula { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 6.4rem; row-gap: 2.4rem; align-items: end; }
.brxe-block.frg-page-hero__text { display: flex; flex-direction: column; row-gap: 1.2rem; min-width: 0; }
.frg-page-label { margin: 0.4rem 0 -0.2rem; }
@media (max-width: 991px) { .brxe-container.frg-page-hero__inner--formula { grid-template-columns: minmax(0, 1fr); } }

/* The formula as a real fraction: numerator teal, a 2px ink bar, denominator ink. */
.frg-formula { padding: 0; border: 0; border-radius: 0; background: transparent; }
.frg-formula__equation { gap: 1.2rem 1.6rem; margin-bottom: 0.8rem; font-family: var(--font-display); font-size: 3rem; line-height: 1.25; font-weight: 500; font-variation-settings: "opsz" 30; font-variant-numeric: lining-nums tabular-nums; }
.frg-formula__name { font-weight: 600; }
.frg-formula__numerator { color: var(--accent); border-bottom-color: var(--ink); }
.frg-formula__denominator { color: var(--ink); }
.frg-formula__scale { color: var(--ink-muted); font-size: 0.8em; }
.frg-formula__text { font-size: 1.4rem; line-height: 1.5; color: var(--ink-muted); }
.frg-page-hero .frg-formula__equation { margin: 0; font-size: clamp(2.8rem, 2rem + 1.4vw, 4rem); font-variation-settings: "opsz" 40; }
.frg-page-hero .frg-formula__equation + .frg-formula__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.frg-page-hero .frg-formula:not(:has(.frg-formula__equation)) .frg-formula__text { max-width: 28ch; font-family: var(--font-display); font-size: clamp(2.2rem, 1.8rem + 0.8vw, 2.8rem); line-height: 1.3; color: var(--ink); }

/* Calculator: fields on the left, the answer and its working on the right. */
.frg-calc { padding: 0; border-color: var(--line); border-radius: var(--radius-m); background: var(--paper); }
.frg-calc__head { margin: 0; padding: 2rem 2.4rem; border-bottom: 1px solid var(--line); }
.frg-calc__title { font-family: var(--font-sans); font-size: 2rem; line-height: 1.4; font-weight: 600; letter-spacing: 0; }
.frg-calc__privacy { font-size: 1.4rem; color: var(--ink-muted); }
.frg-calc__body { gap: 0; }
.frg-calc__form { gap: 2rem; padding: 2.4rem; }
.frg-calc__output { gap: 2rem; align-content: start; padding: 2.4rem; border: 0; border-radius: 0; background: transparent; }
@container (min-width: 720px) {
	.frg-calc:not(.frg-calc--compare) .frg-calc__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.frg-calc:not(.frg-calc--compare) .frg-calc__form { border-right: 1px solid var(--line); }
}
@container (max-width: 719px) {
	.frg-calc__form { padding: 2rem 1.6rem; border-bottom: 1px solid var(--line); }
	.frg-calc__output { padding: 2rem 1.6rem; }
	.frg-calc__head { padding: 1.6rem; }
}
.frg-calc--compare .frg-calc__form { border-bottom: 1px solid var(--line); }
.frg-field { display: flex; flex-direction: column; gap: 0.6rem; }
.frg-field__label { display: flex; align-items: center; gap: 0.8rem; font-size: 1.5rem; line-height: 2rem; }
.frg-field__control { order: 2; min-height: 5.2rem; border-color: var(--line-strong); border-radius: var(--radius-s); }
.frg-field__control:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.frg-field__input { font: 500 2rem/1 var(--font-sans) !important; font-variant-numeric: lining-nums tabular-nums; color: var(--ink); }
.frg-field__help { order: 3; margin: 0; font-size: 1.4rem; line-height: 2rem; }
.frg-field__error { order: 4; }
.frg-calc__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; }
.frg-calc__actions .frg-btn--ghost { min-height: 3.6rem; padding: 0 0.6rem; border: 0; background: transparent; color: var(--accent); font-weight: 600; }
.frg-calc__actions .frg-btn--ghost:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.frg-calc__actions [hidden] { display: none !important; }
.frg-calc__tools { display: none; }

/* The answer: on a highlighter stroke, closed by the accountant's double rule. */
.frg-result { display: grid; gap: 0.8rem; }
.frg-result__name { font-size: 1.2rem; line-height: 1.6rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.frg-result__value { justify-self: start; margin: 0.4rem 0 0; padding: 0 0.06em 0.6rem; font-family: var(--font-display); font-size: clamp(4.8rem, 12cqi, 7.2rem); line-height: 1; font-weight: 500; letter-spacing: -0.02em; font-variation-settings: "opsz" 72; font-variant-numeric: lining-nums tabular-nums; color: var(--ink); border-bottom: 4px double var(--ink); background: linear-gradient(176deg, transparent 0 40%, var(--highlight) 41% 86%, transparent 87%) no-repeat 0 0 / 100% 100%; transition: background-size 480ms cubic-bezier(.2, .7, .2, 1); }
.frg-result.is-fresh .frg-result__value { background-size: 0% 100%; transition: none; }
.frg-result:not([data-state="ok"]) .frg-result__value { background: none; border-bottom: 1px solid var(--line); color: var(--ink-faint); }
.frg-result__sentence { font-size: 1.7rem; line-height: 1.55; max-width: 40ch; }
.frg-result__meaning { font-size: 1.5rem; line-height: 1.6; }

/* The working, printed like an adding-machine tape. */
.frg-steps { padding: 2.2rem 2.4rem 2rem; background: var(--ledger); -webkit-mask: radial-gradient(circle at 6px 0, transparent 4px, #000 4.5px) 0 0 / 12px 51% repeat-x, radial-gradient(circle at 6px 100%, transparent 4px, #000 4.5px) 0 100% / 12px 51% repeat-x; mask: radial-gradient(circle at 6px 0, transparent 4px, #000 4.5px) 0 0 / 12px 51% repeat-x, radial-gradient(circle at 6px 100%, transparent 4px, #000 4.5px) 0 100% / 12px 51% repeat-x; }
.frg-steps__title { margin: 0 0 0.8rem; font-size: 1.2rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.frg-steps__list { gap: 1rem; padding: 0; list-style: none; font-family: var(--font-mono); font-size: 1.4rem; line-height: 2.2rem; }
.frg-steps__list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1.6rem; align-items: baseline; }
.frg-step__label { grid-column: 1 / -1; font-family: var(--font-sans); font-size: 1.3rem; line-height: 1.8rem; color: var(--ink-muted); }
.frg-step__expr { color: var(--ink); }
.frg-steps__list strong { font-weight: 500; text-align: right; }
.frg-steps__list li:last-child { padding-top: 0.6rem; border-top: 1px solid var(--ink); }
.frg-steps__list li:last-child strong { padding-bottom: 1px; border-bottom: 3px double var(--ink); }

/* "Where the figures come from" has its own heading in the template. */
#figures + .brxe-shortcode .frg-story__title { display: none; }

/* The story's rows and choreography are in frg.css; its result is set in the display face. */
.frg-story__result { font-family: var(--font-display); font-variant-numeric: lining-nums tabular-nums; }

/* Reading: the ruler at the top of "Reading a high or low result" (Reading.php, reading.js).
   Near either end the pin's label sits flush with its stem so it stays on the ruler. */
.frg-reading { gap: var(--space-3); max-width: var(--measure); margin: var(--space-5) 0 var(--space-6); }
.frg-reading .fr-ruler__pin[hidden] { display: none; }
.frg-reading .fr-ruler__pin.is-start { transform: translateX(-1px); justify-items: start; }
.frg-reading .fr-ruler__pin.is-end { transform: translateX(calc(1px - 100%)); justify-items: end; }
.frg-reading__caption { margin: 0; font-size: 1.4rem; line-height: 2rem; color: var(--ink-muted); }

/* Term lists ("A low ratio \2026") are ruled rows (frg.css); a pair of them is two columns, like Reading. */
@media (min-width: 768px) {
	.frg-prose ul:has(> li > strong:first-child):has(> li:nth-child(2):last-child) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: 0; }
	.frg-prose ul:has(> li > strong:first-child):has(> li:nth-child(2):last-child) > li:nth-child(n) { padding: 0.4rem 2.4rem 0.4rem 0; border-top: 0; }
	.frg-prose ul:has(> li > strong:first-child):has(> li:nth-child(2):last-child) > li:nth-child(2) { padding: 0.4rem 0 0.4rem 2.4rem; border-left: 1px solid var(--line); }
}

/* Related measures as index rows, and sources folded under one line. */
.frg-page__main .frg-related { gap: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.frg-page__main .frg-related li { display: grid; gap: 0.2rem; padding: 1.2rem 0.6rem; border-top: 1px solid var(--line); }
.frg-page__main .frg-related a { color: var(--ink); font-weight: 600; text-decoration: none; }
.frg-page__main .frg-related a:hover { color: var(--accent); text-decoration: underline; }
.frg-page__main .frg-related__why { font-size: 1.4rem; }
.frg-sources-fold .frg-sources { padding-left: 2rem; font-size: 1.5rem; }

/* On this page: a rule that turns teal at the section in view. */
.frg-toc { position: sticky; top: calc(var(--header-height) + 2.4rem); padding: 0; border: 0; border-radius: 0; background: transparent; }
.frg-toc__title { font-size: 1.2rem; font-weight: 600; letter-spacing: 0.08em; color: var(--ink-muted); }
.frg-toc__list { gap: 0; }
.frg-toc__list a { display: block; padding: 0.6rem 0 0.6rem 1.4rem; border-left: 2px solid var(--line); color: var(--ink-muted); font-size: 1.5rem; line-height: 2rem; }
.frg-toc__list a::before { content: none; }
.frg-toc__list a:hover { color: var(--ink); text-decoration: none; }
.frg-toc__list a[aria-current="true"] { border-left-color: var(--accent); color: var(--ink); font-weight: 600; }

/* ---------- Homepage ([frg_home]) and footer ([frg_site_footer]) ---------- */

.hm-hero { padding-block: var(--space-9) var(--space-8); border-bottom: 1px solid var(--line); }
.hm-hero > .fr-wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--space-8); align-items: center; }
.hm-hero__text { display: grid; gap: var(--space-5); align-content: start; }
.frg-home .hm-display { margin: 0; max-width: 12ch; font-family: var(--font-display); font-size: clamp(4.4rem, 2.8rem + 2.8vw, 6.4rem); line-height: 1; font-weight: 600; letter-spacing: -0.02em; font-variation-settings: "opsz" 72; color: var(--ink); }
.hm-display em { font-style: italic; font-weight: 500; color: var(--accent); }
.hm-lead { max-width: 40ch; }
:is(.frg-home, .frg-notfound) .frg-search--field { width: 100%; max-width: 52rem; }
:is(.frg-home, .frg-notfound) .frg-search--field .frg-search__toggle { display: flex; align-items: center; gap: 1.2rem; width: 100%; min-height: 6rem; margin: 0; padding: 0 2rem; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--paper); color: var(--ink-faint); font: 400 1.8rem/1 var(--font-sans); box-shadow: none; }
:is(.frg-home, .frg-notfound) .frg-search--field .frg-search__toggle:hover { border-color: var(--accent); }
:is(.frg-home, .frg-notfound) .frg-search--field .frg-search__toggle svg { width: 2.2rem; height: 2.2rem; color: var(--ink-muted); }
.hm-quick { display: flex; flex-wrap: wrap; gap: 0.8rem 2rem; margin: 0; font-size: 1.5rem; color: var(--ink-muted); }
.fr-specimen__work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 15ch); gap: var(--space-6); align-items: end; }
.fr-specimen__work .fr-tape { margin: 0; }
.hm-band { padding-block: var(--space-8); }
.hm-band + .hm-band { border-top: 1px solid var(--line); }
.hm-band__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1.2rem 2.4rem; margin-bottom: var(--space-6); }
.hm-qs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-7) var(--space-6); }
.hm-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
.fr-index__more { display: inline-block; margin-top: 0.4rem; font-size: 1.5rem; font-weight: 600; }
.hm-three .fr-index__formula { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
:is(.frg-home, .frg-notfound) .frg-search--field .frg-search__toggle-text { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; }
.hm-hero__text { grid-template-columns: minmax(0, 1fr); }
:is(.frg-home, .frg-notfound) .frg-search--field, :is(.frg-home, .frg-notfound) .frg-search--field .frg-search__toggle { min-width: 0; }
.hm-trust__title { margin-bottom: var(--space-6); }
.hm-trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); }
.hm-trust p { margin: 0; }
.hm-trust b { display: block; margin-bottom: 0.8rem; font-family: var(--font-display); font-size: 2.2rem; line-height: 1.3; font-weight: 600; color: var(--ink); }
.hm-trust__more { margin: var(--space-6) 0 0; }
.fr-footer__about { margin: 1.2rem 0 0; max-width: 34ch; font-size: 1.5rem; line-height: 1.55; color: var(--on-ink-muted); }
.fr-footer__grid nav ul { margin: var(--space-3) 0 0; padding: 0; list-style: none; display: grid; gap: var(--space-2); }
#brx-footer > .brxe-shortcode { width: 100%; }
@media (max-width: 1023px) {
	.hm-hero > .fr-wrap { grid-template-columns: minmax(0, 1fr); }
	.hm-qs, .hm-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hm-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
	.frg-home .fr-wrap, .fr-footer .fr-wrap { padding-left: max(1.6rem, env(safe-area-inset-left, 0px)); padding-right: max(1.6rem, env(safe-area-inset-right, 0px)); }
	.hm-hero { padding-block: var(--space-7); }
	.hm-band { padding-block: var(--space-7); }
	.hm-qs, .hm-three, .hm-trust { grid-template-columns: minmax(0, 1fr); }
	.fr-specimen { padding: var(--space-5); }
	.fr-specimen__work { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Hubs, category pages and the 404 page ---------- */

/* The Ratios directory and category lists: filter chips, then index rows two to a line. */
.frg-directory { gap: var(--space-8); }
.frg-directory__controls { gap: 1.6rem; padding: 0; border: 0; border-radius: 0; background: transparent; }
.frg-directory__search { gap: 0.6rem; font-size: 1.5rem; }
.frg-directory__search input { min-height: 5.2rem; max-width: 52rem; padding: 0 1.6rem; border-color: var(--line-strong); border-radius: var(--radius-s); font-size: 1.7rem; }
.frg-directory__cats { gap: 0.8rem; }
.frg-directory__cats legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.frg-directory__cats label { position: relative; min-height: 3.2rem; padding: 0 1.4rem; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); font-size: 1.4rem; font-weight: 600; color: var(--ink); transition: background-color 120ms ease; }
.frg-directory__cats label:hover { background: var(--ledger); }
.frg-directory__cats label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.frg-directory__cats label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.frg-directory .frg-directory__cats input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.frg-directory__question { margin: 0 0 1.6rem; font-size: 1.7rem; }
.frg-directory__list { gap: 0 var(--space-6); }
.frg-directory__item { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.8rem; padding: 1.2rem 3.2rem 1.2rem 0.6rem; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; transition: background-color 120ms ease; }
.frg-directory__item:hover { background: var(--ledger); }
.frg-directory__item::after { content: "\2192"; position: absolute; right: 0.8rem; top: 50%; transform: translateY(-50%); color: var(--accent); transition: transform 120ms ease; }
.frg-directory__item:hover::after { transform: translate(4px, -50%); }
.frg-directory__link { color: var(--ink); font-size: 1.7rem; font-weight: 600; text-decoration: none; }
.frg-directory__link::after { content: ""; position: absolute; inset: 0; }
.frg-directory__link:hover { color: var(--ink); }
.frg-directory__kind { display: none; }
.frg-directory__formula { flex-basis: 100%; font-family: var(--font-sans); font-size: 1.4rem; line-height: 1.45; color: var(--ink-muted); }

/* Calculator, comparison and guide hubs: Ledger index rows. */
.frg-hub > h2 { margin: var(--space-7) 0 var(--space-4); }
.frg-hub > h2:first-child { margin-top: 0; }
.frg-hub > p { margin: 0 0 var(--space-4); color: var(--ink-muted); }
@media (min-width: 768px) { .frg-hub-index--two ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-6); } }
.frg-hub__notes { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); max-width: var(--measure); }
.frg-hub__notes li { padding: 1.2rem 0; border-top: 1px solid var(--line); }

/* 404: search, then the four hubs. */
.frg-notfound { display: grid; gap: var(--space-6); width: 100%; max-width: 64rem; margin-top: var(--space-3); }
