/* ==========================================================================
   3D PrintHaus — "Haus" design system (Outfit + Periwinkle / Lilac / Sky Cyan)
   Crisp straight-corner geometry, iridescent periwinkle-lilac gradients,
   pixel-step checkerboard accents, and high-contrast obsidian ink.
   ========================================================================== */

:root {
  color-scheme: light;

  /* --- Source palette (Outfit / RCRUT Aesthetic Board) --- */
  --pistachio: #7C83FF;      /* primary brand fill: vibrant periwinkle blue */
  --celadon: #A5B4FC;        /* soft periwinkle */
  --nyanza: #38BDF8;         /* sky cyan */
  --seafoam: #C084FC;        /* lilac purple */
  --mist: #818CF8;           /* cornflower blue */
  --rose: #E879F9;           /* iridescent orchid pink */

  /* --- Washes: airy cool periwinkle/lilac/cyan tints for cards & surfaces --- */
  --celadon-wash: #EEF0FF;   /* periwinkle ice */
  --nyanza-wash: #E6F6FF;    /* sky cyan wash */
  --seafoam-wash: #F4EEFF;   /* lilac lavender wash */
  --mist-wash: #ECF2FF;      /* cornflower wash */
  --rose-wash: #FCEEFF;      /* orchid pink wash */

  /* --- Inks: deep high-contrast tones, AA/AAA on tints, washes, and white --- */
  --green-ink: #4338CA;      /* deep indigo-periwinkle (primary accent ink) */
  --teal-ink: #0369A1;       /* deep sky cyan ink */
  --blue-ink: #312E81;       /* deep midnight indigo */
  --rose-ink: #86198F;       /* deep orchid plum */

  /* --- Blog Category Tokens (Option A: high-contrast, zero green) --- */
  --blog-cat-study: #4338CA;
  --blog-cat-howto: #0369A1;
  --blog-cat-freebie: #86198F;

  /* --- Brand states --- */
  --pistachio-hover: #6366F1;
  --pistachio-press: #4F46E5;

  /* --- Neutrals, biased toward deep obsidian-indigo --- */
  --ink: #0F1020;            /* deep obsidian headings & primary text */
  --ink-2: #242642;          /* body copy */
  --ink-3: #5A5E80;          /* captions, labels */
  --control: #7E83A8;        /* form-control borders */
  --line-strong: #C7CBE6;
  --line: #E3E5F5;
  --surface-3: #ECEEFF;      /* wells, hover fills, inline code */
  --surface-2: #F6F7FF;      /* quiet bands, footer, ad wells */
  --surface: #FFFFFF;        /* cards */
  --bg: #FFFFFF;             /* page */
  --focus: #4338CA;

  /* --- Type (Outfit geometric sans + Red Hat Mono) --- */
  --font-display: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-text: "Outfit", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: "Red Hat Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* --- Shape (Straight corners everywhere) --- */
  --r-xs: 0px;
  --r-sm: 0px;
  --r-md: 0px;
  --r-lg: 0px;
  --r-xl: 0px;
  --r-pill: 0px;

  /* --- Depth: shadows carry the obsidian-indigo hue --- */
  --shadow-1: 0 1px 2px rgba(15, 16, 32, 0.06);
  --shadow-2: 0 1px 2px rgba(15, 16, 32, 0.05), 0 12px 28px -10px rgba(67, 56, 202, 0.16);
  --shadow-3: 0 2px 6px rgba(15, 16, 32, 0.05), 0 30px 60px -24px rgba(67, 56, 202, 0.28);

  /* --- Space --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;

  /* --- Layout --- */
  --container: 1240px;
  --gutter: 20px;
  --rail: 300px;

  /* --- Legacy aliases, so pages written against studio-layout.css keep working --- */
  --bg-page: var(--bg);
  --bg-card: var(--surface);
  --bg-subtle: var(--surface-2);
  --stage-bg: var(--surface-2);
  --stage-grid: rgba(15, 16, 32, 0.07);
  --ink-muted: var(--ink-3);
  --border: var(--line);
  --border-strong: var(--line-strong);
  --primary: var(--green-ink);
  --primary-hover: #312E81;
  --primary-accent: var(--pistachio);
  --primary-soft: var(--celadon-wash);
  --secondary: var(--teal-ink);
  --secondary-soft: var(--nyanza-wash);
  --blue: var(--blue-ink);
  --blue-soft: var(--mist-wash);
  --success: var(--green-ink);
  --success-soft: var(--celadon-wash);
  --warn: var(--rose-ink);
  --warn-soft: var(--rose-wash);
  --radius-lg: var(--r-lg);
  --radius-md: var(--r-md);
  --radius-sm: var(--r-sm);
  --shadow-sm: var(--shadow-1);
  --shadow-md: var(--shadow-2);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--ink);
  text-wrap: balance;
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  font-weight: 500;
  background: var(--surface-3);
  color: var(--ink);
  padding: 0.12em 0.42em;
  border-radius: var(--r-xs);
  white-space: nowrap;
}

a {
  color: var(--green-ink);
  text-underline-offset: 0.18em;
}

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

.nb {
  white-space: nowrap;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--ink);
  color: #ffffff;
  padding: 10px 16px;
  font-weight: 700;
  border-radius: 0 0 var(--r-sm) 0;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 20px;
}

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

.brand-link img,
.brand-cube {
  width: 38px;
  height: 38px;
  flex: none;
}

.brand-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.brand-sub {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-3);
}

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

.nav-pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 13px;
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-pill:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.nav-pill.active {
  background: var(--celadon-wash);
  color: var(--green-ink);
}

