/* =========================================================
   ECE 499 Capstone / Thermal Anomaly Detection
   Style guide derived from the "*thermal" poster:
   cream paper, heavy black grotesk, molten orange gradients.
   ========================================================= */

:root {
  /* Paper + ink */
  --cream:      #fdf4e0;
  --cream-2:    #f7ead1;
  --ink:        #0a0a0c;
  --ink-soft:   #33312c;
  --ink-mute:   #7a746a;
  --rule:       rgba(10, 10, 12, 0.14);

  /* Thermal ramp (cold -> hot) */
  --t-000:      #2b1d5c;
  --t-030:      #8f1d4e;
  --t-050:      #e8341a;
  --t-070:      #ff6a00;
  --t-085:      #ffa000;
  --t-100:      #ffd426;

  --flame: linear-gradient(100deg, var(--t-050) 0%, var(--t-070) 38%, var(--t-085) 66%, var(--t-100) 100%);

  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 72px);

  --mono: "Space Grotesk", ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* ---------------------------------------------------------
   Reset
   --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote, table { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv05";
}

/* Subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ---------------------------------------------------------
   Type primitives
   --------------------------------------------------------- */
.tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.display {
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.88;
  text-transform: lowercase;
}

.serif-note { font-style: italic; color: var(--ink-mute); }

/* ---------------------------------------------------------
   Top bar
   --------------------------------------------------------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px var(--gutter);
  background: rgba(253, 244, 224, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.topbar.is-stuck { border-bottom-color: var(--rule); }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark {
  width: 26px; height: 26px;
  border-radius: 5px;
  background: var(--flame);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 15px; line-height: 1;
  transform: skewX(-9deg);
}
.brand__mark span { transform: skewX(9deg) translateY(1px); }
.brand__name { font-weight: 700; letter-spacing: -0.02em; font-size: 15px; }
.brand__div { color: var(--rule); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.nav a {
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--t-070); }
.nav a.is-active { color: var(--ink); border-bottom-color: var(--t-050); }

.nav__cta {
  border: 1.5px solid var(--ink) !important;
  border-radius: 999px;
  padding: 7px 15px !important;
  background: var(--ink);
  color: var(--cream) !important;
  transition: background .2s, color .2s;
}
.nav__cta:hover { background: transparent; color: var(--ink) !important; }

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 1.5px solid var(--ink);
  background: transparent;
  border-radius: 8px;
  padding: 7px 11px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  cursor: pointer;
}

/* ---------------------------------------------------------
   Layout
   --------------------------------------------------------- */
main { position: relative; z-index: 2; }

.section {
  padding: clamp(72px, 9vw, 128px) var(--gutter);
  border-top: 1px solid var(--rule);
  position: relative;
}
.section--alt { background: var(--cream-2); }
.wrap { max-width: var(--maxw); margin: 0 auto; }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: end;
  margin-bottom: clamp(40px, 5vw, 68px);
}
.section-head__title {
  font-size: clamp(40px, 6.4vw, 82px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.9;
  text-transform: lowercase;
}
.section-head__title .ast { color: var(--t-050); }
.section-head__lede { font-size: clamp(16px, 1.35vw, 19px); color: var(--ink-soft); max-width: 62ch; }
.section-num {
  font-family: var(--mono);
  font-size: 11px; font-weight: 700; letter-spacing: .18em;
  color: var(--ink-mute);
  display: block;
  margin-bottom: 18px;
}

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px var(--gutter) 44px;
  overflow: hidden;
}

.hero__meta {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  color: var(--ink-soft);
  margin-bottom: clamp(28px, 5vh, 56px);
  position: relative; z-index: 3;
}
.hero__meta span:first-child { color: var(--t-050); }

.hero__inner { position: relative; z-index: 3; max-width: 1100px; }

