:root {
  color-scheme: light;
  --color-background: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-2: #eef4f2;
  --color-foreground: #0f172a;
  --color-muted: #475569;
  --color-subtle: #64748b;
  --color-primary: #334155;
  --color-secondary: #475569;
  --color-accent: #059669;
  --color-accent-2: #0f766e;
  --color-accent-soft: #d8f3e8;
  --color-blue-soft: #e0f2fe;
  --color-orange-soft: #ffedd5;
  --color-border: #d9e0e5;
  --color-border-strong: #9aa7b2;
  --color-destructive: #dc2626;
  --color-ring: #059669;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.07);
  --shadow-md: 0 14px 34px rgb(15 23 42 / 0.1);
  --shadow-lg: 0 24px 70px rgb(15 23 42 / 0.13);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --max: 1180px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--color-foreground);
  background: var(--color-background);
  font-family: "Aptos", "Segoe UI Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-kerning: normal;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='96' height='96' viewBox='0 0 96 96' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d7dee5' stroke-width='1'%3E%3Cpath d='M0 96V0h96'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.35;
}

button,
input,
textarea,
select {
  font: inherit;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

p {
  line-height: 1.62;
  text-wrap: pretty;
}

::selection {
  color: #ffffff;
  background: var(--color-accent);
}

.motion-canvas {
  display: none;
}

/* Ensure [hidden] always wins over display rules */
[hidden] { display: none !important; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 72px;
  padding: 0 clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-background);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  display: block;
  height: 32px;
  width: auto;
}

.footer-wordmark {
  display: block;
  height: 18px;
  width: auto;
  opacity: 0.75;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 0.3rem;
  flex: 1;
}

.nav-links a,
.site-footer a {
  color: var(--color-muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: var(--radius-sm);
  padding: 0 0.82rem;
  transition: color 180ms var(--ease), background 180ms var(--ease), box-shadow 180ms var(--ease);
}

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

.nav-links a.is-active {
  color: var(--color-accent-2);
  background: var(--color-accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--color-accent) 22%, transparent);
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.76rem 1rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease);
}

.nav-cta,
.button-primary {
  color: #ffffff;
  background: var(--color-accent);
  box-shadow: 0 10px 24px rgb(5 150 105 / 0.22);
}

.button-light {
  color: #ffffff;
  background: var(--color-primary);
}

.button-ghost {
  color: var(--color-primary);
  border-color: var(--color-border);
  background: var(--color-surface);
}

.nav-cta:hover,
.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.nav-cta:active,
.button:active {
  transform: scale(0.98);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  transform: none;
  box-shadow: none;
}

.nav-toggle {
  display: none;
  min-height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  background: var(--color-surface);
  font-weight: 800;
}

.hero,
.page-hero,
.create-hero {
  position: relative;
  overflow: hidden;
}

