:root {
  color-scheme: dark;
  --bg: #071316;
  --surface: #0c1d21;
  --surface-strong: #10272c;
  --line: #29474d;
  --text: #e9f3f1;
  --muted: #9eb7b3;
  --teal: #59e1c0;
  --yellow: #f2c84b;
  --red: #ff7f70;
  --orange: #ffb35c;
  --shadow: 0 18px 45px rgb(0 0 0 / 28%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 92% 3%, rgb(89 225 192 / 9%), transparent 28rem),
    linear-gradient(180deg, #08181b 0, var(--bg) 28rem);
}

button, input, select, textarea { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

a { color: var(--teal); }

a:hover { color: #9af3dd; }

.site-header, main, .site-footer {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.02em;
}

.brand-mark { color: var(--teal); }

.site-nav { display: flex; gap: 18px; }

.site-nav a { color: var(--muted); font-size: .9rem; }

main { padding-block: 44px 64px; }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, .55fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font: 700 .75rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 780px;
  margin-bottom: 14px;
  font-size: clamp(2.25rem, 6vw, 4.85rem);
  line-height: .96;
  letter-spacing: -.055em;
}

.lede {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.55;
}

.privacy-stamp {
  padding: 18px;
  border: 1px solid var(--line);
  background: rgb(12 29 33 / 70%);
  box-shadow: var(--shadow);
}

.privacy-stamp strong { display: block; margin-bottom: 6px; color: var(--yellow); }
.privacy-stamp span { color: var(--muted); font-size: .9rem; line-height: 1.45; }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.input-panel, .result-panel { min-width: 0; padding: clamp(20px, 3.2vw, 38px); }
.input-panel { border-right: 1px solid var(--line); background: #09191c; }

.panel-kicker {
  margin-bottom: 22px;
  color: var(--muted);
  font: 700 .74rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

label { display: block; margin-bottom: 8px; font-weight: 700; }
.field-hint { color: var(--muted); font-size: .82rem; font-weight: 400; }

textarea, input, select {
  width: 100%;
  border: 1px solid #36565c;
  border-radius: 0;
  color: var(--text);
  background: #061114;
  outline: none;
}

textarea:focus, input:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgb(89 225 192 / 14%); }

textarea {
  min-height: 174px;
  resize: vertical;
  padding: 14px;
  font: .92rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

input, select { height: 46px; padding: 0 12px; }

.field-grid {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 14px;
  margin-top: 18px;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.button {
  min-height: 44px;
  border: 1px solid var(--teal);
  padding: 10px 17px;
  color: #04231c;
  background: var(--teal);
  cursor: pointer;
  font-weight: 800;
}

.button:hover { filter: brightness(1.08); }
.button-secondary { border-color: var(--line); color: var(--text); background: transparent; }
.button:disabled { opacity: .45; cursor: not-allowed; }

.examples { margin-top: 26px; }
.examples h2 { margin-bottom: 10px; font-size: .85rem; color: var(--muted); }
.example-list { display: flex; flex-wrap: wrap; gap: 8px; }

.example-chip {
  border: 1px solid var(--line);
  padding: 7px 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: .78rem;
}

.example-chip:hover { border-color: var(--teal); color: var(--text); }

.status-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.status-row h2 { margin-bottom: 6px; font-size: 1.45rem; }
.status-row p { margin-bottom: 0; color: var(--muted); line-height: 1.45; }

.status-badge {
  flex: 0 0 auto;
  border: 1px solid currentColor;
  padding: 8px 10px;
  color: var(--teal);
  font: 800 .78rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .08em;
}

.status-badge[data-value="INVALID"] { color: var(--red); }
.status-badge[data-value="UNSUPPORTED"],
.status-badge[data-value="STALE"] { color: var(--yellow); }

.unknown-note {
  margin: -10px 0 24px;
  border-left: 3px solid var(--yellow);
  padding: 10px 12px;
  color: #e6dcae;
  background: rgb(242 200 75 / 7%);
  font-size: .88rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-bottom: 26px;
  background: var(--line);
  border: 1px solid var(--line);
}

.summary-card { min-width: 0; padding: 16px; background: var(--surface-strong); }
.summary-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.summary-value { margin-bottom: 5px; font-weight: 760; overflow-wrap: anywhere; }
.summary-note { margin-bottom: 0; color: var(--muted); font-size: .8rem; line-height: 1.4; }

.report-section { margin-top: 28px; }
.report-section h3 { margin-bottom: 12px; font-size: 1rem; }
.report-section > p { color: var(--muted); line-height: 1.5; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: .8rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); background: #081619; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.empty-cell { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.wrap { overflow-wrap: anywhere; }

.issue-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.issue { display: grid; gap: 4px; border-left: 3px solid var(--yellow); padding: 10px 12px; background: rgb(242 200 75 / 6%); font-size: .85rem; line-height: 1.45; }
.issue-error { border-color: var(--red); background: rgb(255 127 112 / 7%); }
.issue-danger { border-color: var(--orange); background: rgb(255 179 92 / 7%); }
.issue-ok { border-color: var(--teal); background: rgb(89 225 192 / 6%); color: var(--muted); }
.issue-code { color: var(--muted); font: 700 .7rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .05em; text-transform: uppercase; }

.code-block {
  display: block;
  min-height: 58px;
  border: 1px solid var(--line);
  padding: 13px;
  color: #c9fff2;
  background: #051012;
  font: .82rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.copy-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.copy-state { color: var(--muted); font-size: .78rem; }

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

.explain-card { border-top: 2px solid var(--line); padding: 16px 2px 0; }
.explain-card strong { display: block; margin-bottom: 7px; }
.explain-card p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }

.prose { max-width: 800px; }
.prose h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); }
.prose h2 { margin-top: 38px; font-size: 1.35rem; }
.prose p, .prose li { color: var(--muted); line-height: 1.7; }
.prose li + li { margin-top: 8px; }
.prose code { color: #c9fff2; }
.callout { margin: 28px 0; border-left: 3px solid var(--teal); padding: 16px 18px; background: var(--surface); }
.callout p:last-child { margin-bottom: 0; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-block: 24px 36px;
  color: var(--muted);
  font-size: .8rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 860px) {
  .intro, .workspace { grid-template-columns: 1fr; }
  .input-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .explain-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .site-header { align-items: flex-start; padding-block: 18px; }
  .site-nav { gap: 12px; }
  main { padding-top: 30px; }
  .intro { gap: 20px; }
  .field-grid, .summary-grid { grid-template-columns: 1fr; }
  .status-row { align-items: flex-start; }
  .site-footer { display: block; }
}

@media (prefers-reduced-motion: no-preference) {
  .button, .example-chip, a { transition: color 140ms ease, border-color 140ms ease, filter 140ms ease; }
}
