/* tldlist.us — TLD reference & comparison
   Clean, fast, developer-reference aesthetic. Light + dark friendly.
   Author: Mustafa Bilgic */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f8fa;
  --bg-sunken: #eef1f5;
  --surface: #ffffff;
  --border: #d8dee4;
  --border-strong: #c2cad3;
  --text: #1f2328;
  --text-soft: #57606a;
  --text-faint: #8b949e;
  --accent: #0a66c2;
  --accent-hover: #084d92;
  --accent-soft: #ddeaf7;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 8px;
  --radius-sm: 5px;
  --shadow: 0 1px 3px rgba(27, 31, 36, 0.08), 0 1px 2px rgba(27, 31, 36, 0.06);
  --shadow-lg: 0 8px 24px rgba(27, 31, 36, 0.12);
  --maxw: 1180px;
  --tag-g: #0969da;     /* gTLD */
  --tag-c: #1a7f37;     /* ccTLD */
  --tag-s: #8250df;     /* sTLD */
  --tag-bg-g: #ddf0ff;
  --tag-bg-c: #dbf6e3;
  --tag-bg-s: #efe3ff;
  --good: #1a7f37;
  --bad: #cf222e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --bg-alt: #161b22;
    --bg-sunken: #10151c;
    --surface: #161b22;
    --border: #30363d;
    --border-strong: #3d444d;
    --text: #e6edf3;
    --text-soft: #9da7b3;
    --text-faint: #6e7681;
    --accent: #4493f8;
    --accent-hover: #6cb0ff;
    --accent-soft: #11243b;
    --shadow: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
    --tag-g: #6cb0ff;
    --tag-c: #56d364;
    --tag-s: #c297ff;
    --tag-bg-g: #0d2942;
    --tag-bg-c: #0f2916;
    --tag-bg-s: #241334;
    --good: #56d364;
    --bad: #ff7b72;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

code, kbd, .mono { font-family: var(--mono); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--text);
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand .dot { color: var(--accent); font-family: var(--mono); }
.brand .logo {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  border-radius: var(--radius-sm);
  font-family: var(--mono); font-weight: 800; font-size: 0.9rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
}
.nav-links a:hover { color: var(--text); background: var(--bg-alt); text-decoration: none; }
.nav-search {
  position: relative;
  margin-left: 6px;
}
.nav-search input {
  width: 170px;
  padding: 7px 11px 7px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--mono);
  transition: width .15s, border-color .15s;
}
.nav-search input:focus { outline: none; width: 210px; border-color: var(--accent); background: var(--surface); }
.nav-search::before {
  content: "⌕";
  position: absolute;
  left: 9px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-size: 1.05rem;
  pointer-events: none;
}
.nav-toggle { display: none; }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-search input { width: 130px; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 46px 0 30px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(1200px 320px at 75% -40%, var(--accent-soft), transparent 70%);
}
.hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -1px;
  margin: 0 0 14px;
  font-weight: 800;
}
.hero h1 .mono { color: var(--accent); }
.lede {
  font-size: 1.12rem;
  color: var(--text-soft);
  max-width: 760px;
  margin: 0 0 18px;
}
.answer-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  box-shadow: var(--shadow);
}
.answer-box strong { color: var(--text); }
.answer-box p:last-child { margin-bottom: 0; }
.answer-box .lbl {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 22px;
}
.hero-stats .stat .n { font-size: 1.6rem; font-weight: 800; font-family: var(--mono); color: var(--text); }
.hero-stats .stat .l { font-size: 0.82rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.5px; }

/* ---------- Hero search (big) ---------- */
.bigsearch {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  max-width: 560px;
}
.bigsearch input {
  flex: 1;
  padding: 13px 16px;
  font-size: 1.05rem;
  font-family: var(--mono);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.bigsearch input:focus { outline: none; border-color: var(--accent); }

/* ---------- Toolbar (filters) ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 24px 0 14px;
}
.filter-group { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg-alt);
  color: var(--text-soft);
  transition: all .12s;
  user-select: none;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.result-count {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--text-faint);
  font-family: var(--mono);
}

/* ---------- Master table ---------- */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
table.tld-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 720px;
}
.tld-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-alt);
  text-align: left;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 11px 14px;
  border-bottom: 2px solid var(--border-strong);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.tld-table thead th:hover { color: var(--text); background: var(--bg-sunken); }
.tld-table thead th[aria-sort] .arrow::after { content: " ⇅"; color: var(--text-faint); font-size: 0.85em; }
.tld-table thead th[aria-sort="ascending"] .arrow::after { content: " ↑"; color: var(--accent); }
.tld-table thead th[aria-sort="descending"] .arrow::after { content: " ↓"; color: var(--accent); }
.tld-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.tld-table tbody tr:hover { background: var(--bg-alt); }
.tld-table tbody tr:last-child td { border-bottom: none; }
.tld-name {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  white-space: nowrap;
}
.tld-name a { color: inherit; }
.tld-meaning { color: var(--text); }
.tld-registry, .tld-examples { color: var(--text-soft); font-size: 0.88rem; }
.tld-price { font-family: var(--mono); white-space: nowrap; font-weight: 600; }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--mono);
  padding: 2px 8px;
  border-radius: 100px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.tag.g { color: var(--tag-g); background: var(--tag-bg-g); }
