:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070b14;
  --bg-2: #0b1220;
  --elev: #10192b;
  --card: #121c30;
  --line: #22314d;
  --line-2: #2c3f63;
  --text: #eef3fb;
  --muted: #8ea0bc;
  --faint: #5d6f8c;
  --mint: #2ee6a6;
  --mint-dim: rgba(46, 230, 166, 0.14);
  --blue: #6b93ff;
  --blue-dim: rgba(107, 147, 255, 0.14);
  --gold: #ffc14d;
  --rose: #ff6b7d;
  --violet: #c084fc;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --header: rgba(7, 11, 20, 0.82);
  --input: #0a1322;
  --table: #0b1424;
  --th: #0e182a;
  --row: #0c1526;
  --glow-a: rgba(46, 230, 166, 0.08);
  --glow-b: rgba(107, 147, 255, 0.12);
  --grid: rgba(34, 49, 77, 0.35);
  --menu-hover: rgba(255, 255, 255, 0.04);
  --mark-ink: #042016;
  --radius: 16px;
  --max: 1120px;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --display: "Outfit", "Segoe UI", sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6fb;
  --bg-2: #e7eef8;
  --elev: #ffffff;
  --card: #ffffff;
  --line: #d5deec;
  --line-2: #c3d0e4;
  --text: #122033;
  --muted: #4d5d75;
  --faint: #6b7c94;
  --mint: #0b8a63;
  --mint-dim: rgba(11, 138, 99, 0.12);
  --blue: #2f4fd0;
  --blue-dim: rgba(47, 79, 208, 0.12);
  --gold: #9a6c00;
  --rose: #c2273d;
  --violet: #7c3aed;
  --shadow: 0 16px 40px rgba(18, 32, 51, 0.08);
  --header: rgba(243, 246, 251, 0.94);
  --input: #ffffff;
  --table: #ffffff;
  --th: #eef3fa;
  --row: #f8fbff;
  --glow-a: rgba(11, 138, 99, 0.1);
  --glow-b: rgba(47, 79, 208, 0.1);
  --grid: rgba(170, 186, 210, 0.45);
  --menu-hover: rgba(18, 32, 51, 0.05);
  --mark-ink: #042016;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 10% -10%, var(--glow-a), transparent 50%),
    radial-gradient(900px 420px at 100% 0%, var(--glow-b), transparent 46%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 20%, transparent 75%);
  z-index: 0;
}

a {
  color: var(--mint);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

.wrap {
  width: min(var(--max), calc(100% - 24px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
}

.skip:focus {
  left: 12px;
  z-index: 20;
  background: var(--mint);
  color: #042016;
  padding: 8px 12px;
  border-radius: 8px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  color: var(--faint);
  font-size: 12px;
  font-family: var(--mono);
  border-bottom: 1px solid var(--line);
}

.topbar span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: var(--header);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  position: relative;
}

.nav .menu {
  margin-left: auto;
}

.brand span:last-child {
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--mint), #1aa37a 55%, var(--blue));
  color: var(--mark-ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
}

.brand strong {
  display: block;
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: 0.01em;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-family: var(--mono);
}

.menu {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.menu a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 14px;
}

.menu a:hover,
.menu a.active {
  color: var(--text);
  background: var(--menu-hover);
  text-decoration: none;
}

.burger {
  display: none;
  background: var(--elev);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.hero {
  padding: 48px 0 24px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

h1 {
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  max-width: 18ch;
}

.lede {
  color: var(--muted);
  font-size: 18px;
  max-width: 62ch;
  margin: 0 0 28px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 18px;
}

.checker {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 10px;
}

input[type="text"],
select,
textarea {
  width: 100%;
  background: var(--input);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 14px 16px;
  font: 16px var(--sans);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px var(--mint-dim);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #43f0b4, #1dbe86);
  color: #042016;
  font-weight: 650;
  font-family: var(--display);
  cursor: pointer;
  min-width: 132px;
}

.btn:hover {
  filter: brightness(1.05);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-2);
}

.btn.small {
  padding: 8px 12px;
  min-width: 0;
  font-size: 13px;
}

.types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.types button {
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 11px;
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
}

.types button.on,
.types button:hover {
  color: var(--mint);
  border-color: rgba(46, 230, 166, 0.45);
  background: var(--mint-dim);
}

.status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: var(--gold);
  margin-right: 6px;
}

.dot.ok {
  background: var(--mint);
}

.dot.bad {
  background: var(--rose);
}

.results {
  margin: 22px 0 8px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.toolbar h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--table);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--th);
}