.hero {
  display: grid;
  min-height: calc(100dvh - 72px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.83fr) minmax(420px, 1fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: center;
  width: min(var(--max), calc(100% - 2rem));
  min-height: calc(100dvh - 72px);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.hero-copy-block {
  max-width: 590px;
}

.signal-label {
  margin-bottom: 0.75rem;
  color: var(--color-accent-2);
  font-size: 0.83rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  max-width: 11ch;
  margin-bottom: 1.15rem;
  color: var(--color-foreground);
  font-size: clamp(3.25rem, 7vw, 6.7rem);
  font-weight: 850;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.page-hero h1,
.create-hero h1 {
  max-width: 13ch;
  font-size: clamp(3rem, 5.6vw, 5.5rem);
}

h2 {
  margin-bottom: 0.85rem;
  color: var(--color-foreground);
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 820;
  letter-spacing: -0.045em;
  line-height: 1;
}

h3 {
  margin-bottom: 0.55rem;
  color: var(--color-foreground);
  font-size: clamp(1.22rem, 2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.lead {
  max-width: 54ch;
  margin-bottom: 1.5rem;
  color: var(--color-muted);
  font-size: clamp(1.04rem, 1.45vw, 1.22rem);
  font-weight: 520;
}

.hero-actions,
.worker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-media {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 1.18;
  object-fit: cover;
  object-position: 63% center;
}

.hero-media figcaption {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.hero-media figcaption span {
  min-height: 38px;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.58rem;
  color: var(--color-primary);
  background: var(--color-surface-2);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
}

.hero-media figcaption span:nth-child(3) {
  color: #ffffff;
  background: var(--color-accent);
}

.section {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3.4rem, 7vw, 6.5rem) 0;
}

.thesis-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: start;
}

.thesis-copy p,
.copy-stack p,
.feature-list p {
  max-width: 68ch;
  color: var(--color-muted);
  font-size: 1.04rem;
  font-weight: 500;
}

.thesis-ledger,
.control-panel,
.model-panel,
.quote-panel,
.job-card,
.maker-grid article,
.price-card,
.trust-grid article {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.thesis-ledger {
  overflow: hidden;
}

.thesis-ledger div {
  display: grid;
  grid-template-columns: 0.33fr 1fr;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.thesis-ledger div:last-child {
  border-bottom: 0;
}

.thesis-ledger span {
  color: var(--color-accent-2);
  font-weight: 900;
}

.thesis-ledger p {
  margin: 0;
  color: var(--color-muted);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 1.3rem;
}

.pipeline {
  display: grid;
  grid-template-columns: 1.15fr 0.9fr 1fr;
  grid-template-areas:
    "capture draft refine"
    "capture make make";
  gap: 1rem;
}

.pipeline-step {
  min-height: 210px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.15rem;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}

.pipeline-step:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pipeline-step:nth-child(1) {
  grid-area: capture;
  min-height: 360px;
  background: var(--color-accent-soft);
}

.pipeline-step:nth-child(2) {
  grid-area: draft;
  background: var(--color-blue-soft);
}

.pipeline-step:nth-child(3) {
  grid-area: refine;
}

.pipeline-step:nth-child(4) {
  grid-area: make;
  background: var(--color-orange-soft);
}

.pipeline-step span,
.panel-title > span,
.generator-strip span,
.range-grid span,
.compute-options span {
  color: var(--color-subtle);
  font-size: 0.78rem;
  font-weight: 850;
}

.pipeline-step p {
  margin-bottom: 0;
  color: var(--color-muted);
}

.proof-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  margin-bottom: clamp(3rem, 6vw, 5rem);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 4vw, 2rem);
  color: #ffffff;
  background: var(--color-primary);
  box-shadow: var(--shadow-lg);
}

.proof-band h2 {
  max-width: 760px;
  color: #ffffff;
}

.proof-band p {
  max-width: 72ch;
  margin-bottom: 0;
  color: rgb(255 255 255 / 0.78);
}

.page-hero,
.create-hero {
  display: grid;
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5.2rem) 0 clamp(2rem, 4vw, 3rem);
}

.page-hero {
  min-height: min(540px, calc(100dvh - 72px));
  align-content: center;
}

.compact-hero h1 {
  max-width: 14ch;
}

.maker-hero h1,
.about-hero h1 {
  max-width: 15ch;
}

.create-hero .lead {
  margin-bottom: 0;
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(270px, 0.78fr) minmax(420px, 1.14fr) minmax(270px, 0.58fr);
  gap: 1rem;
  align-items: start;
  width: min(1420px, calc(100% - 2rem));
  margin: 0 auto clamp(3.2rem, 6vw, 5rem);
}

.control-panel,
.model-panel,
.quote-panel {
  padding: 1rem;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--color-border);
}

.panel-title h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 2.05rem);
}

.mode-tabs,
.compute-presets,
.material-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 0.95rem;
}

.mode-tab,
.preset-button,
.material {
  min-height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  background: var(--color-surface);
  font-weight: 760;
  line-height: 1.1;
  touch-action: manipulation;
  transition: background 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}

.preset-button,
.material {
  padding: 0.62rem 0.74rem;
}

.mode-tab:hover,
.preset-button:hover,
.material:hover {
  transform: translateY(-1px);
  border-color: var(--color-border-strong);
}

.mode-tab.is-active,
.preset-button.is-selected,
.material.is-selected {
  color: #ffffff;
  border-color: var(--color-accent);
  background: var(--color-accent);
}

.upload-zone {
  display: grid;
  min-height: 176px;
  place-items: center;
  margin-bottom: 1rem;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--color-surface-2);
  text-align: center;
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.upload-glyph {
  display: grid;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.7rem;
  place-items: center;
  border-radius: var(--radius-sm);
  color: #ffffff;
  background: var(--color-primary);
  font-size: 2rem;
  font-weight: 760;
  line-height: 1;
}

#upload-label {
  font-size: 1.02rem;
  font-weight: 800;
}

.upload-zone small {
  display: block;
  margin-top: 0.4rem;
  color: var(--color-muted);
  font-weight: 650;
}

.field-label {
  display: block;
  margin: 0.9rem 0 0.42rem;
  color: var(--color-foreground);
  font-size: 0.9rem;
  font-weight: 800;
}

textarea,
input[type="url"],
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-foreground);
  background: var(--color-surface);
  font-weight: 540;
}

textarea,
input[type="url"] {
  padding: 0.78rem;
}

textarea {
  min-height: 132px;
  resize: vertical;
}

select {
  padding: 0 0.65rem;
}

textarea:focus,
input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(5 150 105 / 0.32);
  outline-offset: 2px;
}

