/* ==========================================================================
   FIRETECH · Fire Fighter Robot · site styles
   Theme: "Ember HUD" (dark) + "Paper" (light)
   ========================================================================== */

@property --p {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

:root {
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --fire-1: #ff3d00;
  --fire-2: #ff7a00;
  --fire-3: #ffc94d;
  --grad-fire: linear-gradient(135deg, #ff3d00 0%, #ff7a00 55%, #ffc94d 100%);
  --water: #38bdf8;
  --ok: #22c55e;
  --danger: #ef4444;

  --w-sense: #fbbf24;
  --w-dir: #fb923c;
  --w-pwm: #a78bfa;
  --w-servo: #f472b6;
  --w-pump: #22d3ee;
  --w-power: #f87171;

  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 68px;
  --container: 1200px;
  --code-bg: #0b0d13;

  interpolate-size: allow-keywords;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0b10;
  --bg-alt: #0e1017;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.065);
  --surface-solid: #14161f;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f5f7;
  --text-2: #c9ced8;
  --muted: #8d95a5;
  --accent-text: #ff9a3d;
  --ok-text: #4ade80;
  --water-text: #38bdf8;
  --seek-text: #c4b5fd;
  --glow: rgba(255, 106, 0, 0.25);
  --header-bg: rgba(10, 11, 16, 0.72);
  --mark-bg: rgba(255, 122, 0, 0.15);
  --grid-line: rgba(255, 255, 255, 0.045);
  --uno-fill: #0b4d52;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.75);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #fbf8f4;
  --bg-alt: #f4eee6;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(20, 22, 28, 0.05);
  --surface-solid: #ffffff;
  --border: rgba(20, 22, 28, 0.09);
  --border-strong: rgba(20, 22, 28, 0.18);
  --text: #15171c;
  --text-2: #363b46;
  --muted: #646c7b;
  --accent-text: #c2410c;
  --ok-text: #15803d;
  --water-text: #0369a1;
  --seek-text: #6d28d9;
  --glow: rgba(255, 106, 0, 0.18);
  --header-bg: rgba(251, 248, 244, 0.8);
  --mark-bg: rgba(255, 122, 0, 0.13);
  --grid-line: rgba(20, 22, 28, 0.05);
  --uno-fill: #d6f1f2;
  --shadow: 0 24px 50px -30px rgba(80, 40, 0, 0.35);
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -10;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 0% 0%, rgba(255, 90, 0, 0.07), transparent 60%),
    radial-gradient(800px 600px at 100% 30%, rgba(56, 189, 248, 0.05), transparent 60%);
}

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

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

button,
input {
  font: inherit;
}

ul,
ol {
  list-style: none;
}

::selection {
  background: rgba(255, 122, 0, 0.35);
}

:focus-visible {
  outline: 2px solid var(--water);
  outline-offset: 3px;
  border-radius: 6px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.12em 0.42em;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

code,
kbd,
pre,
.code-view,
.sim-serial {
  font-variant-ligatures: none;
}

kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-2);
  white-space: nowrap;
}

mark {
  background: var(--mark-bg);
  color: var(--accent-text);
  padding: 0 0.3em;
  border-radius: 6px;
  font-weight: 600;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.container-narrow {
  width: min(100% - 40px, 840px);
}

.grad-text {
  background: var(--grad-fire);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
}

.skip-link:focus {
  top: 12px;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 70;
  transform-origin: left center;
  transform: scaleX(var(--progress, 0));
  background: var(--grad-fire);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: #fff;
  background: var(--grad-fire);
  box-shadow: 0 12px 30px -12px rgba(255, 90, 0, 0.75);
}

.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 16px 36px -12px rgba(255, 90, 0, 0.85);
}

.btn-secondary {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: rgba(255, 122, 0, 0.55);
}

.btn-ghost {
  color: var(--text-2);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface-2);
}

.btn-small {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.link-btn {
  background: none;
  border: 0;
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

.link-btn:hover {
  text-decoration: underline;
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

[data-spotlight]::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 122, 0, 0.12), transparent 45%);
}

[data-spotlight]:hover::before {
  opacity: 1;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.05em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 6px 14px rgba(255, 90, 0, 0.45));
}

.brand-text span {
  color: var(--accent-text);
}

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

