/*
    numberrule.com

    One stylesheet, served directly, no build step. Tool pages are the whole
    site and they are all the same shape, so there is not enough variety here
    to justify a bundler.
*/

:root {
    --paper:     #ffffff;
    --ground:    #f4f6f7;
    --ink:       #16202a;
    --ink-2:     #4a5b68;
    --ink-3:     #78889a;
    --rule:      #dde3e8;
    --rule-firm: #b9c4cd;
    --accent:    #0f5d8c;
    --accent-2:  #0b4a70;
    --accent-bg: #e8f1f7;
    --good-bg:   #eef4ef;

    --sans: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.shell { max-width: 1200px; margin: 0 auto; padding: 0 22px; }

/* ---- header ---- */

.site-head {
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
}

.site-head .shell {
    display: flex;
    align-items: center;
    /* Wraps rather than compressing: below the tablet breakpoint the menu drops
       under the wordmark on its own line instead of crushing six labels. */
    flex-wrap: wrap;
    gap: 4px 22px;
    padding-top: 13px;
    padding-bottom: 13px;
}

.brand {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -.02em;
    color: var(--ink);
    text-decoration: none;
}

.brand span { color: var(--accent); }

.brand-tag {
    margin: 0;
    font-size: .85rem;
    color: var(--ink-3);
}

/* The tagline is the first thing to go: the menu has a better claim on the
   space, and the tagline says nothing a visitor needs. */
@media (max-width: 900px) { .brand-tag { display: none; } }

/* ---- site menu ---- */

/* Sits beside the wordmark. margin-right:auto holds it to the left next to the
   brand and pushes the tagline out to the far edge. */
.site-nav { margin-right: auto; }

.site-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    display: block;
    padding: 7px 11px;
    border-radius: 4px;
    font-size: .92rem;
    font-weight: 600;
    color: var(--ink-2);
    text-decoration: none;
}

.site-nav a:hover { color: var(--accent-2); }

/* The current section, marked by the same attribute a screen reader uses.
   Hover changes colour only, so the two never read as the same state. */
.site-nav a[aria-current="page"] {
    color: var(--accent-2);
    background: var(--accent-bg);
}

.site-nav a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* ---- the phone menu ---- */

/* A button that collapses the menu, the way a navbar does. The alternative was
   a sideways-scrolling strip, and at 390px that still left the last two
   sections off screen with nothing saying so. */
.nav-toggle {
    display: none;
    margin-left: auto;
    padding: 6px;
    width: 38px;
    height: 38px;
    color: var(--ink-2);
    background: none;
    border: 1px solid var(--rule-firm);
    border-radius: 5px;
    cursor: pointer;
}

.nav-toggle svg { display: block; width: 100%; height: 100%; }
.nav-toggle .cross { display: none; }

.nav-toggle[aria-expanded="true"] {
    color: var(--accent-2);
    border-color: var(--accent);
}

.nav-toggle[aria-expanded="true"] .bars { display: none; }
.nav-toggle[aria-expanded="true"] .cross { display: block; }

.nav-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

@media (max-width: 700px) {
    .site-head .shell {
        gap: 0 12px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .nav-toggle { display: block; }

    /* Its own full-width line below the wordmark, stacked rather than in a
       row — six labels across a phone is unreadable at any size that fits. */
    .site-nav {
        flex-basis: 100%;
        margin-right: 0;
    }

    /* Only collapsed once the script has confirmed it can open it again. */
    .has-nav-toggle .site-nav { display: none; }
    .has-nav-toggle .site-nav[data-open] { display: block; }

    .site-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 8px 0 4px;
        border-top: 1px solid var(--rule);
        margin-top: 10px;
    }

    .site-nav a {
        padding: 10px 10px;
        font-size: .97rem;
        border-radius: 4px;
    }
}

/* ---- consent banner ---- */

