:root {
  color-scheme: dark;
  --background: #11100e;
  --panel: #1c1a17;
  --panel-raised: #24211d;
  --border: #474139;
  --text: #f2eadc;
  --muted: #bdb3a4;
  --accent: #d89a43;
  --accent-strong: #f1b35c;
  --danger: #dc6b61;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(216, 154, 67, 0.12), transparent 30rem),
    var(--background);
  color: var(--text);
}

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

.site-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 3rem 0 2rem;
}

.logo {
  width: min(360px, 38vw);
  height: auto;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0.35rem; font-size: clamp(2rem, 5vw, 3.7rem); }
h2 { margin-bottom: 0; font-size: clamp(1.4rem, 3vw, 2rem); }

.site-header p,
.build-label,
small,
footer,
.operation-status {
  color: var(--muted);
}

.build-label { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

main {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
  gap: 1.25rem;
  align-items: start;
}

.card,
.notice {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel-raised), var(--panel));
  border-radius: 14px;
  padding: clamp(1rem, 3vw, 1.6rem);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
}

.notice { grid-column: 1 / -1; }
.notice p { margin-bottom: 0; color: var(--muted); }

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.4rem;
}

.eyebrow {
  margin-bottom: 0.3rem;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.privacy-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.field-grid,
.slider-grid {
  display: grid;
  gap: 1rem;
}

.compact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.checker-grid { grid-template-columns: 1.4fr 0.7fr; }
.slider-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1rem; }

label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #11100e;
  color: var(--text);
  padding: 0.72rem 0.78rem;
}

input[type="range"] { padding: 0; accent-color: var(--accent); }
input:focus,
select:focus,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.slider-label {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.7rem;
  align-items: center;
}
.slider-label input { grid-column: 1 / -1; }
.slider-value { color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

details {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
summary { cursor: pointer; color: var(--accent-strong); font-weight: 700; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.25rem;
}

button {
  border: 1px solid #e5a54c;
  border-radius: 8px;
  background: var(--accent);
  color: #1a1208;
  padding: 0.72rem 1rem;
  font-weight: 800;
  cursor: pointer;
}
button:hover:not(:disabled) { background: var(--accent-strong); }
button.secondary { background: transparent; color: var(--text); border-color: var(--border); }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.operation-status { margin-top: 1rem; }
.operation-status p { margin-bottom: 0; }
progress { width: 100%; height: 0.65rem; accent-color: var(--accent); }

pre {
  overflow: auto;
  max-height: 28rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0d0c0a;
  padding: 1rem;
  color: #e9dfce;
  font-size: 0.8rem;
  white-space: pre-wrap;
}

.error { color: var(--danger); }
.verified { color: #90d39b; }
.likely { color: #e9ca78; }

footer { padding: 1.5rem 0 3rem; font-size: 0.85rem; }
footer p { margin-bottom: 0; }

@media (max-width: 850px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .logo { width: min(430px, 100%); }
  main { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .compact-grid,
  .checker-grid,
  .slider-grid { grid-template-columns: 1fr; }
  .site-header { padding-top: 1.5rem; }
}