.hero__word {
  font-size: clamp(96px, 24vw, 340px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.8;
  text-transform: lowercase;
  position: relative;
  display: inline-block;
  /* the molten halo from the poster */
  filter:
    drop-shadow(0 0 12px rgba(255, 106, 0, .55))
    drop-shadow(0 0 42px rgba(232, 52, 26, .38))
    drop-shadow(0 0 96px rgba(255, 160, 0, .3));
}

.hero__sub {
  margin-top: clamp(20px, 3vw, 34px);
  font-size: clamp(19px, 2.15vw, 32px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.18;
  max-width: 22ch;
}
.hero__sub em { font-style: normal; background: var(--flame); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.hero__name {
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: .14em;
  padding-left: 14px;
  border-left: 3px solid var(--t-050);
  max-width: 46ch;
  line-height: 1.6;
}
.hero__name strong { color: var(--ink); }

.hero__desc {
  margin-top: 22px;
  max-width: 54ch;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.2vw, 17px);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero__foot {
  position: relative; z-index: 3;
  margin-top: auto;
  padding-top: clamp(36px, 6vh, 72px);
  display: flex; flex-wrap: wrap; gap: 14px 44px; align-items: flex-end;
}
.hero__stat strong {
  display: block;
  font-size: clamp(30px, 3.6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.hero__stat span { color: var(--ink-mute); }

/* Flame ribbons behind the wordmark */
.ribbons {
  position: absolute;
  z-index: 1;
  left: -6%;
  top: 26%;
  width: 128%;
  height: 78%;
  pointer-events: none;
  filter: blur(0.4px);
}
.ribbons path { mix-blend-mode: multiply; opacity: .92; }

/* Temperature rail (right side of the poster) */
.temp-rail {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(80px, 14vh, 150px);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vh, 13px);
  text-align: right;
}
.temp-rail li {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--ink);
  opacity: .55;
}
.temp-rail li::after {
  content: "";
  display: inline-block;
  width: 16px; height: 2px;
  margin-left: 8px;
  vertical-align: middle;
  background: currentColor;
  opacity: .5;
}

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  font-family: var(--mono);
  font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--ink); color: var(--cream); }
.btn--solid:hover { box-shadow: 0 10px 26px rgba(10,10,12,.22); }
.btn--flame { background: var(--flame); border-color: transparent; color: #fff; }
.btn--flame:hover { box-shadow: 0 12px 30px rgba(232,52,26,.34); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }

/* ---------------------------------------------------------
   Team
   --------------------------------------------------------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(20px, 2.6vw, 34px);
}
.member {
  position: relative;
  background: var(--cream);
  border: 1.5px solid var(--ink);
  border-radius: 22px;
  padding: 30px 30px 34px;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.section--alt .member { background: var(--cream); }
.member:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(10,10,12,.12); }
.member::after {
  content: "";
  position: absolute; inset: auto -40% -55% auto;
  width: 300px; height: 300px;
  background: var(--flame);
  filter: blur(70px);
  opacity: .28;
  pointer-events: none;
}
.member__thermo {
  width: 100%; height: 6px; border-radius: 999px;
  background: var(--flame);
  margin-bottom: 24px;
}
.member__name {
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 800; letter-spacing: -0.04em; line-height: 1;
  margin-bottom: 10px;
}
.member__role { color: var(--t-050); margin-bottom: 18px; }
.member__bio { color: var(--ink-soft); font-size: 16px; position: relative; z-index: 2; }
.member__list { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 2; }
.chip {
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--rule);
  background: rgba(255,255,255,.5);
  border-radius: 999px;
  padding: 6px 11px;
}

.affil {
  margin-top: clamp(30px, 4vw, 48px);
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  padding-top: 26px;
}
.affil img { width: 72px; border-radius: 8px; }
.affil p { color: var(--ink-soft); max-width: 60ch; font-size: 15px; }

/* ---------------------------------------------------------
   Background / problem
   --------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 3.4vw, 56px);
}
.prose p + p { margin-top: 16px; }
.prose p { color: var(--ink-soft); }
.prose strong { color: var(--ink); }

.problem-list { display: grid; gap: 2px; border: 1.5px solid var(--ink); border-radius: 18px; overflow: hidden; }
.problem-list li {
  background: var(--cream);
  padding: 22px 26px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  border-bottom: 1px solid var(--rule);
}
.problem-list li:last-child { border-bottom: 0; }
.problem-list .idx { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--t-050); padding-top: 4px; }
.problem-list h4 { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 5px; }
.problem-list p { color: var(--ink-soft); font-size: 15.5px; }

.pullquote {
  margin-top: clamp(36px, 5vw, 64px);
  border-left: 6px solid var(--t-050);
  padding: 6px 0 6px 26px;
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
  max-width: 30ch;
}

/* ---------------------------------------------------------
   Design / pipeline
   --------------------------------------------------------- */
.pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: clamp(40px, 5vw, 64px);
  counter-reset: step;
}
.step {
  position: relative;
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  padding: 24px 22px 26px;
  background: var(--cream);
  overflow: hidden;
}
.step__bar { height: 5px; border-radius: 999px; margin-bottom: 20px; }
.step:nth-child(1) .step__bar { background: linear-gradient(90deg, var(--t-000), var(--t-030)); }
.step:nth-child(2) .step__bar { background: linear-gradient(90deg, var(--t-030), var(--t-050)); }
.step:nth-child(3) .step__bar { background: linear-gradient(90deg, var(--t-050), var(--t-070)); }
.step:nth-child(4) .step__bar { background: linear-gradient(90deg, var(--t-070), var(--t-085)); }
.step:nth-child(5) .step__bar { background: linear-gradient(90deg, var(--t-085), var(--t-100)); }
.step__n { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .16em; color: var(--ink-mute); }
.step h4 { font-size: 21px; font-weight: 700; letter-spacing: -0.025em; margin: 8px 0 8px; }
.step p { font-size: 15px; color: var(--ink-soft); }

.card {
  border: 1.5px solid var(--ink);
  border-radius: 22px;
  background: var(--cream);
  padding: clamp(24px, 3vw, 38px);
}
.card + .card { margin-top: 22px; }
.card__title {
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1;
  margin-bottom: 8px;
}
.card__lede { color: var(--ink-soft); margin-bottom: 26px; max-width: 72ch; }

.classes { display: flex; flex-wrap: wrap; gap: 10px; }
.class-pill {
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 9px 16px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 9px;
}
.class-pill .dot { width: 9px; height: 9px; border-radius: 50%; }
.class-pill--anom { background: var(--ink); color: var(--cream); border-color: var(--ink); }

table.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
table.spec th, table.spec td { text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--rule); }
table.spec th {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute);
}
table.spec td:first-child { font-weight: 600; }
table.spec td:last-child { font-family: var(--mono); font-size: 13.5px; color: var(--ink-soft); }
table.spec tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }

