/* =======================================================================
   UCCS — project homepage stylesheet
   Palette: off-white #FAFAF7, navy #0A2F5C, teal #2C8C99, amber #E3A32B,
            text #1A1A1A, muted #555, panel #F2F1EC, border #E8E8E3.
   ======================================================================= */

:root {
  --bg:        #FAFAF7;
  --panel:     #F2F1EC;
  --border:    #E8E8E3;
  --text:      #1A1A1A;
  --muted:     #555555;
  --navy:      #0A2F5C;
  --navy-soft: #1E4C82;
  --teal:      #2C8C99;
  --teal-soft: #E1F1F3;
  --amber:     #E3A32B;
  --amber-soft:#FCF1D8;
  --code-bg:   #0F172A;
  --code-fg:   #E2E8F0;

  --radius:      12px;
  --radius-sm:   8px;
  --shadow-sm:   0 1px 2px rgba(10, 47, 92, 0.06);
  --shadow-md:   0 4px 12px rgba(10, 47, 92, 0.08);
  --shadow-lg:   0 12px 32px rgba(10, 47, 92, 0.12);
  --max-w:       1180px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Fira Code', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.mono { font-family: var(--font-mono); font-size: 0.93em; background: var(--panel); padding: 1px 6px; border-radius: 4px; }

/* =======================================================================
   NAV
   ======================================================================= */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.top-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand {
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--teal); text-decoration: none; }

/* =======================================================================
   HERO
   ======================================================================= */
.hero {
  padding: 64px 0 72px;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(44, 140, 153, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse at 95% 50%, rgba(227, 163, 43, 0.06) 0%, transparent 55%),
    linear-gradient(180deg, #FDFDFB 0%, var(--bg) 100%);
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.venue-tag {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 5px 12px;
  border-radius: 999px;
  margin: 0 0 20px 0;
  text-transform: uppercase;
}

.paper-title {
  font-size: clamp(28px, 4.2vw, 50px);
  line-height: 1.15;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 22px 0;
  letter-spacing: -0.01em;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.authors {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 18px;
  margin: 0 0 10px 0;
}
.authors .author { white-space: nowrap; }
.authors sup { color: var(--teal); font-weight: 600; }

.affiliations {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 20px;
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 26px 0;
}
.affiliations sup { color: var(--teal); }
.affiliations .note { color: var(--muted); font-style: italic; }

.affil-logos {
  display: flex;
  justify-content: center;
  gap: 36px;
  align-items: center;
  margin: 18px 0 32px;
  opacity: 0.95;
}
.affil-logos img {
  height: 44px;
  max-width: 220px;
  object-fit: contain;
  filter: saturate(0.9);
}

/* CTA buttons */
.cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--navy);
  font-weight: 600;
  font-size: 15px;
  padding: 11px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, border-color 120ms ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--navy-soft);
  text-decoration: none;
  color: var(--navy);
}
.btn.primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.btn.primary:hover { background: var(--navy-soft); color: #fff; }
.btn-icon { font-size: 16px; line-height: 1; }

/* =======================================================================
   SECTIONS
   ======================================================================= */
.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}
.section:last-of-type { border-bottom: 0; }

.section-title {
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--navy);
  font-weight: 700;
  margin: 0 0 18px 0;
  letter-spacing: -0.01em;
}

.section-lede,
.lede {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text);
  line-height: 1.7;
  max-width: 820px;
  margin: 0 0 32px 0;
}

.section-footnote {
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
  margin-top: 24px;
}

/* =======================================================================
   TL;DR take-home tiles
   ======================================================================= */
.takehome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.takehome {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--teal);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.takehome:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.takehome .tag {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 10px;
}
.takehome h3 {
  font-size: 17px;
  margin: 0 0 8px 0;
  color: var(--navy);
  line-height: 1.35;
}
.takehome h3 em { color: var(--teal); font-style: italic; }
.takehome p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

/* =======================================================================
   PROBLEM grid
   ======================================================================= */
.problem-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 24px 0 32px;
}
.problem-row {
  display: grid;
  grid-template-columns: 110px repeat(3, 1fr);
  gap: 10px;
  align-items: stretch;
}
.row-label {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  padding: 10px;
  border-radius: var(--radius-sm);
}
.row-label.natural { background: var(--teal-soft); color: var(--teal); }
.row-label.failure { background: var(--amber-soft); color: #8a6013; }

.problem-row figure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.problem-row figure img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #fff;
  padding: 8px;
}
.problem-row figcaption {
  padding: 6px 10px 8px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
}

/* Two-column helper */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; }
}

