:root {
  color-scheme: dark;
  --bg: #0c0e0f;
  --panel: #141719;
  --panel-2: #1a1f22;
  --line: #30373b;
  --text: #e8ecec;
  --muted: #9fa9ad;
  --accent: #e2b857;
  --accent-soft: rgba(226, 184, 87, 0.14);
  --danger: #ff8a65;
  --ok: #a6d189;
  --radius: 16px;
  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:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px;
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 48px;
}

.hero {
  max-width: 880px;
  margin-bottom: 28px;
}

.eyebrow,
.offline-badge,
.metric-label,
.wire-heading,
.era {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.lede {
  max-width: 720px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  line-height: 1.55;
}

.offline-badge {
  display: inline-block;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid rgba(226, 184, 87, 0.45);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
}

.panel {
  margin: 18px 0;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255,255,255,0.025), transparent 45%), var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.panel-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.panel-heading h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2.5vw, 1.65rem);
}

.status-light {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 18px rgba(166, 209, 137, 0.65);
}

.equation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.7fr) minmax(0, 1fr);
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

input,
select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f1213;
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

input:focus,
select:focus,
button:focus-visible,
pre:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(226, 184, 87, 0.14);
}

.style-picker {
  margin-top: 16px;
}

button {
  width: 100%;
  min-height: 54px;
  margin-top: 18px;
  border: 1px solid #f1ca72;
  border-radius: 10px;
  background: var(--accent);
  color: #14110a;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.06);
}

.error {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--danger);
  background: rgba(255, 138, 101, 0.08);
  color: #ffc2ae;
}

.era {
  color: var(--accent);
  font-size: 0.72rem;
  text-align: right;
}

.result-strip,
.metrics,
.curatorial-grid {
  display: grid;
  gap: 12px;
}

.result-strip {
  grid-template-columns: 0.6fr 1fr 1.2fr;
  margin-bottom: 12px;
}

.result-strip > div,
.metrics article,
.curatorial-grid article,
.authentication dl > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}

.result-strip > div,
.metrics article {
  padding: 16px;
}

.result-strip strong,
.metrics strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.result-strip strong {
  font-size: clamp(1.05rem, 2.5vw, 1.45rem);
}

.metrics {
  grid-template-columns: repeat(4, 1fr);
  margin: 12px 0;
}

.metric-label {
  color: var(--muted);
  font-size: 0.68rem;
}

.metrics strong {
  font-size: 1.45rem;
  color: var(--accent);
}

.wire-block {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #090b0c;
}

.wire-heading {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.66rem;
}

pre {
  max-height: 360px;
  margin: 0;
  padding: 18px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #d9dedf;
  font: 0.82rem/1.55 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.curatorial-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 12px;
}

.curatorial-grid article {
  padding: 18px;
}

.curatorial-grid h3 {
  margin-bottom: 9px;
  color: var(--accent);
  font-size: 0.9rem;
}

.curatorial-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.authentication dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 16px;
}

.authentication dl > div {
  padding: 16px;
}

.authentication dt {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.76rem;
}

.authentication dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-weight: 700;
}

.lifecycle {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #0e1112;
  color: var(--muted);
  font: 0.78rem/1.6 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

footer {
  padding: 14px 4px 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

footer code {
  color: var(--accent);
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 30px;
  }

  .equation-grid,
  .result-strip,
  .metrics,
  .curatorial-grid,
  .authentication dl {
    grid-template-columns: 1fr;
  }

  .panel-heading,
  .wire-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .era {
    text-align: left;
  }
}