.nav-links a {
  display: block;
  padding: 8px 11px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-links a.is-active {
  color: var(--text);
  background: var(--mark-bg);
  box-shadow: inset 0 -2px 0 var(--fire-2);
}

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

.nav-toggle {
  display: none;
}

[data-theme="dark"] .icon-moon,
[data-theme="light"] .icon-sun {
  display: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: min(calc(100svh - var(--header-h)), 920px);
  padding: 72px 0 120px;
  background:
    radial-gradient(circle at 78% 62%, rgba(255, 90, 0, 0.22), transparent 52%),
    radial-gradient(circle at 8% 12%, rgba(56, 189, 248, 0.08), transparent 40%);
  cursor: crosshair;
}

.hero a,
.hero button {
  cursor: pointer;
}

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

.hero-grid-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 65% 50%, #000 15%, transparent 70%);
  mask-image: radial-gradient(ellipse at 65% 50%, #000 15%, transparent 70%);
}

.hero-copy {
  max-width: 640px;
  position: relative;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fire-2);
  animation: pulse 2s infinite;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(50px, 8.2vw, 100px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 22px 0 22px;
}

.hero-lead {
  font-size: clamp(16px, 1.55vw, 19px);
  color: var(--text-2);
  max-width: 590px;
}

.hero-lead strong {
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: start;
  gap: 14px 30px;
  margin-top: 46px;
}

.stat dt {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
}

.stat dt small {
  font-size: 16px;
  color: var(--muted);
  margin-left: 3px;
}

.stat dd {
  font-size: 13px;
  color: var(--muted);
}

.hero-hud {
  position: absolute;
  right: max(20px, calc((100vw - var(--container)) / 2));
  bottom: 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  pointer-events: none;
}

.hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 12px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.hud-chip .icon {
  width: 14px;
  height: 14px;
  color: var(--water);
}

.hud-chip-fire .icon {
  color: var(--fire-2);
}

.hud-chip b {
  color: var(--text);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  width: 24px;
  height: 38px;
  margin-left: -12px;
  border-radius: 14px;
  border: 2px solid var(--border-strong);
}

.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--fire-2);
  animation: scrollCue 1.8s ease-in-out infinite;
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding: clamp(76px, 10vw, 120px) 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-alt::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(900px, 90%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255, 122, 0, 0.5), transparent);
}

.section-tight {
  padding-top: 24px;
}

.section-head {
  max-width: 740px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 16px 0 14px;
}

.section-head p {
  color: var(--text-2);
  font-size: 17px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.eyebrow span {
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid currentColor;
  letter-spacing: 0.05em;
}

.eyebrow-small {
  font-size: 11px;
}

.eyebrow .icon {
  width: 15px;
  height: 15px;
}

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Tabs ---------- */
.tabs.card {
  padding: 10px;
}

.tab-list {
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 14px;
  background: var(--surface-2);
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-list-center {
  width: max-content;
  max-width: 100%;
  margin: 0 auto 28px;
}

.tab {
  padding: 9px 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.tab:hover {
  color: var(--text);
}

.tab[aria-selected="true"] {
  color: var(--text);
  background: var(--surface-solid);
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.45);
}

.tab-panel {
  padding: 22px 16px 12px;
  animation: fadeUp 0.4s ease;
}

.tab-panel h3 {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 12px;
}

.tab-panel > p {
  color: var(--text-2);
  margin-bottom: 12px;
}

/* ---------- Overview ---------- */
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.check-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-2);
}

.check-list li::before {
  content: "✓";
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: var(--ok-text);
  background: rgba(34, 197, 94, 0.14);
}

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

.objective-grid li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  color: var(--muted);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.objective-grid li:hover {
  border-color: rgba(255, 122, 0, 0.45);
  transform: translateY(-2px);
}

.objective-grid li span {
  grid-row: span 2;
  font-size: 24px;
  line-height: 1.2;
}

.objective-grid li b {
  color: var(--text);
  font-size: 15px;
}

.tool-list li {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.tool-list li:last-child {
  border-bottom: 0;
}

.tool-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 22px;
  background: var(--surface-2);
}

.tool-list p {
  color: var(--muted);
  font-size: 14.5px;
}

.spec-card {
  padding: 26px;
}

.spec-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 8px;
}

.spec-list {
  margin-bottom: 20px;
}

.spec-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border-strong);
  font-size: 14px;
}

.spec-list dt {
  color: var(--muted);
}

.spec-list dd {
  font-weight: 600;
  text-align: right;
}

/* ---------- Poster ---------- */
.poster-showcase {
  display: grid;
  grid-template-columns: minmax(0, 470px) minmax(0, 1fr);
  align-items: center;
  gap: 44px;
  margin-top: 64px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.poster-frame {
  margin: 0;
}

.poster-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  box-shadow: 0 34px 70px -34px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 122, 0, 0.15);
  cursor: zoom-in;
  transform: rotate(-1.5deg);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.45s ease;
}

.poster-open:hover,
.poster-open:focus-visible {
  transform: rotate(0deg) scale(1.015);
  box-shadow: 0 40px 80px -30px rgba(255, 90, 0, 0.5), 0 0 0 1px rgba(255, 122, 0, 0.4);
}

