:root {
  --bg: #000;
  --fg: #f4f0e8;
  --muted: #9c968d;
  --line: rgba(244, 240, 232, 0.14);
  --paper: #fff;
  --ink: #111;
  --muted-ink: #5c564e;
  --line-ink: rgba(0, 0, 0, 0.12);
  --red: #ff0000;
  --accent: #e53935;
  --header: 84px;
  --gutter: 3rem;
  --measure: 1120px;
  --sans: Inter, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header);
  background: var(--paper);
  color-scheme: light;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--red);
  color: #fff;
}

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  background: var(--fg);
  color: var(--bg);
  padding: 0.6rem 0.9rem;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(var(--measure), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header);
  background: var(--bg);
  color: var(--fg);
  border-bottom: 1px solid var(--line);
}

.bar {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.62rem;
  color: #fff;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
}

.logo-bar {
  width: 4px;
  height: 1.22em;
  background: #ff0000;
}

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  flex: 0 0 auto;
  padding: 0.4rem;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
}

.burger,
.burger::before,
.burger::after {
  display: block;
  width: 18px;
  height: 1px;
  background: currentColor;
  position: relative;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger::before,
.burger::after {
  content: "";
  position: absolute;
  left: 0;
}

.burger::before {
  top: -6px;
}

.burger::after {
  top: 6px;
}

.menu-open .burger {
  background: transparent;
}

.menu-open .burger::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-open .burger::after {
  top: 0;
  transform: rotate(-45deg);
}

.menu {
  position: fixed;
  top: var(--header);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  align-items: safe center;
  overflow-y: auto;
  padding: 1.5rem 0;
  background: var(--bg);
  color: var(--fg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.menu-open .menu {
  opacity: 1;
  visibility: visible;
}

.menu ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.menu a {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(2.15rem, 5vw, 3.6rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-decoration: none;
  background-image: linear-gradient(var(--red), var(--red));
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 0 1px;
  transition: background-size 0.35s ease, opacity 0.45s ease, transform 0.45s ease;
}

.menu a:hover,
.menu a:focus-visible {
  background-size: 100% 1px;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-inner > * {
    animation: hero-in 0.9s ease both;
  }

  .hero-inner > :nth-child(1) { animation-delay: 0.08s; }
  .hero-inner > :nth-child(2) { animation-delay: 0.22s; }
  .hero-inner > :nth-child(3) { animation-delay: 0.4s; }

  .hero-cue {
    animation: hero-in 0.9s ease 0.55s both;
  }

  .hero-cue svg {
    animation: hero-cue 2s ease-in-out infinite;
  }

  .reveal .block {
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity 0.75s ease,
      transform 0.75s ease;
  }

  .reveal .block.is-in {
    opacity: 1;
    transform: none;
  }

  .reveal .block .wrap {
    transition: transform 0.45s ease;
  }

  .reveal .block.is-in:hover .wrap {
    transform: scale(1.015);
  }

  .reveal #capabilities.is-in:hover .wrap,
  .reveal #sectors.is-in:hover .wrap,
  .reveal #simulator.is-in:hover .wrap {
    transform: none;
  }

  .reveal .capabilities li,
  .reveal .sectors li {
    opacity: 0;
  }

  .reveal .block.is-in .capabilities li,
  .reveal .block.is-in .sectors li {
    animation: item-in 0.7s ease forwards;
  }

  .reveal .capabilities li:nth-child(1),
  .reveal .sectors li:nth-child(1) { animation-delay: 0.06s; }
  .reveal .capabilities li:nth-child(2),
  .reveal .sectors li:nth-child(2) { animation-delay: 0.16s; }
  .reveal .capabilities li:nth-child(3),
  .reveal .sectors li:nth-child(3) { animation-delay: 0.26s; }
  .reveal .sectors li:nth-child(4) { animation-delay: 0.36s; }
  .reveal .sectors li:nth-child(5) { animation-delay: 0.46s; }

  .capabilities li,
  .sectors li,
  .capabilities li::after,
  .sectors li::before,
  .sectors h3,
  .capabilities .index {
    transition:
      transform 0.4s ease,
      box-shadow 0.4s ease,
      background-color 0.4s ease,
      color 0.4s ease;
  }

  .capabilities li::after,
  .sectors li::before {
    transition: transform 0.4s ease, height 0.4s ease, opacity 0.4s ease;
  }

  .capabilities li:hover,
  .capabilities li:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.08);
  }

  .capabilities li:hover::after,
  .capabilities li:focus-within::after {
    width: 2.6rem;
  }

  .capabilities li:hover .index,
  .capabilities li:focus-within .index {
    color: var(--red);
  }

  .sectors li:hover,
  .sectors li:focus-within {
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.06);
    transform: translateY(-3px);
  }

  .sectors li:hover::before,
  .sectors li:focus-within::before {
    height: calc(100% - 2.4rem);
    opacity: 1;
  }

  .sectors li:hover h3,
  .sectors li:focus-within h3 {
    transform: translateX(6px);
  }

  .menu a {
    opacity: 0;
    transform: translateY(12px);
  }

  .menu-open .menu a {
    opacity: 1;
    transform: none;
  }

  .menu-open .menu li:nth-child(1) a { transition-delay: 0.05s; }
  .menu-open .menu li:nth-child(2) a { transition-delay: 0.1s; }
  .menu-open .menu li:nth-child(3) a { transition-delay: 0.15s; }
  .menu-open .menu li:nth-child(4) a { transition-delay: 0.2s; }
  .menu-open .menu li:nth-child(5) a { transition-delay: 0.25s; }
  .menu-open .menu li:nth-child(6) a { transition-delay: 0.3s; }
  .menu-open .menu li:nth-child(7) a { transition-delay: 0.35s; }
}

