/* ============================================================
   BMSCE · TB Detection System
   Single-source dark theme.

   One background colour is used everywhere — preloader, landing
   and content views — so there is no two-tone hand-off at any
   transition. Depth comes from a graphite surface ramp and
   hairlines, never from a second background colour.

   Type is a two-family editorial system:
     Playfair Display  — display headings, italic for accents
     Inter             — everything functional, including labels

   Re-skin by changing --accent and its two derived values.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

:root {
  /* Graphite ramp — neutral, no blue cast */
  --bg: #0b0e11;
  --surface: #12161a;
  --surface-2: #171c21;
  --surface-3: #1e242a;

  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);

  --text: #eaeef1;
  --text-2: #a8b2ba;
  --text-3: #74808a;

  /* Single restrained accent — muted clinical teal */
  --accent: #5cb0a0;
  --accent-soft: rgba(92, 176, 160, .11);
  --accent-line: rgba(92, 176, 160, .32);

  --display: 'Playfair Display', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);

  --gut: clamp(22px, 4vw, 60px);

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.locked { overflow: hidden; }

::selection { background: var(--accent-line); color: #fff; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }

/* Display headings carry the editorial serif; accents go italic. */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -.015em;
  line-height: 1.06;
}

em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

/* Letterspaced sans labels read more couture than a monospace. */
.eyebrow {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--text-3);
  line-height: 1.5;
}

.eyebrow.accent { color: var(--accent); }

/* ---------- View switching ---------- */

.view { display: none; }
.view.active { display: flex; flex-direction: column; }
.landing-page.active { min-height: 100vh; min-height: 100dvh; }

/* ============================================================
   PRELOADER
   ============================================================ */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity .8s var(--ease), visibility .8s;
}

.preloader.done { opacity: 0; visibility: hidden; }

.pre-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
  transition: transform .8s var(--ease);
}

.preloader.done .pre-stage { transform: translateY(-14px) scale(.97); }

.loader-ring {
  position: relative;
  width: clamp(140px, 27vw, 190px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  animation: ring-in 1s var(--ease) both;
}

.ring-arc {
  position: absolute;
  inset: -1px;
  border: 1px solid transparent;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1.8s linear infinite;
}

.ring-arc.alt {
  inset: 12px;
  border-top-color: transparent;
  border-bottom-color: var(--line-2);
  animation: spin 2.9s linear infinite reverse;
}

.ring-pulse {
  position: absolute;
  inset: -15px;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  opacity: 0;
  animation: halo 2.6s var(--ease) infinite;
}

.loader-ring img {
  width: 63%;
  height: 63%;
  object-fit: contain;
  animation: logo-in 1.1s var(--ease) both .1s;
}

.reveal {
  display: block;
  animation: reveal-up .9s var(--ease) both;
  animation-delay: var(--d, 0s);
}

.preloader .eyebrow {
  margin-top: 2.6rem;
  letter-spacing: .34em;
  font-size: .74rem;
  color: var(--text-2);
}

.preloader h1 {
  font-size: clamp(2.4rem, 5.6vw, 3.9rem);
  font-weight: 400;
  letter-spacing: -.02em;
  margin: 1rem 0 .8rem;
}

.pre-sub {
  font-size: .88rem;
  font-weight: 300;
  letter-spacing: .06em;
  color: var(--text-3);
}

.pre-progress {
  position: absolute;
  left: 50%;
  bottom: clamp(46px, 9vh, 84px);
  transform: translateX(-50%);
  width: min(220px, 52vw);
  height: 1px;
  background: var(--line-2);
  overflow: hidden;
}

.pre-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform-origin: left;
  animation: fill 2.1s var(--ease) both;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ring-in { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: scale(1); } }
@keyframes logo-in { from { opacity: 0; transform: scale(.9); filter: blur(6px); } to { opacity: 1; transform: scale(1); filter: blur(0); } }
@keyframes halo { 0% { opacity: 0; transform: scale(.94); } 35% { opacity: .55; } 100% { opacity: 0; transform: scale(1.16); } }
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(14px); clip-path: inset(0 0 100% 0); }
  to { opacity: 1; transform: translateY(0); clip-path: inset(0 0 -14% 0); }
}
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ============================================================
   TOP BAR
   ============================================================ */

