:root {
  --bg: #07100c;
  --bg-2: #0d1913;
  --panel: rgba(10, 19, 15, 0.88);
  --panel-strong: #0d1814;
  --text: #e8f8ef;
  --muted: #a0b8ac;
  --line: rgba(142, 233, 173, 0.2);
  --mint: #8ee9ad;
  --moss: #4fb06e;
  --amber: #ffc46b;
  --rose: #ff9182;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --sans: "Azeret Mono", "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", "Cascadia Code", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(142, 233, 173, 0.14), transparent 30%),
    radial-gradient(circle at 84% 18%, rgba(255, 196, 107, 0.12), transparent 16%),
    linear-gradient(180deg, #040906 0%, #09110d 52%, #07100c 100%);
  color: var(--text);
  font-family: var(--sans);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(142, 233, 173, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(142, 233, 173, 0.02) 1px, transparent 1px);
  background-size: 100% 28px, 28px 100%;
  opacity: 0.45;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.topbar,
.hero-grid,
.story-grid,
.cta-band,
.compare-grid,
.lane-grid {
  display: grid;
  gap: 24px;
}

.topbar {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 28px;
}

.topbar-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.brand-lockup {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(142, 233, 173, 0.14), rgba(142, 233, 173, 0.04));
  color: var(--mint);
  font-family: var(--mono);
  font-size: 1.35rem;
  text-transform: lowercase;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  letter-spacing: -0.03em;
}

h1 {
  font-size: 1.25rem;
}

h2 {
  max-width: 10ch;
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 0.94;
}

h3 {
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.05;
}

h4 {
  font-size: 1.15rem;
  line-height: 1.2;
}

.lede,
.story-panel p,
.cta-band p,
.lane-card p,
.compare-copy {
  color: #c7ddd0;
  font-size: 1rem;
  line-height: 1.7;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  align-items: start;
}

.hero-copy {
  padding: 24px 4px 0 0;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-points span,
.decision-chip,
.posture-chip,
.example-signal,
.comparison-table,
.quiet-link,
.primary-link,
button,
input,
select,
textarea {
  border: 1px solid var(--line);
}

.hero-points span,
.decision-chip,
.posture-chip,
.example-signal {
  padding: 8px 12px;
  background: rgba(142, 233, 173, 0.08);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.console-panel,
.story-panel,
.example-card,
.cta-band,
.compare-card,
.comparison-table-wrap,
.lane-card,
.lane-band {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.console-panel,
.comparison-table-wrap,
.lane-band {
  padding: 20px;
}

.story-panel,
.example-card,
.compare-card,
.lane-card {
  padding: 18px;
}

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

.field-label,
.counter-line,
.example-copy,
.footer-note,
label,
table,
ol,
ul {
  font-family: var(--mono);
}

.field-label,
.counter-line,
.example-copy,
.footer-note,
label {
  color: var(--muted);
}

textarea,
input,
select {
  width: 100%;
  padding: 16px;
  background: rgba(6, 14, 10, 0.96);
  color: var(--text);
  font-size: 0.97rem;
  line-height: 1.6;
}

textarea {
  min-height: 220px;
  resize: vertical;
}

input,
select {
  min-height: 52px;
}

textarea:focus,
input:focus,
select:focus,
button:focus,
.example-tab:focus,
.primary-link:focus,
.quiet-link:focus {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.control-grid,
.action-row,
.status-row,
.cta-actions,
.lane-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.control-grid {
  margin-top: 14px;
}

.control-field {
  display: grid;
  gap: 8px;
  flex: 1 1 180px;
}

.action-row {
  margin-top: 16px;
}

.status-row {
  align-items: center;
  margin-top: 16px;
}

button,
.primary-link,
.quiet-link,
.signal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  background: rgba(11, 22, 16, 0.96);
  color: var(--text);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.86rem;
  cursor: pointer;
}

button:hover,
.primary-link:hover,
.quiet-link:hover,
.signal-link:hover {
  border-color: rgba(142, 233, 173, 0.44);
}

.ghost-button,
.quiet-link {
  background: rgba(11, 22, 16, 0.58);
}

.primary-link,
button {
  background: linear-gradient(180deg, rgba(142, 233, 173, 0.2), rgba(79, 176, 110, 0.14));
}

.signal-link {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--mint);
}

.decision-chip[data-verdict="close the loop and stop"] {
  background: rgba(255, 145, 130, 0.14);
  color: #ffd4ce;
}

.decision-chip[data-verdict="reply only if they re-open"] {
  background: rgba(255, 196, 107, 0.14);
  color: #ffe0ae;
}

.decision-chip[data-verdict="wait"] {
  background: rgba(142, 233, 173, 0.08);
  color: #d1f5dd;
}

.posture-chip {
  background: rgba(255, 196, 107, 0.12);
}

.decision-summary {
  margin-top: 10px;
  color: #dceee4;
  line-height: 1.6;
}

.decision-reasons,
.suggestions-panel ol,
.compare-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: #d2e6da;
  line-height: 1.7;
}

.meter-grid,
.story-grid,
.compare-grid,
.lane-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.meter-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meter-card {
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(8, 15, 11, 0.9);
}

.meter-card.warn {
  border-color: rgba(255, 196, 107, 0.35);
}

.meter-card.alert {
  border-color: rgba(255, 145, 130, 0.42);
}

.meter-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.meter-track {
  height: 9px;
  background: rgba(142, 233, 173, 0.08);
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--moss), var(--mint));
}

.meter-card.warn .meter-fill {
  background: linear-gradient(90deg, #d5a04f, var(--amber));
}

.meter-card.alert .meter-fill {
  background: linear-gradient(90deg, #da6654, var(--rose));
}

.examples-strip {
  margin-top: 28px;
}

.example-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.example-tab {
  min-height: 42px;
  padding: 0 14px;
  background: rgba(8, 15, 11, 0.82);
}

.example-tab.active {
  background: rgba(142, 233, 173, 0.16);
}

.example-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.9fr);
  gap: 18px;
}

.example-side {
  display: grid;
  gap: 12px;
  align-content: start;
}

.example-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lane-band,
.comparison-main {
  margin-top: 28px;
}

.lane-grid {
  display: grid;
  gap: 18px;
}

.featured {
  border-color: rgba(142, 233, 173, 0.4);
  background:
    linear-gradient(180deg, rgba(142, 233, 173, 0.09), rgba(8, 15, 11, 0.88)),
    rgba(10, 19, 15, 0.88);
}

.compare-card,
.lane-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.comparison-table-scroll {
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.comparison-table th,
.comparison-table td {
  padding: 14px;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--line);
}

.comparison-table th {
  background: rgba(142, 233, 173, 0.1);
}

.cta-band {
  margin-top: 28px;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 24px;
}

.footer-note {
  margin-top: 24px;
  text-align: center;
  font-size: 0.82rem;
}

code {
  font-family: var(--mono);
  color: var(--mint);
}

@media (max-width: 960px) {
  .hero-grid,
  .story-grid,
  .compare-grid,
  .lane-grid,
  .example-card,
  .cta-band {
    grid-template-columns: 1fr;
  }

  .meter-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .topbar-links {
    justify-content: flex-start;
  }
}

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

  .console-panel,
  .comparison-table-wrap,
  .lane-band,
  .story-panel,
  .example-card,
  .compare-card,
  .lane-card,
  .cta-band {
    padding: 16px;
  }

  h2 {
    font-size: clamp(2.5rem, 13vw, 4rem);
  }
}