.poster-open img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.poster-zoom {
  position: absolute;
  right: 22px;
  bottom: 22px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(10, 11, 16, 0.8);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.poster-open:hover .poster-zoom,
.poster-open:focus-visible .poster-zoom {
  opacity: 1;
}

.poster-info {
  padding: 30px;
}

.poster-info h3 {
  margin: 10px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 38px);
  line-height: 1.1;
}

.poster-lead {
  color: var(--text-2);
  font-size: 16.5px;
}

.poster-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 8px;
}

.poster-tags li {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-weight: 600;
  font-size: 14px;
}

.poster-tags .tag-detect {
  background: rgba(255, 61, 0, 0.14);
  border-color: rgba(255, 61, 0, 0.45);
}

.poster-tags .tag-respond {
  background: rgba(255, 201, 77, 0.14);
  border-color: rgba(255, 201, 77, 0.45);
}

.poster-tags .tag-extinguish {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.45);
}

.poster-meta {
  margin: 6px 0 14px;
}

.poster-hashtags {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent-text);
  word-spacing: 4px;
}

.poster-info .hero-actions {
  margin-top: 20px;
}

.lightbox {
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  max-width: none;
  max-height: none;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(5, 6, 10, 0.86);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.lightbox-inner {
  position: relative;
  animation: modalIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lightbox img {
  width: min(92vw, 78vh, 720px);
  height: auto;
  border-radius: 14px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
}

.lightbox .modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #fff;
  background: rgba(10, 11, 16, 0.75);
  border-color: rgba(255, 255, 255, 0.2);
}

.lightbox-caption {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  color: #e5e7eb;
}

/* ---------- Toolbar / chips / search ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

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

.chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  border-color: rgba(255, 122, 0, 0.6);
  color: var(--text);
}

.chip.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  min-width: 250px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-field:focus-within {
  border-color: var(--fire-2);
  box-shadow: 0 0 0 4px var(--glow);
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.result-count {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- Parts ---------- */
.parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.part-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
  animation: pop 0.35s ease both;
}

.part-card:hover,
.part-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(255, 122, 0, 0.45);
}

.part-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  font-size: 27px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.part-qty {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-text);
  background: var(--mark-bg);
}

.part-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.25;
}