/* Fixed to the bottom rather than covering the page. A calculator is the
   reason someone is here and a modal over it would be hostile. */
.consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 22px;
    padding: 14px 22px;
    background: var(--paper);
    border-top: 1px solid var(--rule-firm);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .07);
}

/* The hidden attribute has to be restated, because `display: flex` above it
   beats the browser's own `[hidden] { display: none }` on specificity and the
   banner would never go away when dismissed. */
.consent[hidden] { display: none; }

.consent p {
    margin: 0;
    max-width: 74ch;
    font-size: .87rem;
    color: var(--ink-2);
}

.consent-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Both buttons the same size on purpose. Making "reject" smaller or greyer is
   the standard dark pattern and it makes the consent worthless. */
.consent-actions button {
    font: inherit;
    font-size: .88rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid var(--rule-firm);
    background: var(--paper);
    color: var(--ink-2);
}

.consent-actions button:hover { border-color: var(--accent); color: var(--accent-2); }

.consent-accept {
    background: var(--accent-2) !important;
    border-color: var(--accent-2) !important;
    color: #fff !important;
}

.consent-accept:hover { background: var(--accent) !important; }

@media (max-width: 620px) {
    .consent { padding: 12px 16px; }
    .consent-actions { width: 100%; }
    .consent-actions button { flex: 1; }
}

/* ---- the currency picker ---- */

footer p { margin: 0; }

.currency { margin-top: 14px; font-size: .85rem; }

.currency summary {
    cursor: pointer;
    color: var(--ink-3);
    width: fit-content;
}

.currency summary:hover { color: var(--accent-2); }

.currency ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 2px 10px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.currency a {
    display: block;
    padding: 4px 6px;
    border-radius: 3px;
    color: var(--ink-2);
    text-decoration: none;
}

.currency a:hover { background: var(--accent-bg); color: var(--accent-2); }

.currency a[aria-current="true"] { color: var(--accent-2); font-weight: 600; }

.currency-note {
    margin-top: 12px !important;
    max-width: 60ch;
    color: var(--ink-3);
}

/* ---- page frame ---- */

main { padding: 26px 0 80px; }

/* The tool page takes one of two shapes, decided by whether an ad rail is
   configured. With no rail it runs at a comfortable article width; with one,
   it narrows and the freed column carries the ad rather than sitting empty. */
.tool-shell { display: block; }

/* Fills the shell. Nothing inside the article sets its own measure, because
   mixed widths — a narrow intro above a full-width card, a narrow FAQ answer
   beside a wide one — read as a mistake rather than as typography.

   The trade is real: at this width a line runs past the length that reads
   most comfortably, so the article leans on a more generous line-height to
   keep the eye from losing its place on the return sweep. */
.tool { max-width: none; }

.tool p,
.tool .covers,
.tool .variables,
.tool .faq details p { max-width: none; }

.tool p,
.tool .covers li,
.tool .variables dd,
.tool .faq details p { line-height: 1.75; }

.tool-shell--railed {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 36px;
    align-items: start;
}

.tool-shell--railed .tool { max-width: none; }

.rail { position: sticky; top: 16px; }

@media (max-width: 980px) {
    .tool-shell--railed { grid-template-columns: minmax(0, 1fr); }
    .rail { position: static; }
}

.card {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 26px 30px 28px;
}


h1 {
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    line-height: 1.15;
    letter-spacing: -.02em;
    text-wrap: balance;
    margin: 0 0 8px;
}

.tagline { color: var(--ink-2); margin: 0 0 24px; max-width: 62ch; }

h2 {
    font-size: 1.35rem;
    letter-spacing: -.01em;
    margin: 40px 0 12px;
    text-wrap: balance;
}

h3 { font-size: 1.05rem; margin: 26px 0 8px; }

p { margin: 0 0 15px; max-width: 76ch; }

a { color: var(--accent); }

/* ---- form ---- */

