:root {
  color-scheme: light;
  --ink: #17201f;
  --muted: #66706d;
  --paper: #f4f5ef;
  --panel: #ffffff;
  --line: #d9ddd5;
  --green: #245c4d;
  --green-bright: #d9f36a;
  --blue: #2c4ee8;
  --orange: #f1a65a;
  --shadow: 0 18px 45px rgba(25, 38, 34, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 80% 0, rgba(217, 243, 106, 0.24), transparent 32rem), var(--paper); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }

.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 16px clamp(20px, 5vw, 72px); border-bottom: 1px solid rgba(23, 32, 31, .1); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 760; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; background: var(--ink); color: var(--green-bright); font-size: 12px; letter-spacing: .08em; }
.synthetic-badge, .status-pill { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: var(--muted); font-size: 12px; font-weight: 720; }

main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.hero { min-height: 430px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 48px; padding: 72px 0 54px; }
.eyebrow, .step-label { margin: 0 0 12px; color: var(--green); font-size: 12px; font-weight: 820; letter-spacing: .16em; text-transform: uppercase; }
h1 { max-width: 780px; margin: 0; font-size: clamp(44px, 7vw, 84px); line-height: .98; letter-spacing: -.055em; }
.hero-copy { max-width: 680px; margin: 28px 0 0; color: var(--muted); font-size: clamp(17px, 2vw, 21px); line-height: 1.55; }
.hero-metric { width: 190px; padding: 28px; border-radius: 28px; background: var(--green); color: white; transform: rotate(2deg); box-shadow: var(--shadow); }
.hero-metric span { color: var(--green-bright); font-size: 70px; font-weight: 800; line-height: 1; }
.hero-metric p { margin: 8px 0 0; line-height: 1.4; }

.stepper { position: sticky; top: 12px; z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 8px; margin-bottom: 22px; border: 1px solid rgba(23, 32, 31, .1); border-radius: 18px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(18px); box-shadow: 0 8px 25px rgba(23, 32, 31, .05); }
.stepper a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 720; }
.stepper a:hover, .stepper a:focus-visible { background: var(--paper); color: var(--ink); }
.stepper span { color: var(--green); }