.range-grid {
  display: grid;
  gap: 0.8rem;
}

.range-grid label,
.compute-options label {
  display: grid;
  gap: 0.42rem;
}

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

.range-grid strong {
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.viewer-shell {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #f8fafc;
  aspect-ratio: 1.34;
}

#model-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  aspect-ratio: 1.34;
}

.glb-viewer {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  background: #f8fafc;
  cursor: grab;
  outline: none;
  touch-action: none;
}

.glb-viewer:active {
  cursor: grabbing;
}

.glb-viewer[hidden] {
  display: none;
}

.glb-viewer canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.viewer-shell.has-glb #model-canvas {
  display: none;
}

.viewer-help {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: 1px solid rgb(15 23 42 / 0.12);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.56rem;
  color: var(--color-primary);
  background: rgb(255 255 255 / 0.88);
  box-shadow: var(--shadow-sm);
  font-size: 0.78rem;
  font-weight: 820;
  pointer-events: none;
}

.viewer-badge {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.62rem;
  color: #ffffff;
  background: var(--color-primary);
  box-shadow: var(--shadow-sm);
  font-size: 0.82rem;
  font-weight: 800;
}

.generator-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
  margin: 0.9rem 0;
}

.generator-strip div {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.76rem;
  background: var(--color-surface-2);
}

.generator-strip strong {
  display: block;
  margin-top: 0.24rem;
  color: var(--color-foreground);
  font-size: 0.92rem;
  line-height: 1.18;
}

.worker-panel {
  border-top: 1px solid var(--color-border);
  padding-top: 0.9rem;
}

.compute-presets {
  margin: 0.75rem 0;
}

.compute-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin: 0.8rem 0 1rem;
}

.preflight-panel {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.78rem;
  background: var(--color-surface-2);
}

.preflight-panel.is-pass {
  border-color: color-mix(in oklch, var(--color-accent) 36%, var(--color-border));
  background: var(--color-accent-soft);
}

.preflight-panel.is-warn {
  border-color: #fdba74;
  background: var(--color-orange-soft);
}

.preflight-panel.is-fail {
  border-color: color-mix(in oklch, var(--color-destructive) 42%, var(--color-border));
  background: #fee2e2;
}

.preflight-head {
  display: grid;
  gap: 0.12rem;
}

.preflight-head span,
.preflight-head em {
  color: var(--color-muted);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 800;
}

.preflight-head strong {
  color: var(--color-foreground);
  font-size: 0.95rem;
}

.preflight-panel ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.preflight-panel li {
  display: grid;
  gap: 0.08rem;
  border-top: 1px solid color-mix(in oklch, var(--color-border) 72%, transparent);
  padding-top: 0.45rem;
}

.preflight-panel li strong {
  color: var(--color-foreground);
  font-size: 0.84rem;
}

