/* Sprue Stack — tờ hướng dẫn lắp ráp */

:root {
  --bg: #F4F1EC;
  --ink: #2F4858;
  --accent: #F2A23A;
  --card: #FBFAF7;
  --shadow: rgba(47, 72, 88, 0.10);
  --cut: #2F4858;
  --assemble: #557A8C;
  --paint: #F2A23A;
  --decal: #F6C47E;
  --coat: #A9B8BF;
  --status-sealed: #A9B8BF;
  --status-building: #F2A23A;
  --status-done: #3E8E6E;
  --dark-bg: #121A20;
  --dark-card: #1C2830;
  --radius: 24px;
  --max: 1200px;
  --gate: 6px;
  --font-body: "Manrope", sans-serif;
  --font-num: "Space Grotesk", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(
    circle,
    rgba(47, 72, 88, 0.06) 1px,
    transparent 1px
  );
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

h1,
h2,
h3 {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(40px, 6vw, 84px);
}

h2 {
  font-size: clamp(28px, 4vw, 44px);
}

h3 {
  font-size: clamp(20px, 2.5vw, 26px);
}

p {
  margin: 0 0 1em;
}

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.num {
  font-family: var(--font-num);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.wrap {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(244, 241, 236, 0.88);
  border-bottom: 2px solid rgba(47, 72, 88, 0.12);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.brand-name {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links a {
  text-decoration: none;
}

@media (max-width: 640px) {
  .nav-links .hide-sm {
    display: none;
  }
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  color: var(--ink);
  background: transparent;
}

.btn:hover {
  transform: translateY(-1px);
  color: var(--ink);
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}

.btn-accent:hover {
  color: var(--ink);
  background: #f5ad4f;
}

.btn-ghost {
  background: transparent;
  color: #F4F1EC;
  border-color: rgba(244, 241, 236, 0.4);
}

.btn-ghost:hover {
  color: #F4F1EC;
  border-color: #F4F1EC;
}

/* ——— Sprue frame ——— */
.sprue {
  position: relative;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 8px 28px var(--shadow);
  padding: 28px 24px 28px;
}

.sprue::before,
.sprue::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--bg);
}

.sprue::before {
  top: 10px;
  left: 10px;
}

.sprue::after {
  top: 10px;
  right: 10px;
}

.sprue-holes-bl,
.sprue-holes-br {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--bg);
  bottom: 10px;
}

.sprue-holes-bl {
  left: 10px;
}

.sprue-holes-br {
  right: 10px;
}

.step-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 22px;
  flex-shrink: 0;
}

.step-code {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.step-section {
  padding: 48px 0;
  position: relative;
}

.step-section.alt {
  /* flip layout helpers */
}

/* Vertical runner spine on mobile / connector */
.runner-spine {
  display: none;
}

@media (max-width: 768px) {
  .steps-stack {
    position: relative;
    padding-left: 20px;
  }

  .steps-stack::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 0;
    bottom: 0;
    width: var(--gate);
    background: var(--ink);
    border-radius: 3px;
    opacity: 0.35;
  }
}

/* Gate connectors */
.phone-mount {
  position: relative;
  display: inline-block;
}

.phone-mount img {
  border-radius: 18px;
  border: 2px solid var(--ink);
  box-shadow: 0 12px 32px var(--shadow);
  width: min(100%, 260px);
  margin-inline: auto;
}

.gate {
  position: absolute;
  width: 14px;
  height: 6px;
  background: var(--ink);
  border-radius: 2px;
  z-index: 2;
  transform-origin: center;
}

.gate::after {
  content: "";
  position: absolute;
  inset: -4px -2px;
  background: var(--accent);
  opacity: 0;
  border-radius: 2px;
  pointer-events: none;
}

.gate-top {
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
}

.gate-left {
  left: -3px;
  top: 30%;
  width: 6px;
  height: 14px;
}

