:root {
  --bg: #fffaf1;
  --bg-2: #fff2db;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #ffffff;
  --line: rgba(30, 53, 71, 0.12);
  --ink: #123047;
  --muted: #435867;
  --teal: #0f8b8d;
  --cyan: #33b9c5;
  --orange: #ff7a18;
  --gold: #ffbe0b;
  --lime: #b8de28;
  --berry: #ff4d6d;
  --shadow: 0 20px 60px rgba(18, 48, 71, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --site-width: 1240px;
  --nav-width: 240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 190, 11, 0.28), transparent 22%),
    radial-gradient(circle at top right, rgba(51, 185, 197, 0.22), transparent 28%),
    linear-gradient(180deg, #fff8ef 0%, #fff4e1 42%, #fff9f3 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(18, 48, 71, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 48, 71, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 90%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--teal);
}

.site-shell {
  width: min(calc(100% - 32px), var(--site-width));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(18, 48, 71, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  padding: 10px 14px;
  border-left: 4px solid #4a6cf7;
  background: #f8f9fc;
  border-radius: 6px;
}

.timeline-row strong {
  font-weight: 600;
  color: #333;
}

.timeline-row span {
  color: #555;
}
.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: var(--ink);
}

.brand-kicker,
.eyebrow,
.page-kicker,
.section-kicker,
.local-nav-title,
.card-kicker,
.note-label,
.table-kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-kicker,
.page-kicker,
.section-kicker,
.card-kicker,
.local-nav-title,
.note-label,
.table-kicker {
  color: var(--teal);
}

.brand-title {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 1.12rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.14), rgba(51, 185, 197, 0.14));
  border-color: rgba(18, 48, 71, 0.08);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--orange), var(--berry));
  color: white;
  font: inherit;
}

main {
  display: grid;
  gap: 26px;
  margin-top: 22px;
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.85fr);
  gap: 22px;
  padding: 34px;
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(15, 139, 141, 0.96), rgba(30, 53, 71, 0.96) 55%, rgba(255, 122, 24, 0.94));
  color: white;
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -28% auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 190, 11, 0.4), transparent 62%);
}

.hero-copy h1,
.page-header h1,
.feature-block h2,
.card h2,
.story-block h2,
.section-block h2,
.team-card h2,
.viewer-panel h2 {
  margin: 0;
  font-family: "Syne", sans-serif;
  line-height: 0.98;
}

.hero-copy h1 {
  font-size: clamp(2.8rem, 6vw, 5.3rem);
  max-width: 8ch;
}

.hero-copy p,
.feature-block p,
.card p,
.story-block p,
.section-block p,
.section-block li,
.team-card p,
.table-wrap,
.page-header p,
.viewer-panel p,
.viewer-caption,
.note-card p {
  color: inherit;
  line-height: 1.72;
}

.lede {
  max-width: 60ch;
  font-size: 1.1rem;
  opacity: 0.96;
  margin: 18px 0 0;
}

.hero-tags,
.quick-links,
.fact-pills,
.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.fact-pills span,
.quick-links a,
.inline-links a {
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 0.85rem;
  text-decoration: none;
}

.hero-tags span,
.fact-pills span {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.quick-links a,
.inline-links a,
.pill-link {
  background: rgba(255, 255, 255, 0.14);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-side,
.card,
.page-header,
.feature-block,
.story-block,
.section-block,
.team-card,
.local-nav,
.table-wrap,
.viewer-panel,
.note-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-side {
  padding: 18px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.card-kicker,
.page-kicker,
.section-kicker {
  margin-bottom: 8px;
}

.hero-side .card-title {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: 1.55rem;
}

.hero-side ul,
.score-list,
.rule-list,
.kicker-list,
.sidebar-list,
.detail-list,
.check-list {
  margin: 14px 0 0;
  padding-left: 18px;
  line-height: 1.7;
}

.hero-side .media-frame {
  margin-bottom: 14px;
}

.media-frame {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(18, 48, 71, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.55));
}

.media-frame img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.media-frame.compact img {
  max-height: 340px;
  object-fit: contain;
}

.media-frame.small img {
  max-height: 260px;
  object-fit: contain;
}

.media-frame.micro img {
  max-height: 190px;
  object-fit: contain;
}

.page-header,
.feature-block,
.story-block,
.section-block,
.team-card,
.viewer-panel,
.note-card,
.table-wrap {
  padding: 28px;
}

.page-header {
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(255, 190, 11, 0.24), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.88));
}

.page-header h1 {
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  margin-top: 6px;
}

.page-subtitle {
  max-width: 72ch;
  color: var(--muted);
  margin: 14px 0 0;
}

.feature-grid,
.card-grid,
.story-grid,
.team-grid {
  display: grid;
  gap: 18px;
}

.feature-grid.two,
.card-grid.two,
.story-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid.three,
.team-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.note-card {
  padding: 22px;
}

.card h2,
.feature-block h2,
.story-block h2,
.section-block h2,
.team-card h2,
.viewer-panel h2 {
  font-size: 1.9rem;
  margin-bottom: 8px;
}

.card strong,
.section-block strong {
  color: var(--ink);
}

.score-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
}

.score-list li {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  list-style: none;
}

.rule-list,
.check-list,
.detail-list,
.kicker-list {
  color: var(--muted);
}

.photo-strip,
.media-grid,
.team-photos,
.gallery-grid {
  display: grid;
  gap: 14px;
}

.photo-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.media-grid.two,
.team-photos {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-grid.three,
.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.media-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.page-layout {
  display: grid;
  grid-template-columns: var(--nav-width) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.local-nav {
  position: sticky;
  top: 108px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 248, 236, 0.94));
}