.preflight-panel li span {
  color: var(--color-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.model-links {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.model-link-group {
  display: grid;
  gap: 0.42rem;
}

.model-link-group > span {
  color: var(--color-subtle);
  font-size: 0.76rem;
  font-weight: 850;
}

.model-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.model-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.65rem;
  background: var(--color-accent-soft);
  color: var(--color-accent-2);
  font-weight: 800;
  text-decoration: none;
}

.control-panel,
.quote-panel {
  position: sticky;
  top: 88px;
}

.quote-total {
  margin-bottom: 0.2rem;
  color: var(--color-accent);
  font-size: clamp(3.1rem, 5vw, 4.8rem);
  font-weight: 860;
  letter-spacing: -0.055em;
  line-height: 0.92;
  font-variant-numeric: tabular-nums;
}

.q-selects {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.85rem 0;
}

.q-selects .field-label {
  margin-top: 0.5rem;
  margin-bottom: 0.2rem;
}

.material-row {
  margin-bottom: 1rem;
}

.material {
  justify-content: flex-start;
  width: 100%;
  text-align: left;
}

.swatch {
  display: inline-block;
  width: 0.82rem;
  height: 0.82rem;
  margin-right: 0.45rem;
  border-radius: 3px;
  vertical-align: -0.08rem;
}

.swatch-cyan {
  background: var(--color-accent);
}

.swatch-amber {
  background: #f97316;
}

.swatch-blue {
  background: #2563eb;
}

.quote-panel .button {
  width: 100%;
  margin-top: 0.65rem;
}

.small-note {
  margin: 0.92rem 0 0;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.job-board {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.7fr);
  gap: 1rem;
}

.job-card {
  display: grid;
  align-content: start;
  min-height: 220px;
  padding: 1.1rem;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}

.job-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.job-card.large-card {
  grid-row: span 2;
  min-height: 460px;
  background: var(--color-blue-soft);
}

.job-status {
  justify-self: start;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  padding: 0.42rem 0.54rem;
  color: #7c2d12;
  background: #fed7aa;
  font-size: 0.82rem;
  font-weight: 820;
}

.job-status.ready {
  color: var(--color-accent-2);
  background: var(--color-accent-soft);
}

.job-card p {
  color: var(--color-muted);
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.job-meta span {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.42rem 0.54rem;
  background: var(--color-surface);
  color: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 760;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(320px, 0.9fr);
  gap: clamp(1.2rem, 5vw, 4rem);
  align-items: start;
}

.feature-list,
.copy-stack {
  display: grid;
  gap: 0.8rem;
}

.feature-list p,
.copy-stack p {
  margin: 0;
  border-left: 4px solid var(--color-accent);
  padding: 0.2rem 0 0.2rem 1rem;
}

.maker-grid,
.price-grid,
.trust-grid {
  display: grid;
  gap: 1rem;
}

.maker-grid,
.price-grid {
  grid-template-columns: repeat(3, 1fr);
}

.trust-grid {
  grid-template-columns: 1fr 0.88fr 1.12fr;
}

.maker-grid article,
.price-card,
.trust-grid article {
  padding: 1.15rem;
  min-height: 250px;
}

.maker-grid article:nth-child(1),
.price-card.featured,
.trust-grid article:nth-child(2) {
  background: var(--color-accent-soft);
}

.maker-grid article:nth-child(2),
.trust-grid article:nth-child(1) {
  background: var(--color-blue-soft);
}

.maker-grid article:nth-child(3),
.trust-grid article:nth-child(3) {
  background: var(--color-orange-soft);
}

.maker-number {
  display: inline-block;
  margin-bottom: 1.05rem;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.56rem;
  color: #ffffff;
  background: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 840;
}

.price-card h2 {
  margin-bottom: 0.65rem;
  color: var(--color-accent);
  font-size: clamp(2.75rem, 4.7vw, 4.5rem);
  font-variant-numeric: tabular-nums;
}

.price-card.featured h2 {
  color: var(--color-foreground);
}

.price-card p,
.maker-grid p,
.trust-grid p {
  color: var(--color-muted);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.site-footer span {
  font-weight: 850;
}

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

@media (max-width: 1180px) {
  .nav-links a {
    padding: 0 0.58rem;
    font-size: 0.86rem;
  }

  .studio-layout {
    grid-template-columns: minmax(260px, 0.78fr) minmax(390px, 1.1fr);
  }

  .quote-panel {
    position: static;
    grid-column: 1 / -1;
  }

  .material-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    padding: 0 0.85rem;
  }

  .nav-links {
    position: fixed;
    left: 1rem;
    right: 1rem;
    top: 82px;
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.5rem;
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
  }

  body.nav-open .nav-links {
    display: grid;
  }

  .nav-links a {
    min-height: 48px;
    padding: 0 1rem;
  }

  .nav-cta {
    justify-self: end;
  }

  .hero-grid,
  .create-hero,
  .thesis-section,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: auto;
    padding: 2.4rem 0;
  }

  .hero {
    min-height: auto;
  }

  .hero-media img {
    aspect-ratio: 1.35;
  }

  .pipeline {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "capture capture"
      "draft refine"
      "make make";
  }

  .studio-layout,
  .job-board,
  .maker-grid,
  .price-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }

  .job-card.large-card {
    grid-row: auto;
    min-height: 320px;
  }
}

@media (max-width: 720px) {
  .site-header {
    gap: 0.6rem;
    min-height: 66px;
    padding: 0 0.75rem;
  }

  .brand-logo {
    height: 26px;
  }

  .nav-toggle,
  .nav-cta {
    min-height: 44px;
    font-size: 0.84rem;
  }

  .nav-cta {
    padding-inline: 0.7rem;
  }

  .nav-links {
    top: 74px;
    left: 0.75rem;
    right: 0.75rem;
  }

  h1 {
    max-width: 10.5ch;
    font-size: clamp(3rem, 14vw, 4.55rem);
  }

  .page-hero h1,
  .create-hero h1 {
    font-size: clamp(2.75rem, 12vw, 4.2rem);
  }

  h2 {
    font-size: clamp(2rem, 9vw, 3.1rem);
  }

  .lead {
    font-size: 1rem;
  }

  .hero-grid,
  .section,
  .page-hero,
  .create-hero,
  .studio-layout {
    width: min(100% - 1.1rem, var(--max));
  }

  .hero-media figcaption {
    grid-template-columns: repeat(2, 1fr);
  }

  .pipeline,
  .generator-strip,
  .compute-options,
  .material-row,
  .proof-band,
  .thesis-ledger div {
    grid-template-columns: 1fr;
  }

  .pipeline {
    grid-template-areas:
      "capture"
      "draft"
      "refine"
      "make";
  }

  .pipeline-step:nth-child(1) {
    min-height: 250px;
  }

  .proof-band {
    justify-items: start;
  }

  .control-panel,
  .model-panel,
  .quote-panel,
  .job-card,
  .maker-grid article,
  .price-card,
  .trust-grid article {
    padding: 0.9rem;
  }

  #model-canvas {
    min-height: 300px;
  }

  .viewer-shell,
  .glb-viewer,
  .glb-viewer canvas {
    min-height: 300px;
  }

  .hero-actions,
  .worker-actions {
    align-items: stretch;
  }

  .hero-actions .button,
  .worker-actions .button {
    width: 100%;
  }
}