@media (max-width: 1080px) {
  .nav-links {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: calc(100% + var(--gutter) * 2);
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: calc(var(--gutter) - 13px);
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary,
.btn-secondary,
.btn-teal,
.btn-ink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #2EA8DF 0%, #7C83FF 52%, #B88BFF 100%);
  color: #FFFFFF;
  border-color: rgba(15, 16, 32, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), var(--shadow-1);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2396CA 0%, #6366F1 52%, #A675F8 100%);
}

.btn-primary:active {
  background: linear-gradient(135deg, #1E84B5 0%, #4F46E5 52%, #935EEB 100%);
  transform: translateY(1px);
}

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

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

.btn-teal {
  background: var(--nyanza);
  color: var(--ink);
  border-color: rgba(0, 92, 67, 0.2);
}

.btn-teal:hover {
  background: var(--seafoam);
}

.btn-ink {
  background: var(--ink);
  color: #ffffff;
}

.btn-ink:hover {
  background: var(--ink-2);
}

.btn-lg {
  min-height: 52px;
  padding: 14px 24px;
  font-size: 15.5px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ==========================================================================
   Badges, chips, eyebrows
   ========================================================================== */
.eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

/* Legacy names kept; "orange" now maps to the warm Rose family. */
.badge-orange {
  background: var(--rose-wash);
  color: var(--rose-ink);
  border-color: var(--rose);
}

.badge-green {
  background: var(--celadon-wash);
  color: var(--green-ink);
  border-color: var(--celadon);
}

.badge-teal {
  background: var(--nyanza-wash);
  color: var(--teal-ink);
  border-color: var(--seafoam);
}

.badge-blue {
  background: var(--mist-wash);
  color: var(--blue-ink);
  border-color: var(--mist);
}

.eyebrow,
.module-step {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-ink);
}

.spec-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.spec {
  padding: 4px 8px;
  border: 1px solid rgba(17, 36, 24, 0.12);
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

/* ==========================================================================
   Hero (home)
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  border-bottom: 1px solid var(--line);
}

/* Iridescent periwinkle-lilac-cyan mesh & glossy sphere orbs over crisp white */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 86% 18%, rgba(232, 121, 249, 0.38) 0%, rgba(192, 132, 252, 0.24) 22%, transparent 52%),
    radial-gradient(circle at 12% 14%, rgba(56, 189, 248, 0.34) 0%, rgba(129, 140, 248, 0.22) 26%, transparent 56%),
    radial-gradient(circle at 74% 84%, rgba(124, 131, 255, 0.32) 0%, rgba(165, 180, 252, 0.18) 28%, transparent 58%),
    linear-gradient(135deg, #EEF2FF 0%, #F5F3FF 48%, #FDF4FF 100%);
}

/* Signature geometric pixel-checkerboard mosaic accent along top/right edges */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    conic-gradient(
      rgba(124, 131, 255, 0.16) 90deg,
      transparent 90deg 180deg,
      rgba(192, 132, 252, 0.14) 180deg 270deg,
      transparent 270deg
    );
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(62% 82% at 86% 24%, #000 0%, transparent 72%);
  mask-image: radial-gradient(62% 82% at 86% 24%, #000 0%, transparent 72%);
}

.hero-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(32px, 4vw, 52px) var(--gutter) clamp(40px, 5vw, 68px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.hero-copy {
  min-width: 0;
  max-width: 820px;
}

.hero-demo {
  min-width: 0;
  width: 100%;
  max-width: none !important;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(2.3rem, 1.05rem + 3.7vw, 4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.hero-kicker {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-ink);
}

/* The file extension, set as a periwinkle-lilac gradient chip. */
.stl-chip {
  display: inline-block;
  padding: 0.04em 0.18em 0.07em;
  border-radius: 0;
  background: linear-gradient(135deg, #2EA8DF 0%, #7C83FF 52%, #C084FC 100%);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
}

.hero .lead {
  max-width: 34em;
  margin: 0;
  color: var(--ink-2);
  font-size: clamp(1.02rem, 0.95rem + 0.35vw, 1.16rem);
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.author-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 22px;
  color: var(--ink-3);
  font-size: 13px;
}

.author-byline a {
  color: var(--ink);
  font-weight: 700;
}

.slicer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 18px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(17, 36, 24, 0.1);
  list-style: none;
}

.slicer-row .slicer-label {
  margin-right: 4px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 600;
}

/* --- App window: frames the live maker --- */
.hero-demo {
  min-width: 0;
}

.app-window {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}

.app-window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

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

.win-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: inset 0 0 0 1px rgba(17, 36, 24, 0.14);
}

.win-dots i:nth-child(2) {
  background: var(--mist);
}

.win-dots i:nth-child(3) {
  background: var(--pistachio);
}

.win-title {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid var(--celadon);
  border-radius: var(--r-pill);
  background: var(--celadon-wash);
  color: var(--green-ink);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.live-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-ink);
}

.app-window-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

/* ==========================================================================
   3D stage, controls, KPI strip, export bar (shared with every maker page)
   ========================================================================== */
.blueprint-stage {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  color: var(--ink);
}

.blueprint-canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-sm);
  cursor: grab;
  touch-action: pan-y;
  background-image:
    linear-gradient(to right, var(--stage-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--stage-grid) 1px, transparent 1px);
  background-size: 21px 21px;
}

.blueprint-canvas:active {
  cursor: grabbing;
}

.stage--bare {
  padding: 0;
}

.stage--bare .blueprint-canvas {
  aspect-ratio: 16 / 10;
  border-radius: 0;
  background-image: none;
}

.stage-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  gap: 2px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-1);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  pointer-events: none;
}

.stage-chip b {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
}

.stage-chip span {
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stage-hint {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 600;
  pointer-events: none;
}

.canvas-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.view-tabs,
.stage-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.view-tab,
.zoom-btn {
  min-height: 44px;
  padding: 6px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font-text);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.zoom-btn {
  min-height: 32px;
  padding: 4px 10px;
}

.view-tab:hover,
.zoom-btn:hover {
  background: var(--surface-2);
  border-color: var(--control);
}

.view-tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.color-swatches {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.92);
}

.stage-swatches {
  position: absolute;
  top: 12px;
  right: 12px;
  box-shadow: var(--shadow-1);
}

.swatch-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(17, 36, 24, 0.18);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.swatch-btn:hover {
  transform: scale(1.1);
}

.swatch-btn.active {
  box-shadow: 0 0 0 2px var(--ink);
}

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

.ctrl-group {
  padding: 10px 14px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}

.ctrl-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
}

.ctrl-val {
  color: var(--green-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--pistachio) var(--pct, 0%), var(--line-strong) var(--pct, 0%));
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--line-strong);
}

input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--pistachio);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(17, 36, 24, 0.25);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(17, 36, 24, 0.25);
}

.ctrl-group select,
.ctrl-group input[type="text"],
.ctrl-group input[type="number"],
.cost-input-card input,
.cost-input-card select,
.studio-select {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--control);
  border-radius: var(--r-sm);
  background-color: var(--surface);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 600;
}

.ctrl-group select,
.cost-input-card select,
.studio-select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23112418' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  text-overflow: ellipsis;
}

.ctrl-checkbox-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding-top: 4px;
}

.ctrl-checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

