@font-face {
  font-family: "Syne";
  src: url("../../fonts/syne-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Syne";
  src: url("../../fonts/syne-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../../fonts/source-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../../fonts/source-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../../fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../../fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0b0b0c;
  --panel: #141416;
  --line: #2c2a26;
  --paper: #f4efe4;
  --dim: #cfc6b4;
  --mute: #8a8376;
  --gold: #c9a227;
  --gold-2: #e8c547;
  --input: #fff6d8;
  --ink-text: #161409;
  --red: #d46757;
  --green: #6fbf8b;
  --focus: #e8c547;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-2); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.demo-banner {
  background: #1c1c1f;
  border-bottom: 1px solid var(--line);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0.55rem 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.demo-banner a { color: var(--paper); text-decoration: none; }
.demo-banner a:hover { color: var(--gold-2); }

.wrap { width: min(980px, calc(100% - 2rem)); margin: 2rem auto 3rem; }

header h1 {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.4rem;
}
.lede { color: var(--dim); margin: 0 0 1.75rem; max-width: 40rem; }

.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1.2rem 1.2rem 1.3rem;
}

.card h2 {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin: 0 0 1rem;
}

label {
  display: block;
  font-size: 0.82rem;
  color: var(--dim);
  margin: 0 0 0.3rem;
}
.field { margin: 0 0 0.85rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

input, select {
  width: 100%;
  background: var(--input);
  color: var(--ink-text);
  border: 1px solid transparent;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.95rem;
  padding: 0.55rem 0.6rem;
}
input:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 0; }

.hint { font-size: 0.78rem; color: var(--mute); margin-top: 0.25rem; }

.results { display: grid; gap: 0.65rem; }
.stat {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}
.stat .k { color: var(--mute); font-size: 0.88rem; }
.stat .v {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 1rem;
  font-weight: 500;
}
.hero-stat .v { font-size: 1.55rem; color: var(--gold-2); }

.warn, .ok {
  margin-top: 0.9rem;
  font-size: 0.88rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
}
.warn { color: var(--red); border-color: #5a2e28; }
.ok { color: var(--green); border-color: #1e3a2a; }

.fine {
  margin-top: 1.5rem;
  color: var(--mute);
  font-size: 0.8rem;
  max-width: 46rem;
}

@media (max-width: 760px) {
  .layout, .row { grid-template-columns: 1fr; }
}