.gate-right {
  right: -3px;
  top: 55%;
  width: 6px;
  height: 14px;
}

.step-section.in-view .gate.cut::after {
  animation: gateFlash 0.45s ease-out;
}

.step-section.in-view .phone-mount.cut-apart {
  transform: translateX(4px);
  transition: transform 0.35s ease-out;
}

@keyframes gateFlash {
  0% {
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Callout circles */
.callouts {
  position: relative;
}

.callout {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.callout-n {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  font-weight: 500;
  background: var(--bg);
}

.callout p {
  margin: 0;
  font-size: 15px;
}

.callout-line {
  display: none;
}

@media (min-width: 900px) {
  .callout-overlay {
    position: absolute;
  }
}

/* ——— Hero ——— */
.hero {
  padding: 40px 0 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.hero-copy .eyebrow {
  margin-bottom: 16px;
  display: inline-block;
}

.hero-copy h1 {
  margin-bottom: 12px;
}

.hero-copy .lede {
  font-size: 18px;
  font-weight: 500;
  max-width: 36ch;
  margin-bottom: 28px;
  opacity: 0.9;
}

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

.hero-sprue {
  position: relative;
  min-height: 420px;
}

.hero-sprue-svg {
  width: 100%;
  height: auto;
  display: block;
}

.hero-sprue-svg .runner-path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
}

.hero-sprue.drawn .runner-path {
  animation: drawRunner 900ms ease-out forwards;
}

@keyframes drawRunner {
  to {
    stroke-dashoffset: 0;
  }
}

.hero-parts {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-part {
  position: absolute;
  opacity: 0;
  transform: scale(0.96);
}

.hero-sprue.drawn .hero-part {
  animation: partPop 420ms ease-out forwards;
}

.hero-sprue.drawn .hero-part:nth-child(1) {
  animation-delay: 900ms;
}
.hero-sprue.drawn .hero-part:nth-child(2) {
  animation-delay: 980ms;
}
.hero-sprue.drawn .hero-part:nth-child(3) {
  animation-delay: 1060ms;
}
.hero-sprue.drawn .hero-part:nth-child(4) {
  animation-delay: 1140ms;
}

@keyframes partPop {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-part.phone {
  width: 42%;
  left: 8%;
  top: 12%;
}

.hero-part.phone img {
  width: 100%;
  border-radius: 14px;
  border: 2px solid var(--ink);
  box-shadow: 0 10px 24px var(--shadow);
}

.hero-part.stat-kit {
  right: 6%;
  top: 18%;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 14px 18px;
  text-align: center;
}

.hero-part.stat-kit .num {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
  display: block;
}

.hero-part.chip {
  right: 8%;
  top: 48%;
  background: var(--accent);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 14px;
  border: 2px solid var(--ink);
  pointer-events: auto;
}

.hero-part.cost {
  left: 12%;
  bottom: 10%;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 12px 16px;
}

.hero-part.cost .num {
  font-size: 22px;
  display: block;
}

.hero-part.cost .mono {
  opacity: 0.7;
}

.box-edge {
  margin-top: 28px;
  border: 2px solid var(--ink);
  border-radius: 0 0 12px 12px;
  border-top: none;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 20px;
  text-align: center;
}

.box-edge .mono {
  color: var(--bg);
  opacity: 0.9;
  font-size: 11px;
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-sprue {
    min-height: 360px;
    order: -1;
  }

  .hero-part.phone {
    width: 38%;
  }
}

/* ——— Parts list (Bước 0) ——— */
.parts-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.parts-list li {
  border-bottom: 1px solid rgba(47, 72, 88, 0.15);
}

.parts-list li:last-child {
  border-bottom: none;
}

.parts-list a {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px 16px;
  align-items: start;
  padding: 16px 4px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
  border-radius: 8px;
}

.parts-list a:hover {
  background: rgba(47, 72, 88, 0.04);
  color: inherit;
}

.part-id {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.part-icon {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.part-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 1.6;
}

.part-title {
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 2px;
}

.part-desc {
  margin: 0;
  font-size: 14px;
  opacity: 0.8;
}

/* ——— Kit stack SVG ——— */
.kit-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 20px;
}

.kit-box {
  width: min(100%, 280px);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 14px 18px;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform-origin: center;
  box-shadow: 0 4px 0 rgba(47, 72, 88, 0.12);
}

.kit-box + .kit-box {
  margin-top: -6px;
}

.kit-box:nth-child(1) {
  transform: rotate(-3deg);
  z-index: 3;
}
.kit-box:nth-child(2) {
  transform: rotate(2deg);
  z-index: 2;
}
.kit-box:nth-child(3) {
  transform: rotate(-1.5deg);
  z-index: 1;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.status-dot.sealed {
  background: var(--status-sealed);
}
.status-dot.building {
  background: var(--status-building);
}
.status-dot.done {
  background: var(--status-done);
}

.quote-line {
  font-weight: 600;
  font-size: 18px;
  border-left: 4px solid var(--accent);
  padding-left: 16px;
  margin-top: 20px;
}

/* ——— Two-col step layouts ——— */
.step-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.step-row.flip .visual {
  order: 2;
}

.step-row.flip .copy {
  order: 1;
}

@media (max-width: 800px) {
  .step-row,
  .step-row.flip {
    grid-template-columns: 1fr;
  }

  .step-row.flip .visual,
  .step-row.flip .copy {
    order: unset;
  }
}

/* Field table */
.field-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 20px;
  background: var(--bg);
  border: 2px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
}

.field-table th,
.field-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(47, 72, 88, 0.12);
}

.field-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  background: rgba(47, 72, 88, 0.06);
}

.field-table tr:last-child td {
  border-bottom: none;
}

/* ——— Stages bar ——— */
.stages {
  display: flex;
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  min-height: 72px;
}

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 6px;
  color: #fff;
  cursor: pointer;
  position: relative;
  border: none;
  font-family: var(--font-body);
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
}

.stages.filled .stage {
  animation: stageFill 0.55s ease-out forwards;
}

.stages.filled .stage:nth-child(1) {
  animation-delay: 0ms;
}
.stages.filled .stage:nth-child(2) {
  animation-delay: 100ms;
}
.stages.filled .stage:nth-child(3) {
  animation-delay: 200ms;
}
.stages.filled .stage:nth-child(4) {
  animation-delay: 300ms;
}
.stages.filled .stage:nth-child(5) {
  animation-delay: 400ms;
}

@keyframes stageFill {
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

.stage[data-stage="cut"] {
  background: var(--cut);
}
.stage[data-stage="assemble"] {
  background: var(--assemble);
}
.stage[data-stage="paint"] {
  background: var(--paint);
  color: var(--ink);
}
.stage[data-stage="decal"] {
  background: var(--decal);
  color: var(--ink);
}
.stage[data-stage="coat"] {
  background: var(--coat);
  color: var(--ink);
}

.stage-name {
  font-weight: 700;
  font-size: 14px;
}

.stage-tip {
  font-size: 12px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.2s, max-height 0.2s;
  text-align: center;
  line-height: 1.3;
}

.stage:hover .stage-tip,
.stage:focus .stage-tip,
.stage.active .stage-tip {
  opacity: 0.95;
  max-height: 40px;
}

.session-card {
  margin-top: 24px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 18px;
  background: var(--bg);
}

.session-card .mono {
  margin-bottom: 10px;
  display: block;
}

.session-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--card);
}

.chip.on {
  background: var(--accent);
  border-color: var(--accent);
}

.session-note {
  font-size: 14px;
  opacity: 0.8;
  margin: 0;
}

/* ——— Profile stats ——— */
.big-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.big-stat .num {
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.95;
  display: block;
}

.big-stat .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.ratio-bar {
  display: flex;
  height: 16px;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  width: 100%;
  max-width: 320px;
}

.ratio-bar span {
  display: block;
  height: 100%;
}

.formula {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  background: var(--bg);
  border: 1.5px dashed var(--ink);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 8px;
}

.menu-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 14px;
}

