/* Teal, with the same bones as seedgen.uk: one 640px column, 44px
   controls, light and dark from the system. */
:root {
  --bg: #F2F7F6;
  --surface: #FFFFFF;
  --ink: #11201D;
  --muted: #5C6E6A;
  --line: #D9E5E2;
  --accent: #0F766E;
  --on-accent: #FFFFFF;
  --tint: #DDF3EF;
  --ok: #15803D;
  --ok-tint: #DCFCE7;
  --danger: #B42318;
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1514; --surface: #132220; --ink: #E6F0EE; --muted: #94A8A4; --line: #223633;
    --accent: #2DD4BF; --on-accent: #04201C; --tint: #123B36; --ok: #4ADE80; --ok-tint: #10352A; --danger: #F87171;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1514; --surface: #132220; --ink: #E6F0EE; --muted: #94A8A4; --line: #223633;
  --accent: #2DD4BF; --on-accent: #04201C; --tint: #123B36; --ok: #4ADE80; --ok-tint: #10352A; --danger: #F87171;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sprite { display: none; }
.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.ico .dot { fill: currentColor; stroke: none; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2 { line-height: 1.2; margin: 0 0 .35rem; }
h1 { font-size: 1.6rem; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; }
.lede { color: var(--muted); margin: 0 0 1rem; }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code { font-family: var(--mono); font-size: .9em; }

main { max-width: 640px; margin: 0 auto; padding: 0 16px; }

/* ---- top bar */
.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 640px; margin: 0 auto;
  padding: calc(6px + env(safe-area-inset-top)) 16px 6px;
  background: var(--bg);
}
.mark { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; font-weight: 800; letter-spacing: -.02em; font-size: 1.15rem; color: var(--accent); text-decoration: none; }
.bar-link { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; white-space: nowrap; font-size: .9rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.bar-link:hover { color: var(--accent); }

/* ---- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: .95rem; white-space: nowrap; text-decoration: none;
}
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.toggle[aria-pressed="true"] { background: var(--tint); color: var(--accent); border-color: var(--accent); }
.btn.wide { width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.search { display: flex; gap: 8px; }
.search input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: 1.05rem;
}
.search input:focus { border-color: var(--accent); outline: none; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
/* Under 400px the button keeps its magnifier and the field its whole
   placeholder; the word stays for screen readers. */
@media (max-width: 399px) {
  .search .btn { padding: 0 14px; }
  .search .btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.hint { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--tint); color: var(--accent); font-size: .9rem; }
.examples { margin: 10px 0 0; color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip { min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--accent); font-size: .9rem; font-weight: 600; }
.chip:hover { border-color: var(--accent); }

.tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0 8px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); }
.seg button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; min-height: 44px; padding: 0 12px; border-radius: 999px; font-weight: 600; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--tint); color: var(--accent); }
.tools .toggle { min-height: 44px; font-size: .85rem; }
/* At phone width the three names and the toggle do not fit with icons. */
@media (max-width: 479px) {
  .seg .ico { display: none; }
  .seg button { padding: 0 10px; }
}
.status { margin: 0 0 10px; color: var(--muted); font-size: .85rem; }

/* ---- rows */
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
.dom { font-weight: 700; font-size: 1.05rem; overflow-wrap: anywhere; }
.dom b { color: var(--accent); font-weight: 700; }
.state { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: .78rem; font-weight: 600; white-space: nowrap; padding: 3px 9px; border-radius: 999px; background: var(--tint); color: var(--muted); }
.row[data-state="available"] .state, .row[data-state="maybe"] .state { background: var(--ok-tint); color: var(--ok); }
.row[data-state="taken"] .state { background: var(--line); color: var(--ink); }
.row[data-state="checking"] .state, .row[data-state="idle"] .state { background: none; border: 1px solid var(--line); }
.row[data-state="taken"] .dom, .row[data-state="taken"] .dom b { color: var(--muted); }
.offers { display: grid; gap: 6px; margin-top: 8px; }
.offer {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px;
  min-height: 44px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; color: inherit;
}
.offer:hover { border-color: var(--accent); }
.offer.best { border-color: var(--accent); background: var(--tint); }
.offer .who { font-weight: 600; }
.offer .cost { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.offer .price { font-weight: 700; white-space: nowrap; }
.offer .renew { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.offer .ico { color: var(--muted); }
.from { display: none; margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
.row[data-state="taken"] .offers { display: none; }
.row[data-state="taken"] .from { display: block; }
.rows[data-only-free] .row[data-state="taken"] { display: none; }
.more-row { margin: 12px 0 0; }

/* ---- about */
.about { margin-top: 32px; }
.about p { margin: 0 0 .75rem; color: var(--muted); }
.about strong { color: var(--ink); }
.about a, .foot a, .hint a { color: var(--accent); text-underline-offset: 2px; }
.with-ico { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { padding: 12px 0; font-weight: 600; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.faq details p { padding-bottom: 12px; }
.foot { margin-top: 32px; color: var(--muted); font-size: .85rem; }
.foot p { margin: 0 0 .5rem; }
