:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #152033;
  --muted: #66758c;
  --line: #d8e0ec;
  --cyan: #00ffff;
  --pink: #ff69b4;
  --blue: #6495ed;
  --gray: #a9a9a9;
  --green: #1f8a62;
  --shadow: 0 18px 45px rgba(21, 32, 51, 0.12);
}

/* Apple edition visual layer */
:root {
  --bg: #f5f5f7;
  --panel: rgba(255, 255, 255, 0.82);
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(29, 29, 31, 0.12);
  --green: #087f5b;
  --blue: #0071e3;
  --shadow: 0 22px 65px rgba(0, 0, 0, 0.08);
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 245, 247, 0.98) 38%, #edf1f7 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(29, 29, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 29, 31, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.52), transparent 74%);
}

.topbar {
  margin: 16px 24px 0;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(26px) saturate(180%);
}

.brand-block h1 {
  font-size: 34px;
  letter-spacing: 0;
}

.eyebrow,
.section-kicker,
.panel-kicker,
.figure-label {
  color: #0b6b57;
  font-weight: 800;
}

.nav {
  padding: 4px;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
}

.nav a {
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
}

.nav a:hover {
  background: #1d1d1f;
  color: #ffffff;
}

.github-button,
.stat-pill,
.like-button {
  border: 1px solid rgba(29, 29, 31, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

main {
  padding-top: 34px;
}

.workspace {
  grid-template-columns: minmax(320px, 0.54fr) minmax(620px, 1.46fr);
}

.story {
  gap: 16px;
}

.story-block,
.viewer-shell,
.problem-framing-section,
.results-section,
.figures-section,
.playground-section,
.edge-dynamics-section,
.paper-code-section,
.result-table-card,
.formula-card,
.code-link-panel {
  border: 1px solid rgba(29, 29, 31, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(160%);
}

.story-block {
  padding: 26px;
}

.story-block h2,
.section-heading h2 {
  font-weight: 760;
  letter-spacing: 0;
}

.story-block h2 {
  font-size: 29px;
}

.section-heading h2 {
  font-size: 34px;
}

.viewer-panel,
.viewer,
.edge-animation-figure,
.playground-canvas-wrap,
.table-scroll,
.figure-card a {
  border-radius: 18px;
}

.viewer-toolbar,
.playground-toolbar,
.edge-animation-toolbar {
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

select,
.mode-button,
.playground-toggle,
.edge-animation-toggle {
  border-radius: 999px;
}

.mode-button.active,
.mode-button:hover,
.playground-toggle[aria-pressed="true"],
.edge-animation-toggle[aria-pressed="true"] {
  background: #0071e3;
  color: #ffffff;
}

.problem-thesis {
  border-color: rgba(0, 113, 227, 0.28);
  border-left-color: #0071e3;
  border-radius: 20px;
  background: rgba(235, 245, 255, 0.78);
}

.problem-grid article,
.edge-evidence-grid article,
.method-summary article,
.innovation-grid div {
  border: 1px solid rgba(29, 29, 31, 0.1);
  border-left: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.innovation-grid div {
  box-shadow: inset 0 0 0 1px rgba(8, 127, 91, 0.08);
}

.result-table-card {
  background: rgba(255, 255, 255, 0.76);
}

.result-table thead th {
  background: rgba(0, 113, 227, 0.08);
  color: #1d1d1f;
}

.is-best {
  color: #0b6b57;
}

.is-second {
  color: #52616f;
}

.formula-card:hover,
.formula-card.active {
  border-color: rgba(0, 113, 227, 0.38);
  background: rgba(235, 245, 255, 0.9);
}

.code-link-panel {
  background: rgba(20, 24, 31, 0.94);
}

@media (max-width: 760px) {
  .topbar {
    margin: 10px 12px 0;
    border-radius: 18px;
  }

  .story-block,
  .viewer-shell,
  .problem-framing-section,
  .results-section,
  .figures-section,
  .playground-section,
  .edge-dynamics-section,
  .paper-code-section {
    border-radius: 18px;
  }
}

/* Final enforced Apple Watch Ultra 3-inspired layer */
body {
  background: #f5f5f7;
}

.topbar {
  margin: 0;
  padding: 10px 28px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  background: rgba(5, 5, 7, 0.72);
  color: #f5f5f7;
  box-shadow: none;
}

.brand-block h1,
.nav a:hover {
  color: #ffffff;
}

.nav,
.nav a:hover {
  background: transparent;
}

.nav {
  border: 0;
}

.nav a {
  color: #d2d2d7;
  font-size: 12px;
}

.apple-product-hero {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 34%, rgba(41, 151, 255, 0.34), transparent 26%),
    radial-gradient(circle at 48% 76%, rgba(110, 231, 183, 0.18), transparent 32%),
    linear-gradient(180deg, #020204 0%, #07080c 62%, #11131a 100%);
}

.apple-device-frame,
.apple-glass-specs {
  display: none !important;
}

.apple-hero-copy h2 {
  color: #ffffff;
  font-size: clamp(54px, 8.4vw, 122px);
  line-height: 0.92;
}

.apple-hero-copy p:not(.section-kicker) {
  color: #a1a1a6;
}

.apple-edge-orbit {
  width: min(940px, 94vw);
  aspect-ratio: 900 / 560;
}

.apple-edge-orbit svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 48px 110px rgba(0, 0, 0, 0.55));
}

.orbit-rings ellipse {
  fill: none;
  stroke: rgba(255, 255, 255, 0.14);
}

.orbit-edges path {
  fill: none;
  stroke: url("#appleEdgeGradient");
  stroke-linecap: round;
  stroke-width: 4.8;
}

.orbit-nodes circle {
  fill: url("#appleNodeGlow");
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 2.5;
}

main {
  padding: 0;
}

main > section:not(.apple-product-hero) {
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.apple-ultra-highlights,
.apple-tech-strip,
.workspace,
.problem-framing-section,
.results-section,
.figures-section,
.playground-section,
.edge-dynamics-section,
.paper-code-section {
  padding-left: max(24px, calc((100vw - 1360px) / 2));
  padding-right: max(24px, calc((100vw - 1360px) / 2));
}

.apple-ultra-highlights {
  padding-top: clamp(74px, 9vw, 132px);
  padding-bottom: clamp(74px, 9vw, 132px);
  background: #11131a;
  color: #f5f5f7;
}

.apple-ultra-heading h2 {
  color: #ffffff;
  font-size: clamp(42px, 6.2vw, 86px);
  line-height: 0.96;
}

.apple-ultra-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ultra-card {
  min-height: 285px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 76% 14%, rgba(41, 151, 255, 0.18), transparent 32%),
    #1d1f27;
  color: #f5f5f7;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.ultra-card-large,
.ultra-card-wide {
  grid-column: span 2;
}

.ultra-card span {
  color: #ff9f0a;
}

.ultra-card h3,
.ultra-card strong {
  color: #ffffff;
}

.ultra-card p {
  color: #a1a1a6;
}

.apple-tech-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-top: clamp(70px, 8vw, 118px);
  padding-bottom: clamp(70px, 8vw, 118px);
  background: #f5f5f7;
}

.apple-tech-strip article,
.story-block,
.problem-grid article,
.problem-flow div,
.method-summary article,
.innovation-grid div {
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.055);
}

.workspace {
  grid-template-columns: minmax(300px, 0.42fr) minmax(680px, 1.58fr);
  gap: 28px;
  padding-top: clamp(76px, 8vw, 128px);
  padding-bottom: clamp(76px, 8vw, 128px);
  background: #ffffff;
}

.story-block {
  background: #f5f5f7;
}

.viewer-shell {
  min-height: 760px;
  border: 0;
  border-radius: 8px;
  background:
    radial-gradient(circle at 58% 18%, rgba(41, 151, 255, 0.26), transparent 32%),
    linear-gradient(180deg, #07080c, #11131a);
  color: #f5f5f7;
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.24);
}

.viewer-toolbar,
.viewer-panel,
.metrics-panel {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
}

.metrics-panel h2,
.metrics dd {
  color: #ffffff;
}

.metrics-panel,
.legend p,
.viewer-status {
  color: #a1a1a6;
}

.problem-framing-section,
.playground-section {
  padding-top: clamp(82px, 10vw, 150px);
  padding-bottom: clamp(82px, 10vw, 150px);
  background: #f5f5f7;
}

.figures-section,
.paper-code-section {
  padding-top: clamp(82px, 10vw, 150px);
  padding-bottom: clamp(82px, 10vw, 150px);
  background: #ffffff;
}

.results-section {
  padding-top: clamp(82px, 10vw, 150px);
  padding-bottom: clamp(82px, 10vw, 150px);
  background: #08090d;
  color: #f5f5f7;
}

.results-section .section-heading h2,
.results-section .result-group-heading h3,
.results-section .result-table-heading h4,
.results-section .result-analysis strong {
  color: #ffffff;
}

.results-section .section-heading p:last-child,
.results-section .result-table-heading p,
.results-section .result-analysis p {
  color: #c7c7cc;
}

.results-section .result-table-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #161820;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.results-section .table-scroll {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #0f1016;
}

.results-section .result-table {
  color: #f5f5f7;
}

.results-section .result-table thead th {
  background: #242734;
  color: #ffffff;
}

.results-section .result-table th,
.results-section .result-table td,
.results-section .result-table tbody th,
.results-section .result-table tbody td {
  border-bottom-color: rgba(255, 255, 255, 0.12);
  color: #f5f5f7;
  background: transparent;
}

.results-section .result-table tbody tr:nth-child(even) th,
.results-section .result-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.035);
}