/* Two or three fields across rather than one stacked column. A calculator
   whose answer sits below the fold makes people scroll for the thing they
   came for, and a stacked form is what pushed it there. */
/* A fixed three columns rather than auto-fit, so every row lines up with the
   one above it. auto-fit gave a different column count depending on how many
   fields happened to land in a band, which left holes mid-form. */
.calc {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 20px;
    align-items: start;
}

.calc--cols4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.calc--cols5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* A field can take two columns when its options are too long to read in one.
   Three is available but rarely right: a control stretched across the whole
   form reads as a mistake. */
.field--span2 { grid-column: span 2; }
.field--span3 { grid-column: 1 / -1; }

@media (max-width: 900px) {
    .calc,
    .calc--cols4,
    .calc--cols5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .field--span2,
    .field--span3 { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .calc,
    .calc--cols4,
    .calc--cols5 { grid-template-columns: minmax(0, 1fr); }
    .field--span2,
    .field--span3 { grid-column: auto; }
}

.field { display: grid; gap: 6px; }

.field label {
    font-size: .87rem;
    font-weight: 600;
    color: var(--ink-2);
}

.field .row { display: flex; gap: 8px; }

.field input,
.field select {
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--rule-firm);
    border-radius: 4px;
    padding: 9px 11px;
    min-width: 0;
    width: 100%;
}

.field .row input { flex: 1 1 auto; }

/* Fixed rather than shrink-to-fit: sized to its own text, a "feet" select and
   an "inches" one left the number boxes beside them different widths. */
.field .row select { flex: 0 0 auto; width: 5.8rem; }

.field input:focus,
.field select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}

.field .help { font-size: .82rem; color: var(--ink-3); }

.suffixed { position: relative; }
.suffixed .suffix {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-3);
    font-size: .9rem;
    pointer-events: none;
}
.suffixed input { padding-right: 30px; }

/* ---- the calculate button ---- */

/* Spans the grid so it sits under the fields rather than in a column of its
   own, whatever column count the form chose. */
.calc-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 6px;
}

.calc-actions button {
    font: inherit;
    font-size: .95rem;
    font-weight: 600;
    color: #fff;
    background: var(--accent-2);
    border: 1px solid var(--accent-2);
    border-radius: 5px;
    padding: 10px 22px;
    cursor: pointer;
}

.calc-actions button:hover { background: var(--accent); border-color: var(--accent); }

.calc-actions button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Only shown once a field has changed, so it reads as a prompt rather than as
   permanent instruction furniture. */
.calc-hint {
    font-size: .85rem;
    color: var(--ink-3);
}

/* The answer is still the last correct one for the last submitted inputs, so
   it is dimmed rather than hidden — removing it would be worse than showing a
   stale figure that is labelled as stale. */
.calc[data-changed="true"] ~ .result { opacity: .55; }

