:root {
  color-scheme: light;
  --ink: #15212b;
  --muted: #5a6875;
  --paper: #f7f4ef;
  --surface: #ffffff;
  --line: #d8d2c8;
  --teal: #0f8a8d;
  --teal-dark: #075f68;
  --rose: #c84f5f;
  --gold: #d89b22;
  --green: #3f8f5a;
  --shadow: 0 20px 60px rgba(21, 33, 43, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
}

.topbar {
  align-items: center;
  background: #15212b;
  color: #fff;
  display: flex;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 24px;
}

.brand {
  align-items: center;
  background: linear-gradient(135deg, #f1c65b, #e6665c);
  border-radius: 8px;
  color: #15212b;
  display: inline-flex;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  text-decoration: none;
  width: 72px;
}

nav {
  display: flex;
  gap: 6px;
}

nav a {
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  padding: 8px 10px;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  outline: none;
}

main {
  margin: 0 auto;
  max-width: 1240px;
  padding: 32px 20px 48px;
}

.intro {
  align-items: end;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 28px;
}

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

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

h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1;
  margin-bottom: 16px;
  max-width: 840px;
}

.intro p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 760px;
}

.pilot-path code {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--teal-dark);
  font-weight: 800;
  padding: 2px 6px;
}

.safety-strip {
  align-content: start;
  display: grid;
  gap: 8px;
  min-width: 180px;
}

.safety-strip span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--teal-dark);
  font-weight: 800;
  padding: 10px 12px;
}

.demo-shell {
  display: grid;
  gap: 20px;
  grid-template-columns: 320px minmax(0, 1fr);
}

.scenario-panel,
.workspace,
.input-grid article,
.result-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.scenario-panel {
  align-self: start;
  overflow: hidden;
}

.panel-heading,
.workspace-heading {
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.panel-heading p,
.workspace-heading p,
.input-grid p {
  color: var(--muted);
}

.scenario-list {
  display: grid;
  gap: 1px;
}

.family-tabs {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.family-tab {
  background: #f6fbfa;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--teal-dark);
  cursor: pointer;
  font-weight: 900;
  padding: 12px 10px;
}

.family-tab.active,
.family-tab:hover,
.family-tab:focus-visible {
  background: #dff0ed;
  outline: none;
}

.scenario-button {
  background: #fff;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 6px;
  padding: 14px 18px;
  text-align: left;
}

.scenario-button strong {
  font-size: 0.98rem;
}

.scenario-button span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: capitalize;
}

.scenario-button.active,
.scenario-button:hover,
.scenario-button:focus-visible {
  background: #e9f5f3;
  outline: none;
}

.workspace {
  overflow: hidden;
}

.workspace-heading {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

button#run-demo {
  background: var(--teal-dark);
  border: 0;
  border-radius: 7px;
  color: #fff;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 0.96rem;
  font-weight: 900;
  padding: 12px 16px;
}

button#run-demo:hover,
button#run-demo:focus-visible {
  background: var(--teal);
  outline: none;
}

.input-grid,
.result-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 18px;
}

.input-grid article,
.result-grid article {
  box-shadow: none;
  padding: 16px;
}

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

.score-row {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.score-row div {
  background: #15212b;
  color: #fff;
  display: grid;
  gap: 4px;
  padding: 16px 18px;
}

.score-row span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.score-row strong {
  font-size: 1.08rem;
}

.violation-list {
  display: grid;
  gap: 10px;
}

.violation {
  border-left: 4px solid var(--rose);
  display: grid;
  gap: 4px;
  padding-left: 10px;
}

.violation strong {
  color: var(--rose);
}

pre {
  background: #101820;
  border-radius: 7px;
  color: #edf7f6;
  margin: 0;
  max-height: 360px;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .intro,
  .demo-shell,
  .input-grid,
  .result-grid,
  .score-row {
    grid-template-columns: 1fr;
  }

  .workspace-heading {
    align-items: stretch;
    flex-direction: column;
  }

  button#run-demo {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  nav {
    flex-wrap: wrap;
  }

  main {
    padding: 24px 12px 36px;
  }
}