.menu-dots {
  width: 32px;
  height: 32px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 2px;
  flex-shrink: 0;
}

/* ——— Forecast (dark) ——— */
.forecast {
  background: var(--ink);
  color: #F4F1EC;
  padding: 64px 0;
  position: relative;
}

.forecast .sprue {
  background: transparent;
  border-color: rgba(244, 241, 236, 0.35);
  box-shadow: none;
}

.forecast .sprue::before,
.forecast .sprue::after,
.forecast .sprue-holes-bl,
.forecast .sprue-holes-br {
  background: var(--ink);
  border-color: rgba(244, 241, 236, 0.5);
}

.forecast .step-num {
  background: var(--accent);
  color: var(--ink);
}

.forecast .step-code {
  color: rgba(244, 241, 236, 0.7);
}

.forecast h2 {
  color: #F4F1EC;
}

.forecast-num {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: clamp(72px, 16vw, 180px);
  line-height: 0.9;
  color: var(--accent);
  letter-spacing: -0.03em;
  margin: 8px 0 24px;
}

.forecast-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: end;
}

@media (max-width: 800px) {
  .forecast-grid {
    grid-template-columns: 1fr;
  }
}

.chart-wrap {
  background: rgba(244, 241, 236, 0.06);
  border: 1.5px solid rgba(244, 241, 236, 0.2);
  border-radius: 16px;
  padding: 16px;
}