/* Metric boxes */
.metric-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.metric-box.accent { border-left: 3px solid var(--teal); }
.metric-box h4 {
  margin: 0 0 10px 0;
  font-size: 16px;
  color: var(--navy);
}
.metric-box ul { margin: 0 0 8px 16px; padding: 0; color: var(--muted); font-size: 15px; }
.metric-box li { margin: 4px 0; }
.metric-box p { margin: 6px 0 0 0; color: var(--muted); font-size: 14px; }
.metric-box .axis-note {
  font-size: 13px;
  color: var(--teal);
  font-weight: 600;
  background: var(--teal-soft);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  margin-top: 8px;
}
.metric-box .formula { margin: 10px 0; font-size: 15px; color: var(--text); }

/* Callout */
.callout {
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-top: 28px;
  font-size: 16px;
  line-height: 1.6;
}
.callout.amber {
  background: var(--amber-soft);
  border-left: 4px solid var(--amber);
  color: #5c420b;
}
.callout strong { color: #8a6013; }

/* =======================================================================
   METHOD
   ======================================================================= */
.method-figure {
  margin: 8px 0 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.method-figure img {
  width: 100%;
  height: auto;
  display: block;
}
.method-figure figcaption {
  color: var(--muted);
  font-size: 14px;
  margin-top: 14px;
  line-height: 1.6;
}

.formula-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.formula-block h4 {
  margin: 0 0 10px 0;
  font-size: 15px;
  color: var(--navy);
}
.formula-block .formula { font-size: 15px; }
.formula-block .caption { color: var(--muted); font-size: 14px; margin: 10px 0 0; }

.component-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.component {
  background: linear-gradient(180deg, #fff 0%, #F7F7F3 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.component h4 { margin: 0 0 6px 0; font-size: 15px; color: var(--navy); }
.component p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.55; }

/* =======================================================================
   RESULTS (tabs)
   ======================================================================= */
.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
  transition: color 120ms, border-color 120ms;
  font-family: var(--font-sans);
}
.tab:hover { color: var(--navy); }
.tab.active {
  color: var(--navy);
  border-bottom-color: var(--teal);
}
.tab-panel[hidden] { display: none; }

.result-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 860px) { .result-grid { grid-template-columns: 1fr; } }

.result-figure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.result-figure img { width: 100%; height: auto; display: block; }
.result-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.result-highlights { display: flex; flex-direction: column; gap: 12px; }
.delta {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
}
.delta-val {
  grid-row: 1 / span 2;
  font-size: 34px;
  font-weight: 700;
  color: var(--teal);
  align-self: center;
  line-height: 1;
}
.delta-val.up { color: var(--amber); }
.delta-label { font-size: 14px; color: var(--navy); font-weight: 600; }
.delta-note  { font-size: 13px; color: var(--muted); font-family: var(--font-mono); }

.result-note {
  font-size: 13.5px;
  color: var(--muted);
  font-style: italic;
  margin: 0;
  line-height: 1.55;
}

/* Mini table */
.mini-table {
  margin-top: 20px;
  border-collapse: collapse;
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}
.mini-table caption {
  caption-side: bottom;
  text-align: left;
  color: var(--muted);
  font-size: 12.5px;
  padding: 8px 12px;
  font-style: italic;
}
.mini-table th, .mini-table td {
  padding: 8px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.mini-table th {
  background: var(--panel);
  color: var(--navy);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.mini-table tbody tr:last-child td { border-bottom: 0; }
.mini-table tr.highlight td {
  background: var(--teal-soft);
  color: var(--navy);
}
.mini-table .check { color: var(--teal); font-weight: 700; }

/* =======================================================================
   ABLATIONS (accordion)
   ======================================================================= */
.accordion {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.accordion[open] { box-shadow: var(--shadow-md); }
.accordion summary {
  padding: 14px 20px;
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
  font-size: 16px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 100ms;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary:hover { background: var(--panel); }
.accordion summary::after {
  content: '+';
  margin-left: auto;
  color: var(--teal);
  font-size: 20px;
  font-weight: 300;
  transition: transform 150ms ease;
}
.accordion[open] summary::after {
  content: '−';
  transform: scale(1.05);
}
.accordion .ax-num {
  background: var(--navy);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.accordion-body {
  padding: 0 20px 20px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
}
.accordion-body figure { margin: 0; }
.accordion-body figure img {
  width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.accordion-body figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

/* =======================================================================
   BEYOND / APPENDIX HIGHLIGHTS
   ======================================================================= */
.subsection-title {
  margin: 32px 0 14px 0;
  font-size: clamp(17px, 1.8vw, 21px);
  color: var(--navy);
  font-weight: 700;
  letter-spacing: -0.005em;
  border-left: 3px solid var(--teal);
  padding-left: 12px;
}

.extra-model {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--navy-soft);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
}
.extra-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.extra-tag {
  font-weight: 700;
  color: var(--navy);
  font-size: 17px;
  letter-spacing: 0.01em;
}
.extra-kind {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.extra-model p {
  margin: 0;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.6;
}

.mech-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 16px;
}
.mech-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.mech-card h4 {
  margin: 0 0 10px 0;
  font-size: 17px;
  color: var(--navy);
}
.mech-card p { font-size: 15px; color: var(--text); line-height: 1.6; margin: 8px 0; }
.mech-card .mech-takeaway {
  background: var(--teal-soft);
  border-left: 3px solid var(--teal);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin: 12px 0;
  font-size: 14.5px;
}
.mech-card .mech-takeaway strong { color: var(--teal); }
.mech-card .mech-note {
  font-size: 13.5px;
  color: var(--muted);
  font-style: italic;
  margin-top: 8px;
}
.mech-card figure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.mech-card figure img {
  width: 100%;
  height: auto;
  display: block;
  padding: 6px;
  background: #fff;
}
.mech-card figcaption {
  padding: 6px 10px 8px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
}

/* =======================================================================
   GALLERY
   ======================================================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.gallery-item {
  margin: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  padding: 8px;
  background: #fff;
  display: block;
}
.gallery-item figcaption {
  padding: 6px 10px 8px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 47, 92, 0.88);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
  animation: fadein 180ms ease;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 82vh;
  background: #fff;
  border-radius: var(--radius);
  padding: 14px;
}
.lightbox-caption {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px;
  margin-top: 14px;
  letter-spacing: 0.02em;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}
.lightbox-close:hover { opacity: 1; }

/* =======================================================================
   LIMITATIONS
   ======================================================================= */
.limits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.limits li {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
  box-shadow: var(--shadow-sm);
}
.limits li strong { color: var(--navy); }

/* =======================================================================
   BIBTEX
   ======================================================================= */
.bibtex-wrap {
  position: relative;
  background: var(--code-bg);
  color: var(--code-fg);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-md);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  overflow: auto;
}
.bibtex-wrap pre {
  margin: 0;
  font-family: inherit;
  white-space: pre-wrap;
  word-break: break-word;
}
.copy-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.18); }
.copy-btn.copied { background: var(--teal); border-color: var(--teal); }

/* =======================================================================
   FOOTER
   ======================================================================= */
.site-footer {
  background: #0A2F5C;
  color: #CFD9E6;
  padding: 44px 0 22px;
  font-size: 14.5px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  padding-top: 0;
  padding-bottom: 28px;
}
.footer-grid h4 {
  color: #fff;
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.foot-links { list-style: none; padding: 0; margin: 0; }
.foot-links li { margin: 4px 0; }
.foot-links a, .site-footer a { color: #9FC4E8; }
.site-footer a:hover { color: #fff; }

.qr-strip {
  display: flex;
  gap: 10px;
}
.qr-strip figure {
  margin: 0;
  background: #fff;
  border-radius: 6px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.qr-strip img {
  width: 64px;
  height: 64px;
  display: block;
}
.qr-strip figcaption {
  font-size: 10.5px;
  color: var(--navy);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 18px;
}
.foot-bottom p {
  margin: 0;
  color: #7E9DC2;
  font-size: 13px;
  text-align: center;
}

/* =======================================================================
   Responsive polish
   ======================================================================= */
@media (max-width: 760px) {
  .top-nav .container { height: 56px; }
  .nav-links { display: none; }
  .nav-brand { font-size: 14px; }
  .hero { padding: 40px 0 52px; }
  .section { padding: 52px 0; }
  .affil-logos img { height: 32px; }
  .problem-row { grid-template-columns: 90px 1fr 1fr 1fr; }
  .problem-row figure img { height: 120px; }
  .gallery-item img { height: 150px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (max-width: 520px) {
  .problem-row { grid-template-columns: 1fr 1fr; }
  .problem-row .row-label { grid-column: 1 / -1; padding: 6px; font-size: 12px; }
  .cta { flex-direction: column; }
  .btn { justify-content: center; }
}

/* Prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Print (for "Print this page" accessibility) */
@media print {
  .top-nav, .cta, .copy-btn, #lightbox, .site-footer .qr-strip { display: none; }
  body { font-size: 11pt; }
  .section { padding: 24px 0; }
}