td.value {
  font-family: var(--mono);
  color: var(--mint);
  word-break: break-word;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  background: var(--blue-dim);
  color: var(--blue);
}

.empty,
.error,
.loading {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.error {
  color: var(--rose);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 36px 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.card h2,
.card h3 {
  font-family: var(--display);
  margin: 0 0 8px;
  font-size: 18px;
}

.card p,
.prose p {
  color: var(--muted);
  margin: 0 0 10px;
}

.card a.more {
  font-size: 13px;
}

.section {
  padding: 12px 0 40px;
}

.section h2 {
  font-family: var(--display);
  font-size: 28px;
  margin: 0 0 8px;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 10px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-family: var(--display);
}

.faq p {
  color: var(--muted);
  margin: 10px 0 0;
}

.prose {
  max-width: 78ch;
}

.prose h2,
.prose h3 {
  font-family: var(--display);
  margin-top: 28px;
}

.crumbs {
  color: var(--faint);
  font-size: 13px;
  margin: 18px 0 8px;
}

.crumbs a {
  color: var(--muted);
}

footer.site {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
  position: relative;
  z-index: 1;
}

.foot {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 20px;
}

.foot h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
  margin: 0 0 10px;
}

.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot a {
  color: var(--muted);
  display: inline-block;
  padding: 3px 0;
}

.copy {
  margin-top: 22px;
  color: var(--faint);
  font-size: 12px;
}

.map {
  display: grid;
  gap: 8px;
}

.row {
  display: grid;
  grid-template-columns: 160px 1fr 90px 90px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--row);
}

.row b {
  font-family: var(--display);
}

.ok {
  color: var(--mint);
}

.warn {
  color: var(--gold);
}

.bad {
  color: var(--rose);
}

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

.notice {
  background: var(--blue-dim);
  border: 1px solid var(--line-2);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 12px;
  margin: 12px 0 0;
  font-size: 14px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--elev);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
  min-height: 40px;
  min-width: 40px;
  touch-action: manipulation;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--mint);
  outline: none;
}

.theme-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: inset 4px -2px 0 0 var(--elev);
  flex: 0 0 14px;
}

html[data-theme="light"] .theme-icon {
  background: var(--gold);
  box-shadow: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

button,
.btn,
.types button,
.burger,
.theme-toggle {
  touch-action: manipulation;
}

@media (max-width: 1100px) {
  .burger {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }

  .nav .menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    width: min(280px, calc(100vw - 24px));
    margin-left: 0;
    background: var(--elev);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px;
    flex-direction: column;
    align-items: stretch;
    z-index: 20;
    box-shadow: var(--shadow);
  }

  .menu.open {
    display: flex;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
  }

  .foot {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .checker {
    grid-template-columns: 1fr 120px;
  }

  .checker .btn {
    grid-column: 1 / -1;
  }

  .row {
    grid-template-columns: 1fr 1fr;
  }

  h1 {
    max-width: none;
    font-size: clamp(28px, 8vw, 40px);
  }

  .hero {
    padding: 28px 0 16px;
  }

  .lede {
    font-size: 16px;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(var(--max), calc(100% - 16px));
  }

  .topbar span:last-child {
    display: none;
  }

  .checker,
  .grid,
  .foot,
  .row {
    grid-template-columns: 1fr;
  }

  .theme-label {
    display: none;
  }

  .brand small {
    display: none;
  }

  .panel {
    padding: 12px;
  }

  input[type="text"],
  select,
  .btn {
    min-height: 48px;
    font-size: 16px;
  }

  .types {
    gap: 6px;
  }

  .types button {
    min-height: 36px;
    padding: 8px 10px;
  }

  .table-wrap {
    margin-inline: -4px;
  }

  th,
  td {
    padding: 10px 8px;
    font-size: 13px;
  }
}