.topbar {
  flex: none;
  height: 88px;
  padding: 0 var(--gut);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.content-view .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 14, 17, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: 14px; }

.brand img { width: 42px; height: 42px; object-fit: contain; }

.brand-text {
  white-space: nowrap;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-2);
}

.brand i { font-style: normal; color: var(--text-3); padding: 0 6px; }
.brand .short { display: none; }

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}

.status b {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: blip 2.4s ease-in-out infinite;
}

@keyframes blip { 50% { box-shadow: 0 0 0 6px transparent; } }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-3);
  transition: color .25s var(--ease);
}

.back-btn span { display: inline-block; transition: transform .3s var(--ease); }
.back-btn:hover { color: var(--accent); }
.back-btn:hover span { transform: translateX(-4px); }

/* ============================================================
   SPLIT HERO
   ============================================================ */

.split-hero {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
}

.hero-half {
  position: relative;
  overflow: hidden;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  padding: var(--gut);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: background .5s var(--ease);
}

.hero-half:last-child { border-right: 0; }
.hero-half:hover, .hero-half:focus-visible { background: var(--surface); }

.hero-index {
  position: absolute;
  top: var(--gut);
  left: var(--gut);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .22em;
  color: var(--text-3);
}

.hero-glow, .hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s var(--ease);
}

.hero-glow { background: radial-gradient(56% 56% at 78% 14%, var(--accent-soft) 0%, transparent 70%); }

.hero-grid {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(62% 62% at 78% 14%, #000 0%, transparent 74%);
  mask-image: radial-gradient(62% 62% at 78% 14%, #000 0%, transparent 74%);
}

.hero-half:hover .hero-glow,
.hero-half:hover .hero-grid,
.hero-half:focus-visible .hero-glow,
.hero-half:focus-visible .hero-grid { opacity: 1; }

.hero-copy { position: relative; z-index: 2; display: block; }

.hero-copy .h2 {
  display: block;
  font-family: var(--display);
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  font-weight: 400;
  letter-spacing: -.022em;
  line-height: 1.02;
  margin: 22px 0 26px;
}

.hero-lead {
  display: block;
  max-width: 400px;
  font-size: 1.02rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--text-2);
}

.hero-half::after {
  content: '→';
  position: absolute;
  right: var(--gut);
  bottom: var(--gut);
  font-size: 1.5rem;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-8px);
  transition: transform .45s var(--ease), opacity .45s var(--ease);
}

.hero-half:hover::after,
.hero-half:focus-visible::after { opacity: 1; transform: translateX(0); }

/* ============================================================
   CONTENT VIEWS
   ============================================================ */

.content-wrap {
  width: min(1300px, 100%);
  margin: 0 auto;
  padding: clamp(50px, 6vw, 92px) var(--gut) clamp(72px, 9vw, 124px);
}

.split-wrap {
  display: grid;
  grid-template-columns: .84fr 1.16fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}

.view-title h2 {
  font-size: clamp(2.9rem, 6vw, 5.4rem);
  font-weight: 400;
  letter-spacing: -.022em;
  line-height: 1.04;
  margin: 22px 0 28px;
}

.view-title > p:last-child {
  max-width: 430px;
  color: var(--text-2);
  font-size: 1.02rem;
  font-weight: 300;
  line-height: 1.7;
}

/* ---------- Check-in card ---------- */

.checkin-card {
  max-width: 620px;
  padding: clamp(28px, 3.4vw, 48px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.checkin-card h3 {
  font-size: clamp(2.2rem, 3.8vw, 3.2rem);
  margin: 18px 0 18px;
}

.checkin-card > p:not(.eyebrow) {
  color: var(--text-2);
  font-size: .96rem;
  font-weight: 300;
  line-height: 1.65;
}

.checkin-card form { display: grid; gap: 24px; margin-top: 36px; }

.checkin-card label {
  display: block;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-3);
}

.checkin-card input,
.checkin-card select,
.checkin-card textarea {
  display: block;
  width: 100%;
  margin-top: 11px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  padding: 12px 0;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 300;
  outline: none;
  resize: vertical;
  transition: border-color .25s var(--ease);
}

.checkin-card input:focus,
.checkin-card select:focus,
.checkin-card textarea:focus { border-bottom-color: var(--accent); }

.checkin-card input::placeholder,
.checkin-card textarea::placeholder { color: var(--text-3); }

.checkin-card select { appearance: none; cursor: pointer; }
.checkin-card select option { background: var(--surface-2); color: var(--text); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }

.check {
  display: flex !important;
  gap: 12px;
  align-items: flex-start;
  font-size: .92rem !important;
  font-weight: 300 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--text-2);
  cursor: pointer;
}

