:root {
  color-scheme: light;
  --background: #ffffff;
  --surface: #f7f9fc;
  --surface-strong: #eef3f8;
  --text: #17202a;
  --muted: #647084;
  --border: #dce4ee;
  --blue: #306998;
  --blue-dark: #245579;
  --yellow: #ffd43b;
  --green: #287d46;
  --shadow: 0 18px 50px rgba(23, 32, 42, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
textarea,
input {
  font: inherit;
}

.site-header {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
}

.brand,
.experiment-links a,
.actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 0.96rem;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.experiment-links a:hover strong {
  color: var(--blue);
}

.site-header,
main {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: 620px;
  padding: 86px 0 72px;
  display: grid;
  place-items: center;
  gap: 52px;
}

.hero-copy {
  max-width: 780px;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero p {
  max-width: 640px;
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.7;
}

.runtime-panel {
  width: min(820px, 100%);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface) 100%);
  box-shadow: var(--shadow);
}

.runtime-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.runtime-heading h2 {
  margin: 0;
  font-size: 1rem;
}

.runtime-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.runtime-grid {
  margin: 0;
  padding-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.runtime-grid div {
  min-width: 0;
}

.runtime-grid dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.runtime-grid dd {
  margin: 8px 0 0;
  font-size: 1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.experiment-links {
  margin: 8px 0 84px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--border);
}

.experiment-links a {
  gap: 18px;
  min-height: 112px;
  padding: 24px;
  background: white;
}

.experiment-links span,
.section-number {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
}

.experiment-links strong {
  display: block;
  margin-bottom: 6px;
}

.experiment-links small {
  display: block;
  color: var(--muted);
  line-height: 1.5;
}

.experiment {
  padding: 88px 0;
  display: grid;
  grid-template-columns: minmax(250px, 0.7fr) minmax(760px, 1fr);
  gap: 48px;
  border-top: 1px solid var(--border);
}

.section-copy {
  position: sticky;
  top: 32px;
  align-self: start;
}

.section-copy h2 {
  margin: 10px 0 16px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0;
}

.section-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-copy .caveat {
  margin-top: 16px;
  font-size: 0.94rem;
}

.package-list {
  margin-top: 22px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.package-list strong {
  color: var(--text);
  font-size: 0.74rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.package-list span {
  display: block;
}

.workbench {
  display: grid;
  gap: 16px;
}

textarea,
pre,
.file-drop,
canvas,
.probe-panel,
.probe-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

canvas {
  width: 100%;
  aspect-ratio: 760 / 420;
  display: block;
  background: white;
}

textarea,
pre {
  width: 100%;
  margin: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.6;
}

textarea {
  min-height: 190px;
  padding: 20px;
  color: var(--text);
  resize: vertical;
}

pre {
  min-height: 150px;
  padding: 20px;
  color: #26313f;
  white-space: pre-wrap;
  overflow: auto;
}

.actions {
  gap: 14px;
  flex-wrap: wrap;
}

button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
}

button.secondary-button {
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
}

button:hover {
  background: var(--blue-dark);
}

button.secondary-button:hover {
  border-color: var(--blue);
  background: var(--surface);
  color: var(--blue);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.actions span {
  color: var(--muted);
  font-size: 0.9rem;
}

.probe-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.probe-panel h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.probe-panel p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.probe-controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.probe-controls label {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
}

.probe-controls span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.probe-controls input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-weight: 800;
}

.probe-controls small {
  color: var(--muted);
  font-size: 0.76rem;
}

.probe-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.probe-card {
  min-height: 116px;
  padding: 14px;
  background: white;
}

.probe-card h4 {
  margin: 0;
  color: var(--blue);
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.probe-card strong {
  display: block;
  margin-top: 12px;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.probe-card span {
  display: block;
  margin-top: 10px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
}

.probe-card.failed span {
  color: #b54747;
}

.file-drop {
  display: grid;
  gap: 8px;
  padding: 24px;
  cursor: pointer;
}

.file-drop span {
  font-weight: 800;
}

.file-drop small {
  color: var(--muted);
  line-height: 1.5;
}

#csv-file {
  max-width: 100%;
}

.ready {
  color: var(--green) !important;
}

@media (max-width: 1100px) {
  .site-header,
  .runtime-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: auto;
    padding: 52px 0 56px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 12vw, 3.2rem);
  }

  .runtime-grid,
  .experiment-links,
  .experiment,
  .probe-controls,
  .probe-grid {
    grid-template-columns: 1fr;
  }

  .experiment {
    gap: 32px;
    padding: 64px 0;
  }

  .section-copy {
    position: static;
  }
}
