:root {
  --bg: #f7f7f5;
  --card: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --line: #e6e6e0;
  --accent: #d63b2a;
  --good: #1f7a3a;
  --warn: #b56b00;
  --p800: #d63b2a;
  --p888: #e07a00;
  --p877: #b8a200;
  --p866: #2a8c4a;
  --p855: #2c7fb8;
  --p844: #5a3fbf;
  --p833: #b22e8a;
  --p822: #555;
  --r: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
}
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 18px;
  padding-top: 12px; padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 4px; font-weight: 700; }
.brand .dot {
  width: 22px; height: 22px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  color: white; font-size: 13px; font-weight: 700;
}
.brand .d800 { background: var(--p800); }
.brand .d888 { background: var(--p888); }
.brand .d877 { background: var(--p877); }
.brand-name { margin-left: 6px; font-size: 18px; }
nav { display: flex; gap: 14px; flex: 1; flex-wrap: wrap; align-items: center; }
nav a { font-size: 14px; color: var(--muted); }
nav a:hover { color: var(--ink); }
.nav-prefixes { display: flex; gap: 10px; flex-wrap: wrap; }
.nav-prefixes a { font-weight: 600; font-size: 13px; }
.nav-toggle { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; padding: 4px 10px; color: var(--ink); }

@media (max-width: 900px) {
  .site-header .wrap { flex-wrap: wrap; }
  .nav-toggle { display: inline-block; order: 1; margin-left: auto; }
  .search { order: 2; flex: 1 0 100%; margin-top: 8px; }
  .search input { min-width: 0; flex: 1; }
  nav { display: none; flex: 1 0 100%; flex-direction: column; gap: 4px; padding: 8px 0; }
  nav.open { display: flex; }
  .nav-prefixes { flex-direction: row; gap: 14px; padding: 4px 0; }
}

.search { display: flex; }
.search input {
  border: 1px solid var(--line); border-right: 0;
  border-radius: var(--r) 0 0 var(--r);
  padding: 8px 12px; min-width: 240px;
  background: white;
}
.search button {
  border: 1px solid var(--ink); background: var(--ink); color: white;
  border-radius: 0 var(--r) var(--r) 0;
  padding: 8px 14px; cursor: pointer;
}

main { padding: 28px 0 60px; }

.hero { padding: 30px 0 20px; }
.hero h1 { font-size: clamp(28px, 4vw, 48px); margin: 0 0 10px; line-height: 1.1; letter-spacing: -0.02em; }
.hero h1 .accent { color: var(--accent); }
.hero .lede { font-size: 18px; color: var(--muted); max-width: 720px; }
.hero-search { display: flex; margin: 20px 0; max-width: 560px; }
.hero-search input {
  flex: 1; padding: 14px 16px; font-size: 16px;
  border: 1px solid var(--line); border-right: 0;
  border-radius: var(--r) 0 0 var(--r);
  background: white;
}
.hero-search button {
  padding: 14px 22px; font-size: 16px; border: none;
  background: var(--accent); color: white; cursor: pointer;
  border-radius: 0 var(--r) var(--r) 0;
}