@keyframes hero-cue {
  0%,
  100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes item-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - var(--header));
  min-height: calc(100svh - var(--header));
  display: flex;
  align-items: center;
  align-items: safe center;
  justify-content: center;
  text-align: left;
  padding: 4.5rem 0 5rem;
  background: radial-gradient(ellipse 90% 70% at 50% 42%, #09090b 0%, #000000 70%);
  color: var(--fg);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero .eyebrow {
  justify-content: flex-start;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: normal;
  text-transform: none;
  color: rgba(244, 240, 232, 0.82);
}

.hero .eyebrow::before {
  content: none;
}

.hero .eyebrow img {
  width: auto;
  height: 1.35em;
  flex: 0 0 auto;
}

.hero h1 {
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: clamp(2.45rem, 5.1vw, 4.55rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 12em;
}

.line {
  display: block;
}

.hero-lead {
  max-width: 40rem;
  margin-top: 3.5rem;
  color: rgba(244, 240, 232, 0.78);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.hero-cue {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.75rem;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  margin-inline: auto;
  gap: 0.55rem;
  color: #71717a;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 200ms ease;
}

.hero-cue svg {
  display: block;
  transition: color 200ms ease;
}

.hero-cue:hover,
.hero-cue:focus-visible {
  color: #fff;
}

.hero-cue:hover svg,
.hero-cue:focus-visible svg {
  color: #e53935;
}


.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.75rem 0.85rem;
  margin-top: 2.35rem;
}

.hero .actions {
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.8rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.92rem;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.hero .btn-primary {
  background: var(--fg);
  color: #111;
}

.hero .btn-secondary {
  border-color: rgba(244, 240, 232, 0.45);
  color: var(--fg);
}

.block .btn-primary {
  background: var(--ink);
  color: #fff;
}

.block .btn-secondary {
  border-color: rgba(0, 0, 0, 0.28);
  color: var(--ink);
}

.btn:hover,
.btn:focus-visible {
  border-color: var(--accent);
}

.hero .btn-primary:hover,
.hero .btn-primary:focus-visible,
.block .btn-primary:hover,
.block .btn-primary:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.block,
.footer {
  background: var(--paper);
  color: var(--ink);
  --muted: var(--muted-ink);
  --line: var(--line-ink);
  --fg: var(--ink);
}

.block {
  border-top: 1px solid var(--line);
  padding: clamp(4.75rem, 10vw, 8rem) 0;
}

.hero + .block {
  border-top: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.4rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 2px;
  height: 0.85em;
  background: var(--red);
  flex: 0 0 auto;
}

h2 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.85rem, 3.4vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 18em;
}

.lede {
  max-width: 40rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

.prose {
  max-width: 40rem;
  margin-top: 1.75rem;
  display: grid;
  gap: 1.15rem;
}

.prose p {
  color: #2a2724;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.statement {
  max-width: 16em;
  font-size: clamp(2rem, 3.8vw, 3.15rem);
  line-height: 1.12;
}

.text-link {
  display: inline-block;
  margin-top: 2.25rem;
  padding-bottom: 0.2rem;
  color: inherit;
  font-size: 0.98rem;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, currentColor 35%, transparent);
}

.text-link:hover,
.text-link:focus-visible {
  border-bottom-color: var(--red);
}

.capabilities {
  list-style: none;
  padding: 1.75rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
  border-top: 0;
}

.capabilities li {
  position: relative;
  padding: 1.6rem 1.4rem 1.7rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.capabilities li::after {
  content: "";
  position: absolute;
  top: 0;
  left: 1.4rem;
  width: 1.35rem;
  height: 2px;
  background: #ff0000;
  transform: none;
  transform-origin: left center;
}

.index {
  display: block;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
}

.capabilities h3,
.sectors h3,
.governance h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.capabilities p,
.sectors p,
.governance p {
  margin-top: 0.85rem;
  color: #161616;
  font-size: 0.98rem;
  line-height: 1.65;
}

.sectors {
  list-style: none;
  display: grid;
  gap: 0.7rem;
  margin-top: 2.5rem;
  border-top: 0;
}

.sectors li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(14rem, 0.85fr) 1.15fr;
  gap: 1rem 3rem;
  align-items: baseline;
  padding: 1.35rem 1.35rem 1.35rem 1.5rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.sectors li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.35rem;
  width: 2px;
  height: 1.15rem;
  background: #ff0000;
  opacity: 1;
}

.sectors p {
  margin-top: 0;
}

.governance {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem 4rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.footer {
  background: #000;
  color: #f4f0e8;
  border-top: 2px solid #ff0000;
  padding: 2.15rem 0 2.4rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer .logo {
  color: #fff;
  font-size: 1.25rem;
}

.footer p,
.footer-meta a {
  color: rgba(244, 240, 232, 0.72);
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem 1.5rem;
}

.footer-meta a:hover,
.footer-meta a:focus-visible {
  color: #fff;
  border-bottom: 1px solid #ff0000;
}

@media (max-width: 900px) {
  .capabilities,
  .governance,
  .sectors li {
    grid-template-columns: 1fr;
  }

  .sectors p {
    margin-top: 0.45rem;
  }
}

@media (max-width: 640px) {
  :root {
    --header: 68px;
    --gutter: 1.25rem;
  }

  .logo {
    gap: 0.45rem;
    font-size: 1.35rem;
  }

  .hero-lead {
    margin-top: 2.25rem;
  }

  .hero,
  .hero-inner,
  .hero .eyebrow,
  .hero .actions,
  .actions {
    align-items: flex-start;
    text-align: left;
    justify-content: flex-start;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(1.5rem, 7.6vw, 1.85rem);
  }

  .footer-inner,
  .footer-meta {
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-cue svg {
    animation: none;
  }

  .menu,
  .menu a,
  .burger,
  .burger::before,
  .burger::after {
    transition: none;
  }

  .menu a {
    opacity: 1;
    transform: none;
  }
}

.sim.block {
  color: #f4f0e8;
  background: linear-gradient(180deg, #050608 0%, #0b0c10 100%);
  border-top: 0;
  --muted: #a1a1aa;
  --red: #e53935;
}

.sim h2,
.sim h3 {
  color: #f4f0e8;
}

.sim.block,
.sim-drawer {
  font-feature-settings: "zero" 0;
  font-variant-numeric: lining-nums tabular-nums;
}

.sim-ledger dd,
.sim-base dd,
.sim-base-figure,
.sim-unit,
.sim-scale,
.sim-readout {
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "zero" 0;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0;
}

.sim-controls,
.sim-card {
  border: 1px solid rgba(244, 240, 232, 0.28);
  background: #121316;
}

.sim-layer {
  margin-top: 1.75rem;
}

h2.sim-title {
  position: relative;
  max-width: none;
  margin: 0 0 1.5rem;
  padding-left: 0.85rem;
  color: #f4f4f5;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

h2.sim-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  width: 2px;
  height: 0.85em;
  background: var(--red);
}

.sim-kicker {
  color: #f4f4f5;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sim-note {
  max-width: 40rem;
  margin-top: 0.35rem;
  color: #a1a1aa;
  font-size: 0.95rem;
  line-height: 1.45;
}

.sim-base {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem 2rem;
  max-width: 40rem;
  margin: 0.5rem 0 0;
  padding: 0.75rem 0.85rem 0.7rem;
  border: 1px solid rgba(244, 240, 232, 0.28);
  background: #121316;
}

.sim-base-field,
.sim-base-calc {
  display: grid;
  align-content: start;
  gap: 0.4rem;
  min-width: 0;
}

.sim-base-field:nth-child(1),
.sim-base-field:nth-child(2) {
  position: relative;
}

.sim-base-field:nth-child(1)::after,
.sim-base-field:nth-child(2)::after {
  position: absolute;
  top: 1.26rem;
  left: calc(100% + 1rem);
  color: rgba(244, 240, 232, 0.42);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
  pointer-events: none;
  transform: translateX(-50%);
}

.sim-base-field:nth-child(1)::after {
  content: "×";
}

.sim-base-field:nth-child(2)::after {
  content: "=";
}

.sim-base-margin .sim-base-figure {
  text-align: center;
}

.sim-base dt {
  color: #a1a1aa;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
}

.sim-base dd {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  color: #f4f4f5;
  font-size: 0.78rem;
  line-height: 1.25;
}

.sim-base-field .sim-unit {
  width: 100%;
  justify-content: space-between;
}

.sim-base .sim-readout {
  flex: 1 1 auto;
  justify-content: center;
  gap: 0.28rem;
  min-width: 0;
}

.sim-base .sim-unit input {
  width: 4.5ch;
}

.sim-base .sim-unit input#sim-volume {
  width: 4ch;
}

.sim-base .sim-unit input#sim-price {
  width: 5.5ch;
}

.sim-base .sim-unit input#sim-margin {
  width: 2.8ch;
}

.sim-base-figure {
  margin: 0;
  color: #f4f4f5;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.2;
}

.sim-base-hint {
  margin: 0;
  color: #71717a;
  font-size: 0.68rem;
  line-height: 1.2;
}

.sim-controls {
  display: grid;
  gap: 0;
  max-width: 28rem;
  margin-top: 0.75rem;
  padding: 0.5rem 0.7rem 0.4rem;
}

.sim-stage {
  margin-top: 1.75rem;
}

.sim-stage .sim-base {
  width: 100%;
  max-width: none;
}

.sim-stage .sim-controls {
  width: calc((100% - 1rem) / 2);
  max-width: none;
}

.sim-stage .sim-layer:first-child {
  margin-top: 0;
}

.sim-field {
  display: grid;
  gap: 0.28rem;
}

.sim-field-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.sim-field label {
  font-size: 0.78rem;
  line-height: 1.2;
}

.sim-step {
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid #27272a;
  background: #09090b;
  color: #f4f0e8;
  font: inherit;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
}

.sim-step:hover,
.sim-step:focus-visible {
  border-color: #e53935;
  color: #e53935;
}

.sim-step:disabled {
  color: #52525b;
  cursor: default;
  border-color: #27272a;
}

.sim-unit {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.22rem;
  color: #a1a1aa;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.sim-readout {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.05rem;
  min-width: 3.6rem;
}

.sim-unit input {
  width: 3.4ch;
  min-width: 1.5ch;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f4f0e8;
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: right;
  field-sizing: content;
  appearance: textfield;
}

.sim-unit input::-webkit-outer-spin-button,
.sim-unit input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.sim-unit input:focus {
  outline: none;
}

.sim input[type="range"] {
  width: 100%;
  height: 11px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.sim input[type="range"]::-webkit-slider-runnable-track {
  height: 1px;
  background: #27272a;
}

.sim input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 9px;
  height: 9px;
  margin-top: -4px;
  border: 0;
  background: #e53935;
}

.sim-scale {
  display: flex;
  justify-content: space-between;
  color: #71717a;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.sim input[type="range"]::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 0;
  background: #e53935;
}

.sim input[type="range"]::-moz-range-track {
  height: 1px;
  background: #27272a;
}

.sim-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.7rem;
}

.sim-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.95rem 1rem 0.85rem;
}

.sim-card h3 {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.sim-card .sim-note {
  margin-top: 0;
  font-size: 0.95rem;
}

.sim-ledger {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin: 0;
}

.sim-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 1rem;
  padding: 0.34rem 0;
}

.sim-row dt {
  color: #a1a1aa;
  font-size: 0.92rem;
  line-height: 1.35;
  text-align: left;
}

.sim-row dd {
  margin: 0;
  color: #f4f4f5;
  font-size: 0.92rem;
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
}

.sim-break {
  margin-top: auto;
  padding-top: 0.48rem;
  border-top: 1px solid #27272a;
}

.sim-total dt,
.sim-total dd {
  font-size: 1.12rem;
  font-weight: 600;
}

.sim-ledger dd.is-loss {
  color: #e53935;
}

.sim-ledger dd.is-gain {
  color: #3dbe7a;
}

.sim-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.05rem;
  margin: 0.1rem 0 0.55rem;
  color: #71717a;
}

