:root {
  color: #e9e7df;
  background: #161713;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 90% 2%, rgba(206, 113, 70, 0.16), transparent 28%),
    radial-gradient(circle at 15% 19%, rgba(58, 129, 104, 0.12), transparent 28%),
    #161713;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hero {
  max-width: 1720px;
  margin: 0 auto;
  padding: 0 42px 54px;
}

.top-nav {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lab-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f2f0e8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.lab-mark span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  background: #252621;
  color: #e99769;
  font-family: ui-monospace, monospace;
  font-size: 9px;
}

.build-label {
  color: #777a70;
  font: 700 9px/1.3 ui-monospace, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 18px;
}

.nav-links a {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #b8b8af;
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
}

.nav-links a:hover {
  border-color: rgba(223, 139, 94, 0.55);
  color: #efc1a8;
}

.nav-links a.article-link {
  border-color: #df8b5e;
  background: #df8b5e;
  color: #221b16;
}

.nav-links a.article-link:hover {
  border-color: #efc1a8;
  background: #efc1a8;
  color: #221b16;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
  gap: 70px;
  align-items: end;
  padding-top: 66px;
}

.kicker {
  color: #df8b5e;
  font: 800 10px/1.3 ui-monospace, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

h1 {
  max-width: 850px;
  margin: 18px 0 24px;
  font-size: clamp(48px, 7vw, 88px);
  letter-spacing: -0.055em;
  line-height: 0.93;
}

.hero-grid > div:first-child p {
  max-width: 690px;
  margin: 0;
  color: #9d9e96;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.55;
}

.hero-grid > div:first-child p.hero-writeup {
  margin-top: 20px;
  font-family: Inter, ui-sans-serif, sans-serif;
  font-size: 12px;
}

.hero-writeup a {
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(223, 139, 94, 0.55);
  color: #df8b5e;
  font-weight: 800;
  text-decoration: none;
}

.hero-writeup a:hover {
  border-bottom-color: rgba(239, 193, 168, 0.85);
  color: #efc1a8;
}

.controls-card {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(38, 39, 34, 0.82);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
}

.controls-card label {
  display: block;
  margin-bottom: 8px;
  color: #a8a99f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.controls-card select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 9px;
  outline: none;
  background: #1d1e1a;
  color: #e7e5dc;
  font-size: 11px;
}

.control-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.controls-card select:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}


  min-height: 42px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 800;
}

.primary-button {
  border: 1px solid #df8b5e;
  background: #df8b5e;
  color: #211b18;
}

.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: #2b2c27;
  color: #d6d4cc;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.controls-card small {
  display: block;
  margin-top: 12px;
  color: #777a70;
  font-size: 9px;
  line-height: 1.5;
}

main {
  max-width: 1720px;
  margin: 0 auto;
  padding: 0 42px 72px;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  background: #1d1e1a;
}

