:root {
  --paper: #f4f1ea;
  --ink: #111111;
  --muted: rgba(17, 17, 17, 0.62);
  --line: rgba(17, 17, 17, 0.14);
  --line-strong: rgba(17, 17, 17, 0.32);
  --panel: rgba(255, 255, 255, 0.56);
  --shadow: 0 24px 80px rgba(17, 17, 17, 0.12);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  background:
    radial-gradient(circle at top left, rgba(17, 17, 17, 0.1), transparent 28%),
    radial-gradient(circle at bottom right, rgba(17, 17, 17, 0.08), transparent 24%),
    var(--paper);
  color: var(--ink);
  font-family: "Georgia", "Times New Roman", serif;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

code,
pre {
  font-family: "SFMono-Regular", "Consolas", monospace;
}

.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.hero {
  padding: 18px 0 28px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.panel-kicker,
.status-label {
  margin: 0 0 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: "Helvetica Neue", "Arial Narrow", Arial, sans-serif;
}

.hero h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(3.2rem, 8vw, 7rem);
  line-height: 0.92;
  font-weight: 700;
}

.lede {
  max-width: 60ch;
  margin: 18px 0 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}

.status-grid,
.controls {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wide {
  grid-column: 1 / -1;
}

.panel,
.status-card {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.status-card {
  padding: 22px;
}

.status-value {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.2;
}

.panel {
  padding: 24px;
}

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

.panel-heading h2 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1;
}

.toggle,
.slider-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.toggle:first-of-type,
.slider-group {
  border-top: 0;
}

.toggle input {
  width: 22px;
  height: 22px;
  accent-color: var(--ink);
}

.slider {
  width: 100%;
  accent-color: var(--ink);
}

.outline-button,
.pulse-button {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 16px 18px;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.outline-button:hover,
.pulse-button:hover,
.outline-button:focus-visible,
.pulse-button:focus-visible {
  transform: translateY(-2px);
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 14px 30px rgba(17, 17, 17, 0.18);
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.pulse-button {
  min-height: 118px;
  padding: 18px;
  border-radius: 22px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pulse-button strong {
  display: block;
  font-size: 1.15rem;
}

.pulse-button span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.pulse-button.is-active {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px) scale(0.99);
}

.pulse-button.is-active span {
  color: rgba(244, 241, 234, 0.72);
}

.notes {
  margin-top: 18px;
}

#pattern-readout {
  margin: 0;
  min-height: 120px;
  padding: 18px;
  overflow: auto;
  background: rgba(17, 17, 17, 0.04);
  border-radius: 18px;
  border: 1px solid var(--line);
  line-height: 1.6;
  font-size: 0.95rem;
  white-space: pre-wrap;
}

@media (max-width: 860px) {
  .status-grid,
  .controls {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(100vw - 22px, 1120px);
    padding-top: 24px;
  }

  .panel,
  .status-card {
    padding: 18px;
    border-radius: 22px;
  }

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

  .hero h1 {
    max-width: 12ch;
  }
}