/* ── Canvas background visibility ─────────────────────── */
.hero .motion-canvas,
.page-hero .motion-canvas,
.create-hero .motion-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ── Hero entrance animations ──────────────────────────── */
@keyframes pb-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

@keyframes pb-slide-right {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: none; }
}

.hero-copy-block .signal-label { animation: pb-up 0.6s var(--ease) 0.05s both; }
.hero-copy-block h1            { animation: pb-up 0.75s var(--ease) 0.16s both; }
.hero-copy-block .lead         { animation: pb-up 0.7s var(--ease) 0.3s both; }
.hero-copy-block .hero-actions { animation: pb-up 0.7s var(--ease) 0.45s both; }
.hero-media                    { animation: pb-slide-right 0.9s var(--ease) 0.2s both; }

.page-hero .signal-label { animation: pb-up 0.6s var(--ease) 0.05s both; }
.page-hero h1            { animation: pb-up 0.7s var(--ease) 0.15s both; }
.page-hero .lead         { animation: pb-up 0.7s var(--ease) 0.3s both; }

/* ── Scroll reveal ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

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

/* ── Additional job status variants ───────────────────── */
.job-status.quote {
  color: #1e40af;
  background: var(--color-blue-soft);
}

.job-status.routing {
  color: #5b21b6;
  background: #ede9fe;
}

/* ── Marketplace filter bar ────────────────────────────── */
.marketplace-section {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 1.4rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--color-border);
}

.filter-count {
  margin-left: auto;
  color: var(--color-subtle);
  font-size: 0.84rem;
  font-weight: 760;
  white-space: nowrap;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0 0.88rem;
  background: var(--color-surface);
  color: var(--color-primary);
  font: inherit;
  font-size: 0.83rem;
  font-weight: 760;
  cursor: pointer;
  transition: background 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease);
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--color-border-strong);
}

.filter-pill.is-active {
  background: var(--color-foreground);
  border-color: var(--color-foreground);
  color: #fff;
}

.filter-divider {
  width: 1px;
  height: 18px;
  background: var(--color-border);
  margin: 0 0.2rem;
  flex-shrink: 0;
}

.filter-sort {
  min-height: 34px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0 0.65rem;
  background: var(--color-surface);
  color: var(--color-primary);
  font: inherit;
  font-size: 0.83rem;
  font-weight: 760;
  cursor: pointer;
}

/* ── Dynamic job grid ──────────────────────────────────── */
.job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  min-height: 200px;
}

.job-card-title {
  margin-bottom: 0.45rem;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.job-view-btn {
  justify-self: start;
  margin-top: auto;
  min-height: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0 0.85rem;
  background: var(--color-surface);
  color: var(--color-primary);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 140ms var(--ease), border-color 140ms var(--ease), transform 140ms var(--ease);
}

.job-view-btn:hover {
  background: var(--color-surface-2);
  border-color: var(--color-border-strong);
  transform: translateY(-1px);
}

.job-card {
  cursor: pointer;
}

.no-jobs-msg {
  grid-column: 1 / -1;
  color: var(--color-muted);
  font-size: 1rem;
  padding: 2rem 0;
}

/* ── Detail panel ──────────────────────────────────────── */
.detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgb(15 23 42 / 0.35);
  backdrop-filter: blur(2px);
}

.detail-overlay.is-open {
  display: block;
}

.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(480px, 100vw);
  z-index: 41;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.32s var(--ease);
}

.detail-panel.is-open {
  transform: none;
}

.detail-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.detail-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.detail-close {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-primary);
  font-size: 1.15rem;
  cursor: pointer;
  transition: background 140ms var(--ease);
}

.detail-close:hover {
  background: var(--color-surface-2);
}

.detail-body {
  padding: 1.25rem;
  display: grid;
  gap: 1.1rem;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.detail-meta-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  background: var(--color-surface-2);
}

.detail-meta-item span {
  display: block;
  color: var(--color-subtle);
  font-size: 0.73rem;
  font-weight: 850;
  margin-bottom: 0.18rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-meta-item strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--color-foreground);
}