input[type="checkbox"] {
  accent-color: var(--green-ink);
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.app-window .kpi-strip {
  margin-top: 0;
  gap: 8px;
}

.app-window .kpi-card {
  padding: 9px 10px;
}

.app-window .kpi-val {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-card {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}

.kpi-label {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kpi-val {
  margin-top: 2px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.kpi-sub {
  overflow: hidden;
  color: var(--green-ink);
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-sub.warn {
  color: var(--rose-ink);
}

.export-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.app-window .export-action-bar {
  margin: 2px -14px -14px;
  border-width: 1px 0 0;
  border-radius: 0;
}

.export-note {
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 500;
}

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

.quick-presets-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.quick-presets-label {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
}

.preset-chip {
  min-height: 44px;
  padding: 6px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font-text);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.preset-chip:hover {
  background: var(--celadon-wash);
  border-color: var(--pistachio);
  color: var(--green-ink);
}

/* ==========================================================================
   Summary band: answer-first box, tolerance tiles, jump links
   ========================================================================== */
.summary-band {
  padding-block: clamp(28px, 4vw, 44px) 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.answer-first-box {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.68;
}

.answer-first-box > strong:first-child {
  display: block;
  margin-bottom: 8px;
  color: var(--green-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.answer-first-box strong {
  color: var(--ink);
}

.tolerance-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tol {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(17, 36, 24, 0.08);
  border-radius: var(--r-md);
  background: var(--celadon-wash);
}

.tol:nth-child(2) {
  background: var(--nyanza-wash);
}

.tol:nth-child(3) {
  background: var(--mist-wash);
}

.tol:nth-child(4) {
  background: var(--rose-wash);
}

.tol-num {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.tol-num small {
  margin-left: 3px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.tol-label {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}

.jump-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 13px;
}

.jump-toc-label {
  margin-right: 2px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.jump-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.jump-toc a:hover {
  background: var(--surface-2);
  border-color: var(--control);
}

/* ==========================================================================
   Makers bento (home)
   ========================================================================== */
.section {
  padding-block: clamp(44px, 6vw, 80px);
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(22px, 3vw, 34px);
}

.section-title {
  margin: 12px 0 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 1.15rem + 1.9vw, 2.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

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

.maker-card {
  position: relative;
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 90% 12%, rgba(232, 121, 249, 0.22) 0%, transparent 48%),
    linear-gradient(145deg, #EEF0FF 0%, #F6F7FF 58%, #FFFFFF 100%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Signature pixel-step checkerboard corner accent on maker cards */
.maker-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 64px;
  height: 64px;
  pointer-events: none;
  z-index: 1;
  background-image:
    conic-gradient(
      rgba(124, 131, 255, 0.2) 90deg,
      transparent 90deg 180deg,
      rgba(192, 132, 252, 0.16) 180deg 270deg,
      transparent 270deg
    );
  background-size: 16px 16px;
  -webkit-mask-image: linear-gradient(225deg, #000 0%, transparent 78%);
  mask-image: linear-gradient(225deg, #000 0%, transparent 78%);
}

.maker-card:hover {
  transform: translateY(-3px);
  border-color: var(--pistachio);
  box-shadow: var(--shadow-2);
}

.maker-card:nth-child(1) {
  grid-column: span 7;
}

.maker-card:nth-child(2) {
  grid-column: span 5;
  background: var(--mist-wash);
}

.maker-card:nth-child(3) {
  background: var(--nyanza-wash);
}

.maker-card:nth-child(4) {
  background: var(--rose-wash);
}

.maker-card:nth-child(5) {
  background: var(--seafoam-wash);
}

.maker-art {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
}

.maker-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 4px 24px 24px;
}

.maker-card h2 {
  margin: 12px 0 8px;
  font-size: 1.32rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.maker-card p {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.58;
}

.maker-card .spec-list {
  margin-bottom: 18px;
}

.maker-card .btn-primary,
.maker-card .btn-secondary {
  margin-top: auto;
}

/* The whole card is the link target; the button stays the visible affordance. */
.maker-card .stretched::after {
  content: "";
  position: absolute;
  inset: 0;
}

@media (min-width: 900px) {
  .maker-card:nth-child(1) {
    flex-direction: row;
    align-items: center;
  }
  .maker-card:nth-child(1) .maker-art {
    order: 2;
    flex: 1 1 48%;
    width: 48%;
    aspect-ratio: 1 / 1;
  }
  .maker-card:nth-child(1) .maker-body {
    flex: 1 1 52%;
    padding: 28px 8px 28px 30px;
  }
  .maker-card:nth-child(1) h2 {
    font-size: 1.85rem;
  }
  .maker-card:nth-child(2) .maker-art {
    aspect-ratio: 16 / 9;
  }
}

/* ==========================================================================
   Modules (panels), setup band
   ========================================================================== */
.studio-module {
  margin: 22px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

/* A module that is only a heading plus content of its own cards or table. */
.studio-module.module-flat {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.module-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.module-title {
  margin: 6px 0 0;
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

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

.setup-band {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
  gap: 20px 32px;
  align-items: center;
  margin: 0;
  padding: 26px 28px;
  border-color: rgba(17, 36, 24, 0.08);
  border-radius: var(--r-xl);
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(198, 217, 245, 0.55), transparent 70%),
    var(--surface-2);
  box-shadow: none;
}

.setup-band .module-header {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

.setup-band .btn-secondary {
  margin-top: 14px;
}

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

.setup-band .cost-grid {
  margin: 0;
}

.cost-input-card {
  min-width: 0;
  padding: 10px 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.cost-input-card label {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
}

.chain-arrival-banner {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid var(--celadon);
  border-radius: var(--r-md);
  background: var(--celadon-wash);
  color: var(--green-ink);
  font-size: 13.5px;
  font-weight: 600;
}

.chain-arrival-banner.visible {
  display: flex;
}

/* The one inverse surface in the system: a next-step call to action. */
.chain-cta-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 22px 24px;
  border-radius: var(--r-lg);
  background: var(--ink);
  color: #ffffff;
}

/* ==========================================================================
   Page shell: reading column + rail
   ========================================================================== */
.page-shell {
  max-width: var(--container);
  margin: 28px auto 56px;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail);
  gap: 40px;
  align-items: start;
}

.home .page-shell {
  margin-top: clamp(44px, 5.5vw, 72px);
}

.entry-content {
  min-width: 0;
}

/* Legacy hero card used at the top of maker and guide pages. */
.studio-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background:
    radial-gradient(circle at 92% 18%, rgba(232, 121, 249, 0.28) 0%, rgba(192, 132, 252, 0.18) 28%, transparent 58%),
    radial-gradient(circle at 8% 85%, rgba(56, 189, 248, 0.22) 0%, transparent 52%),
    linear-gradient(135deg, #EEF2FF 0%, #F5F3FF 55%, #FFFFFF 100%);
  box-shadow: var(--shadow-1);
}

.studio-hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 96px;
  height: 96px;
  pointer-events: none;
  background-image:
    conic-gradient(
      rgba(124, 131, 255, 0.22) 90deg,
      transparent 90deg 180deg,
      rgba(192, 132, 252, 0.18) 180deg 270deg,
      transparent 270deg
    );
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(225deg, #000 0%, transparent 75%);
  mask-image: linear-gradient(225deg, #000 0%, transparent 75%);
}

.studio-hero h1 {
  margin: 12px 0 10px;
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.studio-hero p.lead {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.65;
}

.breadcrumb-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 600;
}

.breadcrumb-nav a {
  color: var(--green-ink);
  text-decoration: none;
}

.breadcrumb-nav a:hover {
  text-decoration: underline;
}

/* Prose: direct-child headings and paragraphs of the reading column. */
.entry-content > h2.prose-h2 {
  margin: 44px 0 14px;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.entry-content > p {
  max-width: 70ch;
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 1.75;
}

.hero-visual-figure {
  margin: 22px 0 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}

.hero-visual-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-visual-figure figcaption {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-3);
  font-size: 12.5px;
}

/* ==========================================================================
   Catalog
   ========================================================================== */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.search-input {
  flex: 1 1 240px;
  min-height: 48px;
  padding: 11px 16px 11px 44px;
  border: 1px solid var(--control);
  border-radius: var(--r-pill);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Ccircle cx='7.5' cy='7.5' r='5.5' fill='none' stroke='%23596F60' stroke-width='1.8'/%3E%3Cpath d='M12 12l4.5 4.5' stroke='%23596F60' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 16px center;
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 15px;
  font-weight: 500;
}

.search-input::placeholder {
  color: var(--ink-3);
}

.search-input:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.filter-pill {
  min-height: 40px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.filter-pill:hover {
  background: var(--surface-2);
  border-color: var(--control);
}

.filter-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 14px;
}

.catalog-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.catalog-card:hover {
  transform: translateY(-2px);
  border-color: var(--pistachio);
  box-shadow: var(--shadow-2);
}

.catalog-card h3 {
  margin: 10px 0 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.01em;
}

.catalog-card p {
  margin: 0;
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.52;
}

.catalog-card .btn-secondary {
  width: 100%;
}

.catalog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.catalog-meta .badge {
  font-family: var(--font-mono);
  font-weight: 500;
}

/* ==========================================================================
   Tables
   ========================================================================== */
.cut-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

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

.cut-table th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.cut-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.cut-table td:first-child {
  color: var(--ink);
  font-weight: 700;
}

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

.cut-table tr.checked-row td {
  background: var(--surface-2);
  color: var(--ink-3);
  text-decoration: line-through;
}

/* ==========================================================================
   Ad wells (reserved sizes unchanged, so nothing shifts when ads fill)
   ========================================================================== */
.ad-unit-incontent {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  margin: 30px 0;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  text-align: center;
}

.ad-unit-label {
  margin-bottom: 6px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ad-unit-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 728px;
  min-height: 210px;
  color: var(--ink-3);
  font-size: 12.5px;
}

.ad-rail-sticky {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: var(--rail);
  min-height: 600px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  text-align: center;
}

.ad-adhesion-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 60px;
  padding: 6px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* ==========================================================================
   Buyer guide, callouts, FAQ
   ========================================================================== */
.module-intro {
  max-width: 70ch;
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 14.5px;
}

.buyer-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.buyer-guide-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.buyer-guide-card h3 {
  margin: 10px 0 6px;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.buyer-guide-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.55;
}

.buyer-guide-card .btn-secondary {
  justify-content: center;
}

.disclaimer-callout {
  margin: 26px 0;
  padding: 16px 20px;
  border: 1px solid var(--rose);
  border-radius: var(--r-md);
  background: var(--rose-wash);
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.62;
}

.disclaimer-callout strong {
  color: var(--rose-ink);
}

.disclaimer-callout code {
  background: rgba(255, 255, 255, 0.7);
}

.faq-section {
  margin: 44px 0 22px;
}

.faq-section .prose-h2 {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

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

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.faq-list details[open] {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 18px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

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

/* Plus that closes to a minus when the answer is open. */
.faq-list summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 14px no-repeat;
  transition: transform 0.2s ease;
}

.faq-list details[open] summary::after {
  background: linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat;
  transform: rotate(180deg);
}

.faq-list details p {
  max-width: 70ch;
  margin: 0;
  padding: 0 18px 18px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.68;
}

/* ==========================================================================
   Right rail
   ========================================================================== */
.right-rail {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: var(--rail);
}

.toc-rail-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.toc-rail-title {
  display: block;
  margin: 0 0 10px;
  color: var(--teal-ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc-rail-links {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--line);
}

.toc-rail-link {
  display: block;
  padding: 6px 0 6px 13px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.38;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.toc-rail-link:hover {
  color: var(--green-ink);
  border-left-color: var(--line-strong);
}

.toc-rail-link.is-active {
  color: var(--green-ink);
  font-weight: 700;
  border-left-color: var(--pistachio);
}

.cite-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.locker-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.locker-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px;
  color: var(--teal-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.locker-title span + span {
  color: var(--ink-3);
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

/* The saved-printer line is written by stl-engine.js with inline colours. */
#printLockerList > div:first-child:not(.saved-item) {
  border-radius: var(--r-sm) !important;
  background: var(--mist-wash) !important;
  color: var(--blue-ink) !important;
  font-family: var(--font-mono);
}

.saved-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: 12.5px;
}

.saved-item a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.saved-item a:hover {
  color: var(--green-ink);
}

.profile-sync-card {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12px;
}

.profile-sync-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.profile-sync-row input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--control);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 13px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: 64px;
  padding: 56px var(--gutter) 104px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
}

.footer-inner {
  max-width: calc(var(--container) - var(--gutter) * 2);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-brand .brand-cube {
  width: 34px;
  height: 34px;
}

.site-footer h4 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.005em;
}

.site-footer p {
  max-width: 46ch;
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.6;
}

.site-footer .footer-fine {
  color: var(--ink-3);
  font-size: 12.5px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin-bottom: 8px;
  font-size: 13.5px;
}

.site-footer a {
  color: var(--ink-2);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--green-ink);
  text-decoration: underline;
}

/* ==========================================================================
   Toast, consent
   ========================================================================== */
.pb-toast {
  position: fixed;
  right: 20px;
  bottom: 76px;
  z-index: 80;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  background: var(--ink);
  box-shadow: var(--shadow-3);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.pb-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.pb-consent-banner {
  position: fixed;
  right: 16px;
  bottom: 72px;
  left: 16px;
  z-index: 95;
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 700px;
  margin: 0 auto;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-3);
  color: var(--ink-2);
}

.pb-consent-banner.visible {
  display: flex;
}

.pb-consent-banner strong {
  color: var(--ink);
}

/* telemetry-consent.js writes this link with an inline colour meant for a dark banner. */
.pb-consent-banner a {
  color: var(--green-ink) !important;
}

.pb-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1023px) {
  .page-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .right-rail {
    position: static;
    width: 100%;
  }
  .ad-rail-sticky {
    width: 100%;
    min-height: 280px;
  }
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-demo {
    max-width: 100%;
  }
  .summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .tolerance-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .setup-band {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 899px) {
  .maker-card,
  .maker-card:nth-child(1),
  .maker-card:nth-child(2) {
    grid-column: span 6;
  }
  .maker-card:nth-child(1) {
    grid-column: span 12;
  }
}

@media (max-width: 760px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .tolerance-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .maker-card,
  .maker-card:nth-child(2) {
    grid-column: span 12;
  }
  .cost-grid {
    grid-template-columns: 1fr;
  }
  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .studio-module {
    padding: 20px 18px;
  }
  .setup-band {
    padding: 22px 18px;
  }
  .studio-hero {
    padding: 22px 18px;
  }
}

@media (max-width: 640px) {
  input.studio-input,
  select.studio-input,
  textarea.studio-input,
  .search-input,
  .profile-sync-row input,
  .cost-input-card select,
  .cost-input-card input {
    min-height: 44px;
    font-size: 16px;
  }
  .jump-toc a {
    min-height: 44px;
  }
  .hero-actions .btn-lg {
    flex: 1 1 100%;
    justify-content: center;
  }
  .stage-hint {
    display: none;
  }
}

@media (max-width: 520px) {
  .stage-chip span {
    display: none;
  }
  .author-byline {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .author-byline [aria-hidden="true"] {
    display: none;
  }
}

@media (max-width: 460px) {
  .controls-grid {
    grid-template-columns: 1fr;
  }
  .win-title {
    display: none;
  }
  .brand-sub {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Print
   ========================================================================== */
.print-export-watermark {
  display: none;
}

@media print {
  .site-header,
  .right-rail,
  .ad-unit-incontent,
  .ad-adhesion-bar,
  .site-footer,
  .chain-cta-box,
  .pb-consent-banner,
  .hero-demo,
  .no-print {
    display: none !important;
  }
  .hero::before,
  .hero::after {
    display: none;
  }
  .page-shell {
    display: block;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  .studio-module,
  .studio-hero,
  .maker-card {
    box-shadow: none;
    break-inside: avoid;
    border-color: var(--line-strong);
  }
  .print-export-watermark {
    display: block !important;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid var(--line-strong);
    color: var(--ink-3);
    font-size: 11px;
    text-align: center;
  }
}

/* ==========================================================================
   Brand Design Rules: No Eyebrows, Compact Tool Header & 4-Hub Grids
   ========================================================================== */
.eyebrow,
.eyebrow-row,
.hero-kicker,
.module-step {
  display: none !important;
}

.tool-page-intro {
  margin-bottom: 18px;
}

.tool-page-intro h1 {
  margin: 4px 0 8px;
  font-size: clamp(1.65rem, 1.25rem + 1.4vw, 2.25rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.tool-page-intro p.lead {
  max-width: 66ch;
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
}

/* Gallery & Downloadables 3-Column Card Grids */
.gallery-grid,
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.gallery-card,
.dl-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gallery-card:hover,
.dl-card:hover {
  border-color: var(--pistachio);
  box-shadow: var(--shadow-2);
}

.gallery-card canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.gallery-card-body,
.dl-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 20px;
}

.gallery-card h3,
.dl-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.gallery-card p,
.dl-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

.card-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.card-btn-row > a,
.card-btn-row > button {
  flex: 1 1 auto;
  justify-content: center;
}

/* Hub Four-Card Navigation Strip */
.hub-4-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 960px) {
  .hub-4-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .hub-4-grid {
    grid-template-columns: 1fr;
  }
}

.hub-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(17, 36, 24, 0.1);
  border-radius: var(--r-lg);
  background: var(--celadon-wash);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hub-tile:nth-child(2) { background: var(--mist-wash); }
.hub-tile:nth-child(3) { background: var(--nyanza-wash); }
.hub-tile:nth-child(4) { background: var(--rose-wash); }

.hub-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.hub-tile h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
}

.hub-tile p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

.hub-tile-cta {
  color: var(--green-ink);
  font-size: 13.5px;
  font-weight: 700;
}

/* ==========================================================================
   Configura-Style Split 3D Workbench:
   Stripped Ultra-Clean Left Panel (.workbench-controls) +
   Right Three.js OrbitControls Studio Viewport (.viewer-container)
   ========================================================================== */
.page-shell:has(#zone1Generator) {
  grid-template-columns: minmax(0, 1fr);
}

.page-shell:has(#zone1Generator) .right-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.hero-grid:has(.customizer-workbench) {
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.customizer-workbench,
#zone1Generator.customizer-workbench,
.app-window.customizer-workbench {
  display: grid !important;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: 620px;
  margin: 16px 0 28px;
  padding: 0 !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  box-shadow: 0 10px 30px -10px rgba(17, 36, 24, 0.12) !important;
  overflow: hidden;
}

.app-window.customizer-workbench {
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: 560px;
  margin: 0;
}

.app-window.customizer-workbench .workbench-controls {
  width: 340px;
  min-width: 320px;
  padding: 18px 20px 0 20px !important;
  gap: 12px;
}

.app-window.customizer-workbench .viewer-container,
.app-window.customizer-workbench .blueprint-stage {
  min-height: 560px;
}

.workbench-controls {
  width: 360px;
  min-width: 320px;
  max-height: 740px;
  overflow-y: auto;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  padding: 18px 20px !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.workbench-controls::-webkit-scrollbar {
  width: 6px;
}
.workbench-controls::-webkit-scrollbar-track {
  background: #f8fafc;
}
.workbench-controls::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

/* Strip clutter from left panel header */
.workbench-controls .module-header,
.workbench-controls .app-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 !important;
  padding: 0 0 10px 0 !important;
  border-bottom: 1px solid #f1f5f9 !important;
  background: transparent !important;
}

.workbench-controls .module-title,
.workbench-controls .win-title {
  margin: 0 !important;
  font-size: 14.5px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.01em;
}

.workbench-controls .win-dots,
.workbench-controls .live-pill {
  display: none !important;
}

.workbench-controls .module-header .btn-secondary {
  min-height: 30px !important;
  padding: 4px 10px !important;
  font-size: 11.5px !important;
  border-radius: 8px !important;
}

/* Quick presets inside stripped left panel */
.workbench-controls .quick-presets-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 !important;
  padding: 0 !important;
}

.workbench-controls .quick-presets-label {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.workbench-controls .preset-chip {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 8px;
  text-align: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Clean, unboxed single-column sliders in left panel */
.workbench-controls .controls-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 11px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.workbench-controls .ctrl-group {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.workbench-controls .ctrl-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px !important;
}

.workbench-controls .ctrl-label-row label,
.workbench-controls .ctrl-label-row span:first-child {
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  line-height: 1.3;
}

.workbench-controls .ctrl-val {
  font-family: var(--font-mono);
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #4338CA !important;
  background: #EEF0FF !important;
  border: 1px solid #C7D2FE !important;
  padding: 1px 7px !important;
  border-radius: 0px !important;
  white-space: nowrap;
}

.workbench-controls select.studio-input,
.workbench-controls input[type="text"].studio-input,
.workbench-controls input[type="number"].studio-input {
  min-height: 36px !important;
  padding: 6px 10px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  background-color: #f8fafc !important;
}

.workbench-controls .ctrl-checkbox-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px 10px !important;
  margin-top: 4px !important;
}

.workbench-controls .ctrl-checkbox-row label {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #334155 !important;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Hide preview color swatches across all customizers */
.workbench-swatch-row,
.color-swatches,
.stage-swatches {
  display: none !important;
}

/* Compact 2x2 Live Summary Card inside left panel */
.workbench-controls .kpi-strip {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px 10px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
}

.workbench-controls .kpi-card {
  padding: 2px 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.workbench-controls .kpi-label {
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b !important;
  margin-bottom: 1px !important;
}

.workbench-controls .kpi-val {
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  line-height: 1.25 !important;
}

.workbench-controls .kpi-sub {
  font-size: 10.5px !important;
  color: #64748b !important;
  line-height: 1.2 !important;
}

/* Primary Download CTA pinned at bottom of left panel */
.workbench-controls .export-action-bar {
  margin-top: auto !important;
  padding: 10px 0 0 0 !important;
  border: 0 !important;
  border-top: 1px solid #f1f5f9 !important;
  background: transparent !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;
}

.workbench-controls .export-action-bar > div:first-child:not(.export-btn-group) {
  display: none !important;
}

.workbench-controls .export-btn-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
}

.workbench-controls .export-btn-group .btn-primary,
.workbench-controls .export-action-bar > .btn-primary {
  width: 100% !important;
  justify-content: center !important;
  min-height: 46px !important;
  font-size: 14.5px !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
  order: -1;
}

.workbench-controls .export-btn-group .btn-secondary,
.workbench-controls .export-btn-group .btn-teal,
.workbench-controls .export-action-bar > .btn-secondary {
  width: 100% !important;
  justify-content: center !important;
  min-height: 34px !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

/* Right Side: Configura-Style 3D Studio Viewport (#f5f5f5 background) */
.customizer-workbench .viewer-container,
.customizer-workbench .blueprint-stage {
  flex: 1;
  position: relative !important;
  min-height: 600px;
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #f5f5f5 !important;
  overflow: hidden;
}

.three-studio-mount {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #f5f5f5;
  overflow: hidden;
}

.three-webgl-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  cursor: grab;
  touch-action: none;
}

.three-webgl-canvas:active {
  cursor: grabbing;
}

/* Top-Right Floating Controls (Configura Studio .axes-toggle pill style) */
.viewer-floating-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
}

.axes-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.95);
  color: #334155;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-family: var(--font-text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.15s ease;
}

.axes-toggle:hover {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.axes-toggle .icon {
  display: inline-flex;
  align-items: center;
  color: #64748b;
}

/* Bottom-Left Floating Dimension & Moveability Pill */
.viewer-dim-pill {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 20;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  pointer-events: none;
}

.viewer-dim-main {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
}

.viewer-dim-sub {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
}

@media (max-width: 960px) {
  .customizer-workbench,
  #zone1Generator.customizer-workbench,
  .app-window.customizer-workbench {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .workbench-controls,
  .app-window.customizer-workbench .workbench-controls {
    width: 100%;
    min-width: 0;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
    order: 2;
  }
  .customizer-workbench .viewer-container,
  .customizer-workbench .blueprint-stage,
  .app-window.customizer-workbench .viewer-container,
  .app-window.customizer-workbench .blueprint-stage {
    min-height: 400px;
    height: 400px;
    order: 1;
  }
}

/* ==========================================================================
   Topographic Map Maker + usability pass
   ========================================================================== */

/* --- Topographic Map Maker ------------------------------------------------ */
.topo-results {
  display: none;
  margin-top: 6px;
  max-height: 264px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
}

.topo-result {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: 100%;
  min-height: 44px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-text);
  text-align: left;
  cursor: pointer;
}

.topo-result strong {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
}

.topo-result span {
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--ink-3);
}

.topo-result:hover,
.topo-result.active,
.topo-result:focus-visible {
  background: var(--celadon-wash);
}

.topo-result-empty {
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.topo-status {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
}

.topo-status.busy {
  color: var(--blue-ink);
}

.topo-status.ok {
  color: var(--green-ink);
}

.topo-status.warn {
  color: var(--rose-ink);
  font-weight: 600;
}

.topo-inline-btn {
  margin-top: 8px;
  min-height: 36px;
  padding: 6px 12px;
  font-size: 12.5px;
}

.topo-nudge-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.topo-nudge {
  min-height: 40px;
  padding: 6px 4px;
  font-size: 12px;
  justify-content: center;
  white-space: nowrap;
}

.topo-coord-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.topo-coord {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.topo-coord span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
}

.topo-credits {
  margin: 14px 0 0;
  max-width: none;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-3);
}

/* A full-width feature card in the maker grid (keeps the last row from ending on one small card). */
img.maker-art {
  height: auto;
  object-fit: cover;
}

.maker-card.maker-card-wide {
  grid-column: 1 / -1;
  background: var(--mist-wash);
}

@media (min-width: 900px) {
  .maker-card.maker-card-wide {
    flex-direction: row;
    align-items: center;
  }
  .maker-card.maker-card-wide .maker-art {
    order: 2;
    flex: 0 0 42%;
    width: 42%;
    aspect-ratio: 4 / 3;
  }
  .maker-card.maker-card-wide .maker-body {
    flex: 1 1 58%;
    padding: 28px 12px 28px 30px;
  }
  .maker-card.maker-card-wide h2 {
    font-size: 1.6rem;
  }
}

/* --- Usability pass: every maker page -------------------------------------- */

/* The Download button stays in view while you adjust the controls. */
.workbench-controls {
  padding-bottom: 0 !important;
}

.workbench-controls .export-action-bar {
  position: sticky;
  bottom: 0;
  z-index: 6;
  margin: auto -20px 0 !important;
  padding: 10px 20px max(14px, env(safe-area-inset-bottom)) !important;
  background: #ffffff !important;
  box-shadow: 0 -10px 18px -12px rgba(17, 36, 24, 0.35);
}

/* The whole tool fits on screen: the control list scrolls, the 3D view and Download button do not. */
#zone1Generator {
  scroll-margin-top: 84px;
}

@media (min-width: 961px) {
  #zone1Generator.customizer-workbench {
    min-height: 0;
    height: clamp(500px, calc(100vh - 392px), 740px);
  }
  #zone1Generator .workbench-controls {
    max-height: none;
    height: 100%;
    min-height: 0;
  }
  #zone1Generator.customizer-workbench .viewer-container,
  #zone1Generator.customizer-workbench .blueprint-stage {
    min-height: 0;
  }
}

/* The long spec summary starts folded (site-ui.js adds the button). */
.answer-first-box.is-collapsed {
  position: relative;
  max-height: 94px;
  overflow: hidden;
}

.answer-first-box.is-collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff 85%);
  pointer-events: none;
}

.answer-first-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin: 6px 0 0;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--green-ink);
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* while folded, the button sits on the faded edge of the box instead of taking its own row */
.answer-first-box.is-collapsed + .answer-first-toggle {
  position: relative;
  z-index: 1;
  display: flex;
  width: fit-content;
  margin: -22px 18px 2px auto;
  box-shadow: var(--shadow-1);
}

.answer-first-toggle:hover {
  background: var(--celadon-wash);
  border-color: var(--pistachio);
}

/* Nothing in the control panel is cut off, and everything is big enough to hit. */
.workbench-controls .preset-chip {
  min-height: 38px;
  padding: 5px 8px;
  font-size: 12px;
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.workbench-controls .module-header .btn-secondary {
  min-height: 36px !important;
  padding: 6px 12px !important;
  font-size: 12.5px !important;
}

.workbench-controls .quick-presets-label {
  font-size: 11.5px;
}

.workbench-controls .ctrl-val {
  font-size: 12px !important;
}

.workbench-controls .kpi-label {
  font-size: 11px !important;
}

.workbench-controls .kpi-val {
  font-size: 13.5px !important;
}

.workbench-controls .kpi-sub {
  font-size: 11.5px !important;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.workbench-controls .swatch-btn {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
}

.workbench-controls input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  accent-color: #4338CA;
  cursor: pointer;
}

.cut-table input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: #4338CA;
  cursor: pointer;
}

.workbench-controls .ctrl-checkbox-row label {
  min-height: 36px;
  cursor: pointer;
}

.workbench-controls .export-btn-group .btn-secondary,
.workbench-controls .export-btn-group .btn-teal,
.workbench-controls .export-action-bar > .btn-secondary {
  min-height: 40px !important;
  font-size: 12.5px !important;
}

/* pinned bar: the main download on its own row, any extra downloads side by side under it */
.workbench-controls .export-btn-group {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workbench-controls .export-btn-group .btn-primary,
.workbench-controls .export-btn-group > :only-child,
.workbench-controls .export-btn-group > .btn-secondary:only-of-type {
  grid-column: 1 / -1;
}

.workbench-secondary-actions {
  display: flex;
}

.workbench-secondary-actions > button {
  width: 100%;
  min-height: 40px;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
}

.viewer-dim-sub {
  font-size: 11.5px;
}

.axes-toggle {
  min-height: 40px;
}

.axes-toggle.axes-icon {
  min-width: 40px;
  justify-content: center;
  padding: 8px;
}

@media (pointer: coarse), (max-width: 960px) {
  .workbench-controls .preset-chip,
  .workbench-controls .module-header .btn-secondary,
  .workbench-controls .ctrl-checkbox-row label,
  .workbench-controls .export-btn-group .btn-secondary,
  .workbench-controls .export-btn-group .btn-teal,
  .axes-toggle,
  .viewer-view-tabs .view-tab,
  .workbench-secondary-actions > button,
  .topo-nudge,
  .topo-inline-btn {
    min-height: 44px !important;
  }
  .workbench-controls .preset-chip {
    font-size: 12.5px;
  }
  .workbench-controls .swatch-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
  }
  /* 16px stops phones from zooming the page when a field is tapped */
  .workbench-controls select.studio-input,
  .workbench-controls input[type="text"].studio-input,
  .workbench-controls input[type="number"].studio-input {
    min-height: 44px !important;
    font-size: 16px !important;
  }
  .axes-toggle.axes-icon {
    min-width: 44px;
  }
}

/* Extra views (side cutaways, fit maps) sit as tabs on the viewer; a flat view replaces the 3D one. */
.viewer-view-tabs {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: calc(100% - 32px);
  padding: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.viewer-view-tabs .view-tab {
  min-height: 34px;
  padding: 5px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 12.5px;
}

.viewer-view-tabs .view-tab:hover {
  background: var(--surface-3);
}

.viewer-view-tabs .view-tab.active {
  background: var(--ink);
  color: #ffffff;
}

.customizer-workbench .blueprint-stage.flat-view {
  background: #ffffff !important;
}

.customizer-workbench .blueprint-stage.flat-view .three-studio-mount {
  display: none !important;
}

.customizer-workbench .blueprint-stage.flat-view .blueprint-canvas {
  display: block !important;
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  width: 100%;
  height: auto;
  transform: translateY(-46%);
  border-radius: 0;
  background-image: none;
  cursor: default;
}

/* Printer plate diagram: drawing plus real text, side by side or stacked. */
.bedfit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-2);
}

.bedfit-svg {
  flex: 0 0 200px;
  width: 200px;
  max-width: 100%;
  height: auto;
}

.bedfit-info {
  flex: 1 1 220px;
  min-width: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
}

.bedfit-plate {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bedfit-headline {
  margin: 2px 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.bedfit-detail {
  margin-bottom: 8px;
  color: var(--green-ink);
  font-weight: 700;
}

.bedfit-detail.warn {
  color: var(--rose-ink);
}

.bedfit-note {
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 12.5px;
}

/* Tables: fit a phone where they can, and show an edge shadow where they must scroll sideways. */
.cut-table-wrap {
  background:
    linear-gradient(to right, var(--surface) 40%, rgba(255, 255, 255, 0)) left center / 36px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 40%, rgba(255, 255, 255, 0)) right center / 36px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(17, 36, 24, 0.2), rgba(17, 36, 24, 0)) left center / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(17, 36, 24, 0.2), rgba(17, 36, 24, 0)) right center / 12px 100% no-repeat scroll,
    var(--surface);
}

.cut-table th {
  background: rgba(244, 249, 245, 0.86);
}

.cut-table tr.checked-row td {
  background: rgba(244, 249, 245, 0.86);
}

@media (max-width: 640px) {
  .cut-table {
    min-width: 0;
    font-size: 13px;
  }
  .cut-table:has(th:nth-child(5)) {
    min-width: 620px;
  }
  .cut-table th,
  .cut-table td {
    padding: 10px;
  }
  .cut-table th {
    font-size: 11px;
    letter-spacing: 0.04em;
    white-space: normal;
  }
  .cut-table td code {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* Phones: a shorter viewer, view controls as a compact column, a slimmer size label. */
@media (max-width: 960px) {
  /* clip (not hidden) keeps the rounded corners without trapping the pinned Download bar */
  .customizer-workbench,
  #zone1Generator.customizer-workbench {
    overflow: clip;
  }
  .workbench-controls {
    overflow: visible;
  }
  .answer-first-box.is-collapsed {
    max-height: 124px;
  }
  .viewer-view-tabs {
    top: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .viewer-view-tabs .view-tab {
    flex: 0 0 auto;
    padding: 5px 9px;
    font-size: 12px;
    white-space: nowrap;
  }
}

.three-studio-mount.compact .viewer-floating-controls {
  top: 64px;
  right: 10px;
  flex-direction: column;
  gap: 6px;
}

.blueprint-stage:not(:has(.viewer-view-tabs)) .three-studio-mount.compact .viewer-floating-controls {
  top: 10px;
}

.three-studio-mount.compact .axes-toggle:not(.axes-icon) {
  min-width: 40px;
  justify-content: center;
  padding: 8px;
}

.three-studio-mount.compact .axes-toggle:not(.axes-icon) > span:not(.icon) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.three-studio-mount.compact .viewer-dim-pill {
  left: 10px;
  right: 64px;
  bottom: 10px;
  padding: 7px 10px;
}

.three-studio-mount.compact .viewer-dim-main {
  font-size: 11.5px;
}

.three-studio-mount.tiny .viewer-dim-sub {
  display: none;
}

/* the home page mini-maker title wraps instead of being cut off */
.workbench-controls .win-title {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.3;
}

@media (max-width: 540px) {
  .customizer-workbench .viewer-container,
  .customizer-workbench .blueprint-stage {
    min-height: 360px;
    height: 360px;
  }
  .bedfit-svg {
    flex-basis: 150px;
    width: 150px;
  }
}

@media print {
  .answer-first-box.is-collapsed {
    max-height: none;
    overflow: visible;
  }
  .answer-first-box.is-collapsed::after {
    display: none;
  }
}

/* ==========================================================================
   Plain-language + polish pass
   Helper lines under controls, the printer picker, readable banner text,
   and checklist / cost tables that stack on phones.
   ========================================================================== */

/* one short helper line under a control that needs explaining */
.ctrl-hint {
  margin-top: 5px;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.4;
}

.cost-input-card .ctrl-hint {
  margin-top: 6px;
}

/* long menu text stops before the arrow instead of running under it */
.workbench-controls select.studio-input {
  padding-right: 34px !important;
  text-overflow: ellipsis;
}

/* the dark "next step" banner: its second line was dark text on a dark band */
.chain-cta-box .chain-cta-sub {
  color: rgba(255, 255, 255, 0.84);
  font-size: 13.5px;
  line-height: 1.5;
}

/* "Change printer" under the Printer Fit figure */
.kpi-link {
  display: inline-block;
  margin-top: 1px;
  color: var(--green-ink);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.kpi-link:hover {
  color: var(--ink);
}

#zone3BedFit {
  scroll-margin-top: 96px;
}

/* printer picker above the plate diagram (same card as the Tools hub picker) */
.cost-grid.printer-pick {
  grid-template-columns: minmax(0, 400px);
  margin-bottom: 14px;
}

/* maker pages: saved designs and the ad slot share one row under the article */
.page-shell:has(#zone1Generator) .right-rail {
  position: static;
  width: auto;
  align-items: start;
}

.page-shell:has(#zone1Generator) .ad-rail-sticky {
  width: auto;
  min-height: 250px;
}

@media (pointer: coarse), (max-width: 960px) {
  .kpi-link {
    padding: 8px 0;
  }
}

/* Phones: the checklist and the cost table become stacked rows, so nothing is squeezed or cut off. */
@media (max-width: 640px) {
  #zone2Specs .cut-table,
  #zone4Cost .cut-table,
  #zone2Specs .cut-table tbody,
  #zone4Cost .cut-table tbody {
    display: block;
    min-width: 0;
  }
  #zone2Specs .cut-table thead,
  #zone4Cost .cut-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  #zone2Specs .cut-table tbody tr,
  #zone4Cost .cut-table tbody tr {
    display: grid;
    padding: 12px;
    border-bottom: 1px solid var(--line);
  }
  #zone2Specs .cut-table tbody tr:last-child,
  #zone4Cost .cut-table tbody tr:last-child {
    border-bottom: 0;
  }
  #zone2Specs .cut-table tbody td,
  #zone4Cost .cut-table tbody td {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
  }
  /* checklist: tick box on the left, then name, what it means, and the size */
  #zone2Specs .cut-table tbody tr {
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 10px;
  }
  #zone2Specs .cut-table tbody tr.checked-row {
    background: var(--surface-2);
  }
  #zone2Specs .cut-table tbody td:first-child {
    grid-row: 1 / span 3;
    padding-top: 1px;
  }
  #zone2Specs .cut-table tbody td:nth-child(n + 2) {
    grid-column: 2;
  }
  #zone2Specs .cut-table tbody td:nth-child(3) {
    margin-top: 2px;
  }
  #zone2Specs .cut-table tbody td:nth-child(4) {
    margin-top: 6px;
  }
  /* cost: item and its cost on the first line, quantity and price underneath */
  #zone4Cost .cut-table tbody tr {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 12px;
  }
  #zone4Cost .cut-table tbody td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }
  #zone4Cost .cut-table tbody td:nth-child(4) {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
    font-size: 15px;
  }
  #zone4Cost .cut-table tbody td:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    color: var(--ink-3);
    font-size: 12.5px;
  }
  #zone4Cost .cut-table tbody td:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
    color: var(--ink-3);
    font-size: 12.5px;
  }
}

