:root {
  color-scheme: light;
  --ink: #151a17;
  --muted: #657068;
  --paper: #f4f6f2;
  --surface: #ffffff;
  --line: #d8ddd8;
  --green: #246b45;
  --signal: #d4513d;
  --dark: #111512;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 76px;
  padding: 0 6vw;
  display: flex;
  align-items: center;
  gap: 36px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 800; }
.brand-mark {
  width: 13px;
  height: 13px;
  background: var(--signal);
  border-radius: 50% 50% 45% 55%;
  transform: rotate(45deg);
  box-shadow: 8px 0 0 -3px #fff;
}
nav { display: flex; gap: 30px; margin-left: auto; font-size: 14px; }
nav a { border-bottom: 1px solid transparent; }
nav a:hover, nav a:focus-visible { border-color: currentColor; }
.theme-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: rgba(17, 21, 18, 0.2);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: min(780px, 90vh);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
  background: var(--dark);
}
.hero > img, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero > img { object-fit: cover; object-position: center 48%; }
.hero-shade {
  background: linear-gradient(90deg, rgba(11, 16, 12, 0.82) 0%, rgba(11, 16, 12, 0.42) 55%, rgba(11, 16, 12, 0.12) 100%), linear-gradient(0deg, rgba(11, 16, 12, 0.58), transparent 52%);
}
.hero-content { position: relative; z-index: 1; width: min(760px, 82vw); margin: 0 6vw 10vh; }
.eyebrow {
  margin: 0 0 16px;
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}
.eyebrow.dark { color: var(--green); }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 {
  margin: 0;
  max-width: 720px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 64px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: 0;
}
.hero-copy { max-width: 610px; margin: 22px 0 28px; color: rgba(255, 255, 255, 0.82); font-size: 17px; }
.primary-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  padding: 0 20px;
  background: #fff;
  color: var(--ink);
  border-radius: 4px;
  font-weight: 700;
}
.live-badge {
  position: absolute;
  z-index: 2;
  right: 6vw;
  bottom: 10vh;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
}
.live-badge span { width: 9px; height: 9px; border-radius: 50%; background: #58d68d; box-shadow: 0 0 0 5px rgba(88, 214, 141, 0.18); }

.notes-section { padding: 96px 6vw 110px; }
.section-heading {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 440px);
  gap: 48px;
  align-items: end;
  max-width: 1320px;
  margin: 0 auto 52px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.section-heading h2, .lab-copy h2 {
  margin: 0;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 44px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: 0;
}
.section-heading > p { margin: 0; color: var(--muted); }
.notes-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  max-width: 1320px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.notes-grid article { min-width: 0; padding: 34px; }
.notes-grid article + article { border-left: 1px solid var(--line); }
.lead-note { display: grid; grid-template-columns: 54px 1fr; gap: 22px; background: var(--surface); }
.note-number { color: var(--signal); font-family: Georgia, serif; font-size: 42px; line-height: 1; }
.note-meta { margin: 0 0 14px; color: var(--green); font-size: 12px; font-weight: 700; }
.notes-grid h3 { margin: 0 0 18px; font-family: Georgia, "Noto Serif SC", serif; font-size: 24px; line-height: 1.4; letter-spacing: 0; }
.notes-grid article > p:last-child, .lead-note p { color: var(--muted); }
.lead-note a { display: inline-block; margin-top: 12px; color: var(--green); font-weight: 700; }

.lab-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 8vw;
  padding: 100px 8vw;
  background: var(--dark);
  color: #fff;
}
.lab-copy > p:last-child { max-width: 650px; margin-top: 24px; color: #aeb9b0; }
.diagnostics { align-self: center; border-top: 1px solid #3a443d; }
.diagnostic-row { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #3a443d; }
.diagnostic-row span { color: #aeb9b0; }
.diagnostic-row strong { text-align: right; font-family: ui-monospace, "Cascadia Mono", monospace; font-size: 13px; }
.diagnostic-row .good { color: #7ee2a4; }
.good i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: currentColor; }
#runTest {
  width: 100%;
  min-height: 46px;
  margin-top: 24px;
  border: 1px solid #657168;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
#runTest:hover, #runTest:focus-visible { background: #fff; color: var(--dark); }
.test-result { min-height: 26px; margin: 12px 0 0; color: #aeb9b0; font-size: 13px; text-align: center; }
.quote-band { padding: 90px 10vw; background: var(--signal); color: #fff; }
blockquote { max-width: 1020px; margin: 0 auto; font-family: Georgia, "Noto Serif SC", serif; font-size: 36px; line-height: 1.5; }
footer { min-height: 120px; padding: 34px 6vw; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: #090b0a; color: #929b94; font-size: 13px; }
body.light-alternate { --paper: #f9f7f2; --surface: #fffdf8; --green: #195b5e; --signal: #b64032; }

@media (max-width: 900px) {
  .live-badge { top: 96px; right: 5vw; bottom: auto; }
  .notes-grid { grid-template-columns: 1fr 1fr; }
  .lead-note { grid-column: 1 / -1; }
  .notes-grid .note-item:first-of-type { border-left: 0; border-top: 1px solid var(--line); }
  .notes-grid .note-item:last-child { border-top: 1px solid var(--line); }
  .lab-section { grid-template-columns: 1fr; gap: 54px; }
}

@media (max-width: 620px) {
  .site-header { min-height: 64px; padding: 0 20px; gap: 16px; }
  nav { display: none; }
  .theme-button { margin-left: auto; }
  .theme-button { width: 34px; height: 34px; }
  .hero { min-height: 720px; }
  .hero-shade { background: linear-gradient(0deg, rgba(11, 16, 12, 0.88) 0%, rgba(11, 16, 12, 0.34) 80%); }
  .hero-content { width: auto; margin: 0 22px 58px; }
  h1 { font-size: 40px; }
  .hero-copy { font-size: 15px; }
  .live-badge { top: 84px; right: auto; left: 22px; }
  .notes-section { padding: 68px 20px 76px; }
  .section-heading { grid-template-columns: 1fr; gap: 18px; margin-bottom: 34px; }
  .section-heading h2, .lab-copy h2 { font-size: 34px; }
  .notes-grid { grid-template-columns: 1fr; }
  .notes-grid article { padding: 28px 22px; }
  .lead-note { grid-template-columns: 1fr; }
  .note-number { font-size: 30px; }
  .notes-grid article + article { border-left: 0; border-top: 1px solid var(--line); }
  .lab-section { padding: 72px 22px; }
  .diagnostic-row { min-height: 54px; }
  blockquote { font-size: 27px; }
  .quote-band { padding: 68px 22px; }
  footer { min-height: 130px; padding: 30px 22px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; }
  footer p { margin: 0; }
}

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