.grid { display: grid; gap: 16px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 18px 0; }
.grid.prefixes { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 24px 0; }
.grid.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .grid.two { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 20px;
}
.stat h3 { margin: 0; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.stat .big { font-size: 32px; font-weight: 700; margin-top: 4px; }

.grid.categories { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin: 16px 0; }
.card.category {
  display: flex; flex-direction: column; padding: 14px 16px; gap: 4px;
  text-decoration: none; transition: border-color 0.15s;
}
.card.category:hover { border-color: var(--ink); text-decoration: none; }
.card.category.small { padding: 10px 12px; }
.cat-label { font-weight: 600; line-height: 1.2; }
.cat-code { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.cat-n { font-size: 18px; font-weight: 700; margin-top: 2px; }
.card.category.small .cat-n { font-size: 14px; color: var(--accent); }

.prefix {
  display: flex; flex-direction: column; align-items: center; padding: 18px;
  text-decoration: none; gap: 4px;
}
.prefix:hover { border-color: var(--ink); }
.prefix .n { font-size: 22px; font-weight: 700; }
.prefix .lbl { color: var(--muted); font-size: 12px; }

.pfx {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  font-weight: 700; color: white; font-size: 12px;
  margin-right: 4px; letter-spacing: 0.02em;
  vertical-align: 1px;
}
.pfx-800 { background: var(--p800); }
.pfx-888 { background: var(--p888); }
.pfx-877 { background: var(--p877); }
.pfx-866 { background: var(--p866); }
.pfx-855 { background: var(--p855); }
.pfx-844 { background: var(--p844); }
.pfx-833 { background: var(--p833); }
.pfx-822 { background: var(--p822); }
.ext { color: var(--muted); }

.domain-grid {
  list-style: none; padding: 0; margin: 12px 0 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
}
.domain-grid a { display: block; padding: 6px 10px; background: var(--bg); border-radius: 6px; }
.domain-grid a:hover { background: white; border: 1px solid var(--line); padding: 5px 9px; }

.filter {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px;
  background: var(--card); padding: 12px; border-radius: var(--r); border: 1px solid var(--line);
}
.filter input, .filter select, .filter button {
  border: 1px solid var(--line); background: white; padding: 6px 10px; border-radius: 6px; font-size: 14px;
}
.filter button { background: var(--ink); color: white; cursor: pointer; }

table.domains { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
table.domains th, table.domains td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
table.domains th { background: var(--bg); font-weight: 600; font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.03em; }
.logo-cell { width: 32px; }
.logo-cell img { width: 24px; height: 24px; object-fit: contain; }
.title-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tag {
  display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 999px;
  background: var(--bg); color: var(--muted); border: 1px solid var(--line);
  margin-right: 3px;
}
.tag.good { background: #e8f4ec; color: var(--good); border-color: #c8e3d2; }
.tag.warn { background: #fdf3e2; color: var(--warn); border-color: #f0dab1; }
.tag.dim { color: var(--muted); }

.pager { display: flex; gap: 16px; align-items: center; margin: 18px 0; }

.detail-header {
  display: flex; align-items: center; gap: 22px; padding-bottom: 16px;
  border-bottom: 1px solid var(--line); margin-bottom: 18px;
}
.detail-header .logo { width: 64px; height: 64px; object-fit: contain; }
.detail-header h1 { margin: 0; font-size: 32px; }
.actions .btn {
  display: inline-block; padding: 8px 14px;
  background: var(--ink); color: white; border-radius: 8px; margin-right: 8px;
  font-size: 14px;
}
.actions .btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
dl { margin: 0; display: grid; grid-template-columns: 160px 1fr; gap: 6px 14px; }
dl dt { color: var(--muted); font-size: 13px; }
dl dd { margin: 0; }
.screenshot img { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); }

/* ---- New homepage sections (rewrite 2026-05) -------------------------- */

.hero-banner { padding: 14px 0 8px; }
.banner-art {
  /* CSS placeholder until app/static/banner.png is in place. */
  background: white;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  padding: 36px 28px 30px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  position: relative;
  background-image:
    radial-gradient(circle at 12% 22%, rgba(0,0,0,0.04) 0 14px, transparent 14px),
    radial-gradient(circle at 88% 78%, rgba(0,0,0,0.04) 0 14px, transparent 14px),
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(0,0,0,0.025) 22px 24px);
}
.banner-title {
  font-size: clamp(40px, 9vw, 110px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  -webkit-text-stroke: 2px var(--ink);
  color: white;
  text-shadow: 4px 4px 0 var(--ink);
}
.banner-title em {
  font-style: normal;
  -webkit-text-stroke: 2px var(--p888);
  text-shadow: 4px 4px 0 var(--p888);
}
.banner-tagline {
  font-size: clamp(13px, 1.5vw, 18px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: 10px;
  font-weight: 600;
}
/* If a final art file is dropped in static/, replace placeholder with image */
.hero-banner.has-image .banner-art { background: none; border: 0; padding: 0; }
.hero-banner.has-image .banner-art img { width: 100%; height: auto; display: block; border-radius: var(--r); }

.hero-pitch {
  font-size: clamp(16px, 2vw, 22px);
  color: var(--ink);
  max-width: 820px;
  line-height: 1.45;
  margin: 22px auto 6px;
  text-align: center;
}
.hero-pitch strong { color: var(--accent); font-weight: 700; }
.hero-pitch em { font-style: normal; font-weight: 700; }

.hero-banner .hero-search { margin: 18px auto 0; }

.explainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 32px 0;
}
.card.explain { position: relative; padding-top: 56px; }
.card.explain h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.25; }
.card.explain p { margin: 0; color: #444; line-height: 1.55; }
.explain-num {
  position: absolute; top: 14px; left: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
}

.proof { margin: 36px 0 16px; text-align: center; }
.proof h2 { margin-bottom: 6px; font-size: 26px; }
.proof .muted { max-width: 720px; margin: 0 auto 20px; }
.proof-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.proof-stats > div {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
  display: flex; flex-direction: column; align-items: center;
}
.proof-stats strong { font-size: 28px; font-weight: 800; color: var(--ink); }
.proof-stats span { color: var(--muted); font-size: 13px; margin-top: 2px; text-align: center; }

.cta-band { background: var(--ink); color: white; }
.cta-band h2 { color: white; margin: 0 0 10px; }
.cta-band p { margin: 0 0 8px; line-height: 1.6; color: #ddd; }
.cta-band .btn.ghost { color: white; border-color: white; margin-left: 8px; }

/* Homepage sampler — rich cards with screenshot + logo overlay */
.sample-grid {
  list-style: none; padding: 0; margin: 18px 0 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.sample-card-wrap { list-style: none; }
.sample-card-rich {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  height: 100%;
}
.sample-card-rich:hover {
  text-decoration: none; transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  border-color: var(--ink);
}
.sample-shot {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: #f0efeb;
  display: block;
}
.sample-shot img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block;
}
.sample-shot-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 800; color: white;
  border-radius: 0; padding: 0; margin: 0;
}
.sample-overlay-logo {
  position: absolute; left: 10px; bottom: 10px;
  width: 44px; height: 44px; object-fit: contain;
  background: white; border-radius: 8px; padding: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.sample-meta { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; }
.sample-domain { font-weight: 700; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sample-title { font-size: 13px; color: #444; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sample-cat { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

/* Gallery triage UI */
.triage-header { margin-bottom: 18px; }
.triage-header h1 { margin: 0 0 4px; font-size: 26px; }
.triage-header .muted { max-width: 820px; }
.triage-counts { display: flex; gap: 28px; margin: 14px 0; flex-wrap: wrap; }
.triage-counts span { font-size: 14px; color: var(--muted); }
.triage-counts span strong { color: var(--ink); font-size: 18px; }
.triage-filter { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.triage-filter select { padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line); font-size: 14px; }

.triage-card { padding: 0; overflow: hidden; }
.triage-screenshot { background: #f0efeb; max-height: 60vh; overflow: hidden; }
.triage-screenshot img { width: 100%; height: auto; display: block; }
.triage-meta { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.triage-meta h2 { margin: 0; font-size: 22px; display: flex; align-items: center; gap: 10px; }
.triage-logo { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; padding: 3px; background: white; box-shadow: 0 0 0 1px var(--line); }
.triage-form { padding: 18px 22px; display: flex; flex-direction: column; gap: 12px; }
.triage-form input[type="text"] { padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
.triage-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.triage-actions button { padding: 12px 22px; font-size: 15px; border-radius: 8px; border: 0; cursor: pointer; }
.triage-actions .big-yes { background: var(--good); color: white; flex: 1; min-width: 200px; font-weight: 700; }
.triage-actions .big-yes:hover { filter: brightness(1.08); }
.triage-actions .btn.ghost { background: white; border: 1px solid var(--line); color: var(--ink); }
.triage-actions .btn.ghost:hover { border-color: var(--ink); }
kbd { background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; font-size: 11px; }

/* Discover page sections */
.discover-section { margin-bottom: 18px; padding: 22px; }
.discover-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.discover-header h2 { margin: 0; font-size: 20px; }
.discover-header h2 a { color: var(--ink); }
.discover-header h2 a:hover { color: var(--accent); text-decoration: none; }

/* Submit form */
.submit-page { max-width: 720px; margin: 0 auto; padding: 16px 0; }
.submit-page h1 { margin: 0 0 10px; font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.02em; }
.submit-page .lede { color: #333; font-size: 17px; line-height: 1.55; margin: 0 0 18px; }
.submit-form { display: flex; flex-direction: column; gap: 18px; padding: 24px; }
.submit-form .field { display: flex; flex-direction: column; gap: 4px; }
.submit-form label { font-weight: 600; font-size: 14px; }
.submit-form input[type="text"],
.submit-form input[type="email"],
.submit-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 16px;
  background: white;
  font-family: inherit;
}
.submit-form input:focus, .submit-form textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.submit-form .hint { color: var(--muted); font-size: 12px; margin: 2px 0 0; }
.submit-form .err { color: var(--accent); font-size: 13px; margin: 2px 0 0; font-weight: 600; }
.submit-form .actions { flex-direction: row; gap: 10px; align-items: center; }
.submit-form .btn.primary {
  background: var(--accent); color: white; border: 0;
  padding: 12px 22px; border-radius: 8px; font-size: 15px; cursor: pointer;
}
.submit-form .btn.primary:hover { filter: brightness(1.08); text-decoration: none; }
.submit-form .hp { display: none; }  /* honeypot */

.thanks-page h1 { margin-top: 0; }
.thanks-page ul { line-height: 1.8; }

/* Why-page long-form layout */
article.why { max-width: 740px; margin: 0 auto; padding: 16px 0; }
article.why h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 18px; }
article.why .lede { font-size: 18px; line-height: 1.55; color: #333; margin-bottom: 32px; }
article.why h2 { font-size: 22px; margin: 32px 0 10px; padding-top: 10px; border-top: 1px solid var(--line); }
article.why p, article.why ul { font-size: 16px; line-height: 1.65; color: #333; }
article.why ul { padding-left: 20px; }
article.why li { margin-bottom: 6px; }
article.why .cta-band { margin-top: 36px; }

footer { margin-top: 60px; padding: 36px 0 26px; border-top: 1px solid var(--line); color: var(--muted); background: white; }
footer .footer-cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px;
}
footer .footer-cols strong { color: var(--ink); display: block; font-size: 14px; margin-bottom: 8px; }
footer .footer-cols p { margin: 0; font-size: 13px; line-height: 1.5; }
footer .footer-links { list-style: none; padding: 0; margin: 0; }
footer .footer-links li { margin: 4px 0; }
footer .footer-links a { font-size: 13px; color: var(--muted); }
footer .footer-links a:hover { color: var(--ink); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 14px; }