/* ==========================================================================
   Global Straight-Corner System (0px border-radius everywhere) &
   Hidden At-a-Glance / Global Printer Setup Boxes
   ========================================================================== */
*,
*::before,
*::after,
.customizer-workbench,
#zone1Generator.customizer-workbench,
.app-window.customizer-workbench,
.workbench-controls .module-header .btn-secondary,
.workbench-controls .ctrl-val,
.workbench-controls select.studio-input,
.workbench-controls input[type="text"].studio-input,
.workbench-controls input[type="number"].studio-input,
.workbench-controls .swatch-btn,
.workbench-controls .kpi-strip,
.workbench-controls .export-btn-group .btn-primary,
.workbench-controls .export-action-bar > .btn-primary,
.workbench-controls .export-btn-group .btn-secondary,
.workbench-controls .export-btn-group .btn-teal,
.workbench-controls .export-action-bar > .btn-secondary,
.axes-toggle,
.viewer-dim-pill {
  border-radius: 0 !important;
}

.answer-first-box,
.setup-band {
  display: none !important;
}

/* ==========================================================================
   Portfolio Blog Hub & Article Option A Standard (Native Haus 0px Geometry)
   ========================================================================== */
.blog-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}

.blog-filter-tab {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font-text);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.blog-filter-tab:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--surface-2);
}