.part-open {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.part-open::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.part-card p {
  color: var(--muted);
  font-size: 14.5px;
}

.part-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.tag {
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.part-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-text);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

/* ---------- Modal ---------- */
.modal,
.palette {
  border: 0;
  padding: 0;
  margin: auto;
  background: transparent;
  color: var(--text);
}

.modal {
  width: min(640px, calc(100% - 32px));
}

.modal::backdrop,
.palette::backdrop {
  background: rgba(5, 6, 10, 0.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.modal-inner {
  position: relative;
  max-height: 86vh;
  overflow: auto;
  padding: 28px;
  border-radius: 22px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
  animation: modalIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-right: 44px;
}

.modal-head .part-icon {
  width: 64px;
  height: 64px;
  font-size: 32px;
}

.modal-head h2 {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.15;
}

.modal-head p {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}

.modal-inner h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 20px 0 8px;
}

.modal-inner > div > p {
  color: var(--text-2);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.spec-table th,
.spec-table td {
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.spec-table th {
  width: 42%;
  font-weight: 500;
  color: var(--muted);
}

.modal-pins {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-pins li {
  padding: 5px 10px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--mark-bg);
  color: var(--accent-text);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* ---------- How it works ---------- */
.how-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.flow-card {
  padding: 20px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.flow-diagram {
  width: 100%;
  height: auto;
}

.flow-node {
  cursor: pointer;
  outline: none;
}

.flow-node rect {
  fill: var(--surface-solid);
  stroke: var(--border-strong);
  stroke-width: 1.5;
  transition: fill 0.3s ease, stroke 0.3s ease;
}

.flow-node text {
  fill: var(--text);
  text-anchor: middle;
  font-family: var(--font-display);
  pointer-events: none;
}

.flow-node .flow-title {
  font-size: 18px;
  font-weight: 600;
}

.flow-node .flow-sub {
  font-family: var(--font-mono);
  font-size: 14px;
  fill: var(--muted);
}

.flow-node:hover rect {
  stroke: rgba(255, 122, 0, 0.7);
}

.flow-node:focus-visible rect {
  stroke: var(--water);
  stroke-width: 2.5;
}

.flow-node.is-active rect {
  stroke: var(--fire-2);
  stroke-width: 2.5;
  fill: color-mix(in srgb, var(--fire-2) 14%, var(--surface-solid));
  filter: drop-shadow(0 0 14px rgba(255, 122, 0, 0.45));
}

.flow-link {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 2;
  marker-end: url(#flowArrow);
  transition: stroke 0.3s ease;
}

.flow-link.is-active {
  stroke: var(--fire-2);
  stroke-width: 2.5;
  stroke-dasharray: 8 6;
  marker-end: url(#flowArrowActive);
  animation: dash 0.9s linear infinite;
}

.flow-arrow-head {
  fill: var(--border-strong);
}

.flow-arrow-head-active {
  fill: var(--fire-2);
}

.stepper-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.step-progress {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}

.step-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--grad-fire);
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-item > button {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.step-item > button:hover {
  border-color: var(--border-strong);
  transform: translateX(3px);
}

.step-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  background: var(--surface-2);
  transition: background 0.25s ease, color 0.25s ease;
}

.step-title {
  display: block;
  font-family: var(--font-display);
  font-size: 17.5px;
  line-height: 1.3;
}

.step-text {
  display: block;
  max-height: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14.5px;
  transition: max-height 0.4s ease, margin 0.4s ease;
}

.step-code {
  display: block;
  max-height: 0;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-text);
  transition: max-height 0.4s ease, margin 0.4s ease;
}

.step-item.is-active > button {
  border-color: rgba(255, 122, 0, 0.5);
  background: linear-gradient(100deg, rgba(255, 122, 0, 0.12), transparent 70%), var(--surface);
}

.step-item.is-active .step-num {
  color: #fff;
  background: var(--grad-fire);
}

.step-item.is-active .step-text {
  max-height: 140px;
  margin-top: 4px;
}

.step-item.is-active .step-code {
  max-height: 40px;
  margin-top: 6px;
}

/* ---------- Toggles, ranges, segmented ---------- */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.toggle-ui {
  position: relative;
  flex: none;
  width: 36px;
  height: 20px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  transition: background-color 0.2s ease;
}

.toggle-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.toggle input:checked + .toggle-ui {
  background: var(--fire-2);
  border-color: transparent;
}

.toggle input:checked + .toggle-ui::after {
  transform: translateX(16px);
  background: #fff;
}

.toggle input:focus-visible + .toggle-ui {
  outline: 2px solid var(--water);
  outline-offset: 2px;
}

.toggle-small {
  font-size: 12.5px;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.segmented button {
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
}

.segmented button.is-active {
  color: var(--text);
  background: var(--surface-solid);
  box-shadow: 0 4px 12px -6px rgba(0, 0, 0, 0.5);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--fire-2);
  cursor: pointer;
}

/* ---------- Simulator ---------- */
.sim-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  margin-bottom: 16px;
}

.sim-tool-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.sim-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
}

.sim-stage {
  padding: 12px;
}

#simCanvas {
  width: 100%;
  aspect-ratio: 300 / 190;
  border-radius: 12px;
  cursor: crosshair;
  touch-action: none;
  background: #10131b;
}

#simCanvas:focus-visible {
  outline: 2px solid var(--water);
  outline-offset: 2px;
}

.sim-sliders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 14px 6px 4px;
}

.range-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px 12px;
  font-size: 13.5px;
  color: var(--text-2);
}

.range-field small {
  color: var(--muted);
}

.range-field input {
  grid-column: 1 / -1;
}

.range-field output {
  grid-row: 1;
  grid-column: 2;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent-text);
}

.sim-hint {
  padding: 8px 6px 2px;
  font-size: 13px;
  color: var(--muted);
}

.sim-hint b {
  color: var(--text-2);
}

.sim-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sim-status {
  --state-color: var(--ok-text);
  padding: 18px;
  border-left: 4px solid var(--state-color);
  transition: border-color 0.3s ease;
}

.sim-status[data-state="fire"] {
  --state-color: var(--accent-text);
}

.sim-status[data-state="pump"] {
  --state-color: var(--water-text);
}

.sim-status[data-state="seek"] {
  --state-color: var(--seek-text);
}

.sim-status[data-state="paused"] {
  --state-color: var(--muted);
}

.sim-status-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.sim-state {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--state-color);
}

.sim-state-detail {
  min-height: 44px;
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--text-2);
}

.sim-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.sim-metrics div {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
}

.sim-metrics span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.sim-metrics b {
  font-family: var(--font-mono);
  font-size: 18px;
}

.tank-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-2);
}

.tank-head output {
  font-family: var(--font-mono);
}

.tank-bar {
  height: 10px;
  margin: 6px 0 4px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  overflow: hidden;
}

.tank-bar span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  transition: width 0.2s linear;
}

.sim-io {
  padding: 18px;
}

.sim-io h3,
.panel-head h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15.5px;
}