.detail-divider {
  height: 1px;
  background: var(--color-border);
  margin: 0;
}

/* ── Bid form ──────────────────────────────────────────── */
.bid-form-section h3 {
  margin: 0 0 0.9rem;
  font-size: 1.05rem;
}

.bid-form {
  display: grid;
  gap: 0.8rem;
}

.bid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.bid-field {
  display: grid;
  gap: 0.3rem;
}

.bid-field label {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--color-foreground);
}

.bid-field input,
.bid-field textarea,
.bid-field select {
  min-height: 42px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  background: var(--color-surface);
  color: var(--color-foreground);
  font: inherit;
  font-weight: 540;
  width: 100%;
}

.bid-field textarea {
  min-height: 76px;
  resize: vertical;
}

.bid-submitted-msg {
  border: 1px solid color-mix(in oklch, var(--color-accent) 36%, var(--color-border));
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  background: var(--color-accent-soft);
  color: var(--color-accent-2);
  font-weight: 760;
}

/* ── Toast ─────────────────────────────────────────────── */
.pb-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  z-index: 60;
  border-radius: var(--radius);
  padding: 0.78rem 1.25rem;
  background: var(--color-foreground);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 760;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

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

/* ── Maker onboarding ──────────────────────────────────── */
.maker-onboard {
  max-width: 760px;
}

.onboard-header {
  margin-bottom: 2.5rem;
}

.form-error {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}

.maker-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.mk-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mk-field label,
.mk-fieldset legend {
  font-size: 0.84rem;
  font-weight: 850;
  color: var(--color-subtle);
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.mk-field input[type="text"],
.mk-field input[type="number"],
.mk-field select {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font: inherit;
  font-size: 0.95rem;
  color: var(--color-ink);
  transition: border-color 140ms var(--ease);
}

.mk-field input:focus,
.mk-field select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.mk-fieldset {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mk-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.mk-type-card {
  cursor: pointer;
  display: block;
}

.mk-type-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.mk-type-inner {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  transition: border-color 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease);
}

.mk-type-inner strong {
  font-size: 0.9rem;
  font-weight: 850;
  color: var(--color-ink);
}

.mk-type-inner span {
  font-size: 0.8rem;
  color: var(--color-muted);
  line-height: 1.45;
}

.mk-type-card input:checked + .mk-type-inner {
  border-color: var(--color-primary);
  background: var(--color-accent-soft);
  box-shadow: 0 0 0 3px rgb(16 185 129 / 0.12);
}

.mk-type-card:hover .mk-type-inner {
  border-color: var(--color-border-strong);
}

.mk-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mk-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 140ms var(--ease), background 140ms var(--ease);
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--color-ink);
  background: var(--color-surface);
}

.mk-check:hover {
  border-color: var(--color-border-strong);
}

.mk-check input:checked ~ span,
.mk-check:has(input:checked) {
  color: var(--color-primary);
}

.mk-check:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-accent-soft);
}

.mk-check input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--color-primary);
}

.mk-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.mk-rate-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  overflow: hidden;
  transition: border-color 140ms var(--ease);
}

.mk-rate-wrap:focus-within {
  border-color: var(--color-primary);
}

.mk-rate-prefix,
.mk-rate-suffix {
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--color-muted);
  background: var(--color-surface-2);
  border: none;
  white-space: nowrap;
}

.mk-rate-wrap input {
  flex: 1;
  border: none !important;
  outline: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0.65rem 0.5rem !important;
}

.mk-hint {
  font-size: 0.78rem;
  color: var(--color-muted);
  margin: 0;
}

.mk-submit {
  align-self: flex-start;
  padding: 0.75rem 1.75rem;
}

/* ── Maker job feed ─────────────────────────────────────── */
.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.button-ghost {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-ink);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 800;
  transition: border-color 140ms var(--ease), background 140ms var(--ease);
  white-space: nowrap;
}

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

.maker-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.maker-job-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}

.maker-job-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.maker-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.maker-card-age {
  font-size: 0.76rem;
  color: var(--color-muted);
}

.maker-card-title {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  font-weight: 850;
  color: var(--color-ink);
  margin: 0;
}

.maker-card-desc {
  font-size: 0.84rem;
  color: var(--color-muted);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.maker-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.1rem;
}

.maker-card-chips span {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-subtle);
  background: var(--color-surface-2);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.maker-bid-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-border);
}