.chart-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-legend {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 13px;
}

.chart-legend i {
  display: inline-block;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 6px;
}

.legend-buy {
  background: var(--accent);
}
.legend-done {
  background: #7eb8a0;
}

.demo-toggle {
  margin-top: 20px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.toggle {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: rgba(244, 241, 236, 0.2);
  border: 2px solid rgba(244, 241, 236, 0.4);
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s;
}

.toggle::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #F4F1EC;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
}

.toggle.on {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle.on::after {
  transform: translateX(20px);
  background: var(--ink);
}

.warning-stamp {
  display: none;
  margin-top: 20px;
  border: 3px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 20px;
  border-radius: 8px;
  transform: rotate(-6deg) scale(1.3);
  opacity: 0;
  width: fit-content;
}

.warning-stamp.show {
  display: inline-block;
  animation: stampIn 0.4s ease-out forwards;
}

@keyframes stampIn {
  to {
    opacity: 1;
    transform: rotate(-6deg) scale(1);
  }
}

.forecast p {
  color: rgba(244, 241, 236, 0.85);
}

/* ——— Stats section ——— */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 180px;
  padding: 12px 8px 0;
  border-bottom: 2px solid var(--ink);
  position: relative;
}

.bar-chart::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    to top,
    transparent 0,
    transparent calc(10% - 1px),
    rgba(47, 72, 88, 0.08) calc(10% - 1px),
    rgba(47, 72, 88, 0.08) 10%
  );
  pointer-events: none;
}

.bar {
  flex: 1;
  background: var(--ink);
  border-radius: 4px 4px 0 0;
  min-width: 0;
  position: relative;
  z-index: 1;
  transition: height 0.8s ease-out;
}

.bar:nth-child(odd) {
  background: var(--assemble);
}

.bar-labels {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.bar-labels span {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  opacity: 0.65;
}

.y-label {
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: 0.6;
  margin-bottom: 4px;
}

.cost-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 15px;
}

.cost-table th,
.cost-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(47, 72, 88, 0.12);
}

.cost-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cost-table tr.best {
  background: var(--accent);
  font-weight: 700;
}

.cost-table tr.best td {
  border-bottom-color: transparent;
}