.results-section .best-row th,
.results-section .best-row td {
  background: rgba(110, 231, 183, 0.095) !important;
}

.results-section .is-best {
  color: #6ee7b7 !important;
  font-weight: 900;
}

.results-section .is-second {
  color: #9cc7ff !important;
  font-weight: 800;
}

.edge-dynamics-section {
  padding-top: clamp(82px, 10vw, 150px);
  padding-bottom: clamp(82px, 10vw, 150px);
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 159, 10, 0.12), transparent 30%),
    #11131a;
  color: #f5f5f7;
}

.edge-dynamics-section .section-heading h2,
.edge-dynamics-section h3 {
  color: #ffffff;
}

.edge-dynamics-section .section-heading p:last-child,
.edge-dynamics-section p {
  color: #c7c7cc;
}

.edge-animation-figure,
.edge-animation-toolbar,
.edge-gif-panel {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.figure-card {
  min-height: 620px;
  border-radius: 8px;
  background: #f5f5f7;
}

.code-link-panel {
  border: 0;
  border-radius: 8px;
  background:
    radial-gradient(circle at 80% 0%, rgba(41, 151, 255, 0.18), transparent 34%),
    #11131a;
  color: #f5f5f7;
  box-shadow: 0 28px 86px rgba(0, 0, 0, 0.22);
}

@media (max-width: 1100px) {
  .apple-ultra-grid,
  .apple-tech-strip,
  .workspace {
    grid-template-columns: 1fr;
  }

  .ultra-card,
  .ultra-card-large,
  .ultra-card-wide {
    grid-column: auto;
  }

  .viewer-shell {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .apple-product-hero {
    padding: 54px 16px 34px;
  }

  .apple-hero-copy h2 {
    font-size: 46px;
  }

  .apple-edge-orbit {
    width: min(680px, 112vw);
  }

  .apple-ultra-highlights,
  .apple-tech-strip,
  .workspace,
  .problem-framing-section,
  .results-section,
  .figures-section,
  .playground-section,
  .edge-dynamics-section,
  .paper-code-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .apple-ultra-heading {
    display: block;
  }

  .figure-card {
    min-height: auto;
  }
}

/* Final Apple Watch Ultra 3-inspired layer */
:root {
  --ultra-black: #050507;
  --ultra-ink: #1d1d1f;
  --ultra-muted: #86868b;
  --ultra-card: #f5f5f7;
  --ultra-line: rgba(255, 255, 255, 0.14);
  --ultra-blue: #2997ff;
  --ultra-green: #6ee7b7;
  --ultra-orange: #ff9f0a;
}

body {
  background: #f5f5f7;
  color: var(--ultra-ink);
}

body::before {
  background:
    radial-gradient(circle at 50% 0%, rgba(41, 151, 255, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(5, 5, 7, 0.95) 0 28%, rgba(245, 245, 247, 0) 48%);
  opacity: 1;
}

.topbar {
  margin: 0;
  padding: 10px 28px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  background: rgba(5, 5, 7, 0.72);
  color: #f5f5f7;
  box-shadow: none;
  backdrop-filter: blur(24px) saturate(180%);
}

.brand-block h1 {
  color: #ffffff;
  font-size: 22px;
}

.eyebrow {
  color: #a1a1a6;
}

.nav {
  border: 0;
  background: transparent;
}

.nav a {
  color: #d2d2d7;
  font-size: 12px;
  font-weight: 520;
}

.nav a:hover {
  background: transparent;
  color: #ffffff;
}

.github-action {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.github-action p {
  color: #a1a1a6;
}

.github-button,
.stat-pill,
.like-button {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: #f5f5f7;
  box-shadow: none;
}

.github-action svg {
  fill: #f5f5f7;
}

main {
  padding: 0;
}

main > section:not(.apple-product-hero) {
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.apple-product-hero {
  min-height: 100vh;
  padding: clamp(70px, 8vw, 116px) clamp(20px, 5vw, 72px) clamp(44px, 6vw, 80px);
  background:
    radial-gradient(circle at 50% 34%, rgba(41, 151, 255, 0.34), transparent 26%),
    radial-gradient(circle at 48% 76%, rgba(110, 231, 183, 0.18), transparent 32%),
    linear-gradient(180deg, #020204 0%, #07080c 62%, #11131a 100%);
}

.apple-hero-copy h2 {
  max-width: 1120px;
  color: #ffffff;
  font-size: clamp(54px, 8.4vw, 122px);
  line-height: 0.92;
}

.apple-hero-copy p:not(.section-kicker) {
  color: #a1a1a6;
}

.apple-device-frame,
.apple-glass-specs {
  display: none !important;
}

.apple-visual-stage {
  display: grid;
  place-items: center;
  min-height: min(48vh, 500px);
  perspective: 1100px;
}

.apple-edge-orbit {
  width: min(940px, 94vw);
  aspect-ratio: 900 / 560;
  transform-style: preserve-3d;
  transition: transform 180ms ease-out;
}

.apple-edge-orbit svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 48px 110px rgba(0, 0, 0, 0.55));
}

.orbit-rings ellipse {
  fill: none;
  stroke: rgba(255, 255, 255, 0.13);
  stroke-width: 1.4;
}

.orbit-rings ellipse:nth-child(2) {
  stroke: rgba(41, 151, 255, 0.28);
}

.orbit-rings ellipse:nth-child(3) {
  stroke: rgba(110, 231, 183, 0.24);
}

.orbit-edges path {
  fill: none;
  stroke: url("#appleEdgeGradient");
  stroke-linecap: round;
  stroke-width: 4.8;
  filter: drop-shadow(0 0 20px rgba(122, 183, 255, 0.62));
}

.orbit-nodes circle {
  fill: url("#appleNodeGlow");
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 2.5;
  filter: drop-shadow(0 0 18px rgba(122, 183, 255, 0.68));
}

.apple-ultra-highlights,
.apple-tech-strip,
.workspace,
.problem-framing-section,
.results-section,
.figures-section,
.playground-section,
.edge-dynamics-section,
.paper-code-section {
  padding-left: max(24px, calc((100vw - 1360px) / 2));
  padding-right: max(24px, calc((100vw - 1360px) / 2));
}

.apple-ultra-highlights {
  padding-top: clamp(74px, 9vw, 132px);
  padding-bottom: clamp(74px, 9vw, 132px);
  background: #11131a;
  color: #f5f5f7;
}

.apple-ultra-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.apple-ultra-heading .section-kicker {
  color: var(--ultra-orange);
}

.apple-ultra-heading h2 {
  max-width: 720px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(42px, 6.2vw, 86px);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 0.96;
}

.apple-ultra-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ultra-card {
  min-height: 285px;
  padding: clamp(22px, 2.5vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 76% 14%, rgba(41, 151, 255, 0.18), transparent 32%),
    #1d1f27;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.ultra-card-large {
  grid-column: span 2;
  background:
    radial-gradient(circle at 80% 22%, rgba(110, 231, 183, 0.2), transparent 34%),
    linear-gradient(180deg, #1c2028, #101116);
}

.ultra-card-wide {
  grid-column: span 2;
}

.ultra-card span {
  display: block;
  margin-bottom: 16px;
  color: var(--ultra-orange);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ultra-card h3,
.ultra-card strong {
  display: block;
  margin: 0;
  color: #ffffff;
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 0.98;
}

.ultra-card p {
  max-width: 28ch;
  margin: 14px 0 0;
  color: #a1a1a6;
  font-size: 15px;
  line-height: 1.45;
}

.apple-tech-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-top: clamp(70px, 8vw, 118px);
  padding-bottom: clamp(70px, 8vw, 118px);
  background: #f5f5f7;
}

.apple-tech-strip article {
  min-height: 280px;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.07);
}

.workspace {
  grid-template-columns: minmax(300px, 0.42fr) minmax(680px, 1.58fr);
  gap: 28px;
  align-items: stretch;
  padding-top: clamp(76px, 8vw, 128px);
  padding-bottom: clamp(76px, 8vw, 128px);
  background: #ffffff;
}

.story-block {
  background: #f5f5f7;
}

.viewer-shell {
  min-height: 760px;
  border: 0;
  border-radius: 8px;
  background:
    radial-gradient(circle at 58% 18%, rgba(41, 151, 255, 0.26), transparent 32%),
    linear-gradient(180deg, #07080c, #11131a);
  color: #f5f5f7;
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.24);
}

.viewer-toolbar,
.viewer-panel,
.metrics-panel {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(20px);
}

.metrics-panel h2,
.metrics dd {
  color: #ffffff;
}

.metrics-panel,
.legend p,
.viewer-status {
  color: #a1a1a6;
}

.problem-framing-section,
.playground-section {
  padding-top: clamp(82px, 10vw, 150px);
  padding-bottom: clamp(82px, 10vw, 150px);
  background: #f5f5f7;
}

.figures-section,
.paper-code-section {
  padding-top: clamp(82px, 10vw, 150px);
  padding-bottom: clamp(82px, 10vw, 150px);
  background: #ffffff;
}

.results-section {
  padding-top: clamp(82px, 10vw, 150px);
  padding-bottom: clamp(82px, 10vw, 150px);
  background: #08090d;
  color: #f5f5f7;
}

.results-section .section-heading h2,
.results-section .result-group-heading h3,
.results-section .result-table-heading h4,
.results-section .result-analysis strong {
  color: #ffffff;
}

.results-section .section-heading p:last-child,
.results-section .result-table-heading p,
.results-section .result-analysis p {
  color: #c7c7cc;
}

.results-section .result-table-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #161820;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.results-section .table-scroll {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #0f1016;
}

.results-section .result-table {
  color: #f5f5f7;
}

.results-section .result-table thead th {
  background: #242734;
  color: #ffffff;
}

.results-section .result-table th,
.results-section .result-table td,
.results-section .result-table tbody th,
.results-section .result-table tbody td {
  border-bottom-color: rgba(255, 255, 255, 0.12);
  color: #f5f5f7;
  background: transparent;
}

.results-section .result-table tbody tr:nth-child(even) th,
.results-section .result-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.035);
}

.results-section .result-table .table-break th,
.results-section .result-table .table-break td {
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.results-section .best-row th,
.results-section .best-row td {
  background: rgba(110, 231, 183, 0.095) !important;
}

.results-section .is-best {
  color: #6ee7b7 !important;
  font-weight: 900;
}

.results-section .is-second {
  color: #9cc7ff !important;
  font-weight: 800;
}

.edge-dynamics-section {
  padding-top: clamp(82px, 10vw, 150px);
  padding-bottom: clamp(82px, 10vw, 150px);
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 159, 10, 0.12), transparent 30%),
    #11131a;
  color: #f5f5f7;
}