.maker-bid-suggest {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.maker-bid-label {
  font-size: 0.72rem;
  font-weight: 850;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.maker-bid-range {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--color-primary);
}

.maker-bid-btn {
  padding: 0.5rem 1rem;
  font-size: 0.84rem;
  white-space: nowrap;
}

.feed-empty {
  color: var(--color-muted);
  padding: 2rem 0;
}

@media (max-width: 700px) {
  .mk-type-grid { grid-template-columns: 1fr; }
  .mk-row { grid-template-columns: 1fr; }
  .feed-header { flex-direction: column; }
  .maker-feed { grid-template-columns: 1fr; }
}

/* ── Pricing calculator ────────────────────────────────── */
.calc-section {
  display: block;
}

.calc-header {
  margin-bottom: 2.5rem;
}

.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.calc-field label {
  font-size: 0.84rem;
  font-weight: 850;
  color: var(--color-subtle);
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.calc-field-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.calc-val {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--color-primary);
}

.calc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--color-border-strong);
  outline: none;
  cursor: pointer;
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.2);
  transition: transform 120ms var(--ease);
}

.calc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.calc-slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--color-muted);
}

.calc-number {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font: inherit;
  font-size: 0.95rem;
  color: var(--color-ink);
  transition: border-color 140ms var(--ease);
}

.calc-number:focus {
  outline: none;
  border-color: var(--color-primary);
}

.calc-select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font: inherit;
  font-size: 0.9rem;
  color: var(--color-ink);
  cursor: pointer;
  transition: border-color 140ms var(--ease);
}

.calc-select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.calc-hint {
  font-size: 0.78rem;
  color: var(--color-muted);
  margin: 0;
}

/* Breakdown panel */
.calc-breakdown {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 5rem;
}

.calc-weight-line {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 1.25rem;
  min-height: 1.2em;
}

.calc-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--color-border);
  margin-bottom: 0;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-muted);
  gap: 1rem;
}

.calc-row span:last-child {
  font-weight: 750;
  color: var(--color-ink);
  white-space: nowrap;
}

.calc-discount {
  color: var(--color-primary) !important;
}

.discount-row span:first-child {
  color: var(--color-primary);
}

.calc-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem 0 0.5rem;
  gap: 1rem;
  font-weight: 850;
  font-size: 1rem;
  color: var(--color-ink);
}

.calc-total-num {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--color-primary);
  transition: transform 0.2s var(--ease);
}

.calc-total-num.bump {
  transform: scale(1.06);
}

.calc-disclaimer {
  font-size: 0.74rem;
  color: var(--color-muted);
  margin: 0.5rem 0 0;
  line-height: 1.5;
}

@media (max-width: 800px) {
  .calc-layout {
    grid-template-columns: 1fr;
  }
  .calc-breakdown {
    position: static;
  }
}

/* ── Enhanced card hovers ──────────────────────────────── */
.trust-grid article,
.price-card,
.maker-grid article {
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.trust-grid article:hover,
.price-card:hover,
.maker-grid article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ── Auth nav button + user chip ──────────────────────────── */
.nav-auth {
  padding: 0.45rem 1rem;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-ink);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 140ms var(--ease), background 140ms var(--ease);
  white-space: nowrap;
}

.nav-auth:hover {
  border-color: var(--color-primary);
  background: var(--color-accent-soft);
  color: var(--color-primary);
}

.nav-user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.35rem 0.9rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  font-size: 0.84rem;
}

.nav-user-label {
  font-weight: 800;
  color: var(--color-ink);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-signout {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.8rem;
  color: var(--color-muted);
  cursor: pointer;
  font-weight: 750;
  transition: color 120ms var(--ease);
}

.nav-signout:hover { color: var(--color-ink); }

/* ── Auth modal ────────────────────────────────────────────── */
.auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgb(15 23 42 / 0.4);
  backdrop-filter: blur(3px);
}

.auth-overlay.is-open { display: block; }

.auth-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 51;
  transform: translate(-50%, -48%) scale(0.96);
  opacity: 0;
  width: min(440px, calc(100vw - 2rem));
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.auth-modal.is-open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.auth-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--color-muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: background 120ms var(--ease), color 120ms var(--ease);
}

.auth-close:hover {
  background: var(--color-surface-2);
  color: var(--color-ink);
}

.auth-tabs {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.auth-tab {
  flex: 1;
  padding: 0.55rem 0;
  background: transparent;
  border: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--color-muted);
  cursor: pointer;
  transition: background 140ms var(--ease), color 140ms var(--ease);
}

.auth-tab.is-active {
  background: var(--color-primary);
  color: #fff;
}

.auth-error {
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.84rem;
  margin-bottom: 1rem;
}

.auth-success {
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
  color: var(--color-primary);
  font-size: 0.84rem;
  margin-bottom: 1rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-field label {
  font-size: 0.82rem;
  font-weight: 850;
  color: var(--color-subtle);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.auth-field input {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font: inherit;
  font-size: 0.95rem;
  color: var(--color-ink);
  transition: border-color 140ms var(--ease);
}

.auth-field input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.auth-submit { width: 100%; margin-top: 0.25rem; }

.auth-note {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--color-muted);
  text-align: center;
}

.auth-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: inherit;
  color: var(--color-primary);
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
}

