:root {
  --ink: #16181d;
  --paper: #f6f3ea;
  --paper-soft: #ebe7dc;
  --night: #111218;
  --night-2: #181923;
  --muted: #626977;
  --muted-light: #c4c8d2;
  --line: rgba(22, 24, 29, 0.15);
  --line-light: rgba(255, 255, 255, 0.16);
  --blue: #2667ff;
  --violet: #6e35ff;
  --green: #30c26d;
  --amber: #d98d18;
  --red: #e45f5f;
  --max-width: 1180px;
  color-scheme: light dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body::selection {
  background: var(--blue);
  color: white;
}

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

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

button,
input {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 50;
  padding: 0.7rem 1rem;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  transform: translateY(-140%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  left: 50%;
  top: 1rem;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: min(calc(100% - 2rem), var(--max-width));
  min-height: 68px;
  padding: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(17, 18, 24, 0.78);
  backdrop-filter: blur(14px);
  color: white;
  transform: translateX(-50%);
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 182px;
  height: 48px;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.93);
}

.brand-mark img {
  width: 100%;
  height: auto;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a,
.header-action,
.button,
.tool-tab,
.mode-button {
  min-height: 44px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 0.9rem;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.78);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  border-color: rgba(255, 255, 255, 0.22);
  color: white;
  outline: none;
}

.site-nav a[aria-current="page"] {
  border-color: rgba(255, 255, 255, 0.26);
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-menu,
.menu-toggle {
  display: none;
}

.menu-toggle {
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  cursor: pointer;
}

.menu-toggle span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}

.menu-toggle span:nth-child(1) {
  transform: translate(-50%, -8px);
}

.menu-toggle span:nth-child(2) {
  transform: translate(-50%, -50%);
}

.menu-toggle span:nth-child(3) {
  transform: translate(-50%, 6px);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.header-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 700;
}

.header-action {
  padding: 0.65rem 1rem;
  background: var(--paper);
  color: var(--ink);
}

.header-action:hover,
.header-action:focus-visible {
  background: white;
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 92vh;
  overflow: hidden;
  background: var(--night);
  color: white;
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  height: 9rem;
  background: linear-gradient(180deg, rgba(17, 18, 24, 0), var(--paper));
  content: "";
  pointer-events: none;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(17, 18, 24, 0.86), rgba(17, 18, 24, 0.48) 54%, rgba(17, 18, 24, 0.2)),
    linear-gradient(0deg, rgba(17, 18, 24, 0.48), rgba(17, 18, 24, 0) 42%);
  content: "";
  pointer-events: none;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 9rem 0 7rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.42);
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-heading-dark .eyebrow,
.games-section .eyebrow {
  color: #78e09b;
}

.hero h1 {
  max-width: 12ch;
  margin: 0;
  font-size: 5rem;
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 730px;
  margin: 1.5rem 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.35rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  padding: 0.78rem 1rem;
}

.button-primary {
  background: var(--green);
  color: #07100b;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #5ee38e;
  outline: 2px solid rgba(94, 227, 142, 0.35);
  outline-offset: 2px;
}

.button-secondary {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: white;
  outline: none;
}

.button-dark {
  background: var(--night);
  color: white;
}

.button-dark:hover,
.button-dark:focus-visible {
  background: var(--night-2);
  outline: 3px solid rgba(22, 24, 29, 0.16);
  outline-offset: 2px;
}