@media (max-width: 560px) {
    .calc-actions button { width: 100%; }
    .calc-actions { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ---- result ---- */

.result {
    background: var(--accent-bg);
    border: 1px solid #cfe0ec;
    border-radius: 6px;
    padding: 18px 22px 20px;
    margin-top: 20px;
}

.result .label {
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin: 0 0 6px;
}

.result .headline {
    font-size: clamp(1.9rem, 5vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.result .headline .unit {
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--ink-2);
    margin-left: 6px;
}

.figures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: 5px;
    overflow: hidden;
    margin-top: 18px;
}

.figures div { background: var(--paper); padding: 12px 14px; }

.figures dt {
    font-size: .78rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 3px;
}

.figures dd {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.notes { margin: 16px 0 0; padding: 0; list-style: none; }

.notes li {
    font-size: .88rem;
    color: var(--ink-2);
    padding-left: 16px;
    position: relative;
    margin-bottom: 6px;
}

.notes li::before {
    content: "";
    position: absolute;
    left: 0; top: .62em;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--rule-firm);
}

/* ---- prose blocks ---- */

.formula {
    font-family: var(--mono);
    font-size: 1.02rem;
    background: var(--ground);
    border-left: 3px solid var(--accent);
    border-radius: 0 4px 4px 0;
    padding: 14px 18px;
    margin: 0 0 18px;
    overflow-x: auto;
}

/* Term and description on one line. Stacked, a one-character term like "r"
   left an almost empty row above its own definition. */
.variables {
    display: grid;
    /* Sized to the longest term on the page and no wider. A fixed minimum
       held the column open at 72px even where every term was one character,
       stranding the definitions a hundred pixels away from their labels. */
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 18px;
    row-gap: 10px;
    align-items: baseline;
    margin: 0 0 20px;
    max-width: 82ch;
}

.variables dt {
    font-weight: 600;
    margin: 0;
    /* Long names wrap inside the column rather than widening it for everyone. */
    max-width: 22ch;
}

.variables dd { margin: 0; color: var(--ink-2); max-width: none; }

@media (max-width: 560px) {
    .variables { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
    .variables dd { margin-bottom: 10px; }
}

.example {
    background: var(--good-bg);
    border: 1px solid #d6e3d9;
    border-radius: 6px;
    padding: 20px 22px;
}

.example .given { font-style: italic; color: var(--ink-2); }

.faq details {
    border-bottom: 1px solid var(--rule);
    padding: 14px 0;
}

.faq details summary {
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.faq details summary::-webkit-details-marker { display: none; }

.faq details summary::after {
    content: "+";
    color: var(--accent);
    font-weight: 700;
    flex: 0 0 auto;
}

.faq details[open] summary::after { content: "\2212"; }

.faq details summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.faq details p { margin: 10px 0 0; color: var(--ink-2); max-width: none; }

/* Ad slots reserve their height before the ad loads so switching ads on does
   not shift the page under someone mid-calculation. Rendered only when
   config('ads.enabled') is true and the slot has an ID. */
.ad-slot {
    min-height: 250px;
    margin: 28px 0;
    overflow: hidden;
}

/* Local only, via ADS_PLACEHOLDERS, to check the layout holds. */
.ad-slot--placeholder {
    background: var(--ground);
    border: 1px dashed var(--rule-firm);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-3);
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* ---- index ---- */


/* ---- breadcrumbs & category pages ---- */

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: .85rem;
    color: var(--ink-3);
    margin-bottom: 10px;
}

.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }

.section-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 36px;
    align-items: center;
    background: var(--paper);
    border: 1px solid var(--tier-edge, var(--rule));
    border-top: 4px solid var(--tier-ink, var(--accent));
    border-radius: 8px;
    padding: 30px 34px 32px;
    margin-bottom: 26px;
}

@media (max-width: 860px) {
    .section-hero { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 24px 22px 26px; }
    .section-hero-art { display: none; }
}

.section-hero h1 { color: var(--tier-ink, var(--ink)); margin-bottom: 8px; }

.section-hero .tagline {
    font-size: 1.04rem;
    color: var(--ink-2);
    margin-bottom: 16px;
}

/* Supporting copy rather than long-form reading, so it runs a little wider
   than body prose — but not the full width, which would be tiring. */
.section-hero-copy p { max-width: 80ch; }
.section-hero-copy p:last-of-type { margin-bottom: 0; }

.section-hero-art {
    background: var(--tier-wash, var(--ground));
    color: var(--tier-ink, var(--accent));
    border-radius: 8px;
    padding: 24px;
}

.section-hero-art .scene { max-width: 190px; margin: 0 auto; }

/* Jump links to each category, which also fill the band under the prose. */
.jump {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
}

.jump a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--tier-ink, var(--accent));
    background: var(--tier-wash, var(--ground));
    border: 1px solid var(--tier-edge, var(--rule));
    border-radius: 20px;
    padding: 6px 13px;
}