/* ── Commission success modal ───────────────────────────────────────────────── */

.commission-success-modal {
  text-align: center;
  max-width: 400px;
  padding: 2.5rem 2rem;
}

.cs-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.cs-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-ink);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.cs-body {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin: 0 0 1.75rem;
  max-width: 32ch;
  margin-left: auto;
  margin-right: auto;
}

.cs-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: center;
}

.cs-actions .button {
  width: 100%;
  justify-content: center;
}

.cs-dismiss {
  font-size: 0.85rem;
}

/* ── Dashboard ──────────────────────────────────────────────────────────────── */

.nav-account {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background 140ms var(--ease);
}
.nav-account:hover { background: var(--color-accent-soft); }

.dashboard-section {
  padding-top: 2rem;
  max-width: 860px;
  margin: 0 auto;
}

.dash-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 2rem;
}

.dash-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 0.7rem 1.25rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-muted);
  cursor: pointer;
  transition: color 140ms var(--ease), border-color 140ms var(--ease);
}
.dash-tab.is-active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}
.dash-tab:hover:not(.is-active) { color: var(--color-ink); }

.dash-tab-intro {
  margin-bottom: 1.5rem;
}
.dash-tab-intro p {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin: 0;
}

.dash-loading,
.dash-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.9rem;
}
.dash-empty-link {
  display: block;
  margin-top: 0.75rem;
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
}
.dash-empty-link:hover { text-decoration: underline; }

.dash-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dash-job-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 160ms var(--ease);
}
.dash-job-card:hover { box-shadow: var(--shadow-sm); }

.dash-job-header {
  padding: 1.25rem 1.5rem;
}

.dash-job-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.dash-job-date {
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-left: auto;
}

.dash-job-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-ink);
  margin: 0 0 0.6rem;
}

.dash-job-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-bottom: 0.9rem;
}

.dash-chip {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  background: var(--color-accent-soft);
  color: var(--color-primary);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
}

.dash-expand-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-muted);
  cursor: pointer;
  transition: border-color 140ms var(--ease), color 140ms var(--ease);
}
.dash-expand-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }

.dash-expand-arrow { font-size: 0.72rem; }

.dash-bids-panel {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  padding: 1rem 1.5rem;
}

.dash-no-bids {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin: 0;
}

.dash-bids-header {
  display: grid;
  grid-template-columns: 1fr 70px 50px 1fr;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 850;
  color: var(--color-subtle);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0.5rem;
}

.dash-bids-list { display: flex; flex-direction: column; gap: 0.35rem; }

.dash-bid-row {
  display: grid;
  grid-template-columns: 1fr 70px 50px 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.6rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  transition: background 120ms var(--ease);
}
.dash-bid-row:hover { background: var(--color-surface); }

.dash-bid-maker { font-weight: 700; color: var(--color-ink); }

.dash-bid-specialty {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 0.1rem 0.45rem;
  margin-top: 0.2rem;
}

.dash-bid-meta { display: flex; flex-direction: column; }

.dash-bid-price { font-weight: 800; color: var(--color-ink); }

.dash-bid-days { color: var(--color-muted); }

.dash-bid-note {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--color-muted);
  font-style: italic;
  padding: 0 0.5rem;
}

.dash-bid-actions { display: flex; align-items: center; gap: 0.5rem; justify-content: flex-end; }

.dash-accept-btn {
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

.dash-accepted-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  background: var(--color-accent-soft);
  color: var(--color-primary);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 800;
}

.dash-bid-note-display {
  font-size: 0.82rem;
  color: var(--color-muted);
  font-style: italic;
  margin: 0.5rem 0 0;
}

/* Accept bid modal */
.accept-modal { max-width: 440px; }

.accept-title {
  font-size: 1.2rem;
  font-weight: 900;
  margin: 0 0 1.25rem;
}

.accept-details {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1rem;
}

.accept-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--color-border);
}
.accept-row:last-child { border-bottom: none; }
.accept-row span:first-child { color: var(--color-muted); }
.accept-row strong { text-align: right; }

.accept-note span:last-child {
  font-style: italic;
  color: var(--color-muted);
  text-align: right;
}

.accept-info {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.accept-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.accept-error {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #fee2e2;
  color: #991b1b;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

@media (max-width: 720px) {
  .dash-bids-header { display: none; }
  .dash-bid-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
  }
  .dash-bid-price { text-align: right; }
  .dash-bid-days { display: none; }
  .dash-bid-note { grid-column: 1 / -1; }
  .dash-bid-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