figure { border: 1.5px solid var(--ink); border-radius: 18px; overflow: hidden; background: #fff; }
figure img { width: 100%; }
figcaption {
  padding: 12px 16px;
  border-top: 1.5px solid var(--ink);
  background: var(--cream);
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft);
}
figcaption em { font-family: var(--sans); font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink-mute); display: block; margin-top: 4px; font-size: 13px; }

.fig-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.fig-grid--wide { grid-template-columns: 1fr; }

/* ---------------------------------------------------------
   Results
   --------------------------------------------------------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: clamp(38px, 5vw, 58px);
}
.metric {
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  padding: 26px 24px 24px;
  background: var(--cream);
  position: relative;
  overflow: hidden;
}
.metric__v {
  font-size: clamp(44px, 5.4vw, 68px);
  font-weight: 800; letter-spacing: -0.05em; line-height: 0.92;
  background: var(--flame);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.metric__v sup { font-size: .42em; vertical-align: super; letter-spacing: 0; }
.metric__k { margin-top: 12px; color: var(--ink); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.metric__n { color: var(--ink-mute); font-size: 13.5px; margin-top: 3px; }

.ab {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.ab__card { border: 1.5px solid var(--ink); border-radius: 20px; padding: 26px 26px 28px; background: var(--cream); }
.ab__card h4 { font-size: 21px; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 6px; }
.ab__card > p { color: var(--ink-soft); font-size: 15px; margin-bottom: 20px; }
.bar-row { margin-bottom: 16px; }
.bar-row__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 14px; }
.bar-row__top b { font-family: var(--mono); font-size: 14px; }
.bar-track { height: 10px; border-radius: 999px; background: rgba(10,10,12,.09); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; width: 0; transition: width 1.1s cubic-bezier(.2,.7,.3,1); }
.bar-fill--hot { background: var(--flame); }
.bar-fill--cold { background: linear-gradient(90deg, var(--t-000), var(--t-030)); }
.delta { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.delta--down { color: var(--t-030); }
.delta--up { color: var(--t-050); }

.finding-note {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 14.5px;
  color: var(--ink-soft);
}

.compare { margin-top: clamp(34px, 4vw, 54px); }
.compare__pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.compare__pair + .compare__pair { margin-top: 18px; }

.limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: clamp(34px, 4vw, 54px); }
.limit { border-left: 4px solid var(--t-030); padding-left: 20px; }
.limit h4 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.limit p { color: var(--ink-soft); font-size: 15px; }

/* ---------------------------------------------------------
   Acknowledgments
   --------------------------------------------------------- */