.sim-io h3 {
  margin-bottom: 8px;
}

.sim-io h3 small,
.panel-head h3 small {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}

.pin-list li {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.pin-name {
  font-family: var(--font-mono);
  font-weight: 700;
}

.pin-desc {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}

.pin-val {
  min-width: 56px;
  padding: 2px 8px;
  border-radius: 6px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surface-2);
  color: var(--text-2);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.pin-val.is-high {
  background: rgba(34, 197, 94, 0.15);
  color: var(--ok-text);
}

.pin-val.is-flame {
  background: rgba(255, 122, 0, 0.2);
  color: var(--accent-text);
}

.pin-val.is-water {
  background: rgba(56, 189, 248, 0.18);
  color: #0ea5e9;
}

.ir-bars {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.ir-bar {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}

.ir-track {
  position: relative;
  height: 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.ir-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #f59e0b, #ff3d00);
}

.ir-threshold {
  position: absolute;
  top: -5px;
  bottom: -5px;
  left: 33%;
  width: 2px;
  border-radius: 2px;
  background: var(--text);
}

.ir-note {
  font-size: 11px;
  color: var(--muted);
}

.sim-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.sim-trace-card,
.sim-serial-card {
  overflow: hidden;
}

.sim-serial-card {
  display: flex;
  flex-direction: column;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.panel-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sim-trace {
  margin: 0;
  padding: 10px 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.72;
  color: #c9d1d9;
  background: var(--code-bg);
}

.trace-line {
  display: block;
  padding: 0 16px;
  border-left: 3px solid transparent;
  background: rgba(255, 122, 0, calc(var(--heat, 0) * 0.2));
  white-space: pre;
}

.trace-line.is-current {
  border-left-color: var(--fire-2);
  background: rgba(255, 122, 0, 0.3);
  color: #fff;
}

.trace-line .t-com {
  color: #6a737d;
}

.trace-val {
  color: #ffcb6b;
  font-weight: 700;
}

.sim-serial {
  flex: 1 1 auto;
  height: 0;
  min-height: 260px;
  overflow-y: auto;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: #9be7b0;
  background: var(--code-bg);
}

.serial-line {
  white-space: pre;
}

.serial-line.is-fire {
  color: #ffb86b;
}

.serial-time {
  color: #5c6370;
}

/* ---------- Wiring ---------- */
.wiring-card {
  padding: 16px;
}

.wire-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.legend-chip i {
  width: 16px;
  height: 4px;
  border-radius: 4px;
  background: var(--c);
}

.legend-chip.is-active {
  color: var(--text);
  border-color: var(--fire-2);
  background: var(--mark-bg);
}

.wiring-scroll {
  overflow-x: auto;
}

.scroll-hint {
  display: none;
  margin: 2px 0 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.wiring-svg {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  min-width: 760px;
  height: auto;
}

.w-comp {
  cursor: pointer;
  outline: none;
}

.w-comp rect {
  fill: var(--surface-solid);
  stroke: var(--border-strong);
  stroke-width: 1.5;
  transition: stroke 0.2s ease, fill 0.2s ease;
}

.w-uno rect {
  fill: var(--uno-fill);
  stroke: #13a1a8;
}

.w-comp text {
  fill: var(--text);
  pointer-events: none;
}

.w-title,
.w-sub {
  text-anchor: middle;
}

.w-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.w-comp .w-sub {
  font-family: var(--font-mono);
  font-size: 11.5px;
  fill: var(--muted);
}

.w-comp .w-pin-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  fill: var(--text-2);
}

.w-pin-label:not([text-anchor]) {
  text-anchor: middle;
}

.w-comp:hover rect,
.w-comp.is-active rect {
  stroke: var(--fire-2);
  stroke-width: 2.5;
}

.w-comp:focus-visible rect {
  stroke: var(--water);
  stroke-width: 2.5;
}

.w-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  fill: var(--muted);
}

.w-dots circle {
  fill: var(--text-2);
}

.wire {
  --wc: var(--w-power);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.wire[data-type="sense"] { --wc: var(--w-sense); }
.wire[data-type="dir"] { --wc: var(--w-dir); }
.wire[data-type="pwm"] { --wc: var(--w-pwm); }
.wire[data-type="servo"] { --wc: var(--w-servo); }
.wire[data-type="pump"] { --wc: var(--w-pump); }
.wire[data-type="power"] { --wc: var(--w-power); }

.wire path {
  fill: none;
  stroke: var(--wc);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke-width 0.2s ease;
}

.wire path.hit {
  stroke: transparent;
  stroke-width: 16;
}

.wire.is-hidden {
  display: none;
}

.wires.has-focus .wire {
  opacity: 0.14;
}

.wires.has-focus .wire.is-active {
  opacity: 1;
}

.wire.is-active path:not(.hit) {
  stroke-width: 4.5;
  stroke-dasharray: 10 7;
  animation: dash 0.8s linear infinite;
  filter: drop-shadow(0 0 6px var(--wc));
}

.wiring-info {
  min-height: 48px;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 14px;
  color: var(--text-2);
}

.wiring-info b {
  color: var(--text);
}

.wiring-table-wrap {
  margin-top: 24px;
}

.table-scroll {
  overflow-x: auto;
}

.pin-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 14px;
}

.pin-table th {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.pin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}

.pin-table tr:last-child td {
  border-bottom: 0;
}

.pin-table td:first-child {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text);
}

.pin-table tbody tr {
  transition: background-color 0.15s ease;
}

.pin-table tbody tr:hover,
.pin-table tbody tr.is-active {
  background: var(--mark-bg);
}

.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
}

