/* The /directory pages (rendered by src/directory.js). Same tokens as the landing page (DESIGN.md):
   treasury green and gold for the header and hero, banknote paper for the content. */
:root {
  --ink: #071d18;
  --ink-2: #0c2a23;
  --gold: #e3b341;
  --gold-hi: #f7d886;
  --gold-deep: #8a6210;
  --paper: #edf1ea;
  --paper-2: #e0e8dd;
  --card: #f7f9f5;
  --text: #0b1f1a;
  --muted: #4b5e56;
  --on-ink: #f1f4ee;
  --on-ink-muted: #a3b8ae;
  --rule-ink: rgba(227, 179, 65, 0.2);
  --rule-paper: rgba(11, 31, 26, 0.14);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 5vw, 72px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
code { font-family: var(--mono); font-size: 0.86em; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.d-wrap { width: 100%; max-width: calc(1180px + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.d-wrap.narrow { max-width: calc(860px + var(--gutter) * 2); }

.test-strip { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 16px; background: #fff1e0; color: #b4530b; font-size: 14px; font-weight: 500; text-align: center; }
.test-strip .dot { width: 8px; height: 8px; border-radius: 50%; background: #f08c2e; flex: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--gold); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background 0.2s, box-shadow 0.2s; }
.btn:hover { background: var(--gold-hi); box-shadow: 0 0 0 5px rgba(227, 179, 65, 0.16); }
.btn.sm { height: 38px; padding: 0 16px; font-size: 15px; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--rule-paper); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--gold-deep); }

/* header */
.d-nav { background: var(--ink); color: var(--on-ink); border-bottom: 1px solid var(--rule-ink); }
.d-nav .d-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; font-size: 21px; letter-spacing: -0.035em; }
.brand svg { width: 28px; height: 28px; color: var(--gold); }
.d-nav nav { display: flex; align-items: center; gap: 24px; font-size: 15px; }
.d-nav nav a:not(.btn) { text-decoration: none; color: var(--on-ink-muted); }
.d-nav nav a:not(.btn):hover, .d-nav nav a[aria-current="page"] { color: var(--on-ink); }

/* hero */
.d-hero { position: relative; background: var(--ink); color: var(--on-ink); padding: 56px 0 64px; overflow: hidden; isolation: isolate; }
.d-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(55% 90% at 85% 30%, rgba(227, 179, 65, 0.12), transparent 62%), radial-gradient(45% 80% at 5% 100%, rgba(31, 94, 74, 0.5), transparent 70%); }
.eyebrow { margin: 0 0 14px; color: var(--gold); font-weight: 600; font-size: 15px; }
.d-hero h1 { margin: 0; max-width: 16ch; font-size: clamp(36px, 5vw, 64px); line-height: 1; font-weight: 640; letter-spacing: -0.045em; text-wrap: balance; }
.lede { margin: 20px 0 0; max-width: 36em; color: var(--on-ink-muted); font-size: clamp(16px, 1.3vw, 19px); }

/* content */
.paper { padding: 32px 0 72px; }
.paper h1 { margin: 8px 0 12px; font-size: clamp(30px, 4vw, 46px); line-height: 1.05; font-weight: 640; letter-spacing: -0.04em; }
.paper h2 { margin: 0 0 6px; font-size: 20px; font-weight: 620; letter-spacing: -0.02em; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.filters label { display: flex; }
.filters .q { flex: 1 1 280px; }
.filters input, .filters select { width: 100%; height: 46px; padding: 0 14px; border: 1.5px solid var(--rule-paper); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; }
.filters select { padding-inline-end: 34px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px; background-repeat: no-repeat; }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 4px rgba(227, 179, 65, 0.2); }
.count-line { margin: 14px 2px 0; font-size: 14px; }
.count-line a { color: var(--gold-deep); }

.table-wrap { margin-top: 18px; overflow-x: auto; border: 1px solid var(--rule-paper); border-radius: 14px; background: var(--card); }
.d-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
.d-table th { padding: 12px 18px; text-align: start; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--paper-2); white-space: nowrap; }
.d-table td { padding: 14px 18px; border-top: 1px solid var(--rule-paper); vertical-align: middle; }
.d-table tbody tr:hover { background: rgba(227, 179, 65, 0.06); }
.d-table .price { text-align: end; white-space: nowrap; font-weight: 600; }
.d-table .svc a { font-weight: 600; text-decoration: none; }
.d-table .svc a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.d-table .desc { display: block; margin-top: 2px; max-width: 46ch; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.d-table code { display: inline-block; margin-inline-end: 4px; padding: 2px 7px; border-radius: 6px; background: var(--paper-2); font-weight: 600; font-size: 12px; }
.d-table .count { margin-inline-start: 4px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.methods { white-space: nowrap; }
.seller { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.logo { display: inline-grid; place-items: center; flex: none; border-radius: 6px; background: var(--ink); color: var(--gold); font-weight: 650; font-size: 13px; object-fit: cover; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 14px; }
.pager span:last-child { display: flex; gap: 8px; }

.empty { margin-top: 18px; padding: 48px 20px; border: 1px solid var(--rule-paper); border-radius: 14px; background: var(--card); text-align: center; }
.empty h2 { margin-bottom: 6px; }
.empty .btn { margin-top: 10px; }

.agents { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 48px; padding: 16px 18px; border: 1px dashed var(--rule-paper); border-radius: 14px; font-size: 14px; }
.agents code { overflow-wrap: anywhere; }

/* one service */
.back { color: var(--muted); text-decoration: none; font-size: 15px; }
.back:hover { color: var(--text); }
.by { display: flex; align-items: center; gap: 10px; margin: 20px 0 0; color: var(--muted); }
.tag { padding: 1px 8px; border-radius: 99px; background: #fff1e0; color: #b4530b; font-size: 12px; font-weight: 600; }
.lede-paper { margin: 0 0 6px; max-width: 40em; color: var(--muted); font-size: 18px; }
.card { margin-top: 20px; padding: 22px; border: 1px solid var(--rule-paper); border-radius: 14px; background: var(--card); }
.card .table-wrap { border: 0; border-radius: 0; margin-top: 10px; background: transparent; }
.prices { min-width: 0; }
.prices td { padding: 12px 8px; }
.prices td:first-child { width: 1%; white-space: nowrap; }
.prices .path { width: 100%; font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.two .card { margin-top: 20px; }
.facts dl { display: grid; gap: 14px; margin: 0; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.how .actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }

/* footer */
.d-foot { border-top: 1px solid var(--rule-paper); padding: 24px 0; color: var(--muted); font-size: 14px; }
.d-foot .d-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.d-foot .links { display: flex; flex-wrap: wrap; gap: 18px; }
.d-foot a { text-decoration: none; }
.d-foot a:hover { color: var(--text); }

@media (max-width: 720px) {
  .two { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .d-nav nav { gap: 16px; }
  .filters label:not(.q) { flex: 1 1 140px; }
  .filters .btn { flex: 1 1 100%; }
}