.sim-aside-arrow {
  display: block;
  margin-right: 1.1rem;
}

.sim-explain {
  padding: 0.38rem 0.6rem;
  border: 1px solid #27272a;
  background: #0c0d12;
  color: #f4f4f5;
  font: inherit;
  font-size: 0.84rem;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.sim-explain:hover,
.sim-explain:focus-visible {
  border-color: #e53935;
  color: #fff;
}

.sim-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  visibility: hidden;
  transition: visibility 0s linear 0.34s;
}

.sim-drawer.is-open {
  visibility: visible;
  transition: visibility 0s;
}

.sim-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(5, 6, 8, 0.55);
  backdrop-filter: blur(8px);
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.34s ease;
}

.sim-drawer.is-open .sim-backdrop {
  opacity: 1;
}

.sim-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(28rem, 100%);
  height: 100%;
  padding: 4.5rem 1.75rem 2rem;
  overflow: auto;
  background: #0c0d12;
  border-left: 1px solid #27272a;
  color: #f4f0e8;
  transform: translateX(100%);
  transition: transform 0.34s ease;
}

.sim-drawer.is-open .sim-panel {
  transform: translateX(0);
}

.sim-panel h2,
.sim-panel h3 {
  color: #f4f0e8;
}

.sim-panel h2 {
  max-width: none;
  font-size: 1.65rem;
}

.sim-panel h3 {
  margin-top: 1.6rem;
  font-size: 0.95rem;
  letter-spacing: -0.03em;
}

.sim-panel p {
  margin-top: 0.6rem;
  color: #a1a1aa;
  line-height: 1.55;
}

.sim-drawer-close {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid #27272a;
  background: transparent;
  color: #f4f0e8;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.sim-drawer-close:hover,
.sim-drawer-close:focus-visible {
  border-color: #e53935;
  color: #e53935;
}

@media (prefers-reduced-motion: reduce) {
  .sim-drawer,
  .sim-backdrop,
  .sim-panel {
    transition: none;
  }
}

@media (max-width: 1100px) {
  .sim-base {
    grid-template-columns: 1fr 1fr;
  }

  .sim-base-field:nth-child(1)::after,
  .sim-base-field:nth-child(2)::after {
    content: none;
  }
}

@media (max-width: 860px) {
  .sim-cards,
  .sim-stage .sim-controls {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .sim-base {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .sim-base {
    grid-template-columns: 1fr;
  }
}
