/* TLDscout's one stylesheet: the search page (index.html) and the info pages (about, privacy, terms, how we make
   money, for registries). External on purpose: the server's Content-Security-Policy allows no inline styles or scripts.
   Colours: every text/background pair below meets WCAG AA (4.5:1) in both themes. */
:root {
  --bg: #f6f7f4; --surface: #ffffff; --surface-2: #f1f2ee; --text: #1b1d1a; --muted: #5b6058; --line: #dfe2da; --line-strong: #c9cdc3;
  --accent: #2a6a49; --accent-hover: #215a3d; --on-accent: #ffffff; --accent-soft: #e1f0e7; --focus: #2a6a49;
  --ok: #17663d; --ok-bg: #dff2e6; --warn: #774c00; --warn-bg: #fbeed3;
  --taken: #5c605a; --taken-bg: #eceee9; --res: #5b3d91; --res-bg: #eee7fa;
  --note-bg: #fbf6e9; --note-line: #eadfbf;
  --shadow: 0 1px 2px rgba(20, 30, 20, .05), 0 4px 16px rgba(20, 30, 20, .05);
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111310; --surface: #191c18; --surface-2: #20241f; --text: #e8eae5; --muted: #a4a99f; --line: #2c312a; --line-strong: #3b4138;
    --accent: #7fc89f; --accent-hover: #98d6b2; --on-accent: #0d1a12; --accent-soft: #1c3226; --focus: #7fc89f;
    --ok: #86d9aa; --ok-bg: #153222; --warn: #f2c66f; --warn-bg: #362b12;
    --taken: #b1b5ad; --taken-bg: #262a25; --res: #cab3f3; --res-bg: #2d2443;
    --note-bg: #1f1d15; --note-line: #3a3524;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 32px 16px 64px; }
a { color: var(--accent); }
button { font: inherit; cursor: pointer; }
:where(a, button, select, input, summary):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.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; }
[hidden] { display: none !important; }

/* ---- header ---- */
header { margin-bottom: 20px; }
.wordmark { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; font-weight: 400; }
.wordmark a { color: inherit; text-decoration: none; display: inherit; align-items: inherit; gap: inherit; }
.wordmark svg { width: 34px; height: 34px; flex: none; }
.wm-bg { fill: var(--accent); }
.wm-fg { stroke: var(--on-accent); fill: none; }
.wm-tld { font-weight: 800; color: var(--accent); letter-spacing: 0; }
.wm-scout { font-weight: 400; }
.tagline { margin: 8px 0 0; color: var(--muted); font-size: 16px; max-width: 46em; }

