/* Shapekit - light house style */

/* Manrope (SIL Open Font License, see fonts/OFL.txt), self-hosted: no request to Google */
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/manrope-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/manrope-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --bg: #ffffff;
  --surface: #f6f7f8;
  --surface-2: #eef0f2;
  --line: #e3e6ea;
  --ink: #101418;
  --muted: #5d6670;
  --accent: #0b7a6e;
  --accent-hover: #086156;
  --accent-soft: #e6f3f1;
  --warn: #9a5b00;
  --warn-soft: #fff5e3;
  --error: #b42318;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 20, 24, .04), 0 8px 24px rgba(16, 20, 24, .06);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.summary :focus-visible { outline-color: #fff; }
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100; padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: #fff; font-weight: 700; text-decoration: none; transition: top .15s;
}
.skip-link:focus { top: 10px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 28px; } }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9rem;
}
.lead { font-size: 1.12rem; color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header > .container { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark { width: 30px; height: 30px; flex: none; }
.logo-text { font-size: 1.18rem; letter-spacing: -.02em; white-space: nowrap; }
.logo-text b { font-weight: 800; }
.logo-text span { font-weight: 500; color: var(--muted); }
.nav { display: none; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 8px 12px; border-radius: 8px;
}
.nav a:hover, .nav a[aria-current] { background: var(--surface); }
.header-cta { margin-left: auto; }
.menu-btn {
  margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px;
  width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer; color: var(--ink);
}
.header-cta + .menu-btn { margin-left: 8px; }
.menu-btn { flex-shrink: 0; }
@media (max-width: 359px) { .site-header .header-cta { display: none; } .site-header .menu-btn { margin-left: auto; } }
.mobile-nav { display: none; border-top: 1px solid var(--line); padding: 8px 0 16px; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 12px 16px; color: var(--ink); text-decoration: none; font-weight: 600; }
@media (min-width: 900px) {
  .nav { display: flex; }
  .header-cta { margin-left: 8px; }
  .menu-btn, .mobile-nav, .mobile-nav.open { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: .98rem;
  padding: 12px 20px; border-radius: 12px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: #c9ced4; background: var(--surface); }
.btn-small { padding: 8px 14px; font-size: .9rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
@media (min-width: 720px) { section { padding: 88px 0; } }
.section-alt { background: var(--surface); }
.section-head { max-width: 680px; margin-bottom: 40px; }

/* Hero */
.hero { padding: 56px 0 40px; }
@media (min-width: 720px) { .hero { padding: 88px 0 56px; } }
.hero h1 { max-width: 820px; }
.hero h1 em { font-style: normal; color: var(--accent); }

.routes { display: grid; gap: 16px; margin-top: 40px; }
@media (min-width: 860px) { .routes { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) { .routes.routes-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .routes.routes-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 640px) { .routes.routes-8 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .routes.routes-8 { grid-template-columns: repeat(4, 1fr); } }
.route {
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--ink); text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.route:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.route-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.route h2 { margin: 6px 0 0; font-size: 1.15rem; }
.route p { color: var(--muted); margin: 0; flex: 1; }
.route .route-cta { font-weight: 700; color: var(--accent); display: flex; align-items: center; gap: 6px; }

.trust { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 28px; }
@media (min-width: 860px) { .trust { grid-template-columns: repeat(4, 1fr); } }
.trust div { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); }
.trust b { display: block; font-size: .98rem; }
.trust span { font-size: .85rem; color: var(--muted); }

/* Steps */
.steps { display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 24px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  display: block; font-weight: 800; color: var(--accent); margin-bottom: 12px;
}
.step p { color: var(--muted); margin: 0; }

/* Two columns */
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }

.shape-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.shape-item {
  padding: 18px 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); text-align: center;
  background: var(--bg);
}
.shape-item svg { margin: 0 auto 10px; width: 56px; height: 56px; color: var(--accent); }
.shape-item b { display: block; font-size: .95rem; }
.shape-item span { font-size: .82rem; color: var(--muted); }

.litho-visual { margin: 0; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; background: #15171a; }
.litho-visual img { width: 100%; height: 100%; object-fit: cover; }

/* Hero with a product render */
.hero-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 56px; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-visual {
  position: relative; margin: 0; border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 3;
  background: radial-gradient(ellipse at 50% 55%, #2a2620 0%, #15171a 65%);
  box-shadow: 0 30px 60px -30px rgba(16, 20, 24, .45);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual figcaption {
  position: absolute; left: 16px; bottom: 16px; display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #f3efe6;
  font-size: .82rem; font-weight: 700; backdrop-filter: blur(6px);
}
.hero-visual .dot { width: 8px; height: 8px; border-radius: 50%; background: #ffd27a; box-shadow: 0 0 10px #ffd27a; }
@media (max-width: 959px) { .hero-visual { max-width: 560px; } }

/* Product image at the top of each maker card */
.route { padding: 0; overflow: hidden; gap: 0; }
.route > :not(.route-media) { margin-left: 22px; margin-right: 22px; }
.route-media { aspect-ratio: 4 / 3; background: var(--surface); border-bottom: 1px solid var(--line); overflow: hidden; }
.route-media.dark { background: #15171a; border-bottom-color: #15171a; }
.route-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.route:hover .route-media img { transform: scale(1.04); }
.route h2 { margin-top: 18px; }
.route p { margin-top: 8px; }
.route .route-cta { margin-top: 14px; margin-bottom: 20px; }

/* Cards and rows */
.price-grid { display: grid; gap: 16px; }
@media (min-width: 860px) { .price-grid { grid-template-columns: 1.2fr 1fr; } }
.card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.price-rows { list-style: none; padding: 0; margin: 16px 0 0; }
.price-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.price-rows li span:last-child { font-weight: 700; white-space: nowrap; }

/* Specs */
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 24px; }
@media (min-width: 720px) { .specs { grid-template-columns: repeat(4, 1fr); } }
.specs div { padding: 16px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); }
.specs b { display: block; font-size: 1.2rem; }
.specs span { font-size: .82rem; color: var(--muted); }
.notice {
  margin-top: 20px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--warn-soft); color: var(--warn); font-size: .92rem;
}
.notice.info { background: var(--accent-soft); color: var(--accent-hover); }

/* FAQ */
.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 0; font-weight: 700; font-size: 1.04rem;
  display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 500; font-size: 1.4rem; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 8px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 32px; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.site-footer h2 { margin: 0 0 10px; font-size: .9rem; letter-spacing: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.copyright { margin-top: 32px; font-size: .85rem; color: var(--muted); }

/* ---------- Maker pages ---------- */
.page-head { padding: 40px 0 8px; }
@media (min-width: 720px) { .page-head { padding: 56px 0 16px; } }
.page-head h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
.tool { display: grid; gap: 24px; padding-bottom: 72px; align-items: start; }
@media (min-width: 980px) { .tool { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; } }
.tool-stage { position: relative; min-width: 0; }
@media (min-width: 980px) { .tool-stage { position: sticky; top: 84px; } }
.viewer {
  position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); overflow: hidden;
}
.viewer canvas { width: 100% !important; height: 100% !important; touch-action: none; }
.viewer.dark { background: #15171a; border-color: #15171a; }
.viewer-empty {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  color: var(--muted); padding: 24px; pointer-events: none;
}
.viewer-toolbar { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; justify-content: space-between; pointer-events: none; }
.viewer-toolbar > * { pointer-events: auto; }
.seg { display: inline-flex; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button {
  font: inherit; font-size: .85rem; font-weight: 700; border: 0; background: none; color: var(--muted);
  padding: 6px 10px; border-radius: 7px; cursor: pointer;
}
.seg button.active { background: var(--ink); color: #fff; }
.viewer-hint { margin-top: 8px; font-size: .84rem; color: var(--muted); text-align: center; }
.viewer-loading {
  position: absolute; inset: 0; display: none; place-items: center; background: rgba(246,247,248,.7);
  font-weight: 700; color: var(--muted);
}
.viewer-loading.show { display: grid; }
.viewer-nogl {
  position: absolute; inset: auto 12px 12px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--warn-soft); color: var(--warn); font-size: .86rem; z-index: 2;
}

.panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.block { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--bg); }
.block h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; }
.block h2,
.block h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.block h2 .num,
.block h3 .num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff;
  font-size: .8rem; display: grid; place-items: center; flex: none;
}
.block.disabled { opacity: .5; pointer-events: none; }

.dropzone {
  display: block;
  border: 2px dashed #cdd2d8; border-radius: var(--radius); padding: 28px 16px; text-align: center;
  cursor: pointer; transition: border-color .15s, background .15s; background: var(--surface);
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone b { display: block; margin-bottom: 4px; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone { position: relative; }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.field-error { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: #fdecea; color: var(--error); font-size: .88rem; }
.file-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface); font-size: .92rem;
}
.file-chip button { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; }

.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.options.three { grid-template-columns: repeat(3, 1fr); }
.option { position: relative; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option label {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 14px 8px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
  font-weight: 700; font-size: .92rem; height: 100%;
}
.option label small { font-weight: 500; color: var(--muted); font-size: .8rem; }
.option label svg { width: 34px; height: 34px; color: var(--ink); }
.option input:checked + label { border-color: var(--accent); background: var(--accent-soft); }
.option input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label, .label { font-weight: 700; font-size: .92rem; }
.field .hint { font-size: .82rem; color: var(--muted); }
.field-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=url], select, textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--bg);
  border: 1px solid #d3d8de; border-radius: var(--radius-sm); padding: 11px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
textarea { min-height: 110px; resize: vertical; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row output { min-width: 64px; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .94rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; }


.summary { background: var(--ink); color: #fff; border-color: var(--ink); }
.summary .price-rows li { border-color: rgba(255,255,255,.14); }
.summary .total { font-size: 1.3rem; }
.summary .muted, .summary .small { color: rgba(255,255,255,.66); }
.summary .btn-primary { background: #fff; color: var(--ink); }
.summary .btn-primary:hover { background: #e9ecef; }


.crop-wrap { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: #1b1d20; touch-action: none; cursor: grab; }
.crop-wrap:active { cursor: grabbing; }
.crop-wrap canvas { width: 100%; height: auto; touch-action: none; }
.crop-wrap canvas:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

.download .btn-block + .btn-block { margin-top: 10px; }
.download .status { font-size: .88rem; margin: 12px 0 0; min-height: 1.4em; }
.download .status.error { color: #ffb4ab; }
.tips { margin: 14px 0 0; padding-left: 18px; font-size: .88rem; color: rgba(255,255,255,.72); }
.tips li { margin: 4px 0; }

.prose { max-width: 720px; padding: 40px 0 72px; }
.prose h2 { font-size: 1.4rem; margin-top: 1.6em; }
.prose p, .prose li { color: var(--muted); }

/* Phones and tablets: keep a compact 3D preview in view while you scroll through the options */
@media (max-width: 979px) and (min-height: 560px) {
  .tool-stage {
    position: sticky; top: 64px; z-index: 20; background: var(--bg);
    margin: 0 -16px; padding: 8px 16px 10px; border-bottom: 1px solid var(--line);
  }
  .tool-stage .viewer { aspect-ratio: auto; height: clamp(200px, 36vh, 340px); }
  .tool-stage .viewer-hint { display: none; }
  .tool-stage .notice { margin-top: 8px; padding: 8px 12px; font-size: .84rem; }
  .seg button { padding: 6px 9px; font-size: .8rem; }
  /* nothing to look at yet: no need to keep it on screen */
  .tool-stage:has(.viewer-empty:not([hidden])) { position: relative; top: 0; }
}

/* Small phones: maker cards side by side with their picture, so all four fit on a screen or two */
@media (max-width: 639px) {
  .route { display: grid; grid-template-columns: 116px 1fr; grid-template-rows: auto auto 1fr; column-gap: 0; }
  .route-media { grid-row: 1 / 4; aspect-ratio: auto; height: 100%; border-bottom: 0; border-right: 1px solid var(--line); }
  .route-media.dark { border-right-color: #15171a; }
  .route > :not(.route-media) { margin-left: 16px; margin-right: 14px; }
  .route h2 { margin-top: 14px; font-size: 1.05rem; }
  .route p { margin-top: 4px; font-size: .9rem; line-height: 1.45; }
  .route .route-cta { margin-top: 8px; margin-bottom: 14px; font-size: .92rem; }
  .routes { gap: 12px; }
}
@media (max-width: 639px) { .route-media.contain img { object-fit: contain; } }
[id] { scroll-margin-top: 80px; }

/* 404 */
.notfound { padding: 72px 16px 96px; max-width: 720px; }
.notfound-links { list-style: none; padding: 0; margin: 8px 0 32px; display: grid; gap: 8px; }
.notfound-links a {
  display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; font-weight: 700;
}
.notfound-links a:hover { border-color: var(--accent); background: var(--accent-soft); }

/* Crop view before a photo is chosen */
.block.disabled .crop-wrap canvas { display: none; }
.block.disabled .crop-wrap {
  aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--surface-2);
}
.block.disabled .crop-wrap::after { content: "Your photo appears here"; color: var(--muted); font-size: .9rem; font-weight: 600; }
.viewer.dark .viewer-empty { color: #a3abb4; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Free 3D models ---------- */
.page-hero { padding: 48px 0 8px; }
@media (min-width: 720px) { .page-hero { padding: 72px 0 16px; } }
.page-hero h1 em { font-style: normal; color: var(--accent); }
.designs-list { padding-top: 24px; }

.design-cards { display: grid; gap: 20px; }
@media (min-width: 760px) { .design-cards { grid-template-columns: repeat(2, 1fr); } }
.design-card {
  display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  background: var(--bg); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.design-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.design-card-media { aspect-ratio: 4 / 3; background: var(--stage); overflow: hidden; }
.design-card-media img { width: 100%; height: 100%; object-fit: contain; padding: 4%; transition: transform .35s ease; }
.design-card-media.photo img { padding: 2% 8%; }
.design-card-media.dark { background: #15171a; }
.design-card-media.scene img, .gallery-main.scene img { object-fit: cover; padding: 0; }
.design-card-media.dark img { object-fit: cover; padding: 0; }
.design-card:hover .design-card-media img { transform: scale(1.03); }
.design-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.design-card-body h2, .design-card-body h3 { margin: 0; font-size: 1.3rem; }
.design-card-body p { color: var(--muted); margin: 0; flex: 1; }
.design-card .route-cta { font-weight: 700; color: var(--accent); margin-top: 6px; }
.design-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 4px 0 0; }
.design-meta li { font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface); color: var(--muted); }

:root { --stage: radial-gradient(ellipse at 50% 42%, #fbfbfc 0%, #eef0f2 55%, #e2e5e9 100%); }

.product { padding: 20px 0 56px; }
@media (min-width: 720px) { .product { padding: 28px 0 80px; } }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.product-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 960px) { .product-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 56px; } }
.gallery { min-width: 0; }
@media (min-width: 960px) { .gallery { position: sticky; top: 84px; } }
.gallery-main { margin: 0; aspect-ratio: 1; border-radius: 24px; background: var(--stage); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 3%; }
.gallery-main.photo img { padding: 3% 10%; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.gallery-thumbs button {
  padding: 0; border: 2px solid transparent; border-radius: 14px; background: var(--stage); cursor: pointer;
  aspect-ratio: 1; overflow: hidden; transition: border-color .15s;
}
.gallery-thumbs button:hover { border-color: #c9ced4; }
.gallery-thumbs button[aria-pressed="true"] { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.product-info h1 { font-size: clamp(2.1rem, 5.4vw, 3.2rem); margin-bottom: .35em; }
.facts { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.facts li { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); }
.facts b { display: block; font-size: 1.08rem; }
.facts span { font-size: .82rem; color: var(--muted); }
.btn-download { width: 100%; padding: 16px 22px; font-size: 1.05rem; border-radius: 14px; }
.btn-download small { font-weight: 600; opacity: .92; margin-left: 4px; }
.license { margin: 14px 0 10px; }
.license a { color: inherit; }

.model-grid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 960px) { .model-grid { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 28px; } }
.design-viewer { background: var(--stage); border: 0; aspect-ratio: 16 / 11; }
@media (max-width: 719px) { .design-viewer { aspect-ratio: 1; } }
.design-viewer:not(.ready) .viewer-toolbar { display: none; }
.swatches { padding: 22px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.swatches h3 { margin-bottom: 14px; }
.swatch-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.swatch-row > span { font-size: .88rem; font-weight: 700; }
.swatch-row > div { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(16, 20, 24, .18); background: var(--c);
  cursor: pointer; padding: 0; box-shadow: inset 0 -6px 10px rgba(0, 0, 0, .12);
}
.swatch[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 3px; }
.swatches .viewer-hint { text-align: left; margin: 4px 0 0; }

.parts { display: grid; gap: 14px; }
@media (min-width: 900px) { .parts { grid-template-columns: repeat(2, 1fr); gap: 18px; } }
.part {
  display: grid; grid-template-columns: 132px 1fr; grid-template-rows: 1fr auto; column-gap: 18px; row-gap: 12px;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
}
.part > img { grid-row: 1 / 3; width: 132px; height: 99px; object-fit: contain; border-radius: var(--radius-sm); background: var(--stage); align-self: start; }
.part h3 { margin: 2px 0 4px; }
.part p { color: var(--muted); font-size: .92rem; margin: 0 0 10px; }
.part dl { margin: 0; display: grid; gap: 4px; font-size: .86rem; }
.part dl div { display: grid; grid-template-columns: 70px 1fr; gap: 8px; }
.part dt { color: var(--muted); }
.part dd { margin: 0; }
.part-dl { justify-self: start; gap: 6px; }
.part-dl .muted { font-weight: 600; }
@media (max-width: 520px) {
  .part { grid-template-columns: 92px 1fr; column-gap: 14px; }
  .part > img { width: 92px; height: 69px; grid-row: 1; }
  .part-body { grid-column: 2; }
  .part-dl { grid-column: 1 / 3; }
}

.build-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .build-grid { grid-template-columns: 1.1fr 1fr; gap: 56px; } }
.needs { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.needs li { position: relative; padding: 14px 16px 14px 44px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.needs li::before {
  content: ""; position: absolute; left: 16px; top: 19px; width: 14px; height: 14px; border-radius: 4px;
  border: 2px solid var(--accent);
}
.build-grid .specs { margin-top: 0; }
@media (min-width: 720px) { .build-grid .specs { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .steps-6 { grid-template-columns: repeat(3, 1fr); } }

/* Homepage: the small link to the name tag maker, and a section head with a button */
.route-mini {
  display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 10px 18px 10px 10px;
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none;
  background: var(--bg); transition: border-color .15s;
}
.route-mini:hover { border-color: var(--accent); }
.route-mini img { width: 64px; height: 48px; object-fit: contain; border-radius: 8px; background: var(--surface); flex: none; }
.route-mini span:not(.route-cta) { flex: 1; color: var(--muted); font-size: .92rem; }
.route-mini b { color: var(--ink); margin-right: 6px; }
.route-mini .route-cta { color: var(--accent); font-weight: 700; }
.section-head-row { max-width: none; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-end; justify-content: space-between; }
.section-head-row > div { max-width: 680px; }

/* ---------- Phone case maker: shape, place and colours ---------- */
.shape-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 18px; }
@media (max-width: 420px) { .shape-grid { grid-template-columns: repeat(4, 1fr); } }
.shape-opt { position: relative; }
.shape-opt input { position: absolute; opacity: 0; pointer-events: none; }
.shape-opt label {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 100%;
  padding: 8px 4px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
  font-size: .74rem; font-weight: 700; text-align: center; line-height: 1.2;
}
.shape-opt svg { width: 28px; height: 28px; color: var(--ink); }
.shape-opt input:checked + label { border-color: var(--accent); background: var(--accent-soft); }
.shape-opt input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.layout-row { display: grid; grid-template-columns: minmax(110px, 160px) 1fr; gap: 20px; align-items: start; }
.layout-wrap canvas { width: 100%; height: auto; display: block; cursor: grab; touch-action: none; }
.layout-wrap canvas:active { cursor: grabbing; }
.layout-wrap canvas.fixed { cursor: default; }
.layout-wrap canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 12px; }
.layout-side .hint { margin: 0 0 10px; }
.color-rows { display: grid; gap: 12px; margin-bottom: 14px; }
.color-rows:empty { display: none; }
.color-row { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: end; }
.color-row .chip {
  width: 34px; height: 34px; border-radius: 50%; background: var(--c); margin-bottom: 4px;
  border: 1px solid rgba(16, 20, 24, .18); box-shadow: inset 0 -6px 10px rgba(0, 0, 0, .12);
}
.color-row label { display: block; font-weight: 700; font-size: .86rem; margin-bottom: 4px; }
.color-row label small { font-weight: 500; color: var(--muted); }
.color-row select { padding: 8px 10px; }
.seg-count { background: var(--surface); }
.seg-count button { min-width: 42px; }
#block-colors .check { margin-bottom: 12px; }
.block h2 .optional { font-size: .8rem; font-weight: 600; letter-spacing: 0; color: var(--muted); margin-left: 4px; }
#text-place button { min-width: 72px; }

/* Photos on the homepage (Unsplash, self-hosted) */
.hero-photo { background: #e9e4da; }
.hero-inset {
  position: absolute; left: 14px; top: 14px; width: 34%; margin: 0; border-radius: 14px; overflow: hidden;
  aspect-ratio: 4 / 3; background: #15171a; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .55);
  border: 3px solid rgba(255, 255, 255, .9);
}
.hero-inset img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo .hero-inset figcaption {
  left: 8px; bottom: 8px; padding: 4px 9px; font-size: .72rem; background: rgba(0, 0, 0, .45); gap: 6px;
}
.hero-photo .hero-inset .dot { width: 6px; height: 6px; }
.step-photo { padding: 0 0 24px; overflow: hidden; display: flex; flex-direction: column; }
.step-photo img { order: -1; }
.step-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 20px; }
.step-photo::before, .step-photo h3, .step-photo p { margin-left: 24px; margin-right: 24px; }
.photo-visual { margin: 0; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; background: #e9e4da; }
.photo-visual img { width: 100%; height: 100%; object-fit: cover; }
.printer-split .section-head { margin-bottom: 0; }
.printer-split .specs { grid-template-columns: repeat(2, 1fr); }

/* Photo to STL */
.crop-look { margin-bottom: 10px; background: var(--surface); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.btn-row[hidden] { display: none; }
.stl-colors .color-row { align-items: center; }
.stl-colors .color-row .chip { margin-bottom: 0; align-self: end; margin-bottom: 4px; }
.stl-color-fields { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stl-color-fields select { flex: 1 1 130px; min-width: 0; width: auto; }
.stl-color-fields input[type=color] { width: 40px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.stl-color-fields input[type=number] { width: 64px; padding: 8px 6px; }
.stl-color-fields .td { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: .78rem; color: var(--muted); font-weight: 700; }
.stl-color-fields .td input { width: 58px; }
.stl-color-fields .order { display: inline-flex; gap: 2px; }
.stl-color-fields .order button {
  width: 30px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); cursor: pointer;
  font: inherit; font-weight: 700; color: var(--ink);
}
.stl-color-fields .order button:disabled { opacity: .35; cursor: default; }
details.more { margin-top: 12px; }
details.more summary { cursor: pointer; font-size: .86rem; font-weight: 700; color: var(--accent); }
details.more p { margin: 8px 0 0; }
#block-colors .check { margin-bottom: 8px; }
.swap-plan { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; counter-reset: none; }
.swap-plan:empty { display: none; }
.swap-plan li {
  display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, .08); font-size: .88rem;
}
.swap-plan li span { color: rgba(255, 255, 255, .7); white-space: nowrap; }
.summary .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.summary .btn-secondary:hover { background: rgba(255, 255, 255, .08); }
.summary .btn-secondary:disabled { opacity: .5; }
#count { display: flex; width: 100%; }
#count button { flex: 1 1 0; min-width: 0; padding-left: 0; padding-right: 0; }
#block-shape .shape-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 0; }
@media (max-width: 420px) { #block-shape .shape-opt label { font-size: .66rem; padding-left: 2px; padding-right: 2px; } }
.badge-new {
  display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-hover); font-size: .72rem; font-weight: 800; letter-spacing: .02em;
}
@media (min-width: 1000px) { .design-cards-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Private download stats (stats.html) ---------- */
.stats-page { padding-bottom: 72px; }
.stats-key { max-width: 420px; margin: 8px 0 24px; }
.stats-tiles { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); margin: 8px 0 8px; }
.stats-tiles .card { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.stats-tiles strong { font-size: clamp(1.4rem, 5vw, 2rem); }
.stats-page h2 { font-size: 1.3rem; margin: 32px 0 12px; }
.stats-days { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); }
.stats-bar { flex: 1 1 0; min-width: 0; height: max(2px, var(--h)); background: var(--accent); border-radius: 3px 3px 0 0; }
.stats-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.stats-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.stats-table th, .stats-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.stats-table tr:last-child td { border-bottom: 0; }
.stats-table td:nth-child(2), .stats-table td:nth-child(3) { font-variant-numeric: tabular-nums; white-space: nowrap; }
.stats-table td:last-child { color: var(--muted); min-width: 180px; }
.stats-note { margin-top: 14px; color: var(--muted); font-size: .85rem; }
@media (max-width: 480px) { .stats-tiles { grid-template-columns: 1fr 1fr; } .stats-tiles .card:first-child { grid-column: 1 / -1; } }
@media (max-width: 600px) {
  .stats-table th:nth-child(3), .stats-table td:nth-child(3) { display: none; }   /* the tiles above show the last 7 days */
  .stats-table th, .stats-table td { padding: 10px; }
  .stats-table td:last-child { min-width: 0; }
}

/* Hide the "Powered by Netlify" badge that Netlify injects on every page */
#nl-badge-frame { display: none !important; }