.type-badge i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--c);
}

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

.callout {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  border-left-width: 4px;
  background: var(--surface);
  font-size: 14px;
  color: var(--text-2);
}

.callout b {
  color: var(--text);
}

.callout-danger {
  border-left-color: var(--danger);
}

.callout-info {
  border-left-color: var(--water);
}

.callout-tip {
  border-left-color: var(--ok);
}

.callout-small {
  margin-top: 18px;
  font-size: 13px;
  text-align: left;
}

/* ---------- Code viewer ---------- */
.code-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.code-window {
  overflow: hidden;
  background: var(--code-bg);
  border-color: rgba(255, 255, 255, 0.08);
}

.code-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #11141c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
}

.window-dots i:nth-child(2) {
  background: #febc2e;
}

.window-dots i:nth-child(3) {
  background: #28c840;
}

.code-tabs {
  display: flex;
  flex: 1;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
}

.code-tab {
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8b93a3;
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

.code-tab:hover {
  color: #d6deeb;
}

.code-tab.is-active {
  color: #fff;
  background: #1c2131;
}

.code-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn-small {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 9px;
  border-color: rgba(255, 255, 255, 0.08);
  background: #1c2131;
  color: #c9d1d9;
}

.icon-btn-small:hover {
  background: #252b3d;
  border-color: rgba(255, 255, 255, 0.16);
}

.icon-btn-small[aria-pressed="true"] {
  color: var(--fire-3);
  border-color: var(--fire-2);
}

.code-view {
  position: relative;
  max-height: 580px;
  overflow: auto;
  padding: 12px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: #d6deeb;
  scroll-behavior: smooth;
}

.code-loading {
  padding: 8px 20px;
  color: #8b93a3;
}

.cl {
  display: flex;
  transition: background-color 0.25s ease;
}

.cl:hover {
  background: rgba(255, 255, 255, 0.035);
}

.ln {
  flex: none;
  width: 56px;
  padding-right: 16px;
  text-align: right;
  color: #4b5263;
  user-select: none;
}

.lc {
  flex: 1;
  padding-right: 20px;
  white-space: pre;
}

.code-view.is-wrapped .lc {
  white-space: pre-wrap;
  word-break: break-word;
}

.cl.has-note .ln {
  color: #ff9a3d;
  cursor: pointer;
}

.cl.is-highlight {
  background: rgba(255, 122, 0, 0.17);
  box-shadow: inset 3px 0 0 var(--fire-2);
}

.t-com { color: #6a737d; font-style: italic; }
.t-pre { color: #c792ea; }
.t-str { color: #c3e88d; }
.t-num { color: #f78c6c; }
.t-kw { color: #82aaff; }
.t-type { color: #ffcb6b; }
.t-fn { color: #7fdbca; }
.t-ard { color: #ff9e64; }
.t-mac { color: #f07178; }

.explain-card {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  padding: 22px;
}

.explain-card h3 {
  margin: 10px 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.3;
}

.explain-card p:not(.eyebrow) {
  min-height: 110px;
  font-size: 14.5px;
  color: var(--text-2);
}

.explain-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
}

.explain-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Build guide ---------- */
.build-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.build-progress {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  padding: 24px;
  text-align: center;
}

.progress-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  aspect-ratio: 1;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: conic-gradient(var(--fire-2) calc(var(--p) * 1%), var(--surface-2) 0);
  transition: --p 0.6s ease;
}

.progress-ring::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--surface-solid);
}

.progress-ring span {
  position: relative;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
}

.build-progress-text {
  color: var(--text-2);
  font-size: 14.5px;
}

.build-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.build-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.build-item.is-done {
  border-color: rgba(34, 197, 94, 0.4);
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.08), transparent 60%), var(--surface);
}

.build-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.build-check {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.build-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.check-ui {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid var(--border-strong);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.check-ui svg {
  width: 16px;
  height: 16px;
  color: #fff;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.build-check input:checked + .check-ui {
  background: var(--ok);
  border-color: var(--ok);
}

.build-check input:checked + .check-ui svg {
  opacity: 1;
  transform: none;
}

.build-check input:focus-visible + .check-ui {
  outline: 2px solid var(--water);
  outline-offset: 2px;
}

.build-toggle {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.build-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

.build-title {
  flex: 1;
  font-weight: 600;
}

.build-item.is-done .build-title {
  color: var(--text-2);
  text-decoration: line-through;
  text-decoration-color: rgba(34, 197, 94, 0.6);
}

.build-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.build-toggle .icon {
  color: var(--muted);
  transition: transform 0.25s ease;
}

.build-toggle[aria-expanded="true"] .icon {
  transform: rotate(180deg);
}

.build-detail {
  padding: 0 18px 18px 58px;
  font-size: 14.5px;
  color: var(--text-2);
}

.build-detail ul {
  margin: 8px 0;
  padding-left: 18px;
  list-style: disc;
}

.build-detail li {
  margin: 4px 0;
}

.build-tip {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  background: var(--mark-bg);
}

/* ---------- Impact ---------- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.app-card {
  padding: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 122, 0, 0.45);
}

.app-icon {
  font-size: 32px;
}

.app-card h3 {
  margin: 10px 0 6px;
  font-family: var(--font-display);
  font-size: 18px;
}

.app-card p {
  font-size: 14.5px;
  color: var(--muted);
}

.proscons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pros,
.cons {
  padding: 24px;
}

.pros {
  border-top: 3px solid var(--ok);
}

.cons {
  border-top: 3px solid var(--fire-2);
}

.pros h3,
.cons h3 {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 20px;
}

.proscons li {
  display: flex;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
  color: var(--text-2);
}

.proscons li:last-child {
  border-bottom: 0;
}

.proscons li b {
  color: var(--text);
}

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

.road-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
}

.road-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.road-icon {
  font-size: 26px;
}

.road-status {
  padding: 3px 9px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.road-item h3 {
  font-family: var(--font-display);
  font-size: 18px;
}

.road-item p {
  font-size: 14.5px;
  color: var(--muted);
}

.road-link {
  margin-top: auto;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-text);
}

.road-link:hover {
  text-decoration: underline;
}

.roadmap-note {
  margin-top: 22px;
  text-align: center;
  color: var(--muted);
}

.roadmap-note a {
  font-weight: 600;
  color: var(--accent-text);
}

/* ---------- Quiz ---------- */
.quiz-card {
  padding: clamp(20px, 4vw, 32px);
}

.quiz-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

.quiz-dots {
  display: flex;
  gap: 6px;
}

.quiz-dots i {
  width: 22px;
  height: 6px;
  border-radius: 99px;
  background: var(--surface-2);
  transition: background-color 0.3s ease;
}

.quiz-dots i.is-current { background: var(--fire-2); }
.quiz-dots i.is-correct { background: var(--ok); }
.quiz-dots i.is-wrong { background: var(--danger); }

.quiz-q {
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: clamp(19px, 2.4vw, 23px);
  line-height: 1.35;
}

.quiz-options {
  display: grid;
  gap: 10px;
}

.quiz-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.quiz-opt:hover:not(:disabled) {
  border-color: var(--fire-2);
  transform: translateX(4px);
}

.quiz-opt:disabled {
  cursor: default;
}

.quiz-key {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  background: var(--surface-2);
}

.quiz-opt.is-correct {
  border-color: var(--ok);
  background: rgba(34, 197, 94, 0.12);
}

.quiz-opt.is-wrong {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.12);
}

.quiz-feedback {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 14.5px;
  color: var(--text-2);
  animation: fadeUp 0.3s ease;
}

.quiz-feedback .good {
  color: var(--ok-text);
}

.quiz-feedback .bad {
  color: var(--danger);
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.quiz-result {
  text-align: center;
}

.quiz-result .quiz-actions {
  justify-content: center;
}

.quiz-score {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 700;
  line-height: 1.1;
}

.quiz-grade {
  margin-bottom: 6px;
  font-size: 18px;
}

.quiz-best {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.faq[open] {
  border-color: rgba(255, 122, 0, 0.4);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-weight: 600;
  font-size: 16.5px;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary .icon {
  color: var(--muted);
  transition: transform 0.25s ease;
}

.faq[open] summary .icon {
  transform: rotate(180deg);
  color: var(--accent-text);
}

.faq::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 0.3s ease, content-visibility 0.3s allow-discrete;
}

.faq[open]::details-content {
  block-size: auto;
}

.faq-body {
  padding: 0 20px 18px;
  color: var(--text-2);
}

.faq-body a {
  font-weight: 600;
  color: var(--accent-text);
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  justify-content: center;
  gap: 20px;
}

.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 30px 24px;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 122, 0, 0.45);
}

.avatar {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 10px;
  padding: 3px;
  border-radius: 50%;
  background: var(--grad-fire);
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-solid);
}

.avatar.is-fallback img {
  display: none;
}

.avatar.is-fallback::after {
  content: attr(data-initials);
  position: absolute;
  inset: 3px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-solid);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
}

.team-card h3 {
  font-family: var(--font-display);
  font-size: 21px;
}

.team-role {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- CTA ---------- */
.cta {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  padding: clamp(28px, 5vw, 56px);
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 90, 0, 0.22), transparent 55%),
    var(--surface);
}

.cta h2 {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.15;
}

.cta p {
  color: var(--text-2);
}

.repo-stats {
  display: grid;
  gap: 12px;
}

.repo-stats li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.repo-stats .icon {
  color: var(--accent-text);
}

.repo-stats b {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
}

.repo-stats span {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 56px 0 28px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-grid h3 {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-grid ul {
  display: grid;
  gap: 8px;
}

.footer-grid ul a {
  color: var(--text-2);
  font-size: 14.5px;
}

.footer-grid ul a:hover {
  color: var(--accent-text);
}

.footer-about {
  max-width: 380px;
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--muted);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--muted);
}

.footer-bottom a {
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Floating UI ---------- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.back-to-top:hover {
  border-color: var(--fire-2);
}

.toast-region {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--water);
  background: var(--surface-solid);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
  font-size: 14.5px;
  pointer-events: auto;
  animation: toastIn 0.3s ease;
}

.toast-success { border-left-color: var(--ok); }
.toast-fire { border-left-color: var(--fire-2); }

.toast.is-leaving {
  animation: toastOut 0.3s ease forwards;
}

.palette {
  width: min(600px, calc(100% - 32px));
  margin-top: 12vh;
}

.palette-inner {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
  animation: modalIn 0.22s ease;
}

.palette-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.palette-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}

.palette-list {
  max-height: 50vh;
  overflow: auto;
  padding: 8px;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.palette-item[aria-selected="true"] {
  background: var(--mark-bg);
}

.pi-icon {
  width: 26px;
  text-align: center;
}

.pi-hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.palette-empty {
  padding: 18px;
  text-align: center;
  color: var(--muted);
}

.noscript {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  padding: 14px 18px;
  border-radius: 12px;
  background: #7c2d12;
  color: #fff;
  text-align: center;
}

/* ---------- Animations ---------- */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 122, 0, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(255, 122, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 122, 0, 0); }
}

@keyframes scrollCue {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(12px); }
}