.csv-block {
  margin-top: 20px;
  background: var(--ink);
  color: #F4F1EC;
  border-radius: 12px;
  padding: 16px;
  overflow-x: auto;
}

.csv-block .mono {
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
}

.csv-block pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  white-space: pre;
}

/* ——— Settings / dark preview ——— */
.settings-preview {
  transition: background 0.35s ease, color 0.35s ease;
}

.settings-preview.dark {
  background: var(--dark-bg);
  color: #F4F1EC;
  border-radius: var(--radius);
  padding: 24px;
  margin: -8px;
}

.settings-preview.dark .sprue {
  background: var(--dark-card);
  border-color: rgba(244, 241, 236, 0.3);
  color: #F4F1EC;
}

.settings-preview.dark .sprue::before,
.settings-preview.dark .sprue::after,
.settings-preview.dark .sprue-holes-bl,
.settings-preview.dark .sprue-holes-br {
  background: var(--dark-bg);
  border-color: rgba(244, 241, 236, 0.4);
}

.settings-preview.dark .step-num {
  background: var(--accent);
  color: var(--ink);
}

.settings-preview.dark .chip {
  background: var(--dark-card);
  border-color: rgba(244, 241, 236, 0.35);
  color: #F4F1EC;
}

.settings-preview.dark .phone-mount img {
  border-color: rgba(244, 241, 236, 0.35);
}

.settings-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.theme-toggle-wrap {
  margin-top: 16px;
}

.theme-toggle-wrap .toggle-row {
  color: inherit;
}

.settings-preview.dark .toggle {
  background: rgba(244, 241, 236, 0.15);
  border-color: rgba(244, 241, 236, 0.35);
}

.settings-preview .phone-mount img {
  width: min(100%, 180px);
}

/* ——— Finish ——— */
.finish {
  padding: 64px 0 48px;
  text-align: center;
}

.finish-display {
  position: relative;
  max-width: 640px;
  margin: 0 auto 32px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
}

.finish-display img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0.92;
}

.finish-display .plinth {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: linear-gradient(
    to top,
    rgba(47, 72, 88, 0.95),
    transparent
  );
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 0 auto 28px;
  max-width: 420px;
  text-align: left;
}

.ticks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  font-size: 16px;
}

.tick {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--status-done);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.finish-quote {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 28ch;
  margin: 0 auto 28px;
  line-height: 1.35;
}

/* ——— Footer ——— */
.site-footer {
  border-top: 2px solid var(--ink);
  background: var(--ink);
  color: #F4F1EC;
  padding: 20px 0;
}

.site-footer .inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

.site-footer .mono {
  color: rgba(244, 241, 236, 0.7);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer a {
  color: #F4F1EC;
  font-size: 14px;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

/* ——— Support page ——— */
.page-hero {
  padding: 48px 0 24px;
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 64px);
}

.faq {
  padding: 24px 0 64px;
}

.faq-item {
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--card);
  margin-bottom: 12px;
  overflow: hidden;
}

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

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

.faq-item summary::after {
  content: "+";
  font-family: var(--font-num);
  font-size: 22px;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item .answer {
  padding: 0 20px 18px;
  margin: 0;
  font-size: 16px;
  opacity: 0.9;
}

.contact-box {
  margin-top: 40px;
  padding: 24px;
}

/* ——— Reduced motion ——— */
@media (prefers-reduced-motion: reduce) {
  .hero-sprue-svg .runner-path {
    stroke-dashoffset: 0;
    animation: none !important;
  }

  .hero-part {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .stage {
    transform: none;
    opacity: 1;
    animation: none !important;
  }

  .warning-stamp.show {
    animation: none;
    opacity: 1;
    transform: rotate(-6deg) scale(1);
  }

  .gate::after {
    animation: none !important;
  }

  .step-section.in-view .phone-mount.cut-apart {
    transform: none;
  }

  .btn,
  .bar,
  .settings-preview,
  .toggle,
  .toggle::after {
    transition: none;
  }
}