.hero-signals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 980px;
  margin: 3.5rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-signals li {
  min-height: 70px;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 4px solid var(--blue);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

.hero-signals li:nth-child(2) {
  border-left-color: var(--violet);
}

.hero-signals li:nth-child(3) {
  border-left-color: var(--green);
}

.hero-signals li:nth-child(4) {
  border-left-color: var(--amber);
}

.page-hero {
  min-height: 74vh;
}

.page-hero .hero-content {
  padding-bottom: 6rem;
}

.page-hero h1 {
  max-width: 820px;
  font-size: 4.35rem;
}

.section {
  padding: 6rem 0;
}

.section-light {
  background: var(--paper);
}

.section-inner {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.section-heading {
  max-width: 760px;
}

.section-heading h2 {
  margin: 0;
  font-size: 2.75rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow) {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.section-heading-dark h2,
.section-heading-dark p:not(.eyebrow) {
  color: white;
}

.section-heading-dark p:not(.eyebrow) {
  color: var(--muted-light);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.2rem;
}

.service-card,
.tool-shell,
.tool-roadmap article,
.contact-panel,
.process-list li {
  border-radius: 8px;
}

.service-card {
  min-height: 250px;
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: white;
}

.service-card-featured {
  grid-column: span 2;
  background: #151821;
  color: white;
}

.service-kicker {
  display: block;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
}

.service-card-featured .service-kicker {
  color: var(--green);
}

.service-card h3 {
  margin: 3.2rem 0 0.75rem;
  font-size: 1.22rem;
  letter-spacing: 0;
}

.service-card p {
  margin: 0;
  color: var(--muted);
}

.service-card-featured p {
  color: var(--muted-light);
}

.service-grid-links .service-card {
  display: flex;
  flex-direction: column;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.2rem;
}

.article-list {
  display: grid;
  gap: 1rem;
  margin-top: 2.2rem;
}

.article-list-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.article-list-card h3 {
  margin: 1rem 0 0.55rem;
  font-size: 1.35rem;
  line-height: 1.1;
}

.article-list-card p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.article-card {
  min-height: 280px;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.article-meta {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(38, 103, 255, 0.24);
  border-radius: 6px;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 900;
}

.article-card h3 {
  margin: 3rem 0 0.75rem;
  font-size: 1.18rem;
  line-height: 1.15;
}

.article-card p {
  margin: 0;
  color: var(--muted);
}

.article-page {
  background: var(--paper);
}

.article-hero {
  position: relative;
  padding: 9rem 0 5rem;
  background: var(--night);
  color: white;
  overflow: hidden;
}

.article-hero::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 18, 24, 0.92), rgba(17, 18, 24, 0.62)),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: auto, 46px 46px, 46px 46px;
  content: "";
}

.article-hero-inner {
  position: relative;
  z-index: 1;
}

.article-back {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-bottom: 2.5rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.article-hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: 4.1rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.article-lede {
  max-width: 820px;
  margin: 1.35rem 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.25rem;
}

.article-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.article-details span {
  min-height: 34px;
  padding: 0.4rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85rem;
  font-weight: 800;
}

.article-body {
  width: min(calc(100% - 2rem), 860px);
  margin: 0 auto;
  padding: 4.5rem 0;
}

.article-body p,
.article-body li {
  color: #2d3340;
  font-size: 1.05rem;
}

.article-body > p:first-child {
  margin-top: 0;
}

.article-body h2 {
  margin: 3rem 0 0.8rem;
  font-size: 2rem;
  line-height: 1.08;
}

.article-body h3 {
  margin: 2rem 0 0.6rem;
}

.article-body strong {
  color: var(--ink);
}

.article-body pre {
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151821;
  color: white;
}

.article-body code {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.95rem;
}

.article-body table {
  width: 100%;
  margin: 1.2rem 0;
  border-collapse: collapse;
  background: white;
}

.article-body th,
.article-body td {
  padding: 0.8rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article-body th {
  background: var(--paper-soft);
}

.schematic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.4rem 0;
}

.schematic-card {
  margin: 1.4rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(22, 24, 29, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 24, 29, 0.035) 1px, transparent 1px),
    white;
  background-size: 24px 24px;
}

.schematic-grid .schematic-card {
  margin: 0;
}

.schematic-card svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 150px;
}

