:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1c2333;
  --text-soft: #5b6478;
  --accent: #2f5fe0;
  --accent-soft: #e8eeff;
  --best: #e6f6ea;
  --best-text: #157a3a;
  --border: #e3e6ef;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 28px 0 22px;
}
.header-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
a.logo-link { color: inherit; text-decoration: none; }
.breadcrumb { margin: 18px 0 0; font-size: 14px; }
.controls.zone-controls {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.controls.zone-controls .control-group--years { flex: 0 0 320px; }
.zone-hint { flex: 1; min-width: 260px; margin: 0; }
.zone-pages h2 { margin-bottom: 10px; }
.zone-links a {
  display: inline-block;
  margin: 0 8px 8px 0;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
}
.zone-links a:hover { border-color: var(--accent); color: var(--accent); }
.header-date { margin: 4px 0 0; color: var(--text-soft); font-size: 14px; white-space: nowrap; }
@media (max-width: 640px) {
  .header-inner { flex-direction: column; gap: 4px; }
  .header-date { white-space: normal; }
}
.logo {
  display: flex;
  align-items: center;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #435259;
}
.logo span { color: #11a642; }
.logo-icon { width: 24px; height: 24px; flex: 0 0 24px; margin-right: 9px; }
@media (max-width: 640px) {
  .logo { font-size: 19px; }
  .logo-icon { width: 20px; height: 20px; flex-basis: 20px; }
}
.tagline { margin: 6px 0 0; color: var(--text-soft); }

.controls {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 24px 0;
}
.control-label { display: block; font-weight: 600; margin-bottom: 8px; }
#tld-search {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 10px;
}
#tld-search:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.tld-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tld-chips button {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.tld-chips button:hover { border-color: var(--accent); }
.tld-chips button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

#years { width: 100%; accent-color: var(--accent); }
.hint { font-size: 13px; color: var(--text-soft); margin: 8px 0 0; }

.results h1 { font-size: 24px; margin: 8px 0 4px; }
.updated { color: var(--text-soft); font-size: 14px; margin: 0 0 14px; }

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  cursor: pointer;
  user-select: none;
  background: #fafbfe;
}
th.sorted { color: var(--accent); }
th.num, td.num { text-align: right; }
td.num { font-variant-numeric: tabular-nums; }

.best-row { background: var(--best); }
.best-badge {
  display: inline-block;
  background: var(--best-text);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: 8px;
  vertical-align: middle;
}
.promo-badge {
  position: relative;
  display: inline-block;
  margin-right: 7px;
  padding: 1px 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  cursor: help;
  vertical-align: middle;
}
.promo-badge .tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: -10px;
  width: 240px;
  padding: 9px 12px;
  background: #1c2333;
  color: #fff;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.45;
  border-radius: 8px;
  white-space: normal;
  text-align: left;
  box-shadow: 0 6px 20px rgba(28, 35, 51, 0.25);
  z-index: 20;
}
.promo-badge .tip::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 24px;
  border: 6px solid transparent;
  border-top-color: #1c2333;
}
.promo-badge:hover .tip,
.promo-badge:focus .tip {
  display: block;
}
.reg-name { font-weight: 600; }
a.reg-name { color: inherit; text-decoration: none; }
a.reg-name:hover { color: var(--accent); text-decoration: underline; }
.manual-mark { color: #b26a00; font-size: 12px; cursor: help; }
.reg-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
}
.reg-link:hover { text-decoration: underline; }
.na { color: var(--text-soft); }

.note { font-size: 13px; color: var(--text-soft); margin: 10px 2px 0; }

.matrix-section { margin-top: 40px; }
.matrix-section h2, .faq h2 { font-size: 20px; }
.matrix-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 14px; }
.matrix-toggle button {
  border: none;
  background: var(--surface);
  padding: 7px 16px;
  font-size: 14px;
  cursor: pointer;
}
.matrix-toggle button.active { background: var(--accent); color: #fff; font-weight: 600; }
#matrix-table th:first-child, #matrix-table td:first-child { position: sticky; left: 0; background: var(--surface); }
#matrix-table thead th:first-child { background: #fafbfe; }
#matrix-table td.best-cell { background: var(--best); color: var(--best-text); font-weight: 700; }

.faq {
  margin: 40px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 20px 12px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  color: var(--text-soft);
  font-size: 13.5px;
  background: var(--surface);
}
.site-footer p { margin: 4px 0; }

@media (max-width: 760px) {
  .controls { grid-template-columns: 1fr; }
  th, td { padding: 10px 10px; }
}