.blog-filter-tab.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
}

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

@media (max-width: 960px) {
  .blog-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .blog-hub-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .blog-filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .blog-filter-bar::-webkit-scrollbar {
    display: none;
  }
  .blog-filter-tab {
    flex-shrink: 0;
  }
}

.blog-hub-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.blog-hub-card:hover {
  transform: translateY(-2px);
  border-color: var(--pistachio);
  box-shadow: var(--shadow-2);
}

.blog-card-art {
  width: 100%;
  height: 175px;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.blog-card-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.blog-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  padding: 16px 18px 18px;
}

.blog-card-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.blog-cat-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  font-family: var(--font-text);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.15;
}

.blog-cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px !important;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
}

.blog-cat-study {
  color: var(--blog-cat-study);
}

.blog-cat-howto {
  color: var(--blog-cat-howto);
}

.blog-cat-freebie {
  color: var(--blog-cat-freebie);
}

.blog-card-date {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-3);
}

.blog-card-title {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.blog-card-excerpt {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.blog-card-cta {
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.blog-hub-card[data-blog-type="Data Study"] .blog-card-cta {
  color: var(--blog-cat-study);
}

.blog-hub-card[data-blog-type="How-To Guide"] .blog-card-cta {
  color: var(--blog-cat-howto);
}

.blog-hub-card[data-blog-type="Free STL Pack"] .blog-card-cta {
  color: var(--blog-cat-freebie);
}

.tool-page-intro .blog-cat-label {
  margin-bottom: 10px;
}

.guide-hero-media {
  margin: 0 0 24px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface-2);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

.guide-hero-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 640px) {
  .guide-hero-media img {
    max-height: 280px;
  }
}