/* ---- search ---- */
.search-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
form.search { display: flex; gap: 8px; }
form.search input {
  flex: 1; min-width: 0; font: inherit; font-size: 18px; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--text);
}
form.search input::placeholder { color: var(--muted); }
form.search input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
form.search button { padding: 0 22px; border-radius: 10px; border: 0; background: var(--accent); color: var(--on-accent); font-weight: 650; font-size: 16px; }
form.search button:hover { background: var(--accent-hover); }
.options { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 2px 0; color: var(--muted); font-size: 13.5px; }
.options label { display: inline-flex; align-items: center; gap: 6px; }
select { font: inherit; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px; padding: 3px 8px; max-width: 100%; }
/* Public mode: the Cloudflare Turnstile check (it gives the page a short-lived ticket for searches and Verify). */
.gate { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.gate .ts { min-height: 0; max-width: 100%; }

.notice { margin: 16px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 14px; }

/* ---- progress, summary, notes ---- */
.status-bar { margin: 22px 0 10px; display: none; }
.status-bar.on { display: block; }
.progress { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.summary { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 13.5px; color: var(--muted); }
#summaryLeft { color: var(--text); font-weight: 550; }
.share { font-size: 12.5px; padding: 1px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }
.share:hover { border-color: var(--accent); color: var(--accent); }
.note { margin: 10px 0 0; padding: 10px 14px; font-size: 13px; line-height: 1.55; color: var(--muted); background: var(--note-bg); border: 1px solid var(--note-line); border-radius: 10px; }
.note b { color: var(--text); font-weight: 650; }
/* Public mode: the paid-link disclosure and the price/availability disclaimer, above the results. */
.disclosure { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.disclosure p { margin: 2px 0; }
.disclosure b { color: var(--text); font-weight: 650; }

/* ---- toolbar ---- */
.toolbar { display: none; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 12px; }
.toolbar.on { display: flex; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip b { font-weight: 650; margin-left: 5px; font-variant-numeric: tabular-nums; }
.toolbar input, .toolbar select { font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }
.toolbar input { width: 150px; }
.toolbar input::placeholder { color: var(--muted); }
.spacer { flex: 1; }

/* ---- result lists ---- */
h2.section { font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 22px 2px 8px; font-weight: 650; }
/* No overflow:hidden on .list: it clipped the "more" menu on the last rows. Rows have no background, so the corners stay round. */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.row { display: grid; grid-template-columns: minmax(0, 1.5fr) 118px minmax(0, 1.5fr); column-gap: 14px; row-gap: 4px; align-items: center; padding: 10px 16px; }
.row:not([hidden]) ~ .row { border-top: 1px solid var(--line); } /* a divider above every visible row but the first */
.name { font-size: 16px; overflow-wrap: anywhere; }
.name .t { font-weight: 700; }
.name small { display: block; margin-top: 1px; color: var(--muted); font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; }
.name small .q { color: var(--text); font-weight: 550; }
.pill { justify-self: start; font-size: 12.5px; font-weight: 650; padding: 3px 10px; border-radius: 999px; white-space: nowrap; cursor: help; }
.pill.pending { color: var(--muted); background: var(--taken-bg); }
.pill.available { color: var(--ok); background: var(--ok-bg); }
.pill.likely { color: var(--warn); background: var(--warn-bg); }
.pill.dnsfree { color: var(--ok); background: transparent; border: 1px dashed var(--ok); }
.pill.taken { color: var(--taken); background: var(--taken-bg); }
.pill.reserved { color: var(--res); background: var(--res-bg); }
.pill.notsold { color: var(--muted); background: transparent; border: 1px solid var(--line-strong); }
.pill.unknown { color: var(--muted); background: transparent; border: 1px dashed var(--line-strong); }
.row.is-taken .name { color: var(--muted); }
.regs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.btns { display: contents; }
.reg, .aff { font-size: 13px; text-decoration: none; color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px; padding: 4px 9px; white-space: nowrap; background: var(--surface); }
.reg:hover, .aff:hover { border-color: var(--accent); color: var(--accent); }
.reg b { font-weight: 650; font-variant-numeric: tabular-nums; }
.reg .renew, .reg .min { color: var(--muted); font-size: 11.5px; font-weight: 400; }
.reg .prem { font-weight: 650; color: var(--res); }
.aff { font-size: 12.5px; padding: 3px 8px; }
.aff .paid { color: var(--muted); font-size: 11.5px; }
.refnote { flex-basis: 100%; text-align: right; color: var(--muted); font-size: 11.5px; }
.row.is-taken .reg, .row.is-taken .aff { opacity: .6; }
details.more { position: relative; font-size: 13px; }
details.more summary { list-style: none; cursor: pointer; color: var(--muted); padding: 4px 6px; border-radius: 6px; }
details.more summary:hover { color: var(--text); }
details.more summary::-webkit-details-marker { display: none; }
/* Right-aligned under "more ▾"; when that would leave the screen, placeMenu() (app.js) moves it back inside. */
details.more div { position: absolute; right: 0; top: 100%; z-index: 5; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 6px; display: grid; gap: 2px; min-width: 140px; box-shadow: 0 8px 24px rgba(0,0,0,.16); }
details.more a { color: var(--text); text-decoration: none; padding: 5px 9px; border-radius: 6px; }
details.more a:hover { background: var(--accent-soft); }
.none { color: var(--muted); font-size: 12.5px; }
.empty { padding: 26px; text-align: center; color: var(--muted); }

/* The line under a row: the standard-price hint, Verify (public mode), and Porkbun's on-demand check and its answer. */
.extra { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.hint::before { content: "ⓘ "; }
.pbcheck, .vbtn, details.atreg summary { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); }
.vbtn { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.pbcheck:hover:not([aria-disabled="true"]), .vbtn:hover:not([aria-disabled="true"]), details.atreg summary:hover { border-color: var(--accent); color: var(--accent); }
.pbcheck[aria-disabled="true"], .vbtn[aria-disabled="true"] { cursor: progress; opacity: .8; }
.pbcheck[aria-busy="true"]::before, .vbtn[aria-busy="true"]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pbcheck[aria-busy="true"]::before, .vbtn[aria-busy="true"]::before { animation: none; border-right-color: currentColor; opacity: .5; } .progress i { transition: none; } }
details.atreg { font-size: 12.5px; }
details.atreg summary { list-style: none; cursor: pointer; }
details.atreg summary::-webkit-details-marker { display: none; }
details.atreg[open] summary { border-color: var(--accent); }
details.atreg .why { margin: 6px 0 4px; color: var(--muted); max-width: 46em; }
details.atreg .links { display: flex; flex-wrap: wrap; gap: 6px; }
.vnote { font-style: italic; }
.pbres:empty, .vres:empty { display: none; }
.pbres, .vres { color: var(--text); }
.pbres[data-kind="premium"] { color: var(--res); font-weight: 600; }
.vres[data-kind="available"] { color: var(--ok); font-weight: 600; }
.pbres[data-kind="unavailable"], .pbres[data-kind="limited"], .pbres[data-kind="error"], .vres[data-kind="limited"], .vres[data-kind="error"], .vres[data-kind="unknown"] { color: var(--warn); }

/* ---- help and footer ---- */
.help { margin-top: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px; font-size: 13.5px; color: var(--muted); }
.help summary { cursor: pointer; padding: 12px 0; color: var(--text); font-weight: 650; font-size: 14.5px; }
.help h3 { margin: 16px 0 6px; font-size: 13.5px; color: var(--text); }
.help p { margin: 6px 0; }
.help b { color: var(--text); font-weight: 650; }
.help dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 8px 0 14px; }
.help dt { margin: 0; }
.help dd { margin: 0; }
.help dt .pill { cursor: default; display: inline-block; }
footer { margin-top: 16px; font-size: 12.5px; color: var(--muted); }
footer p { margin: 4px 0; }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 8px; }

@media (max-width: 640px) {
  .wrap { padding-top: 22px; }
  .wordmark { font-size: 26px; }
  .wordmark svg { width: 30px; height: 30px; }
  .tagline { font-size: 15px; }
  form.search button { padding: 0 16px; }
  .row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; padding: 10px 12px; }
  .regs { grid-column: 1 / -1; justify-content: flex-start; }
  .refnote { text-align: left; }
  /* "more ▾" usually wraps to the left edge here, so hang the menu to the right of it (placeMenu still checks). */
  details.more div { right: auto; left: 0; }
  .toolbar input { width: 100%; order: 10; }
  .spacer { display: none; }
  .help { padding: 4px 14px; }
  .help dl { grid-template-columns: 1fr; gap: 2px; }
  .help dd { margin-bottom: 8px; }
}

/* ---- info pages (about, privacy, terms, how we make money, for registries) ---- */
.doc { max-width: 760px; }
.doc h1 { font-size: 28px; line-height: 1.2; margin: 18px 0 6px; letter-spacing: -0.01em; }
.doc h2 { font-size: 18px; margin: 28px 0 8px; }
.doc h3 { font-size: 15px; margin: 18px 0 6px; }
.doc p, .doc li { line-height: 1.6; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 4px 0; }
.doc .updated { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }
.doc .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 14px 0; }
.doc table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 10px 0; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--muted); font-weight: 650; font-size: 13px; }
.doc code { font-size: 13px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
.back { font-size: 14px; }