.thanks { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; }
.thank {
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  padding: 26px 26px 28px;
  background: var(--cream);
  position: relative;
}
.thank__role { color: var(--t-050); margin-bottom: 12px; }
.thank h4 { font-size: 23px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 8px; line-height: 1.1; }
.thank p { color: var(--ink-soft); font-size: 15px; }
.thank--wide { grid-column: 1 / -1; }

/* ---------------------------------------------------------
   Report
   --------------------------------------------------------- */
.report { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(24px, 3.4vw, 48px); align-items: start; }
.report__meta li { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.report__meta li span:first-child { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-mute); padding-top: 4px; }
.report__meta li span:last-child { text-align: right; font-weight: 600; }
.report__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.pdf-frame {
  border: 1.5px solid var(--ink);
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  height: clamp(520px, 78vh, 900px);
}
.pdf-frame iframe, .pdf-frame embed { width: 100%; height: 100%; border: 0; display: block; }
.pdf-fallback { padding: 40px; text-align: center; color: var(--ink-soft); }

.poster-block { margin-top: clamp(34px, 4vw, 54px); }

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.footer {
  background: var(--ink);
  color: var(--cream);
  padding: clamp(60px, 8vw, 100px) var(--gutter) 40px;
  position: relative;
  z-index: 2;
  overflow: hidden;
}
.footer__word {
  font-size: clamp(64px, 16vw, 220px);
  font-weight: 800; letter-spacing: -0.06em; line-height: .82;
  text-transform: lowercase;
  background: var(--flame);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 30px;
}
.footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; border-top: 1px solid rgba(253,244,224,.2); padding-top: 30px; }
.footer h5 { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(253,244,224,.5); margin-bottom: 12px; }
.footer li, .footer p { font-size: 15px; color: rgba(253,244,224,.82); }
.footer li { margin-bottom: 6px; }
.footer a { text-decoration: none; border-bottom: 1px solid rgba(253,244,224,.3); }
.footer a:hover { border-bottom-color: var(--t-085); }
.footer__base { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(253,244,224,.2); display: flex; flex-wrap: wrap; gap: 12px 28px; color: rgba(253,244,224,.5); }

/* ---------------------------------------------------------
   References
   --------------------------------------------------------- */
.refs { counter-reset: ref; display: grid; gap: 10px; margin-top: 26px; }
.refs li {
  counter-increment: ref;
  display: grid; grid-template-columns: 34px 1fr; gap: 12px;
  font-size: 14.5px; color: var(--ink-soft);
  padding-bottom: 10px; border-bottom: 1px solid var(--rule);
}
.refs li::before { content: "[" counter(ref) "]"; font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--t-050); padding-top: 3px; }
.refs em { color: var(--ink); font-style: italic; }

details.more { margin-top: clamp(34px, 4vw, 54px); border-top: 1px solid var(--rule); padding-top: 20px; }
details.more > summary {
  cursor: pointer; list-style: none;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "+"; margin-left: auto; font-size: 18px; line-height: 1; }
details.more[open] > summary::after { content: "–"; }

/* ---------------------------------------------------------
   Scroll reveal
   --------------------------------------------------------- */
/* Gated on html.js so the page is fully readable without JavaScript. */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; align-items: start; }
  .report { grid-template-columns: 1fr; }
  .temp-rail { display: none; }
  .nav { display: none; }
  .nav-toggle { display: block; }
  .topbar.is-open { flex-wrap: wrap; }
  .topbar.is-open .nav {
    display: flex; flex-direction: column; align-items: flex-start;
    width: 100%; margin: 14px 0 8px; gap: 14px;
  }
  .hero { min-height: auto; padding-top: 108px; padding-bottom: 64px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .member, .card, .metric, .ab__card, .thank, .step { border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .bar-fill { transition: none; }
}

@media print {
  .topbar, .ribbons, .temp-rail, .pdf-frame { display: none; }
  body { background: #fff; }
  body::before { display: none; }
}