@keyframes dash {
  to { stroke-dashoffset: -34; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1140px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 12px 20px 22px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-solid);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .nav-links.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 12px 14px;
    font-size: 16px;
  }
}

@media (max-width: 980px) {
  .overview-grid,
  .how-grid,
  .sim-main,
  .code-layout,
  .build-layout,
  .cta,
  .poster-showcase {
    grid-template-columns: minmax(0, 1fr);
  }

  .poster-frame {
    width: min(100%, 470px);
    margin: 0 auto;
  }

  .flow-card,
  .explain-card,
  .build-progress {
    position: static;
  }

  .build-progress {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 6px 20px;
    text-align: left;
  }

  .build-progress .progress-ring {
    grid-row: span 2;
    width: 110px;
    margin: 0;
  }

  .build-progress .callout-small {
    grid-column: 1 / -1;
  }

  .progress-ring span {
    font-size: 26px;
  }

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

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

  .hero {
    padding-bottom: 280px;
  }

  .hero-hud {
    left: 20px;
    right: 20px;
    justify-content: center;
    bottom: 22px;
  }

  .scroll-cue {
    display: none;
  }
}

@media (max-width: 700px) {
  .sim-bottom,
  .proscons,
  .roadmap,
  .objective-grid,
  .sim-sliders,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-stats {
    grid-template-columns: repeat(2, auto);
  }

  .search-field {
    min-width: 0;
    width: 100%;
  }

  .sim-toolbar {
    justify-content: flex-start;
  }

  .build-detail {
    padding-left: 18px;
  }

  .build-time {
    display: none;
  }

  .hide-sm {
    display: none !important;
  }

  .section-head {
    margin-bottom: 36px;
  }

  .window-dots {
    display: none;
  }

  .code-tabs {
    order: -1;
    flex-basis: 100%;
  }

  .code-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .scroll-hint {
    display: block;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