.jump a:hover { background: var(--paper); }
.jump a:focus-visible { outline: 2px solid var(--tier-ink); outline-offset: 2px; }

.jump span {
    font-weight: 400;
    font-size: .8rem;
    opacity: .75;
}

.group-head h2 a { color: inherit; text-decoration: none; }
.group-head h2 a:hover { color: var(--accent); }

.back { margin-top: 36px; font-size: .92rem; }


/* ---- tier & category blocks (tier and category pages) ---- */

.page-intro { margin: 22px 0 8px; }
.page-intro p { color: var(--ink-2); }

/* Deliberately not a boxed card. Nesting tool cards inside another bordered
   box squeezed the grid to four columns and left a fifth tool orphaned on its
   own row; unboxed, the same tools get the full width and fit on one. */
.cat-card {
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid var(--rule-firm);
}

.cat-card:first-of-type { border-top: 0; padding-top: 0; }

.cat-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cat-card-head > div { flex: 1 1 auto; }
.cat-card-head h2 { margin: 0 0 2px; font-size: 1.2rem; }
.cat-card-head h2 a { color: inherit; text-decoration: none; }
.cat-card-head h2 a:hover { color: var(--accent); }
.cat-card-head p { margin: 0; font-size: .89rem; color: var(--ink-2); }

.cat-card-intro {
    margin: 16px 0 0;
    font-size: .93rem;
    color: var(--ink-2);
    /* Two or three supporting sentences, not an article — let them use the
       card rather than stopping halfway across it. */
    max-width: 88ch;
}

.tool-list--roomy {
    grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
    gap: 14px;
}

.tool-list--roomy a { padding: 20px 22px 22px; }
.tool-list--roomy strong { font-size: 1.12rem; margin-bottom: 5px; }
.tool-list--roomy span { font-size: .9rem; }

/* ---- homepage tier cards ---- */

.scene { width: 100%; height: auto; display: block; }

.tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 18px;
    margin-top: 26px;
}

.tier-card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--tier-edge, var(--rule));
    border-top: 4px solid var(--tier-ink, var(--accent));
    border-radius: 8px;
    text-decoration: none;
    color: var(--ink);
    overflow: hidden;
}

.tier-card:hover { box-shadow: 0 3px 14px rgba(22, 32, 42, .09); }
.tier-card:focus-visible { outline: 2px solid var(--tier-ink); outline-offset: 2px; }

.tier-card-art {
    background: var(--tier-wash, var(--ground));
    color: var(--tier-ink, var(--accent));
    padding: 22px 26px 18px;
}

.tier-card-art .scene { max-width: 132px; margin: 0 auto; }

.tier-card-body { padding: 20px 24px 22px; display: flex; flex-direction: column; flex: 1 1 auto; }

.tier-card h2 {
    margin: 0 0 6px;
    font-size: 1.22rem;
    color: var(--tier-ink, var(--ink));
}

.tier-card p {
    margin: 0 0 14px;
    font-size: .9rem;
    color: var(--ink-2);
    max-width: none;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.chips li {
    font-size: .78rem;
    color: var(--tier-ink, var(--ink-2));
    background: var(--tier-wash, var(--ground));
    border-radius: 20px;
    padding: 4px 11px;
}

.tier-card-count {
    margin-top: auto;
    font-size: .86rem;
    font-weight: 600;
    color: var(--tier-ink, var(--accent));
}

/* ---- related, at the foot of a tool page ---- */

.related { margin-top: 44px; }
.related h2 { margin-bottom: 4px; }

/* ---- popular & results ---- */

.popular, .results { margin-top: 46px; }
.popular h2, .results h2 { margin-bottom: 4px; }

/* ---- tool page ---- */
/* ---- tool page ---- */

/* The summary runs the full width of the card below it. Constrained to a
   reading measure it sat in a narrow column above a wide card, which read as
   a mistake rather than as typography. Keep these to a sentence or two. */
.intro {
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--ink-2);
    margin-bottom: 18px;
    max-width: none;
}