.schematic-card figcaption {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.schematic-card figcaption strong {
  display: block;
  margin-bottom: 0.2rem;
}

.schematic-wire,
.schematic-component,
.schematic-muted {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.schematic-wire {
  stroke: var(--ink);
  stroke-width: 3;
}

.schematic-component {
  stroke: var(--blue);
  stroke-width: 3;
}

.schematic-muted {
  stroke: var(--muted);
  stroke-width: 2;
}

.schematic-accent {
  fill: var(--green);
}

.schematic-fill {
  fill: var(--paper-soft);
  stroke: var(--line);
  stroke-width: 1.5;
}

.schematic-label {
  fill: var(--ink);
  font: 700 15px Inter, ui-sans-serif, system-ui, sans-serif;
}

.schematic-small {
  fill: var(--muted);
  font: 700 12px Inter, ui-sans-serif, system-ui, sans-serif;
}

.schematic-more {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
  margin: 1.4rem 0;
  padding: 1rem;
  border: 1px solid rgba(38, 103, 255, 0.24);
  border-radius: 8px;
  background: white;
}

.schematic-more p {
  max-width: 580px;
  margin: 0;
}

.formula-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1.2rem 0;
}

.formula-strip strong {
  display: grid;
  place-items: center;
  min-height: 72px;
  padding: 0.8rem;
  border-radius: 8px;
  background: var(--night);
  color: white;
  font-size: 1.2rem;
  text-align: center;
}

.article-callout {
  margin: 2rem 0;
  padding: 1.2rem;
  border: 1px solid rgba(38, 103, 255, 0.28);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: white;
}

.article-callout h2 {
  margin-top: 0;
}

.article-next {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 3rem;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.2rem;
}

.topic-grid article {
  min-height: 210px;
  padding: 1.1rem;
  border: 1px solid var(--line-light);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.topic-grid span {
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.topic-grid h3 {
  margin: 2rem 0 0.7rem;
  color: white;
  font-size: 1.12rem;
  line-height: 1.18;
}

.topic-grid p {
  margin: 0;
  color: var(--muted-light);
}

.button-secondary-light {
  border-color: var(--line);
  background: white;
  color: var(--ink);
}

.button-secondary-light:hover,
.button-secondary-light:focus-visible {
  border-color: var(--blue);
}

.card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 42px;
  margin-top: auto;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-weight: 800;
}

.card-action:hover,
.card-action:focus-visible {
  border-color: var(--blue);
  outline: 3px solid rgba(38, 103, 255, 0.18);
  outline-offset: 2px;
}

.card-action-dark {
  border-color: rgba(255, 255, 255, 0.22);
  color: white;
}

.card-action-dark:hover,
.card-action-dark:focus-visible {
  border-color: white;
  outline-color: rgba(255, 255, 255, 0.22);
}

.process-section,
.games-section {
  background: var(--night);
  color: white;
}

.split-layout,
.games-layout,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: start;
}

.process-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.process-list li {
  position: relative;
  min-height: 116px;
  padding: 1rem 1rem 1rem 4rem;
  border: 1px solid var(--line-light);
  background: rgba(255, 255, 255, 0.06);
  counter-increment: step;
}

.process-list li::before {
  position: absolute;
  left: 1rem;
  top: 1rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--green);
  content: counter(step, decimal-leading-zero);
  font-size: 0.75rem;
  font-weight: 800;
}

.process-list span {
  display: block;
  font-weight: 800;
}

.process-list p {
  margin: 0.4rem 0 0;
  color: var(--muted-light);
}

.tool-shell {
  margin-top: 2.2rem;
  border: 1px solid var(--line);
  background: white;
  overflow: hidden;
}

.tool-feature-callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.4rem;
  align-items: center;
  margin-top: 2.2rem;
  padding: 1.2rem;
  border: 1px solid rgba(38, 103, 255, 0.24);
  border-left: 6px solid var(--blue);
  background: white;
}

.tool-feature-callout h3 {
  margin: 0.25rem 0 0.45rem;
  font-size: 1.65rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.tool-feature-callout p:not(.eyebrow) {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
}

.tool-tabs,
.mode-control {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper-soft);
}

.tool-tab,
.mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.tool-tab {
  padding: 0.65rem 0.9rem;
}

.tool-tab.is-active,
.mode-button.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.tool-tab:focus-visible,
.mode-button:focus-visible {
  outline: 3px solid rgba(38, 103, 255, 0.25);
  outline-offset: 2px;
}

.tool-panel {
  padding: 1rem;
}

.tool-panel-heading {
  max-width: 780px;
  margin-bottom: 1rem;
}

.tool-panel-heading h3 {
  margin: 1rem 0 0.55rem;
  font-size: 1.65rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.tool-panel-heading p {
  margin: 0;
  color: var(--muted);
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.calculator-grid label {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  font-weight: 800;
}

.calculator-grid span,
.result-card span,
.contact-panel span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.calculator-grid input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.7rem 0.8rem;
  background: #fbfaf5;
  color: var(--ink);
}

.calculator-grid input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(38, 103, 255, 0.18);
}