.edge-dynamics-section .section-heading h2,
.edge-dynamics-section h3 {
  color: #ffffff;
}

.edge-dynamics-section .section-heading p:last-child,
.edge-dynamics-section p {
  color: #c7c7cc;
}

.edge-animation-figure,
.edge-animation-toolbar,
.edge-gif-panel {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.figure-card {
  min-height: 620px;
  background: #f5f5f7;
}

.code-link-panel {
  border: 0;
  background:
    radial-gradient(circle at 80% 0%, rgba(41, 151, 255, 0.18), transparent 34%),
    #11131a;
  color: #f5f5f7;
  box-shadow: 0 28px 86px rgba(0, 0, 0, 0.22);
}

.apple-reveal {
  opacity: 0;
  transform: translate3d(0, 46px, 0) scale(0.985);
  transition:
    opacity 720ms ease var(--reveal-delay, 0ms),
    transform 780ms cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms);
}

.apple-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

@media (max-width: 1100px) {
  .apple-ultra-grid,
  .apple-tech-strip,
  .workspace {
    grid-template-columns: 1fr;
  }

  .ultra-card,
  .ultra-card-large,
  .ultra-card-wide {
    grid-column: auto;
  }

  .viewer-shell {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .apple-product-hero {
    padding: 54px 16px 34px;
  }

  .apple-hero-copy h2 {
    font-size: 46px;
  }

  .apple-edge-orbit {
    width: min(680px, 112vw);
  }

  .apple-ultra-highlights,
  .apple-tech-strip,
  .workspace,
  .problem-framing-section,
  .results-section,
  .figures-section,
  .playground-section,
  .edge-dynamics-section,
  .paper-code-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .apple-ultra-heading {
    display: block;
  }

  .figure-card {
    min-height: auto;
  }
}

/* Apple product-page redesign */
:root {
  --bg: #f5f5f7;
  --panel: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(29, 29, 31, 0.12);
  --blue: #0071e3;
  --green: #0a7f5b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.08);
  --apple-scroll: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", sans-serif;
}

body::before {
  opacity: 0.45;
}

.topbar {
  margin: 0;
  padding: 10px 26px;
  border: 0;
  border-bottom: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 0;
  background: rgba(251, 251, 253, 0.78);
  box-shadow: none;
  backdrop-filter: blur(22px) saturate(180%);
}

.brand-block h1 {
  font-size: 22px;
  font-weight: 700;
}

.eyebrow {
  color: #86868b;
  font-size: 10px;
  font-weight: 700;
}

.nav {
  border: 0;
  background: transparent;
}

.nav a {
  padding: 6px 8px;
  color: #424245;
  font-size: 12px;
  font-weight: 500;
}

.nav a:hover {
  background: transparent;
  color: #000000;
}

.github-action,
.github-button,
.stat-pill,
.like-button {
  box-shadow: none;
}

.github-action {
  background: transparent;
  border-color: transparent;
}

.github-action p {
  color: #86868b;
}

.github-button,
.stat-pill,
.like-button {
  min-height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
}

main {
  padding: 0;
}

main > section:not(.apple-product-hero) {
  width: min(1440px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}

.apple-product-hero {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: clamp(28px, 4vw, 54px);
  min-height: min(880px, calc(100vh - 72px));
  padding: clamp(54px, 7vw, 92px) clamp(24px, 5vw, 72px) clamp(34px, 4vw, 56px);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 16%, rgba(0, 113, 227, 0.34), transparent 30%),
    radial-gradient(circle at 80% 64%, rgba(10, 127, 91, 0.22), transparent 26%),
    linear-gradient(180deg, #050507 0%, #0b0b0f 52%, #16171c 100%);
  color: #f5f5f7;
}

.apple-product-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 170px;
  background: linear-gradient(180deg, transparent, rgba(245, 245, 247, 0.08));
  pointer-events: none;
}

.apple-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  text-align: center;
}

