/* Mollusk Geocoder site. Colours, spacing, radius and type come from /brand/tokens.css, a copy of
   molluskinc/mollusk-interface design/tokens.css (Tidewater; the source is design/tokens.json there).
   Never type a hex value here: use the var(--…) names. Rules from that repo's design/README.md:
   borders and tone, not shadow; brass for at most one call to action per view, on abyss; no icons. */

@font-face { font-family: "Archivo"; font-weight: 700; font-display: swap; src: url("/fonts/archivo-latin-700.woff2") format("woff2") }
@font-face { font-family: "Archivo"; font-weight: 800; font-display: swap; src: url("/fonts/archivo-latin-800.woff2") format("woff2") }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-400.woff2") format("woff2") }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-500.woff2") format("woff2") }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-600.woff2") format("woff2") }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-400.woff2") format("woff2") }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-600.woff2") format("woff2") }

* { box-sizing: border-box }
html { color-scheme: light dark }
body { margin: 0; font: 400 1rem/1.6 var(--font-sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column }
main { flex: 1 0 auto; width: 100% }
main, footer .wrap, header .bar { max-width: 68rem; margin: 0 auto; padding-left: var(--space-5); padding-right: var(--space-5) }
@media (max-width: 40rem) { main, footer .wrap, header .bar { padding-left: var(--space-4); padding-right: var(--space-4) } }
main { padding-top: var(--space-7); padding-bottom: var(--space-8) }
main > p, main > ul, main > ol { max-width: 65ch }

/* Header band: abyss ground, shallows mark, header-ink wordmark (design/README.md, "Lockup"). */
header.site { background: var(--header-bg); color: var(--header-ink) }
header .bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); min-height: 64px; padding-top: var(--space-3); padding-bottom: var(--space-3) }
.lockup { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--header-ink); text-decoration: none; margin-right: auto }
.lockup img { width: 32px; height: 32px; display: block }
.wordmark { font: 700 1.6rem/1 var(--font-display); letter-spacing: -0.01em }
.product { font: 600 0.75rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--shallows); padding-top: 0.3rem }
header nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4) }
header nav a { color: var(--header-ink); text-decoration: none; font-weight: 500 }
header nav a:hover { text-decoration: underline; text-underline-offset: 4px }
header nav a.cta { background: var(--brass); color: var(--abyss); padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); font-weight: 600 }
header nav a.cta:hover { text-decoration: none; filter: brightness(1.08) }

/* Type */
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 var(--space-4) }
h1 { font-size: clamp(2rem, 4vw, 2.75rem) }
h2 { font-size: 1.5rem; margin-top: var(--space-7) }
h3 { font-size: 1.15rem; font-weight: 700; margin-top: var(--space-6) }
.eyebrow { font: 600 0.75rem/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-ink); margin: 0 0 var(--space-3) }
.lede { font-size: 1.2rem; color: var(--ink-muted); max-width: 60ch }
a { color: var(--primary); text-underline-offset: 3px }
a:hover { color: var(--primary-hover) }
code, pre, kbd, .mono { font-family: var(--font-mono); font-size: 0.92em }
.note { color: var(--ink-muted); font-size: 0.9rem }

/* Hero of the home page: the claim and the numbers, on abyss (design/README.md, "Layout"). */
.hero { background: var(--header-bg); color: var(--header-ink); border-top: 1px solid rgba(255, 255, 255, 0.08) }
.hero .wrap { max-width: 68rem; margin: 0 auto; padding: var(--space-8) var(--space-5) var(--space-7) }
.hero h1 { color: var(--header-ink); max-width: 22ch }
.hero .lede { color: var(--header-ink); opacity: 0.85 }
.hero .eyebrow { color: var(--shallows) }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--space-5); margin: var(--space-6) 0 0; padding: 0; list-style: none }
.stats li { border-top: 2px solid var(--shallows); padding-top: var(--space-3) }
.stats strong { display: block; font: 800 2.25rem/1.1 var(--font-display); font-variant-numeric: tabular-nums }
.stats span { color: var(--header-ink); opacity: 0.8; font-size: 0.95rem }

/* Controls */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px }
header a:focus-visible { outline-color: var(--shallows) }
.cta, button { display: inline-block; background: var(--primary); color: var(--on-primary); border: 1px solid transparent; border-radius: var(--radius-md); padding: var(--space-2) var(--space-4); text-decoration: none; font: 600 1rem/1.4 var(--font-sans); cursor: pointer }
.cta:hover, button:hover { background: var(--primary-hover); color: var(--on-primary) }
.button-quiet { background: transparent; color: var(--primary); border-color: var(--line-strong) }
.button-quiet:hover { background: var(--surface-sunk); color: var(--primary) }
/* The header's Sign up is the one brass call to action of every page; the hero's button is shallows on abyss. */
.hero .cta { background: var(--shallows); color: var(--abyss); margin-right: var(--space-4) }
.hero .cta:hover { background: var(--shallows); filter: brightness(1.08); color: var(--abyss) }
.hero .cta.button-quiet { background: transparent; color: var(--header-ink); border-color: rgba(230, 237, 234, 0.45) }
.hero .cta.button-quiet:hover { background: rgba(255, 255, 255, 0.06); filter: none; color: var(--header-ink) }
input, select, textarea { font: inherit; padding: var(--space-2) var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); max-width: 100% }
label { display: inline-block; margin-right: var(--space-2); font-weight: 500 }
form p { margin: 0 0 var(--space-4) }
/* A form reads top to bottom: each label above its field, the fields at one width, in a card. */
main form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); max-width: 32rem; margin: var(--space-5) 0 }
main form label { display: block; margin: 0 0 var(--space-1) }
main form input:not([type="checkbox"]):not([type="radio"]), main form select, main form textarea { width: 100% }
main form p:has(> input[type="checkbox"]), main form p:has(> input[type="radio"]) { display: flex; gap: var(--space-2); align-items: center }
main form p:has(> input[type="checkbox"]) label, main form p:has(> input[type="radio"]) label { display: inline; margin: 0; font-weight: 400 }

/* Surfaces: borders and tone, not shadow. */
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5) }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--space-5); margin: var(--space-6) 0 }
.grid .card h3 { margin-top: 0 }
pre { background: var(--surface-sunk); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); overflow-x: auto; min-height: 2rem; line-height: 1.5 }
table { border-collapse: collapse; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg) }
caption { text-align: left; padding: var(--space-2) 0; color: var(--ink-muted) }
th, td { text-align: left; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums }
th { font: 600 0.8rem/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted) }
.table-wrap { overflow-x: auto }
@media (max-width: 40rem) { table { display: block; overflow-x: auto } th, td { padding: var(--space-2) var(--space-3) } }

/* Footer: the legal line on every page (design/README.md, "Legal line"). */
footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: var(--space-7) }
footer .wrap { padding-top: var(--space-6); padding-bottom: var(--space-6); display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); align-items: baseline; justify-content: space-between }
footer nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5) }
footer p { margin: 0 }
.legal { color: var(--ink-muted); font-size: 0.9rem }
[hidden] { display: none !important }
#live-key, #test-key { white-space: pre-wrap; word-break: break-all }
.card > :first-child { margin-top: 0 }
#bot:not(:empty) { margin: 0 0 var(--space-4) }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-5); margin: 0 0 var(--space-3) }
.facts dt { color: var(--ink-muted) }
.facts dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600 }
main .card { margin-top: var(--space-5) }
main .card form { border: 0; padding: 0; margin: var(--space-3) 0 0; max-width: 32rem }
