:root {
  --ink: #111111;
  --muted: #666666;
  --line: #dcdcd7;
  --paper: #ffffff;
  --surface: #f6f5f1;
  --accent: #1a73e8;
  --success: #188038;
  --warning: #b26a00;
  --danger: #b3261e;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.55;
}

.container {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  padding: 18px 0;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-weight: 750;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}

.header-nav {
  display: flex;
  gap: 6px;
}

.nav-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.nav-link.active,
.nav-link:hover {
  color: var(--ink);
  background: #eceae4;
}

.hero {
  padding: 84px 0 72px;
}

.hero-inner {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0 0 28px;
  font-size: 1.1rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.hero-features {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.hero-features li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  margin-right: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:hover {
  background: #000;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-small {
  padding: 8px 14px;
  font-size: 0.9rem;
}

.icon-btn {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.review {
  padding: 34px 0 70px;
}

.review-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.progress-step {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.progress-step.active {
  border-color: var(--ink);
  color: var(--ink);
  background: #eceae4;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

h2 {
  margin: 0 0 6px;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
}

h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

h4 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.hint {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.field-group {
  margin-bottom: 28px;
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--muted);
}

.optional::after {
  content: " · optional";
  font-weight: 500;
  color: #9a9a94;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(26, 115, 232, 0.25);
  border-color: var(--accent);
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.option-card,
.option-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfaf7;
  padding: 12px;
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.option-card:hover,
.option-chip:hover {
  border-color: var(--accent);
}

.option-card.selected,
.option-chip.selected {
  border-color: var(--accent);
  background: rgba(26, 115, 232, 0.07);
}

.option-card input,
.option-chip input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.custom-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-row input[type="radio"] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.experiment {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  background: #fbfaf7;
}

.experiment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.experiment-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--success);
}

.confidence-value {
  display: block;
  margin-top: 4px;
  font-weight: 700;
  color: var(--ink);
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.summary-view {
  padding: 40px 0 70px;
}

.summary-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.summary-sidebar {
  position: sticky;
  top: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.summary-actions {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.summary-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.summary-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.summary-title {
  margin: 0 0 22px;
  font-size: 1.5rem;
  line-height: 1.2;
}

.summary-block {
  margin-bottom: 22px;
}

.summary-label {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.summary-experiment {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}

.summary-experiment h4 {
  margin: 0 0 8px;
}

.summary-experiment p {
  margin: 0 0 6px;
}

.print-area {
  display: none;
}

.review-print {
  width: 210mm;
  min-height: 297mm;
  padding: 14mm;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.print-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 5mm;
  margin-bottom: 7mm;
}

.print-title {
  margin: 0 0 8mm;
  font-size: 1.4rem;
  line-height: 1.2;
}

.print-block {
  margin-bottom: 8mm;
}

.print-label {
  margin: 0 0 3mm;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.print-experiment {
  border-top: 1px solid var(--line);
  padding-top: 4mm;
  margin-top: 4mm;
}

.print-experiment h4 {
  margin: 0 0 2mm;
}

.print-experiment p {
  margin: 0 0 2mm;
  font-size: 0.88rem;
}

.print-foot {
  margin-top: auto;
  padding-top: 5mm;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--muted);
}

.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .option-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  .summary-layout {
    grid-template-columns: 1fr;
  }

  .summary-sidebar {
    position: static;
  }

  .review-print {
    width: 100%;
    min-height: auto;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  body {
    background: #fff;
  }

  .screen-only {
    display: none !important;
  }

  .print-area {
    display: block;
  }

  .review-print {
    width: auto;
    min-height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .print-head {
    border-bottom: 1px solid #000;
    color: #000;
  }

  .print-label {
    color: #444;
  }

  .print-foot {
    border-top: 1px solid #444;
    color: #444;
  }
}