.covers { max-width: 76ch; padding-left: 20px; margin: 0 0 18px; }
.covers li { margin-bottom: 6px; color: var(--ink-2); }

/* ---- finder ---- */


.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.finder { margin-top: 22px; max-width: 420px; }

.finder input {
    font: inherit;
    font-size: 1rem;
    width: 100%;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--rule-firm);
    border-radius: 5px;
    padding: 11px 14px;
}

.finder input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}

.finder-empty {
    margin: 10px 0 0;
    font-size: .9rem;
    color: var(--ink-3);
}

/* ---- numbers worth knowing ---- */

.quick {
    margin-top: 56px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 30px 34px 32px;
}

.quick h2 { margin-top: 0; margin-bottom: 6px; }

.quick-lede { color: var(--ink-2); font-size: .95rem; margin-bottom: 24px; }

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px 32px;
    margin: 0;
}

.quick-grid dt {
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: 3px;
}

.quick-grid dd {
    margin: 0;
    font-size: .92rem;
    color: var(--ink-2);
    line-height: 1.6;
}

.quick-grid strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---- homepage ---- */


.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 40px;
    align-items: center;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 32px 36px 34px;
}

@media (max-width: 820px) {
    .hero { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 24px 22px 26px; }
    .hero-art { display: none; }
}

.eyebrow {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 12px;
}

.hero h1 {
    font-size: clamp(1.9rem, 5vw, 2.8rem);
    margin-bottom: 16px;
}

.hero .lede { color: var(--ink-2); font-size: 1.03rem; }

.hero-art {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--accent);
}

.hero-art .scene { width: 100%; max-width: 230px; color: var(--accent); }

.hero-caption {
    margin: 0;
    font-family: var(--mono);
    font-size: .82rem;
    letter-spacing: .04em;
    color: var(--ink-3);
    text-align: center;
}

.promise {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 32px;
}

.promise > div { background: var(--paper); padding: 22px 24px 24px; }

.promise h2 {
    font-size: 1rem;
    margin: 0 0 8px;
    letter-spacing: 0;
}

.promise p { font-size: .91rem; color: var(--ink-2); margin: 0; max-width: none; }

.group { margin-top: 34px; scroll-margin-top: 16px; }

.group-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rule-firm);
}

.group-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--accent-bg);
    color: var(--accent);
}

.group-icon .dia { width: 30px; height: 30px; }

.group-head > div { flex: 1 1 auto; }
.group-head h2 { margin: 0 0 2px; font-size: 1.2rem; }
.group-head p { margin: 0; font-size: .89rem; color: var(--ink-2); }

.group-count {
    flex: 0 0 auto;
    font-family: var(--mono);
    font-size: .8rem;
    color: var(--ink-3);
    background: var(--ground);
    border: 1px solid var(--rule);
    border-radius: 20px;
    padding: 3px 11px;
}

.about {
    margin-top: 56px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 32px 36px 34px;
}

.about h2 { margin-top: 0; }
.about p { color: var(--ink-2); }

.tool-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
    gap: 10px;
    padding: 0;
    margin: 18px 0 0;
    list-style: none;
}

.tool-list a {
    display: block;
    height: 100%;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 13px 15px 14px;
    text-decoration: none;
    color: var(--ink);
}

.tool-list a:hover { border-color: var(--accent); background: var(--accent-bg); }
.tool-list a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tool-list strong { display: block; margin-bottom: 3px; font-size: 1.02rem; }

.tool-list span {
    font-size: .84rem;
    line-height: 1.45;
    color: var(--ink-2);
    display: block;
}

footer {
    border-top: 1px solid var(--rule);
    background: var(--paper);
    padding: 24px 0;
    font-size: .85rem;
    color: var(--ink-3);
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
