:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #07100e;
  color: #f4f8f6;
  --accent: #78f0b5;
  --muted: #a8b8b1;
  --panel: #101c19;
  --line: #284239;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 85% 8%, rgba(36, 159, 108, 0.22), transparent 30rem),
    linear-gradient(180deg, #091512 0%, #07100e 100%);
}

.site-header, main, footer { width: min(100% - 2rem, 70rem); margin-inline: auto; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.site-header p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.site-header-actions { display: flex; align-items: center; gap: 1rem; }
.site-header-actions a { color: var(--accent); font-size: 0.9rem; font-weight: 750; }
.brand { color: #fff; font-size: 1.1rem; font-weight: 800; letter-spacing: -0.03em; text-decoration: none; }
.brand span { color: var(--accent); }

main { display: grid; gap: 1rem; padding-block: clamp(2rem, 6vw, 5rem); }
.intro { max-width: 46rem; }
.eyebrow { margin: 0 0 0.65rem; color: var(--accent); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
h1, h2, h3 { letter-spacing: -0.035em; }
h1 { max-width: 13ch; margin: 0; font-size: clamp(2.4rem, 8vw, 5.3rem); line-height: 0.98; }
h2 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.6rem); }
.intro h2 { max-width: 13ch; font-size: clamp(2.4rem, 8vw, 5.3rem); line-height: 0.98; }
h3 { margin-top: 0; }
.lead { max-width: 39rem; margin: 1.4rem 0; color: #d7e1dc; font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.55; }
.privacy-note { max-width: 42rem; margin: 1.5rem 0; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 0.9rem; background: rgba(16, 28, 25, 0.72); color: var(--muted); line-height: 1.5; }
.privacy-note strong { color: #fff; }

.primary-button {
  min-height: 3.25rem;
  padding: 0.85rem 1.35rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #062118;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.primary-button:hover { background: #9af6ca; }
.primary-button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.primary-button:disabled { cursor: wait; opacity: 0.7; }
.camera-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.camera-secondary-button { min-height: 3.25rem; padding: 0.85rem 1.2rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: #fff; font: inherit; font-weight: 750; cursor: pointer; }
.camera-secondary-button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.status { min-height: 1.5rem; color: var(--muted); }

.panel { padding: clamp(1rem, 4vw, 2rem); border: 1px solid var(--line); border-radius: 1.25rem; background: rgba(16, 28, 25, 0.94); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.live-badge { padding: 0.35rem 0.55rem; border-radius: 0.35rem; background: #e54949; color: white; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.1em; }
video { display: block; width: 100%; max-height: 34rem; border-radius: 0.8rem; background: #020504; object-fit: contain; transform: scaleX(-1); }
.preview-caption { margin-bottom: 0; color: var(--muted); }
.result-panel { border-color: var(--line); }
.result-panel[data-outcome="ready"] { border-color: #3d8063; }
.result-panel[data-outcome="could_not_check"] { border-color: #b68a36; }
.result-panel[data-outcome="not_ready"] { border-color: #b95757; }
.result-action { max-width: 48rem; color: #d7e1dc; line-height: 1.55; }
.measurements { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin: 1.5rem 0; }
.measurements div, .engineering-report dl div { padding: 0.9rem; border: 1px solid var(--line); border-radius: 0.7rem; }
dt { color: var(--muted); font-size: 0.82rem; }
dd { margin: 0.35rem 0 0; font-weight: 750; overflow-wrap: anywhere; }
details { border-top: 1px solid var(--line); padding-top: 1rem; }
summary { width: fit-content; color: var(--accent); font-weight: 800; cursor: pointer; }
.engineering-report { padding-top: 1rem; line-height: 1.55; }
.engineering-report dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
code { color: var(--accent); }
footer { padding-block: 1rem 2rem; border-top: 1px solid var(--line); }
footer a { color: var(--muted); }

[hidden] { display: none !important; }

@media (max-width: 42rem) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .site-header-actions { align-items: flex-start; flex-direction: column; gap: 0.5rem; }
  .measurements, .engineering-report dl { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}