.check input { width: auto; margin: 5px 0 0; accent-color: var(--accent); }

.primary-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  padding: 18px 22px;
  border-radius: 3px;
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}

.primary-btn:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #06201c; }
.primary-btn:disabled { cursor: default; opacity: .6; }
.primary-btn span { font-size: 1.1rem; }

/* ============================================================
   ABOUT THE PROJECT
   ============================================================ */

.about-wrap { display: block; }

.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 5vw, 80px);
  align-items: end;
  padding-bottom: clamp(44px, 5vw, 68px);
  border-bottom: 1px solid var(--line);
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.stat {
  background: var(--surface);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: background .3s var(--ease);
}

.stat:hover { background: var(--surface-2); }

.stat b {
  font-family: var(--display);
  /* Sized so the longest value ("DenseNet-121") stays on one line. */
  font-size: clamp(1.5rem, 2.3vw, 2.05rem);
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--accent);
  /* Playfair defaults to oldstyle figures; metrics want even lining ones. */
  font-variant-numeric: lining-nums tabular-nums;
}

.stat span {
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-3);
  line-height: 1.55;
}

.about-section { padding-top: clamp(52px, 6vw, 92px); }

.sec-head { margin-bottom: clamp(28px, 3vw, 44px); }

.sec-head h3 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  font-weight: 400;
  letter-spacing: -.02em;
  margin-top: 16px;
}

.sec-sub {
  margin-top: 14px;
  color: var(--text-3);
  font-size: .96rem;
  font-weight: 300;
}

/* ---------- Highlight chips ---------- */

.chip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.chip-grid li {
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent-line);
  border-radius: 3px;
  font-size: .95rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-2);
  transition: background .3s var(--ease), border-left-color .3s var(--ease), transform .3s var(--ease);
}

.chip-grid li:hover {
  background: var(--surface-2);
  border-left-color: var(--accent);
  transform: translateY(-2px);
}

.chip-grid b {
  display: block;
  margin-bottom: 9px;
  font-family: var(--display);
  font-size: 1.28rem;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--text);
}

/* ---------- Pipeline ---------- */

.pipeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.pipeline li {
  background: var(--surface);
  padding: 28px 20px 30px;
  font-size: .88rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-3);
  transition: background .3s var(--ease);
}

.pipeline li:hover { background: var(--surface-2); }

.pipeline .step {
  display: block;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--accent);
  margin-bottom: 18px;
}

.pipeline b {
  display: block;
  margin-bottom: 10px;
  font-family: var(--display);
  font-size: 1.24rem;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--text);
}

/* ---------- Model spec ---------- */

.spec-split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(26px, 3vw, 48px);
  align-items: start;
}

.spec-list li {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: .96rem;
  font-weight: 300;
  line-height: 1.6;
}

.spec-list li:first-child { padding-top: 0; }

.spec-list b {
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-top: 4px;
}

.spec-list span { color: var(--text-2); }

.metric-card {
  padding: clamp(24px, 2.8vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.metric-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: .96rem;
}

.metric-table th {
  text-align: right;
  padding: 0 0 14px;
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--line);
}

.metric-table th:first-child { text-align: left; }

.metric-table td {
  text-align: right;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
  font-weight: 400;
  font-variant-numeric: lining-nums tabular-nums;
}

.metric-table td:first-child { text-align: left; color: var(--text); }
.metric-table tr:last-child td { border-bottom: 0; }
.metric-table i { font-style: normal; color: var(--text-3); font-size: .82rem; margin-left: 8px; }

.metric-note {
  margin-top: 22px;
  font-size: .88rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-3);
  padding-left: 16px;
  border-left: 2px solid var(--accent-line);
}

/* ---------- Limitations ---------- */