.panel { margin: 0 0 22px; padding: clamp(24px, 5vw, 56px); border: 1px solid rgba(23, 32, 31, .1); border-radius: 28px; background: var(--panel); box-shadow: var(--shadow); scroll-margin-top: 92px; }
.panel.muted { background: #eef0e8; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading h2, .report-panel h2 { margin: 0; font-size: clamp(27px, 4vw, 42px); letter-spacing: -.035em; }
.status-pill.available { border-color: var(--green); background: #e2f0e9; color: var(--green); }
.status-pill.neutral { background: var(--paper); }
.section-copy { max-width: 760px; margin: -12px 0 30px; color: var(--muted); line-height: 1.6; }

label { display: grid; gap: 9px; color: #3d4745; font-size: 13px; font-weight: 760; }
textarea, input, select { width: 100%; border: 1px solid #cdd2c9; border-radius: 12px; background: white; color: var(--ink); outline: none; }
textarea { padding: 18px; resize: vertical; font-size: 17px; line-height: 1.5; }
input, select { min-height: 48px; padding: 0 13px; }
textarea:focus, input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(44, 78, 232, .11); }
.privacy-note { margin: 13px 0 0; padding: 12px 14px; border-radius: 10px; background: #f5f0e7; color: #68503c; font-size: 13px; line-height: 1.45; }
.button-row { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 22px; }
button { min-height: 48px; border-radius: 12px; padding: 0 20px; font-weight: 780; border: 1px solid transparent; }
button.primary { background: var(--ink); color: white; }
button.primary:hover:not(:disabled) { background: var(--green); }
button.secondary { border-color: #c7cbc4; background: transparent; color: var(--ink); }
button.secondary:hover:not(:disabled) { border-color: var(--ink); background: rgba(255, 255, 255, .55); }
.inline-status { min-height: 22px; margin: 15px 0 0; color: var(--muted); font-size: 14px; }
.inline-status.success { color: var(--green); }
.inline-status.error { color: #a03a32; }
.ai-contribution { margin-top: 12px; padding: 14px 16px; border: 1px solid #b9c9ff; border-radius: 12px; background: #eef2ff; color: #263c9c; font-size: 14px; line-height: 1.5; }
.ai-contribution strong { color: #172b82; }
label:has([aria-invalid="true"]) { color: #943930; }
[aria-invalid="true"] { border-color: #c85f52; background: #fff7f5; }

.field-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.option-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 28px; }
.option-card { position: relative; grid-template-columns: auto 1fr; align-items: flex-start; gap: 13px; padding: 19px; border: 1px solid #cbd0c7; border-radius: 16px; background: white; cursor: pointer; }
.option-card:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(44, 78, 232, .1); }
.option-card input { width: 19px; min-height: 19px; margin-top: 2px; accent-color: var(--blue); }
.option-content { display: grid; gap: 7px; }
.option-title { color: var(--ink); font-size: 17px; font-weight: 820; text-transform: capitalize; }
.option-details { color: var(--muted); font-size: 13px; font-weight: 540; }
.option-provenance { color: var(--blue); font-size: 12px; }
.confirm-button { width: 100%; margin-top: 18px; background: var(--blue); color: white; }
.no-options { grid-column: 1 / -1; padding: 18px; border-radius: 14px; background: white; color: var(--muted); }

.empty-state { display: grid; place-items: center; min-height: 250px; padding: 32px; border: 1px dashed #c8cec5; border-radius: 18px; color: var(--muted); text-align: center; }
.empty-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--paper); color: var(--green); font-size: 30px; }
.path-layout { display: grid; gap: 23px; }
.confirmed-summary { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; padding: 18px; border-radius: 16px; background: #e8f3ed; text-transform: capitalize; }
.confirmed-summary .check-mark { grid-row: 1 / span 2; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--green); color: white; }
.confirmed-summary small { color: var(--green); }
.path-layout h3 { margin: 0; font-size: 20px; }
.diagram { display: flex; align-items: center; gap: 10px; overflow-x: auto; padding: 26px; border-radius: 18px; background: var(--ink); }
.diagram-node { flex: 0 0 auto; padding: 13px 16px; border: 1px solid #5f6a67; border-radius: 11px; color: white; }
.diagram-arrow { color: var(--green-bright); font-size: 22px; }
.parts-list { display: grid; gap: 9px; }
.part-row { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 13px; }
.part-quantity { color: var(--blue); font-weight: 850; }
.part-row small, .provenance-line { color: var(--muted); }
.provenance-line { margin: 0; font-size: 13px; }
.evidence-warning { margin: 0; padding: 12px 14px; border-radius: 10px; background: #fff2dc; color: #764915; font-size: 13px; }

.report-panel { display: flex; align-items: center; justify-content: space-between; gap: 32px; background: var(--green); color: white; }
.report-panel .step-label { color: var(--green-bright); }
.report-panel p { max-width: 700px; margin: 12px 0 0; color: #dce8e2; line-height: 1.55; }
button.light { border-color: rgba(255, 255, 255, .5); color: white; flex: 0 0 auto; }
.report-result { display: grid; gap: 3px; color: var(--green-bright); font-size: 13px; }
footer { padding: 34px 20px 60px; color: var(--muted); text-align: center; font-size: 13px; }

dialog { width: min(560px, calc(100% - 28px)); border: 0; border-radius: 22px; padding: 28px; box-shadow: 0 30px 90px rgba(0, 0, 0, .25); }
dialog::backdrop { background: rgba(18, 27, 25, .62); backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.dialog-heading h2 { margin: 0; font-size: 25px; }
.dialog-heading button { min-height: 38px; padding: 0 12px; border: 0; background: var(--paper); font-size: 24px; }
#report-form { display: grid; gap: 16px; }
#report-form .button-row { justify-content: flex-end; }

@media (max-width: 820px) {
  .hero { min-height: 0; grid-template-columns: 1fr; padding: 60px 0 42px; }
  .hero-metric { display: none; }
  .field-grid { grid-template-columns: repeat(2, 1fr); }
  .option-grid { grid-template-columns: 1fr; }
  .report-panel { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .topbar { padding: 14px 16px; }
  .brand > span:last-child { font-size: 13px; }
  .synthetic-badge { display: none; }
  main { width: min(100% - 20px, 1120px); }
  h1 { font-size: 44px; }
  .stepper a { justify-content: center; padding: 11px 5px; font-size: 0; }
  .stepper a span { font-size: 12px; }
  .panel { padding: 24px 18px; border-radius: 22px; }
  .section-heading { flex-direction: column; gap: 14px; }
  .field-grid { grid-template-columns: 1fr; }
  .button-row button { width: 100%; }
  .part-row { grid-template-columns: 40px 1fr; }
  .part-row small { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