.apple-hero-copy .section-kicker {
  color: #a7c7ff;
}

.apple-hero-copy h2 {
  max-width: 980px;
  margin: 0 auto 18px;
  color: #f5f5f7;
  font-size: clamp(48px, 8vw, 108px);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 0.94;
}

.apple-hero-copy p:not(.section-kicker) {
  max-width: 780px;
  margin: 0 auto;
  color: #a1a1a6;
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 500;
  line-height: 1.38;
}

.apple-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 26px;
}

.apple-hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 650;
}

.apple-hero-actions a:first-child {
  background: var(--blue);
}

.apple-hero-actions a:last-child {
  color: #2997ff;
}

.apple-visual-stage {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
  transition: transform 160ms ease-out;
}

.apple-device-frame {
  position: relative;
  margin: 0;
  padding: clamp(10px, 1.8vw, 18px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04)),
    #0f1014;
  box-shadow:
    0 44px 120px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: transform 220ms ease-out;
}

.apple-device-frame img {
  display: block;
  width: 100%;
  max-height: min(46vh, 430px);
  object-fit: cover;
  object-position: center 18%;
  border-radius: 6px;
  filter: saturate(0.96) contrast(1.02);
}

.apple-glass-specs {
  position: absolute;
  left: 50%;
  bottom: clamp(12px, 3vw, 30px);
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  width: min(760px, calc(100% - 48px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(10, 12, 16, 0.72);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(24px) saturate(160%);
  translate: -50% 0;
}

.apple-glass-specs div {
  padding: 16px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.apple-glass-specs div:last-child {
  border-right: 0;
}

.apple-glass-specs span,
.apple-glass-specs strong {
  display: block;
}

.apple-glass-specs span {
  margin-bottom: 5px;
  color: #a1a1a6;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.apple-glass-specs strong {
  color: #ffffff;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 760;
  line-height: 1;
}

.apple-tech-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 8px;
  background: rgba(29, 29, 31, 0.1);
}

.apple-tech-strip article {
  min-height: 250px;
  padding: clamp(24px, 3vw, 38px);
  background: #ffffff;
}

.apple-tech-strip span {
  display: block;
  margin-bottom: 18px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.apple-tech-strip h3 {
  max-width: 12ch;
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1;
}

.apple-tech-strip p {
  max-width: 32ch;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.workspace {
  grid-template-columns: minmax(300px, 0.42fr) minmax(680px, 1.58fr);
  gap: 28px;
  padding-top: clamp(48px, 6vw, 92px);
}

.story-block,
.problem-framing-section,
.results-section,
.figures-section,
.playground-section,
.edge-dynamics-section,
.paper-code-section,
.result-table-card,
.formula-card,
.code-link-panel,
.problem-grid article,
.edge-evidence-grid article,
.method-summary article,
.innovation-grid div,
.problem-flow div,
.figure-card,
.playground-card {
  border: 1px solid rgba(29, 29, 31, 0.1);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
  backdrop-filter: none;
}

.story-block {
  padding: 28px;
}

.story-block h2 {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 760;
  line-height: 1.05;
}

.section-heading h2 {
  max-width: 980px;
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 760;
  line-height: 0.98;
}

.section-heading p:last-child {
  max-width: 920px;
  font-size: 18px;
  line-height: 1.55;
}

.viewer-shell {
  border: 0;
  border-radius: 8px;
  background: #050507;
  color: #f5f5f7;
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.2);
}

.viewer-toolbar,
.viewer-panel,
.metrics-panel {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
}

.viewer-panel,
.viewer {
  border-radius: 8px;
}

.metrics-panel h2,
.metrics dd {
  color: #ffffff;
}

.metrics-panel,
.legend p,
.viewer-status {
  color: #a1a1a6;
}

.mode-button.active,
.mode-button:hover,
.playground-toggle[aria-pressed="true"],
.edge-animation-toggle[aria-pressed="true"],
.playground-button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.problem-framing-section {
  margin-top: clamp(48px, 7vw, 104px);
}

.problem-thesis {
  border-radius: 8px;
  background: #f5f5f7;
}

.problem-thesis blockquote {
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 760;
  line-height: 1.1;
}

.result-table-card {
  padding: clamp(18px, 2vw, 26px);
}

.result-table-heading h4 {
  font-size: 24px;
}

.table-scroll,
.viewer-toolbar,
.playground-toolbar,
.edge-animation-toolbar,
.edge-animation-figure,
.playground-canvas-wrap,
.figure-card a {
  border-radius: 8px;
}

.figure-card {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(18px, 2.5vw, 30px);
}

.figure-card img {
  filter: saturate(0.96) contrast(1.02);
}

.code-link-panel {
  background: #15161a;
  color: #f5f5f7;
}

.apple-reveal {
  opacity: 0;
  transform: translate3d(0, 34px, 0);
  transition:
    opacity 720ms ease var(--reveal-delay, 0ms),
    transform 780ms cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms);
}

.apple-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.reduce-motion .apple-reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

@media (max-width: 1100px) {
  main > section:not(.apple-product-hero) {
    width: min(100% - 28px, 980px);
  }

  .apple-product-hero {
    min-height: auto;
  }

  .apple-tech-strip,
  .workspace,
  .figure-card,
  .figure-card.reverse {
    grid-template-columns: 1fr;
  }

  .figure-card.reverse a,
  .figure-card.reverse figcaption {
    order: initial;
  }
}

@media (max-width: 760px) {
  .topbar {
    margin: 0;
    border-radius: 0;
  }

  .apple-product-hero {
    padding: 42px 16px 28px;
  }

  .apple-hero-copy h2 {
    font-size: 46px;
  }

  .apple-hero-copy p:not(.section-kicker) {
    font-size: 17px;
  }

  .apple-glass-specs {
    position: relative;
    left: auto;
    bottom: auto;
    grid-template-columns: 1fr;
    width: 100%;
    margin-top: 12px;
    translate: none;
  }

  .apple-glass-specs div {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .apple-glass-specs div:last-child {
    border-bottom: 0;
  }

  .apple-tech-strip article {
    min-height: auto;
  }

  .section-heading h2 {
    font-size: 34px;
  }
}

/* Apple full-site refinement */
body {
  background:
    linear-gradient(180deg, #050507 0 760px, #f5f5f7 760px 100%),
    #f5f5f7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 113, 227, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(245, 245, 247, 0.72) 52%, rgba(255, 255, 255, 0.9));
  opacity: 1;
  pointer-events: none;
}

.apple-product-hero {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 34%, rgba(76, 126, 255, 0.32), transparent 25%),
    radial-gradient(circle at 48% 72%, rgba(110, 231, 183, 0.16), transparent 34%),
    linear-gradient(180deg, #020204 0%, #07080c 62%, #11131a 100%);
}

.apple-hero-copy h2 {
  max-width: 1080px;
}

.apple-hero-copy p:not(.section-kicker) {
  max-width: 820px;
}

.apple-visual-stage {
  display: grid;
  place-items: center;
  min-height: min(46vh, 460px);
  perspective: 1100px;
}

.apple-device-frame,
.apple-glass-specs {
  display: none;
}

.apple-edge-orbit {
  width: min(920px, 92vw);
  aspect-ratio: 900 / 560;
  transform-style: preserve-3d;
  transition: transform 180ms ease-out;
}

.apple-edge-orbit svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 40px 90px rgba(0, 0, 0, 0.48));
}

.orbit-rings ellipse {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1.4;
}

.orbit-rings ellipse:nth-child(2) {
  stroke: rgba(122, 183, 255, 0.22);
}

.orbit-rings ellipse:nth-child(3) {
  stroke: rgba(110, 231, 183, 0.22);
}

.orbit-edges path {
  fill: none;
  stroke: url("#appleEdgeGradient");
  stroke-linecap: round;
  stroke-width: 4.5;
  filter: drop-shadow(0 0 18px rgba(122, 183, 255, 0.58));
}

.orbit-nodes circle {
  fill: url("#appleNodeGlow");
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 2.5;
  filter: drop-shadow(0 0 18px rgba(122, 183, 255, 0.6));
}

main > section:not(.apple-product-hero) {
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.apple-tech-strip,
.workspace,
.problem-framing-section,
.results-section,
.figures-section,
.playground-section,
.edge-dynamics-section,
.paper-code-section {
  padding-left: max(24px, calc((100vw - 1360px) / 2));
  padding-right: max(24px, calc((100vw - 1360px) / 2));
}

.apple-tech-strip {
  gap: 18px;
  padding-top: clamp(46px, 7vw, 96px);
  padding-bottom: clamp(46px, 7vw, 96px);
  background: #f5f5f7;
}

.apple-tech-strip article {
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 250, 252, 0.96)),
    #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.07);
}

.workspace {
  align-items: stretch;
  padding-top: clamp(70px, 8vw, 120px);
  padding-bottom: clamp(70px, 8vw, 120px);
  background: #ffffff;
}

.story {
  align-content: start;
}

.story-block {
  background: #f5f5f7;
}

.viewer-shell {
  min-height: 760px;
  padding: clamp(18px, 2.2vw, 30px);
  background:
    radial-gradient(circle at 58% 18%, rgba(0, 113, 227, 0.24), transparent 32%),
    linear-gradient(180deg, #07080c, #11131a);
}

.viewer-toolbar,
.viewer-panel,
.metrics-panel {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(20px);
}

.problem-framing-section {
  padding-top: clamp(82px, 10vw, 150px);
  padding-bottom: clamp(82px, 10vw, 150px);
  background: #f5f5f7;
}

.problem-grid article,
.problem-flow div,
.method-summary article,
.innovation-grid div {
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.055);
}

.results-section {
  padding-top: clamp(82px, 10vw, 150px);
  padding-bottom: clamp(82px, 10vw, 150px);
  background: #0b0b0f;
  color: #f5f5f7;
}

.results-section .section-heading h2,
.results-section .result-group-heading h3,
.results-section .result-table-heading h4 {
  color: #ffffff;
}

.results-section .section-heading p:last-child,
.results-section .result-table-heading p,
.results-section .result-analysis p {
  color: #a1a1a6;
}

.results-section .result-table-card {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 26px 86px rgba(0, 0, 0, 0.28);
}

.results-section .table-scroll {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.results-section .result-table {
  color: #f5f5f7;
}

.results-section .result-table th,
.results-section .result-table td {
  border-bottom-color: rgba(255, 255, 255, 0.11);
}

.results-section .result-table thead th {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.figures-section {
  padding-top: clamp(82px, 10vw, 150px);
  padding-bottom: clamp(82px, 10vw, 150px);
  background: #ffffff;
}

.figure-card {
  min-height: 620px;
  margin-top: 28px;
  background: #f5f5f7;
}

.figure-card a {
  background: #ffffff;
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.08);
}

.playground-section {
  padding-top: clamp(82px, 10vw, 150px);
  padding-bottom: clamp(82px, 10vw, 150px);
  background: #f5f5f7;
}

.edge-dynamics-section {
  padding-top: clamp(82px, 10vw, 150px);
  padding-bottom: clamp(82px, 10vw, 150px);
  background:
    radial-gradient(circle at 26% 18%, rgba(0, 113, 227, 0.15), transparent 28%),
    #11131a;
  color: #f5f5f7;
}

.edge-dynamics-section .section-heading h2,
.edge-dynamics-section h3 {
  color: #ffffff;
}

.edge-dynamics-section .section-heading p:last-child,
.edge-dynamics-section p {
  color: #a1a1a6;
}

.edge-animation-figure,
.edge-animation-toolbar,
.edge-gif-panel {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.06);
}

.paper-code-section {
  padding-top: clamp(82px, 10vw, 150px);
  padding-bottom: clamp(82px, 10vw, 150px);
  background: #ffffff;
}

.code-link-panel {
  border: 0;
  background:
    radial-gradient(circle at 80% 0%, rgba(0, 113, 227, 0.18), transparent 34%),
    #11131a;
  box-shadow: 0 28px 86px rgba(0, 0, 0, 0.22);
}

.apple-reveal {
  transform: translate3d(0, 46px, 0) scale(0.985);
}

.apple-reveal.is-visible {
  transform: translate3d(0, 0, 0) scale(1);
}

@media (max-width: 1100px) {
  .apple-tech-strip,
  .workspace {
    grid-template-columns: 1fr;
  }

  .viewer-shell {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .apple-edge-orbit {
    width: min(680px, 112vw);
  }

  .apple-tech-strip,
  .workspace,
  .problem-framing-section,
  .results-section,
  .figures-section,
  .playground-section,
  .edge-dynamics-section,
  .paper-code-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .figure-card {
    min-height: auto;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

section[id] {
  scroll-margin-top: 140px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 32px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 247, 251, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand-block,
.topbar-right {
  min-width: 0;
}

.brand-block {
  flex: 0 0 auto;
}

.topbar-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.eyebrow,
.section-kicker,
.panel-kicker {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav a:hover {
  background: #e9eef6;
  color: var(--ink);
}

.top-actions,
.github-action,
.site-stats,
.github-button,
.stat-pill,
.like-button {
  display: flex;
  align-items: center;
}

.top-actions {
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.github-action {
  min-width: 0;
  gap: 8px;
}

.github-action p {
  max-width: 260px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.github-button {
  min-height: 34px;
  flex: 0 0 auto;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid #111827;
  border-radius: 6px;
  background: #111827;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
}

.github-button:hover {
  background: #253149;
}

.github-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: 0 0 auto;
}

.site-stats {
  gap: 8px;
}

.stat-pill,
.like-button {
  min-height: 34px;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.stat-pill strong,
.like-button strong {
  color: var(--ink);
  font-size: 13px;
}

.like-button {
  cursor: pointer;
}

.like-button:hover,
.like-button.liked {
  border-color: #e4a0b8;
  background: #fff1f6;
  color: #a72f5b;
}

.heart-mark {
  color: #c93468;
  font-size: 16px;
  line-height: 1;
}

main {
  padding: 28px 32px 40px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 0.58fr) minmax(620px, 1.42fr);
  gap: 24px;
  align-items: start;
}

.story,
.viewer-shell {
  min-width: 0;
}

.story {
  display: grid;
  gap: 18px;
}

.story-block {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(21, 32, 51, 0.06);
}

.story-block h2 {
  margin-bottom: 14px;
  font-size: 26px;
  line-height: 1.15;
}

.story-block p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.innovation-grid {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.innovation-grid div {
  padding: 13px 14px;
  border-left: 3px solid var(--green);
  background: #f7fafc;
  border-radius: 6px;
}

.innovation-grid strong,
.innovation-grid span {
  display: block;
}

.innovation-grid strong {
  margin-bottom: 3px;
  font-size: 14px;
}

.innovation-grid span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.viewer-shell {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.viewer-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.selector-group {
  display: grid;
  gap: 6px;
}

label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

select {
  min-width: 190px;
  height: 40px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.mode-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mode-button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}

.mode-button:hover,
.mode-button.active {
  border-color: #a8c0dd;
  background: #edf5fb;
  color: var(--ink);
}

.viewer-layout {
  display: grid;
  grid-template-columns: minmax(460px, 1fr) 230px;
  gap: 16px;
}

.viewer-panel {
  position: relative;
  min-height: 630px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3f8;
}

.viewer {
  width: 100%;
  height: 630px;
}

.loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(238, 243, 248, 0.86);
  color: var(--muted);
  font-weight: 800;
}

.loading.hidden {
  display: none;
}

.metrics-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.metrics-panel h2 {
  margin-bottom: 0;
  font-size: 28px;
}

.metrics {
  display: grid;
  gap: 10px;
  margin: 0;
}

.metrics div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.metrics dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metrics dd {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
}

.legend {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.legend p {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(21, 32, 51, 0.18);
  flex: 0 0 auto;
}

.gen-heavy {
  background: var(--cyan);
}

.gen-light {
  background: var(--pink);
}

.ref-ab {
  background: var(--blue);
}

.ref-ag {
  background: var(--gray);
}

.viewer-status {
  margin-top: auto;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.problem-framing-section,
.results-section,
.figures-section,
.playground-section,
.edge-dynamics-section {
  margin-top: 32px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(21, 32, 51, 0.06);
}

.section-heading {
  max-width: 900px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin-bottom: 10px;
  font-size: 30px;
  line-height: 1.16;
}

.section-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.story-block p + p {
  margin-top: 12px;
}

.problem-thesis {
  margin-bottom: 20px;
  padding: 18px 20px;
  border: 1px solid #b9d5f0;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #eef6fb;
}

.problem-thesis blockquote {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 850;
  line-height: 1.32;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.problem-grid article {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.problem-grid span {
  display: block;
  margin-bottom: 9px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.problem-grid h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.problem-grid p,
.problem-flow p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.62;
}

.problem-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.problem-flow div {
  min-width: 0;
  padding: 16px;
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  background: #f7fafc;
}

.problem-flow .panel-kicker {
  margin-bottom: 8px;
  color: var(--green);
}

.result-group {
  display: grid;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.result-group + .result-group {
  margin-top: 26px;
}

.result-group-heading h3 {
  margin: 0;
  font-size: 23px;
  line-height: 1.2;
}

.result-table-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.result-table-heading {
  max-width: 860px;
}

.result-table-heading h4 {
  margin: 0 0 7px;
  font-size: 19px;
  line-height: 1.25;
}

.result-table-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.table-scroll {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.result-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 13px;
}

.result-table th,
.result-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e4ebf4;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.result-table thead th {
  background: #edf5fb;
  color: #22334d;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.result-table tbody th {
  font-weight: 850;
}

.result-table tbody tr:last-child th,
.result-table tbody tr:last-child td {
  border-bottom: 0;
}

.result-table .table-break th,
.result-table .table-break td {
  border-top: 2px solid var(--line);
}

.best-row th {
  color: #0f5f44;
}

.is-best {
  color: #0f6b4b;
  font-weight: 900;
}

.is-second {
  color: #42536d;
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.ablation-subtables {
  display: grid;
  gap: 18px;
}

.ablation-subtable h5 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.result-analysis {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.result-analysis strong {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.result-analysis p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.62;
}

.result-table-card.compact .result-table {
  min-width: 620px;
}

.figure-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.55fr);
  gap: 22px;
  align-items: center;
  margin: 0;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.figure-card.reverse {
  grid-template-columns: minmax(270px, 0.55fr) minmax(0, 1.45fr);
}

.figure-card.reverse a {
  order: 2;
}

.figure-card.reverse figcaption {
  order: 1;
}

.figure-card a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
}

.figure-card img {
  display: block;
  width: 100%;
  height: auto;
}

.figure-card figcaption {
  min-width: 0;
}

.figure-label {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.figure-card h3 {
  margin: 0 0 12px;
  font-size: 23px;
  line-height: 1.2;
}

.figure-card figcaption p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.playground-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.58fr);
  gap: 20px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.playground-stage {
  min-width: 0;
}

.playground-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.playground-toolbar h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

.playground-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.playground-button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
}

.playground-button:hover,
.playground-button.active {
  border-color: #8fb5d6;
  background: #edf5fb;
  color: var(--ink);
}

.playground-button.primary {
  border-color: #1f8a62;
  background: #1f8a62;
  color: #ffffff;
}

.playground-canvas-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  aspect-ratio: 2 / 1;
  touch-action: none;
}

#edge-playground {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

#edge-playground.dragging {
  cursor: grabbing;
}

.playground-caption {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.playground-side {
  display: grid;
  gap: 14px;
}

.playground-readout,
.playground-controls,
.playground-metrics article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.playground-readout {
  padding: 18px;
}

.playground-readout h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.2;
}

.playground-readout p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.playground-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.playground-metrics article {
  min-height: 88px;
  padding: 14px;
}

.playground-metrics span {
  display: block;
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.playground-metrics strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.1;
}

.playground-controls {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.range-control,
.checkbox-control {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.range-control input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.checkbox-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-control input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.edge-dynamics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 24px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.edge-animation-card {
  min-width: 0;
  margin: 0;
}

.edge-animation-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.edge-gif-metrics {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.edge-animation-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  aspect-ratio: 1458 / 768;
}

.edge-animation-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.edge-animation-card figcaption {
  padding-top: 16px;
}

.edge-animation-card h3,
.mechanism-callout h3 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.2;
}

.edge-animation-card figcaption p,
.mechanism-callout p,
.edge-summary {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.edge-explanation {
  display: grid;
  gap: 16px;
}

.mechanism-callout {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
}

.edge-evidence-grid {
  display: grid;
  gap: 10px;
}

.edge-evidence-grid article {
  padding: 14px;
  border-left: 3px solid var(--green);
  border-radius: 6px;
  background: #fbfcfe;
}

.edge-evidence-grid strong,
.edge-evidence-grid span {
  display: block;
}

.edge-evidence-grid strong {
  margin-bottom: 5px;
  font-size: 14px;
}

.edge-evidence-grid span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.edge-summary {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.paper-code-section {
  margin-top: 32px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(21, 32, 51, 0.06);
}

.method-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.method-summary article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
}

.method-summary h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.method-summary p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.formula-code-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(480px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.formula-list {
  display: grid;
  gap: 10px;
}

.formula-card {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.formula-card:hover,
.formula-card.active {
  border-color: #8fb5d6;
  background: #edf5fb;
}

.formula-card span {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.formula-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.45;
}

.formula-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.code-link-panel {
  position: sticky;
  top: 92px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
  color: #eef3f8;
  box-shadow: 0 18px 45px rgba(21, 32, 51, 0.16);
}

.code-panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.code-panel-header h3 {
  margin: 0;
  color: #ffffff;
  font-size: 20px;
}

.code-explanation {
  margin-bottom: 14px;
  color: #b8c6d8;
  font-size: 14px;
  line-height: 1.6;
}

.code-link-panel pre {
  max-height: 560px;
  margin: 0;
  overflow: auto;
  padding: 14px;
  border-radius: 8px;
  background: #0b1020;
  border: 1px solid rgba(238, 243, 248, 0.12);
}

.code-link-panel code {
  color: #dce7f7;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
}

@media (max-width: 1100px) {
  .topbar {
    align-items: flex-start;
  }

  .topbar-right {
    align-items: flex-start;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .nav {
    flex-wrap: wrap;
  }

  .workspace,
  .viewer-layout,
  .problem-grid,
  .problem-flow,
  .figure-card,
  .figure-card.reverse,
  .playground-layout,
  .edge-dynamics-layout,
  .method-summary,
  .formula-code-layout {
    grid-template-columns: 1fr;
  }

  .figure-card.reverse a,
  .figure-card.reverse figcaption {
    order: initial;
  }

  .viewer-panel,
  .viewer {
    min-height: 560px;
    height: 560px;
  }

  .code-link-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  section[id] {
    scroll-margin-top: 330px;
  }

  .topbar,
  .viewer-toolbar,
  .playground-toolbar,
  .edge-animation-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .nav {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .topbar-right,
  .top-actions,
  .github-action,
  .site-stats {
    width: 100%;
  }

  .top-actions,
  .github-action {
    align-items: flex-start;
  }

  .github-action {
    flex-direction: column;
  }

  .site-stats {
    flex-wrap: wrap;
  }

  .github-action p {
    max-width: none;
  }

  .stat-pill,
  .like-button {
    flex: 1 1 132px;
    justify-content: center;
  }

  main,
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .story-block,
  .viewer-shell,
  .problem-framing-section,
  .results-section,
  .figures-section,
  .playground-section,
  .edge-dynamics-section,
  .paper-code-section {
    padding: 16px;
  }

  .story-block h2,
  .section-heading h2 {
    font-size: 22px;
  }

  .problem-thesis blockquote {
    font-size: 18px;
  }

  .result-table-card {
    padding: 14px;
  }

  .result-table {
    font-size: 12px;
  }

  .result-table th,
  .result-table td {
    padding: 9px 10px;
  }

  .mode-button {
    flex: 1 1 auto;
  }

  .playground-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .playground-metrics {
    grid-template-columns: 1fr;
  }

  .viewer-panel,
  .viewer {
    min-height: 430px;
    height: 430px;
  }
}

/* Apple edition final overrides */
:root {
  --bg: #f5f5f7;
  --panel: rgba(255, 255, 255, 0.82);
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(29, 29, 31, 0.12);
  --green: #087f5b;
  --blue: #0071e3;
  --shadow: 0 22px 65px rgba(0, 0, 0, 0.08);
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 245, 247, 0.98) 38%, #edf1f7 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(29, 29, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 29, 31, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.52), transparent 74%);
}

.topbar {
  margin: 16px 24px 0;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(26px) saturate(180%);
}

.brand-block h1 {
  font-size: 34px;
  letter-spacing: 0;
}

.eyebrow,
.section-kicker,
.panel-kicker,
.figure-label {
  color: #0b6b57;
  font-weight: 800;
}

.nav {
  padding: 4px;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
}

.nav a {
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
}

.nav a:hover {
  background: #1d1d1f;
  color: #ffffff;
}

.github-button,
.stat-pill,
.like-button {
  border: 1px solid rgba(29, 29, 31, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

main {
  padding-top: 34px;
}

.workspace {
  grid-template-columns: minmax(320px, 0.54fr) minmax(620px, 1.46fr);
}

.story {
  gap: 16px;
}

.story-block,
.viewer-shell,
.problem-framing-section,
.results-section,
.figures-section,
.playground-section,
.edge-dynamics-section,
.paper-code-section,
.result-table-card,
.formula-card,
.code-link-panel {
  border: 1px solid rgba(29, 29, 31, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(160%);
}

.story-block {
  padding: 26px;
}

.story-block h2,
.section-heading h2 {
  font-weight: 760;
  letter-spacing: 0;
}

.story-block h2 {
  font-size: 29px;
}

.section-heading h2 {
  font-size: 34px;
}

.viewer-panel,
.viewer,
.edge-animation-figure,
.playground-canvas-wrap,
.table-scroll,
.figure-card a {
  border-radius: 18px;
}

.viewer-toolbar,
.playground-toolbar,
.edge-animation-toolbar {
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

select,
.mode-button,
.playground-toggle,
.edge-animation-toggle {
  border-radius: 999px;
}

.mode-button.active,
.mode-button:hover,
.playground-toggle[aria-pressed="true"],
.edge-animation-toggle[aria-pressed="true"] {
  background: #0071e3;
  color: #ffffff;
}

.problem-thesis {
  border-color: rgba(0, 113, 227, 0.28);
  border-left-color: #0071e3;
  border-radius: 20px;
  background: rgba(235, 245, 255, 0.78);
}

.problem-grid article,
.edge-evidence-grid article,
.method-summary article,
.innovation-grid div {
  border: 1px solid rgba(29, 29, 31, 0.1);
  border-left: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.innovation-grid div {
  box-shadow: inset 0 0 0 1px rgba(8, 127, 91, 0.08);
}

.result-table-card {
  background: rgba(255, 255, 255, 0.76);
}

.result-table thead th {
  background: rgba(0, 113, 227, 0.08);
  color: #1d1d1f;
}

.is-best {
  color: #0b6b57;
}

.is-second {
  color: #52616f;
}

.formula-card:hover,
.formula-card.active {
  border-color: rgba(0, 113, 227, 0.38);
  background: rgba(235, 245, 255, 0.9);
}

.code-link-panel {
  background: rgba(20, 24, 31, 0.94);
}

@media (max-width: 760px) {
  .topbar {
    margin: 10px 12px 0;
    border-radius: 18px;
  }

  .story-block,
  .viewer-shell,
  .problem-framing-section,
  .results-section,
  .figures-section,
  .playground-section,
  .edge-dynamics-section,
  .paper-code-section {
    border-radius: 18px;
  }
}
