@font-face {
  font-family: "PT Mono";
  src: url("assets/fonts/pt_mono.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #101714;
  --panel: #17211b;
  --raised: #1c2822;
  --text: #eeeae0;
  --muted: #b8c0b5;
  --brass: #e4bd72;
  --line: #344139;
  --font: "Segoe UI", system-ui, sans-serif;
  --mono: "PT Mono", Consolas, monospace;
  --header-height: 78px;
  --section-nav-height: 58px;
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-height) + var(--section-nav-height) + 24px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.65 var(--font); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 5px; }
::selection { background: var(--brass); color: var(--bg); }
.shell { width: min(calc(100% - 96px), 1248px); margin-inline: auto; }
.skip-link { position: fixed; top: 10px; left: 12px; z-index: 10; padding: 8px 16px; background: var(--brass); color: var(--bg); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; top: 0; z-index: 5; background: #101714f7; border-bottom: 1px solid var(--line); }
.header-inner { min-height: calc(var(--header-height) - 1px); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; flex: none; gap: 12px; font-size: 17px; font-weight: 650; line-height: 1.2; letter-spacing: .065em; white-space: nowrap; }
.brand b { color: var(--brass); font-weight: inherit; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font: 10px/1.35 var(--mono); letter-spacing: .13em; }
.site-nav { display: flex; align-items: center; gap: clamp(13px, 1.6vw, 25px); }
.site-nav a, .header-discord, .footer-discord { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .875rem; white-space: nowrap; }
.site-nav a:hover, .header-discord:hover, .footer-discord:hover { color: var(--text); }
.site-nav a[aria-current="page"], .language-control a[aria-current="page"] { color: var(--brass); }
.header-actions { display: flex; gap: 17px; align-items: center; }
.language-control { display: flex; align-items: center; color: var(--muted); font: .8125rem/1 var(--mono); }
.language-control a { display: grid; min-width: 32px; min-height: 44px; place-items: center; }
.menu-toggle { display: none; width: 44px; min-height: 44px; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; cursor: pointer; }
.menu-toggle span { display: block; width: 17px; height: 1px; margin: 4px auto; background: var(--text); }

.section-navigation { position: sticky; top: calc(var(--header-height) - 1px); z-index: 4; background: #141e18f5; border-block: 1px solid var(--line); backdrop-filter: blur(12px); }
.section-links { display: flex; align-items: stretch; gap: 33px; min-height: calc(var(--section-nav-height) - 2px); }
.section-links a { display: grid; place-items: center; padding: 11px 2px 9px; border-bottom: 2px solid transparent; color: var(--muted); font-size: .9375rem; line-height: 1.25; }
.section-links a[aria-current="location"], .section-links a:hover { color: var(--brass); }
.section-links a[aria-current="location"] { border-bottom-color: var(--brass); }

.end-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 35px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 19px; border: 1px solid transparent; border-radius: 5px; font-weight: 630; text-align: center; }
.primary { background: var(--brass); color: #172019; }
.primary:hover { background: #f0cf91; }
.secondary { background: var(--panel); border-color: var(--line); }
.secondary:hover { background: var(--raised); }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; gap: 18px 36px; flex-wrap: wrap; padding-block: 17px; }
.footer-inner > p { color: var(--muted); font-size: .875rem; margin-right: auto; }

:root {
  --gold: #f3c679;
  --mint: #8ce2aa;
  --blue: #8fcff4;
  --rose: #ee9fad;
  --amber: #e8a878;
  --track: #2a3931;
}

h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
main :is(h1, h2, h3, h4) { overflow-wrap: anywhere; }
.gold { --accent: var(--gold); }
.mint { --accent: var(--mint); }
.blue { --accent: var(--blue); }
.rose { --accent: var(--rose); }
.amber { --accent: var(--amber); }
.mono, .measurement-value { font-family: var(--mono); }

.lead {
  background: radial-gradient(ellipse at 65% 0, #20352a, transparent 83%), #121c16;
}
.lead-layout { padding-block: clamp(30px, 4.4vw, 64px) clamp(22px, 3vw, 42px); }
.lead h1 { margin: 0 0 clamp(20px, 2.8vw, 36px); }
.lead-highlights, .profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.headline-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  background: #18241d;
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--accent);
  border-radius: 6px;
  padding: 15px clamp(12px, 2vw, 24px);
}
a.headline-metric:hover { background: #213027; border-color: var(--accent); }
.headline-metric strong {
  color: var(--accent);
  font-weight: 400;
  font-size: min(clamp(1.65rem, 3.4vw, 2.75rem), 4.4vw);
  line-height: 1.06;
}
.headline-metric span { color: var(--muted); font-size: .875rem; line-height: 1.35; overflow-wrap: anywhere; }

.content-section { padding-block: clamp(32px, 4.5vw, 62px); }
.content-section h2 { margin-bottom: clamp(17px, 2.2vw, 28px); }
.plot-grid, .benchmark-grid, .result-grid, .achievement-grid { display: grid; gap: 14px; }
.plot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.benchmark-grid, .result-grid, .achievement-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plot, .result-card, .build-card, .bug-entry {
  min-width: 0;
  padding: clamp(14px, 1.8vw, 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.plot { display: flex; flex-direction: column; gap: 16px; background: #15221b; }
.plot-heading, .section-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 5px 12px;
}
.plot-label { color: var(--muted); font-size: .75rem; line-height: 1.35; }
.chart-values { display: grid; gap: 12px; }
.chart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) fit-content(58%);
  align-items: baseline;
  gap: 4px 8px;
  font-size: .875rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.chart-row dt { color: var(--text); }
.chart-row .measurement-value { color: var(--accent); text-align: end; }
.chart-track {
  position: relative;
  grid-column: 1 / -1;
  height: 10px;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), #53685a 0 25%), var(--track);
}
.chart-track::before, .chart-track::after {
  content: "";
  position: absolute;
  inset-block: 0;
  border-radius: 3px;
}
.chart-track::before {
  inset-inline-start: 0;
  width: var(--low);
  background: var(--accent);
}
.chart-track::after {
  inset-inline-start: var(--low);
  width: calc(var(--high) - var(--low));
  background: repeating-linear-gradient(135deg, var(--accent) 0 2px, transparent 2px 5px);
}
.plot figcaption { color: var(--muted); }
.profile-stats { margin-top: 14px; }
.profile-stats strong { font-size: clamp(1.3rem, 2vw, 1.8rem); }
.optimization, .bugfixes { background: #121b16; border-block-start: 1px solid var(--line); }
.section-heading { margin-bottom: 12px; }

body[data-ss-type="improvements"] .benchmark-plot h3 {
  font-size: var(--ss-card-title, 1.125rem);
  line-height: 1.3;
  letter-spacing: normal;
}
.benchmark-plot .plot-heading { flex-direction: column; }
.magnet-grid { margin-top: 14px; align-items: stretch; }
.magnet-plot { border-top: 2px solid var(--mint); }
.result-card { display: grid; align-content: start; gap: 7px; }
.result-card strong {
  color: var(--gold);
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  font-weight: 400;
  line-height: 1.1;
}
.result-label { color: var(--muted); font-size: .875rem; line-height: 1.35; }
.result-card p, .client-settings p, .build-card p, .bug-entry p { color: var(--muted); }
.particle-result { border-top: 2px solid var(--gold); }
.particle-result strong { font-size: clamp(2rem, 4vw, 3rem); }
.text-link {
  color: var(--brass);
  font-size: .875rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;
  overflow-wrap: anywhere;
}
.text-link:hover { color: var(--text); }
.source-links { margin-top: 14px; display: flex; gap: 8px 18px; flex-wrap: wrap; }
.server-work, .client-settings { margin-top: clamp(22px, 3vw, 36px); }
.server-work h3, .client-settings h3 { margin-bottom: 12px; }
.client-settings { border-left: 2px solid var(--blue); padding-inline-start: 16px; }
.build-card, .bug-entry { display: grid; align-content: start; gap: 7px; }
.end-links { margin-top: 24px; }

@media (max-width: 1140px) {
  :root { --header-height: 66px; }
  .menu-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 48px 15px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { font-size: 1rem; white-space: normal; }
}

@media (max-width: 850px) {
  .shell { width: calc(100% - 48px); }
  .site-nav { padding-inline: 24px; }
  .benchmark-grid, .result-grid, .achievement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  :root { --header-height: 61px; }
  .shell { width: calc(100% - 36px); }
  .site-nav { padding-inline: 18px; }
  .header-inner, .header-actions { gap: 9px; }
  .brand { gap: 8px; font-size: 15px; }
  .brand img { width: 30px; height: 30px; }
  .brand small { font-size: 9px; }
  .header-discord { display: none; }
  .section-links {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .98fr);
    gap: 5px;
  }
  .section-links a { font-size: .8125rem; text-align: center; overflow-wrap: anywhere; }
  .plot-grid, .lead-highlights, .profile-stats, .result-grid, .achievement-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .lead-highlights, .profile-stats { gap: 6px; }
  .headline-metric {
    display: grid;
    grid-template-columns: 8em minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
  }
  .headline-metric strong { font-size: clamp(1.25rem, 5vw, 1.6rem); }
  .footer-inner { gap: 6px 16px; }
  .footer-inner > p { order: 1; width: 100%; }
}

@media (max-width: 460px) {
  .benchmark-grid { grid-template-columns: minmax(0, 1fr); }
  .headline-metric { grid-template-columns: minmax(0, min(46%, 7.2rem)) minmax(0, 1fr); }
  .headline-metric strong { overflow-wrap: anywhere; }
}

@media (max-width: 365px) {
  .brand { gap: 6px; font-size: 13px; }
  .brand img { width: 27px; height: 27px; }
  .language-control a { min-width: 28px; }
}

.bar-1 { --low: 91.6667%; --high: 97.9067%; }
.bar-2 { --low: 66.6667%; --high: 66.6667%; }
.bar-3 { --low: 27.5733%; --high: 34.6933%; }
.bar-4 { --low: 24.7200%; --high: 26.7200%; }
.bar-5 { --low: 10.6667%; --high: 12.0000%; }
.bar-6 { --low: 31.3000%; --high: 31.3000%; }
.bar-7 { --low: 30.9000%; --high: 30.9000%; }
.bar-8 { --low: 22.9200%; --high: 22.9200%; }
.bar-9 { --low: 100.0000%; --high: 100.0000%; }
.bar-10 { --low: 4.2290%; --high: 4.2290%; }
.bar-11 { --low: 52.9236%; --high: 52.9236%; }
.bar-12 { --low: 30.3571%; --high: 30.3571%; }
.bar-13 { --low: 73.4084%; --high: 73.4084%; }
.bar-14 { --low: 0.0000%; --high: 0.0000%; }
.bar-15 { --low: 16.6667%; --high: 16.6667%; }
.bar-16 { --low: 21.7391%; --high: 21.7391%; }
