:root {
  --ink: #16182d;
  --muted: #687083;
  --paper: #f6f8fb;
  --surface: #ffffff;
  --line: #dce3ec;
  --teal: #0e9aa7;
  --teal-dark: #087782;
  --green: #18885a;
  --amber: #d88919;
  --coral: #e66a4e;
  --violet: #6157c8;
  --shadow: 0 20px 60px rgba(22, 24, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(246, 248, 251, 0.92);
  border-bottom: 1px solid rgba(220, 227, 236, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.brand img {
  width: 152px;
  height: auto;
}

.brand span {
  border-left: 1px solid var(--line);
  padding-left: 12px;
  color: var(--muted);
  font-size: 13px;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

main {
  width: min(1180px, calc(100vw - 36px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.7fr);
  align-items: center;
  gap: 32px;
  padding: 42px 0;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.96;
}

.hero-copy p {
  max-width: 690px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.actions,
.behavior-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

button,
.actions button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}

button.secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.signal-panel,
.band,
.adaptive {
  border: 1px solid rgba(220, 227, 236, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.signal-panel {
  padding: 22px;
}

.panel-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-status strong,
.panel-status small {
  display: block;
}

.panel-status small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.status-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 6px rgba(216, 137, 25, 0.14);
}

body[data-mode="human"] .status-light {
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(24, 136, 90, 0.14);
}

body[data-mode="review"] .status-light {
  background: var(--amber);
  box-shadow: 0 0 0 6px rgba(216, 137, 25, 0.14);
}

body[data-mode="bot"] .status-light {
  background: var(--violet);
  box-shadow: 0 0 0 6px rgba(97, 87, 200, 0.14);
}

dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-log {
  min-height: 138px;
  max-height: 210px;
  margin-top: 18px;
  overflow: auto;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.lane-note {
  margin-top: 14px;
  border: 1px solid rgba(14, 154, 167, 0.18);
  border-radius: 8px;
  background: rgba(14, 154, 167, 0.08);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  padding: 12px;
}

.event-log p {
  margin: 0 0 7px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.band {
  margin: 0 0 28px;
  padding: 32px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading h2 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.04;
}

.metric-grid,
.behavior-grid,
.idea-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.metric-grid article,
.idea-grid article {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
}

.metric-grid span {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-grid strong,
.idea-grid strong {
  display: block;
  margin-top: 18px;
  font-size: 24px;
}

.metric-grid p,
.idea-grid p,
.adaptive p {
  color: var(--muted);
  line-height: 1.55;
}

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

.behavior-grid button {
  min-height: 92px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  text-align: left;
}

.adaptive {
  margin-top: 18px;
  padding: 24px;
  box-shadow: none;
}

.adaptive h3 {
  margin: 0;
  font-size: 24px;
}

form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
}

form button {
  width: fit-content;
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .metric-grid,
  .idea-grid,
  .behavior-grid,
  form {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

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