.local-nav-title {
  margin-bottom: 12px;
}

.local-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  transition: 140ms ease;
}

.local-nav a:hover,
.local-nav a.is-active {
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.14), rgba(184, 222, 40, 0.18));
  color: var(--ink);
}

.page-sections {
  display: grid;
  gap: 18px;
}

.section-block {
  scroll-margin-top: 120px;
}

.split-layout,
.stack-layout,
.viewer-layout {
  display: grid;
  gap: 18px;
}

.split-layout {
  grid-template-columns: 1fr;
  align-items: start;
}

.stack-layout {
  grid-template-columns: 1fr;
}

.note-card {
  background: linear-gradient(135deg, rgba(184, 222, 40, 0.17), rgba(255, 190, 11, 0.16));
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.data-table th,
.data-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(18, 48, 71, 0.08);
}

.data-table th {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--teal);
}

.timeline {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.timeline-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.4fr) minmax(120px, 0.55fr);
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
}

.timeline-row strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
  color: var(--teal);
}

.code-link,
.view-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: white;
  text-decoration: none;
}

pre[class*="language-"] {
  margin: 16px 0;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  max-height: 420px;
  overflow: auto;
}

.viewer-layout {
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
}

.viewer-canvas {
  min-height: 640px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.9), rgba(222, 244, 247, 0.7)),
    linear-gradient(180deg, #f4fffb, #fef4e8);
  overflow: hidden;
}

.viewer-canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.viewer-caption {
  color: var(--muted);
  margin-top: 14px;
}

.lede-large {
  max-width: 15ch;
  margin: 10px 0 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  line-height: 1.02;
}

.hero-copy .lede-secondary {
  max-width: 58ch;
  margin-top: 18px;
}

.doc-frame {
  overflow: hidden;
  min-height: 720px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.doc-frame iframe,
.doc-frame embed {
  width: 100%;
  height: 720px;
  border: 0;
}

.carousel-shell {
  display: grid;
  gap: 12px;
}

.carousel-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
}

.carousel-track {
  display: flex;
  transition: transform 380ms ease;
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  flex: 0 0 100%;
}

.carousel-slide .media-frame,
.carousel-slide.media-frame {
  height: 100%;
}

.carousel-slide .media-frame img,
.carousel-slide.media-frame img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

.carousel-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.carousel-controls button {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: white;
  font: inherit;
  cursor: pointer;
}

.carousel-dots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(18, 48, 71, 0.2);
  cursor: pointer;
}

.carousel-dots button.is-active {
  background: var(--orange);
}

.section-block .carousel-shell {
  height: 100%;
}

.section-block .carousel-slide .media-frame {
  min-height: 430px;
}

.competition-gallery {
  max-width: 920px;
  margin: 0 auto;
}

.competition-gallery .carousel-slide .media-frame {
  min-height: 380px;
}

.competition-gallery .carousel-slide .media-frame img {
  max-height: 380px;
}

.appendix-math {
  display: grid;
  gap: 12px;
}

.appendix-math .math-display {
  overflow-x: auto;
  padding: 10px 0;
}

.appendix-gallery {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.team-hero {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.team-hero img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
}

.team-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shooting-layout {
  align-items: stretch;
}

.shooting-stack {
  height: 100%;
  grid-template-rows: auto 1fr;
}

.shooting-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(180px, 1fr);
  height: 100%;
  align-content: stretch;
}

.shooting-gallery .media-frame {
  height: 100%;
}

.shooting-gallery .media-frame img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.shooting-gallery .shooting-hero {
  grid-column: 1 / -1;
  min-height: 320px;
}

.nav-layout {
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
}

.nav-gallery-tight {
  gap: 8px;
}

.nav-pair {
  gap: 8px;
}

.nav-gallery-tight .media-frame.micro img {
  max-height: 228px;
}

.nav-gallery-tight .media-frame {
  border-radius: 18px;
}

.video-frame {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.video-frame iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}

.portrait-video iframe {
  aspect-ratio: 9 / 16;
}

.video-grid {
  display: grid;
  gap: 18px;
}

.video-grid.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.footer-note {
  margin-top: 12px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .hero,
  .split-layout,
  .viewer-layout,
  .feature-grid.two,
  .card-grid.two,
  .card-grid.three,
  .card-grid.four,
  .story-grid.two,
  .video-grid.three-up,
  .page-layout,
  .team-grid,
  .photo-strip,
  .media-grid.four,
  .media-grid.three,
  .gallery-grid,
  .timeline-row,
  .team-grid.two-up {
    grid-template-columns: 1fr;
  }

  .local-nav {
    position: static;
  }
}

@media (max-width: 860px) {
  .site-shell {
    width: min(calc(100% - 20px), var(--site-width));
    padding-top: 12px;
  }

  .topbar {
    border-radius: 26px;
    padding: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    justify-content: flex-start;
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero,
  .page-header,
  .feature-block,
  .story-block,
  .section-block,
  .viewer-panel,
  .table-wrap,
  .team-card,
  .note-card {
    padding: 22px;
  }

  .hero-copy h1,
  .page-header h1 {
    max-width: none;
  }

  .media-grid.two,
  .team-photos {
    grid-template-columns: 1fr;
  }

  .doc-frame,
  .doc-frame iframe,
  .doc-frame embed {
    min-height: 560px;
    height: 560px;
  }
}

.positive {
  color: #2ecc71;
  font-weight: 700;
}

.negative {
  color: #e74c3c;
  font-weight: 700;
}