.calculator-grid input[type="range"] {
  padding: 0;
  accent-color: var(--blue);
}

.inline-output {
  color: var(--ink);
  font-weight: 900;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.result-grid-single {
  grid-template-columns: 1fr;
}

.result-card {
  display: grid;
  align-content: space-between;
  min-height: 120px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151821;
  color: white;
}

.result-card strong {
  font-size: 1.65rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.result-card-wide strong {
  font-size: 2.1rem;
}

.mode-control {
  margin: -1rem -1rem 1rem;
}

.mode-button {
  padding: 0.55rem 0.85rem;
}

.lab-grid {
  display: grid;
  gap: 2.4rem;
  margin-top: 2.2rem;
}

.lab-card {
  display: grid;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.lab-card:first-child {
  padding-top: 0;
  border-top: 0;
}

.lab-card-heading {
  max-width: 780px;
}

.lab-card-heading h3 {
  margin: 1rem 0 0.55rem;
  font-size: 1.65rem;
  line-height: 1.08;
}

.lab-card-heading p {
  margin: 0;
  color: var(--muted);
}

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

.calculator-grid select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.7rem 0.8rem;
  background: #fbfaf5;
  color: var(--ink);
  font: inherit;
}

.calculator-grid select:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(38, 103, 255, 0.18);
}

.lab-result-grid {
  margin-top: 0;
}

.lab-canvas {
  width: 100%;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.tool-roadmap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.tool-roadmap article {
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: white;
}

.tool-roadmap h3 {
  margin: 0 0 0.55rem;
}

.tool-roadmap p {
  margin: 0;
  color: var(--muted);
}

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

.section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.section-actions-left {
  justify-content: flex-start;
}

.games-layout {
  align-items: center;
}

.playable-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.2rem;
}

.playable-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1fr);
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.playable-card-dark {
  background: #151821;
  color: white;
}

.playable-card-body {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}