.limit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.limit-grid li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: .98rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-2);
}

.limit-grid li::before { content: '—'; color: var(--accent); flex: none; }

/* ---------- Meet the team ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.person {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 44px 26px 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: background .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}

.person:hover {
  background: var(--surface-2);
  border-color: var(--line-2);
  transform: translateY(-3px);
}

/* Photo slot — falls back to initials when no image is supplied */
.avatar {
  position: relative;
  width: clamp(148px, 13vw, 184px);
  aspect-ratio: 1;
  border-radius: 50%;
  margin-bottom: 32px;
  overflow: hidden;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  transition: border-color .35s var(--ease);
}

.avatar::before {
  content: attr(data-initials);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 2.9rem;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--text-3);
  transition: color .35s var(--ease);
}

.avatar img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1) contrast(1.04);
  transition: filter .4s var(--ease);
}

.avatar img.no-photo { display: none; }

.person:hover .avatar { border-color: var(--accent-line); }
.person:hover .avatar::before { color: var(--accent); }
.person:hover .avatar img { filter: grayscale(0) contrast(1); }

.person .eyebrow { font-size: .66rem; letter-spacing: .22em; }

.person h4 {
  font-size: clamp(1.55rem, 2vw, 1.95rem);
  font-weight: 500;
  letter-spacing: -.015em;
  line-height: 1.2;
  margin: 14px 0 10px;
}

.usn {
  font-size: .8rem;
  font-weight: 400;
  letter-spacing: .09em;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.usn i { font-style: normal; color: var(--line-2); padding: 0 4px; }

.disclaimer {
  margin-top: clamp(52px, 6vw, 84px);
  padding-top: 30px;
  border-top: 1px solid var(--line);
  font-size: .88rem;
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: .02em;
  color: var(--text-3);
}

/* ---------- Scroll reveal ---------- */

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}

.reveal-on-scroll.in { opacity: 1; transform: none; }

/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 1080px) {
  .chip-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: repeat(3, 1fr); }
  .spec-split { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .split-wrap { grid-template-columns: 1fr; gap: 40px; }
  .checkin-card { max-width: none; }
}

@media (max-width: 900px) {
  html, body { font-size: 16px; }
  .about-intro { grid-template-columns: 1fr; align-items: start; gap: 34px; }

  /* Portrait tablets read better stacked than split. */
  .split-hero { grid-template-columns: 1fr; }
  .hero-half {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    min-height: 44vh;
  }
  .hero-half:last-child { border-bottom: 0; }
  .hero-half::after { opacity: 1; transform: none; }
  .hero-copy .h2 { font-size: clamp(2.9rem, 8vw, 4.6rem); }
}

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 720px) {
  html, body { font-size: 16px; }

  .topbar { height: 72px; }
  .brand img { width: 34px; height: 34px; }
  .brand-text { font-size: .64rem; letter-spacing: .12em; }
  .content-view .status { display: none; }
  .landing-page .status { font-size: .6rem; letter-spacing: .1em; }

  .hero-half { padding: 56px 24px 52px; min-height: 46vh; }
  .hero-index { top: 24px; left: 24px; }
  .hero-copy .h2 { font-size: clamp(2.8rem, 13vw, 4rem); margin: 16px 0 20px; }
  .hero-lead { font-size: .98rem; max-width: none; }
  .hero-half::after { right: 24px; bottom: 50px; }

  .stat-grid { grid-template-columns: 1fr 1fr; }
  .chip-grid, .limit-grid { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .spec-list li { grid-template-columns: 1fr; gap: 7px; }
  .spec-list b { padding-top: 0; }
  .team-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .person { padding: 34px 18px 30px; }
  .avatar { width: clamp(112px, 30vw, 150px); margin-bottom: 24px; }
  .avatar::before { font-size: 2.3rem; }
  .form-row { grid-template-columns: 1fr; }
  .metric-table { font-size: .88rem; }
}

@media (max-width: 480px) {
  .brand .long { display: none; }
  .brand .short { display: inline; }
  .brand i { padding: 0 5px; }

  /* One column, so the no-wrap USN + section line always has room. */
  .team-grid { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .pipeline { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   MOTION PREFERENCES
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal-on-scroll { opacity: 1; transform: none; }
}