.tag.c { color: var(--tag-c); background: var(--tag-bg-c); }
.tag.s { color: var(--tag-s); background: var(--tag-bg-s); }
.no-results {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-faint);
}
.no-results code { background: var(--bg-alt); padding: 2px 6px; border-radius: 4px; }

/* ---------- Generic content ---------- */
main { padding: 8px 0 60px; }
.section { margin: 44px 0; }
.section > h2 {
  font-size: 1.5rem;
  letter-spacing: -0.4px;
  margin: 0 0 6px;
  font-weight: 800;
}
.section > h2 + .sub { color: var(--text-soft); margin-top: 0; }
h3 { font-size: 1.2rem; margin: 28px 0 8px; letter-spacing: -0.2px; }
p { margin: 0 0 14px; }
.content p, .content li { color: var(--text); }
.content ul, .content ol { padding-left: 22px; }
.content li { margin: 5px 0; }

.prose { max-width: 760px; }

/* ---------- Breadcrumbs ---------- */
.crumbs {
  font-size: 0.85rem;
  color: var(--text-faint);
  padding: 14px 0 0;
  font-family: var(--mono);
}
.crumbs a { color: var(--text-soft); }
.crumbs .sep { margin: 0 6px; }

/* ---------- TLD data card (detail page) ---------- */
.tld-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 30px 0 6px;
}
.tld-badge {
  font-family: var(--mono);
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  color: var(--accent);
  letter-spacing: -1px;
  line-height: 1;
}
.datacard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 18px 0 6px;
  box-shadow: var(--shadow);
}
.datacard .cell { background: var(--surface); padding: 14px 16px; }
.datacard .cell .k {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-faint); font-weight: 700; margin-bottom: 3px;
}
.datacard .cell .v { font-size: 1.02rem; color: var(--text); font-weight: 600; }
.datacard .cell .v.mono { font-family: var(--mono); }

/* pros / cons */
.proscons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 18px 0;
}
@media (max-width: 620px) { .proscons { grid-template-columns: 1fr; } }
.proscons .col {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px 14px;
  background: var(--surface);
}
.proscons h4 { margin: 0 0 8px; font-size: 1rem; }
.proscons ul { list-style: none; padding: 0; margin: 0; }
.proscons li { padding-left: 22px; position: relative; margin: 6px 0; }
.proscons .pros li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 800; }
.proscons .cons li::before { content: "✕"; position: absolute; left: 0; color: var(--bad); font-weight: 800; }

/* registrar buttons */
.registrars {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}
.reg-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: var(--shadow);
  transition: transform .1s, border-color .1s;
}
.reg-btn:hover { text-decoration: none; transform: translateY(-1px); border-color: var(--accent); }
.reg-btn .price { font-family: var(--mono); color: var(--accent); font-weight: 700; }
.reg-disclaimer { font-size: 0.8rem; color: var(--text-faint); margin-top: 4px; }

/* generic table inside content */
.content table.data, table.data {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.92rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
table.data th, table.data td { padding: 10px 13px; text-align: left; border-bottom: 1px solid var(--border); }
table.data th { background: var(--bg-alt); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.3px; color: var(--text-soft); }
table.data tr:last-child td { border-bottom: none; }
table.data td:first-child { font-family: var(--mono); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 10px 0;
  background: var(--surface);
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 800; font-size: 1.2rem; }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { background: var(--bg-alt); }
.faq details > div { padding: 0 18px 16px; color: var(--text-soft); }

/* ---------- Callout ---------- */
.callout {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  background: var(--bg-alt);
  padding: 14px 18px;
  border-radius: var(--radius);
  margin: 18px 0;
  font-size: 0.95rem;
}
.callout.note { border-left-color: var(--accent); }

/* ---------- Cross links / cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.xcard {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--surface);
  transition: border-color .12s, transform .1s;
}
.xcard:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.xcard .t { font-weight: 700; font-family: var(--mono); color: var(--accent); font-size: 1.05rem; }
.xcard .d { color: var(--text-soft); font-size: 0.88rem; margin-top: 4px; }

/* ---------- Ad slots ---------- */
.ad-slot {
  margin: 30px auto;
  text-align: center;
  min-height: 90px;
  max-width: 100%;
  overflow: hidden;
}
.ad-slot::before {
  content: "Advertisement";
  display: block;
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.ad-slot .adsbygoogle { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 40px 0 30px;
  margin-top: 50px;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 22px; } }
.site-footer h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-faint); margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--text-soft); }
.site-footer a:hover { color: var(--accent); }
.footer-brand .brand { margin-bottom: 8px; }
.footer-brand p { color: var(--text-faint); max-width: 360px; font-size: 0.88rem; }
.footer-bottom {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.84rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
}
.updated {
  font-size: 0.82rem;
  color: var(--text-faint);
  font-family: var(--mono);
}
.updated time { color: var(--text-soft); }

/* utility */
.muted { color: var(--text-faint); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
hr.div { border: none; border-top: 1px solid var(--border); margin: 36px 0; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 12px; top: 12px; background: var(--accent); color:#fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }

/* code blocks (data / dataset documentation page) */
.codeblock {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 12px 0 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text);
  -webkit-overflow-scrolling: touch;
}
.codeblock code { font-family: var(--mono); background: none; padding: 0; white-space: pre; }
.prose h3 { font-size: 1.05rem; font-weight: 600; margin: 18px 0 6px; }