.playable-card h3 {
  margin: 0.6rem 0 0.75rem;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.playable-card p:not(.eyebrow) {
  margin: 0 0 1.2rem;
  color: var(--muted);
}

.playable-card-dark p:not(.eyebrow) {
  color: var(--muted-light);
}

.playable-card .playable-note {
  margin-top: 0;
  font-weight: 800;
  color: var(--ink);
}

.playable-card-dark .playable-note {
  color: white;
}

.playable-preview {
  position: relative;
  min-height: 320px;
  background: #0b0d12;
  overflow: hidden;
}

.playable-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

.playable-preview span {
  position: absolute;
  display: block;
  border-radius: 5px;
  box-shadow: 0 0 24px rgba(41, 199, 184, 0.25);
}

.playable-preview-survivors {
  background:
    radial-gradient(circle at 32% 38%, rgba(244, 201, 93, 0.22), transparent 20%),
    linear-gradient(135deg, #171a24 0%, #0d1118 100%);
}

.playable-preview-survivors span:nth-child(1) {
  left: 45%;
  top: 48%;
  width: 28px;
  height: 28px;
  background: #29c7b8;
}

.playable-preview-survivors span:nth-child(2) {
  left: 18%;
  top: 25%;
  width: 18px;
  height: 18px;
  background: #ff6b6b;
}

.playable-preview-survivors span:nth-child(3) {
  right: 18%;
  top: 34%;
  width: 20px;
  height: 20px;
  background: #ff6b6b;
}

.playable-preview-survivors span:nth-child(4) {
  left: 58%;
  bottom: 22%;
  width: 42px;
  height: 8px;
  background: #f4c95d;
  transform: rotate(-24deg);
}

.playable-preview-dungeon {
  background:
    radial-gradient(circle at 66% 32%, rgba(38, 103, 255, 0.22), transparent 18%),
    linear-gradient(135deg, #10141f 0%, #090b10 100%);
}

.playable-preview-dungeon span:nth-child(1) {
  left: 22%;
  top: 22%;
  width: 44px;
  height: 44px;
  border: 2px solid #566070;
  background: rgba(255,255,255,0.04);
}

.playable-preview-dungeon span:nth-child(2) {
  left: 40%;
  top: 38%;
  width: 44px;
  height: 44px;
  border: 2px solid #29c7b8;
  background: rgba(41, 199, 184, 0.18);
}

.playable-preview-dungeon span:nth-child(3) {
  right: 20%;
  top: 55%;
  width: 44px;
  height: 44px;
  border: 2px solid #f4c95d;
  background: rgba(244, 201, 93, 0.16);
}

.playable-preview-dungeon span:nth-child(4) {
  left: 36%;
  bottom: 16%;
  width: 74px;
  height: 18px;
  background: #ff6b6b;
}

.game-stage {
  border: 1px solid var(--line-light);
  border-radius: 8px;
  background: #0b0d12;
  overflow: hidden;
}

.game-stage canvas {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.contact-section {
  background: var(--paper);
}

.contact-panel {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: white;
}

.contact-panel a {
  display: grid;
  gap: 0.2rem;
  min-height: 72px;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.contact-panel a:hover,
.contact-panel a:focus-visible {
  border-color: var(--blue);
  outline: 3px solid rgba(38, 103, 255, 0.18);
}

.contact-panel strong {
  font-size: 1.15rem;
  word-break: break-word;
}

.site-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.5rem max(1rem, calc((100% - var(--max-width)) / 2));
  border-top: 1px solid var(--line);
  background: white;
  color: var(--muted);
}

.site-footer img {
  width: 154px;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  background: var(--paper);
}

.site-footer p,
.site-footer span {
  margin: 0;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .brand-mark {
    grid-column: 1;
    grid-row: 1;
  }

  .site-nav {
    display: none;
  }

  .header-action {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
  }

  .mobile-menu:not([hidden]) {
    position: fixed;
    left: 50%;
    top: 5.7rem;
    z-index: 19;
    display: grid;
    gap: 0.45rem;
    width: min(calc(100% - 2rem), var(--max-width));
    padding: 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(17, 18, 24, 0.94);
    backdrop-filter: blur(14px);
    color: white;
    transform: translateX(-50%);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
  }

  .mobile-menu a {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    min-height: 46px;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.82);
    font-weight: 800;
  }

  .mobile-menu a[aria-current="page"] {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: white;
  }

  .mobile-menu-action {
    background: var(--paper) !important;
    color: var(--ink) !important;
  }

  .hero h1 {
    font-size: 4rem;
  }

  .page-hero h1 {
    font-size: 3.5rem;
  }

  .article-hero h1 {
    font-size: 3.3rem;
  }

  .hero-signals,
  .service-grid,
  .article-grid,
  .article-list-card,
  .topic-grid,
  .calculator-grid,
  .result-grid,
  .playable-grid,
  .deliverable-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .playable-card {
    grid-template-columns: 1fr;
  }

  .playable-preview {
    min-height: 220px;
  }

  .split-layout,
  .games-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .service-card-featured {
    grid-column: span 1;
  }
}

@media (max-width: 680px) {
  .site-header {
    width: calc(100% - 1rem);
    top: 0.5rem;
    min-height: 58px;
    padding: 0.45rem;
  }

  .brand-mark {
    width: 148px;
    height: 44px;
  }

  .mobile-menu:not([hidden]) {
    top: 4.85rem;
    width: calc(100% - 1rem);
  }

  .hero {
    min-height: 96vh;
  }

  .hero-content {
    padding: 8rem 0 4.5rem;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .page-hero h1 {
    font-size: 2.55rem;
  }

  .article-hero {
    padding: 7.5rem 0 3.8rem;
  }

  .article-hero h1 {
    font-size: 2.55rem;
  }

  .article-lede {
    font-size: 1.08rem;
  }

  .hero-copy {
    font-size: 1.08rem;
  }

  .hero-signals,
  .service-grid,
  .article-grid,
  .article-list-card,
  .topic-grid,
  .schematic-grid,
  .calculator-grid,
  .result-grid,
  .tool-roadmap,
  .playable-grid,
  .deliverable-grid {
    grid-template-columns: 1fr;
  }

  .formula-strip {
    grid-template-columns: 1fr;
  }

  .tool-feature-callout {
    grid-template-columns: 1fr;
  }

  .tool-feature-callout .button {
    width: 100%;
  }

  .section {
    padding: 4rem 0;
  }

  .section-heading h2 {
    font-size: 2rem;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