.proof-strip > div {
  display: grid;
  min-height: 104px;
  align-content: center;
  gap: 7px;
  padding: 21px 26px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.proof-strip > div:last-child {
  border-right: 0;
}

.proof-strip span {
  color: #787b71;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.proof-strip strong {
  color: #eeece4;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 400;
}

.bundle-section,
.race-section,
.benchmark-section,
.explanation-section,
.methodology-section {
  padding-top: 88px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 28px;
}

.section-heading h2,
.benchmark-section h2 {
  margin: 10px 0 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.section-heading > p {
  max-width: 440px;
  margin: 0;
  color: #85877e;
  font-size: 11px;
  line-height: 1.55;
}

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

.bundle-card,
.race-card,
.benchmark-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  background: #1d1e1a;
}

.bundle-card {
  padding: 22px;
}

.bundle-card header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.bundle-card header div {
  display: grid;
  gap: 5px;
}

.bundle-card header span,
.bundle-card header small {
  color: #7e8077;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bundle-card header strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 400;
}

.bundle-track {
  display: flex;
  height: 58px;
  overflow: hidden;
  margin-top: 20px;
  border-radius: 9px;
  background: #292a25;
}

.bundle-segment {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 8px;
  color: #191713;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.bundle-segment--mono {
  background: linear-gradient(90deg, #c96f46, #e59768);
}

.bundle-segment--read {
  background: #6db398;
}

.bundle-segment--preload {
  background: #d5956e;
}

.bundle-segment--ondemand {
  background:
    repeating-linear-gradient(
      135deg,
      #a3745b 0,
      #a3745b 8px,
      #b88466 8px,
      #b88466 16px
    );
}

.bundle-card p {
  margin: 13px 0 0;
  color: #7e8077;
  font-size: 10px;
}

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

.race-card {
  min-width: 0;
  overflow: hidden;
}

.race-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.race-card > header > div:first-child {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
}

.variant-number {
  grid-row: 1 / 3;
  color: #595c53;
  font: 800 9px/1 ui-monospace, monospace;
}

.race-card h3 {
  margin: 0 0 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 400;
}

.race-card header p {
  margin: 0;
  color: #73766c;
  font-size: 9px;
}

.run-state {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 999px;
  background: #2b2c27;
  color: #8d8f85;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.open-tab-group {
  display: flex;
  gap: 6px;
}

.open-tab-button {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: transparent;
  color: #a9ab9f;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.open-tab-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.open-tab-button:hover,
.open-tab-button:focus-visible {
  border-color: rgba(102, 186, 152, 0.5);
  color: #ebe9e0;
  background: rgba(102, 186, 152, 0.1);
}

.open-tab-button--raw:hover,
.open-tab-button--raw:focus-visible {
  border-color: rgba(120, 158, 223, 0.55);
  color: #ebe9e0;
  background: rgba(120, 158, 223, 0.12);
}

.run-state.is-running {
  background: rgba(222, 139, 91, 0.14);
  color: #df8b5e;
}

.run-state.is-ready {
  background: rgba(77, 162, 127, 0.14);
  color: #66ba98;
}

.run-state.is-error {
  background: rgba(210, 75, 75, 0.14);
  color: #e17468;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.metric-row > div {
  display: grid;
  gap: 4px;
  padding: 13px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.metric-row > div:last-child {
  border-right: 0;
}

.metric-row span {
  color: #6f7268;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-row strong {
  color: #ebe9e0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 400;
}

.frame-wrap {
  height: 582px;
  overflow: hidden;
  background: #efede7;
}

.frame-wrap iframe {
  width: 220%;
  height: 1280px;
  border: 0;
  transform: scale(0.4545);
  transform-origin: top left;
}

.waterfall {
  min-height: 150px;
  padding: 15px 18px 17px;
  background: #191a17;
  color: #66695f;
  font-size: 9px;
}

.waterfall-scale {
  display: flex;
  justify-content: space-between;
  margin: 0 52px 8px 96px;
  color: #55584f;
  font: 700 7px/1 ui-monospace, monospace;
}

.waterfall-row {
  display: grid;
  grid-template-columns: 84px 1fr 42px;
  gap: 9px;
  align-items: center;
  min-height: 21px;
}

.waterfall-row > span {
  overflow: hidden;
  color: #85877d;
  font: 700 8px/1 ui-monospace, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.waterfall-row > div {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 3px;
  background:
    linear-gradient(90deg, transparent 24%, #2d2f29 25%, transparent 26%) 0 0 /
      25% 100%,
    #242520;
}

.waterfall-row b {
  color: #66695f;
  font: 700 7px/1 ui-monospace, monospace;
  text-align: right;
}

.waterfall-bar {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 3px;
}

.waterfall-bar--initial {
  background: #70b79b;
}

.waterfall-bar--deferred {
  background: #dd9063;
}

.waterfall-bar--preloaded {
  background: #d8ad55;
}

.waterfall-markers {
  position: relative;
  height: 24px;
  margin: 7px 51px 0 93px;
  border-top: 1px solid #32342e;
}

.waterfall-markers span {
  position: absolute;
  top: 5px;
  color: #70b79b;
  font: 800 7px/1 ui-monospace, monospace;
  transform: translateX(-50%);
}

.waterfall-markers span::before {
  position: absolute;
  bottom: 10px;
  left: 50%;
  width: 1px;
  height: 22px;
  background: currentColor;
  content: "";
  opacity: 0.7;
}

.waterfall-markers .is-edit {
  color: #dd9063;
}

.benchmark-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(400px, 1.2fr);
  gap: 70px;
  align-items: start;
}

.benchmark-section > div:first-child > p {
  max-width: 520px;
  color: #85877e;
  font-size: 11px;
  line-height: 1.6;
}

.benchmark-card {
  padding: 22px;
}

.benchmark-card > button {
  width: 100%;
  min-height: 42px;
  border: 1px solid #71b79c;
  border-radius: 9px;
  background: #71b79c;
  color: #17201c;
  font-size: 10px;
  font-weight: 900;
}

.benchmark-card > p {
  margin: 12px 0 0;
  color: #73766c;
  font: 700 8px/1.4 ui-monospace, monospace;
  text-align: center;
  text-transform: uppercase;
}

.benchmark-results {
  margin-top: 18px;
  overflow-x: auto;
}

.benchmark-results table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px;
}

.benchmark-results th,
.benchmark-results td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #aaa9a1;
  text-align: right;
}

.benchmark-results th:first-child,
.benchmark-results td:first-child {
  text-align: left;
}

.benchmark-results th {
  color: #66695f;
  font-size: 7px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.benchmark-results .is-win {
  color: #71b79c;
}

.benchmark-results .is-tradeoff,
.benchmark-results .is-loss {
  color: #df8b5e;
}

.benchmark-results .comparison-row td {
  color: #74776d;
  font-size: 8px;
}

.benchmark-results .comparison-row .is-win {
  color: #71b79c;
}

.benchmark-results .comparison-row .is-tradeoff {
  color: #df8b5e;
}

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

.explanation-section > div {
  min-height: 200px;
  padding: 23px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.explanation-number {
  color: #5e6158;
  font: 800 9px/1 ui-monospace, monospace;
}

.explanation-section h3 {
  margin: 34px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 400;
}

.explanation-section p {
  margin: 0;
  color: #7f8178;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  line-height: 1.55;
}

.methodology-section .section-heading {
  align-items: start;
}

.methodology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.methodology-card {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #191a16;
}

.methodology-card h3 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 400;
  color: #ebe9e0;
}

.methodology-card p {
  margin: 0;
  color: #97998f;
  font-size: 11.5px;
  line-height: 1.6;
}

.methodology-card code {
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #dfd4bd;
  font-size: 10.5px;
}

.pp-callout {
  padding: 18px 20px;
  border: 1px solid rgba(223, 139, 94, 0.3);
  border-radius: 12px;
  background: rgba(223, 139, 94, 0.08);
  margin-bottom: 20px;
}

.pp-callout p {
  margin: 0;
  color: #e7c9b2;
  font-size: 11.5px;
  line-height: 1.6;
}

.pp-callout strong {
  color: #f2e3d4;
}

.methodology-writeup {
  margin: 0;
  color: #85877e;
  font-size: 12px;
  line-height: 1.6;
}

.methodology-writeup a {
  color: #df8b5e;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(223, 139, 94, 0.4);
}

.methodology-writeup a:hover {
  color: #efc1a8;
  border-bottom-color: rgba(239, 193, 168, 0.7);
}

.page-footer {
  display: flex;
  max-width: 1720px;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 0 42px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #5e6158;
  font: 700 8px/1.4 ui-monospace, monospace;
}

.benchmark-host {
  position: fixed;
  top: -10000px;
  left: -10000px;
  width: 1280px;
  height: 800px;
  overflow: hidden;
  pointer-events: none;
}

.benchmark-host iframe {
  width: 1280px;
  height: 800px;
  border: 0;
}

@media (max-width: 980px) {
  .hero-grid,
  .benchmark-section {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .race-grid {
    grid-template-columns: 1fr;
  }

  .frame-wrap iframe {
    width: 160%;
    height: 930px;
    transform: scale(0.625);
  }
}

@media (max-width: 680px) {
  .hero,
  main,
  .page-footer {
    padding-inline: 16px;
  }

  .top-nav {
    min-height: 62px;
  }

  .build-label {
    display: none;
  }

  .hero-grid {
    padding-top: 46px;
  }

  h1 {
    font-size: 48px;
  }

  .control-actions,
  .proof-strip,
  .bundle-bars,
  .explanation-section {
    grid-template-columns: 1fr;
  }

  .proof-strip > div {
    min-height: 88px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .proof-strip > div:last-child {
    border-bottom: 0;
  }

  .section-heading {
    display: grid;
    gap: 16px;
  }

  .frame-wrap {
    height: 581px;
  }

  .frame-wrap iframe {
    width: 180%;
    height: 1046px;
    transform: scale(0.5555);
  }

  .benchmark-section {
    grid-template-columns: 1fr;
  }

  .page-footer {
    display: grid;
    padding-block: 20px;
  }
}
