/* CAD marketplace — Phase 1 stylesheet. No framework, no build step. */

/* ---------- fonts ----------
   Self-hosted, nothing from Google. Archivo is one variable file covering
   the whole weight and width range the brand uses; the mono faces are two
   static cuts. swap everywhere, so text paints in the fallback first. */
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Tokens — BUILD.md. */
  --ink: #14171C;
  --paper: #F3F0E8;
  --paper-2: #EAE6DC;
  --card: #FFFFFF;
  --line: #DDD7CA;
  --orange: #FF5B1F;
  --orange-dark: #C73E0B;
  --orange-light: #FF9A6B;
  --muted: #5B6270;
  --steel: #9AA3AF;
  --grid-dark: #1C2128;

  /* Dark-header furniture, read off the reference pages. */
  --dark-line: #262B33;
  --dark-field: #1E232A;
  --dark-field-line: #323843;
  --dark-nav: #C9CED6;
  --dark-chip-line: #3A414C;
  --dark-outline: #4A515D;

  --bg: var(--paper);
  --surface: var(--card);
  --ink-soft: var(--muted);
  --rule: var(--line);
  --accent: var(--orange);
  --accent-ink: var(--ink);
  --link: var(--orange-dark);
  --danger: #b42318;
  --ok: #116b3f;
  --warn-bg: #fff6e5;
  --radius: 12px;
  --radius-input: 10px;
  --radius-btn: 8px;
  --radius-tag: 4px;
  --shadow: 0 1px 2px rgba(20, 24, 29, .06), 0 4px 12px rgba(20, 24, 29, .04);

  --font-display: 'Archivo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --content: 1200px;
  --gutter: 120px;
}


* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- generic ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 650; }
h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.02em; }
h2 { font-size: 18px; margin: 0 0 12px; letter-spacing: -.01em; }
.lede { color: var(--ink-soft); margin: 0 0 22px; }
.muted { color: var(--ink-soft); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-block; cursor: pointer;
  padding: 9px 16px; border-radius: 6px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 550; font-size: 14px; text-align: center;
}
/* Pressed/hover is the dark cut. The label flips to paper with it: ink on
   orange-dark is only 3.53:1, paper on it is 5.09:1. */
.btn:hover { background: var(--orange-dark); border-color: var(--orange-dark); color: #fff; text-decoration: none; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.danger { background: var(--surface); color: var(--danger); border-color: var(--line); }
/* These are not orange buttons, so they must not pick up the rule above. */
.btn.secondary:hover { background: var(--paper); color: var(--ink); border-color: var(--ink-soft); }
.btn.danger:hover { background: var(--paper); color: var(--danger); border-color: var(--danger); }
.btn.block { display: block; width: 100%; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
/* For the ink header: a hairline in paper, filling in on hover. */
.btn.outline { background: transparent; color: var(--paper); border-color: var(--paper); }
.btn.outline:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.flash { padding: 11px 14px; border-radius: 6px; margin-bottom: 18px; font-size: 14px; }
.flash.ok    { background: #e7f6ed; color: var(--ok); border: 1px solid #b7e0c8; }
.flash.error { background: #fdecea; color: var(--danger); border: 1px solid #f3c1bb; }
.errors { margin: 0 0 18px; padding: 12px 14px 12px 32px; }
.errors li { margin: 2px 0; }

/* ---------- forms ---------- */
.form-card { padding: 24px; }
.narrow { max-width: 460px; margin: 0 auto; }
.field { margin-bottom: 18px; }
.field > label, .field-label {
  display: block; font-weight: 550; font-size: 13px; margin-bottom: 6px;
}
.field .hint { display: block; color: var(--ink-soft); font-size: 12.5px; margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search],
select, textarea {
  width: 100%; padding: 9px 11px; font: inherit; font-size: 14px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(255, 91, 31, .45); outline-offset: -1px; border-color: var(--accent);
}
textarea { min-height: 120px; resize: vertical; }
input[type=file] { font-size: 13px; }
.req { color: var(--danger); }
.checkbox-row { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; }
.checkbox-row input { margin-top: 3px; flex: none; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.declaration { background: var(--warn-bg); border: 1px solid #f0dcb4; border-radius: 6px; padding: 14px; }
fieldset { border: 0; padding: 0; margin: 0 0 22px; }
fieldset legend {
  padding: 0; font-size: 12px; font-weight: 650; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-soft); margin-bottom: 14px;
}
.fitment-row { display: grid; grid-template-columns: 1.2fr 1.2fr .7fr .7fr; gap: 10px; margin-bottom: 10px; }

/* ---------- browse ---------- */
.browse { display: grid; grid-template-columns: 232px 1fr; gap: 26px; align-items: start; }
.filters { padding: 18px; position: sticky; top: 18px; }
.filters h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.filters .field { margin-bottom: 15px; }
.results-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
}
.results-head .count { color: var(--ink-soft); font-size: 14px; margin-left: auto; }

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


.empty { padding: 46px 24px; text-align: center; color: var(--ink-soft); }

/* ---------- detail ---------- */
.detail { display: grid; grid-template-columns: 1.35fr 1fr; gap: 26px; align-items: start; }
.detail .shot { overflow: hidden; }
.detail .shot img { width: 100%; display: block; background: #e9edf1; }
.side { padding: 20px; margin-bottom: 18px; }
.side h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.spec { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec th, .spec td { text-align: left; padding: 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { font-weight: 550; color: var(--ink-soft); width: 44%; font-size: 13px; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.filelist { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.filelist li {
  display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line);
}
.filelist li:last-child { border-bottom: 0; }
.filelist .name { word-break: break-all; }
.filelist .size { margin-left: auto; color: var(--ink-soft); font-size: 13px; white-space: nowrap; }
.prose { white-space: pre-wrap; margin: 0; }

/* ---------- tables (admin, my models) ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
.table th, .table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.table tr:last-child td { border-bottom: 0; }
.table-card { overflow: hidden; padding: 0; }

.pager { display: flex; gap: 10px; justify-content: center; margin: 26px 0 8px; align-items: center; }


/* ---------- standing pages ---------- */
.static-page { max-width: 62ch; }
.draft-note {
  display: inline-block; margin: 0 0 14px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
  color: var(--orange-dark); border: 1px solid var(--orange); border-radius: 4px;
  padding: 3px 8px;
}

@media (max-width: 860px) {
  .browse, .detail { grid-template-columns: 1fr; }
  .filters { position: static; }
  .grid-2, .fitment-row { grid-template-columns: 1fr; }
}

[hidden] { display: none !important; }

/* ---------- Phase 2: earnings ---------- */

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
/* Proportional figures: tabular-nums makes a standalone number look loose. */
.stat-figure { font-size: 30px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.stat-note { font-size: 12.5px; color: var(--ink-soft); }

.chart-card, .table-card { padding: 18px; margin-bottom: 18px; }
.chart-sub { font-size: 13px; margin: -6px 0 16px; }

/* The plot box grows with its content so the x-axis band is never clipped. */
.plot { display: flex; gap: 10px; height: 170px; }
.y-axis {
  display: flex; flex-direction: column; justify-content: space-between;
  font-size: 11px; color: var(--ink-soft); font-variant-numeric: tabular-nums;
  text-align: right; min-width: 24px; padding-bottom: 1px;
}
/* Solid hairline baseline, one shade off the surface — never dashed. */
.bars { flex: 1; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line); }
.bar-slot { flex: 1; height: 100%; display: flex; align-items: flex-end; max-width: 24px; }
.bar {
  width: 100%; background: var(--accent);
  /* 4px rounded data-end, square where it meets the baseline. */
  border-radius: 4px 4px 0 0;
  min-height: 0;
}
.bar-slot:hover .bar { background: #1a5fd0; }
.x-axis {
  display: flex; justify-content: space-between;
  font-size: 11.5px; color: var(--ink-soft); margin-top: 8px; padding-left: 34px;
}

.table-view { margin-top: 16px; }
.table-view summary { font-size: 13px; color: var(--ink-soft); cursor: pointer; }
.table-view summary:hover { color: var(--ink); }
.table.compact td, .table.compact th { padding: 6px 10px; font-size: 13px; }

/* tabular-nums where numbers stack vertically and must align. */
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .num.strong { font-weight: 600; }
.table .num.shortfall { color: var(--ink-soft); }
.tag.warn { background: var(--warn-bg); color: #8a5a00; border: 1px solid #f0dcb4; }

.admin-note { font-size: 13px; color: var(--ink-soft); margin: -6px 0 14px; }
.void-form { display: grid; gap: 12px; max-width: 520px; }
.cluster-bar { display: inline-block; height: 6px; border-radius: 3px; background: var(--accent); vertical-align: middle; }
.filter-inline { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.filter-inline label { font-size: 12.5px; color: var(--ink-soft); display: flex; flex-direction: column; gap: 4px; }
.filter-inline input { width: 110px; }
.inline-void { margin: 0; }

/* ---------- spending: featured placement ---------- */
.spend-card { padding: 18px; margin-bottom: 18px; }
.spend-table td { vertical-align: middle; }
.spend-table th.buy, .spend-table td.buy { text-align: right; white-space: nowrap; }
.buy-form { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.buy-form select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.buy-form button[disabled] { opacity: .5; cursor: not-allowed; }
.spend-short { margin: 12px 0 0; font-size: 13px; }
.tag.live { background: #e7f0fe; color: #14458f; border: 1px solid #c5d9fb; }
.tag.queued { background: #eef0f3; color: var(--ink-soft); border: 1px solid var(--line); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- wallet linking ---------- */
.wallet-card { padding: 18px; margin-bottom: 18px; }
.wallet-address { margin: 0 0 6px; }
.wallet-address code, .wallet-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px; word-break: break-all;
}
.wallet-address code { font-size: 15px; }
.wallet-actions { margin: 14px 0 0; }
.wallet-status { min-height: 1.4em; margin: 10px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.wallet-status.error { color: var(--danger); }
.wallet-note { font-size: 13px; margin: 14px 0 0; }
#wallet-connect[disabled] { opacity: .5; cursor: not-allowed; }

/* ==========================================================================
   Site kit — see BUILD.md. Everything below is the rebuilt shell (header,
   footer), the homepage and browse. Rules above this line still dress the
   pages that were not part of the rebuild: model detail, upload, admin, auth.
   ========================================================================== */

/* Base tag, kept because admin and model detail still use .tag.live/.warn. */
.tag {
  font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  padding: 2px 7px; border-radius: var(--radius-tag);
  background: transparent; color: var(--ink); border: 1px solid var(--line);
}

/* ---------- shared ---------- */
.section-inner { max-width: var(--content); margin: 0 auto; padding: 0 var(--gutter); box-sizing: border-box; }
main.bleed { display: block; }
.eyebrow {
  display: block; font-family: var(--font-mono); font-size: 12px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--orange-dark);
}
.eyebrow.on-dark { color: var(--orange); }
h1, h2, h3 {
  font-family: var(--font-display); font-weight: 760; font-stretch: 112%;
  letter-spacing: -.02em; line-height: 1.05; margin: 0;
}
h2 { font-size: 40px; }
h3 { font-size: 26px; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ---------- header ---------- */
.site-header { background: var(--ink); border-bottom: 1px solid var(--dark-line); }
.header-inner {
  height: 72px; max-width: var(--content); margin: 0 auto; padding: 0 var(--gutter);
  box-sizing: border-box; display: flex; align-items: center; gap: 28px;
}
.header-collapse { display: contents; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; white-space: nowrap; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { display: block; }
.brand-word {
  font-family: var(--font-display); font-weight: 780; font-stretch: 118%;
  letter-spacing: -.015em; line-height: 1; font-size: 24px; color: var(--paper);
}
.brand-word.lg { font-size: 26px; }
.header-nav { display: flex; gap: 24px; flex-shrink: 0; }
.header-nav a, .header-actions a {
  font-family: var(--font-display); font-size: 15px; font-weight: 500;
  color: var(--dark-nav); text-decoration: none; white-space: nowrap; flex-shrink: 0;
}
.header-nav a:hover, .header-actions a:hover { color: #fff; text-decoration: none; }
/* Every other item in the row is flex-shrink: 0, so the search is what
   absorbs a narrow window: 220px when there is room, never below 132px. */
.header-search { margin-left: auto; flex: 0 1 220px; min-width: 132px; }
.header-search .field {
  display: flex; align-items: center; gap: 10px; width: 100%;
  height: 40px; box-sizing: border-box; padding: 0 14px;
  background: var(--dark-field); border: 1px solid var(--dark-field-line); border-radius: var(--radius-btn);
}
.header-search .icon { display: flex; color: var(--steel); }
.header-search input {
  font-family: var(--font-display); flex-grow: 1; min-width: 0; font-size: 14px;
  color: #fff; background: transparent; border: 0; outline: none;
}
.header-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.account { position: relative; display: flex; align-items: center; }
.account-chip { display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--dark-nav); }
.account-chip:hover { color: #fff; }
.account-initial {
  display: grid; place-items: center; width: 32px; height: 32px; box-sizing: border-box;
  border-radius: 50%; background: var(--dark-field); border: 1px solid var(--dark-field-line);
  font-family: var(--font-display); font-size: 14px; font-weight: 650; color: var(--paper);
}
.account-caret { display: block; width: 12px; height: 12px; }
.account-toggle:checked ~ .account-chip .account-caret { transform: rotate(180deg); }
.account-toggle:checked ~ .account-menu { display: flex; }
.account-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 14px); z-index: 30;
  flex-direction: column; gap: 12px; min-width: 200px; padding: 16px;
  background: var(--ink); border: 1px solid var(--dark-line); border-radius: var(--radius);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .38);
}
.account-name {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--steel);
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account-menu .logout { margin: 0; }
.account-menu .linkish { text-align: left; }
.header-actions .logout { margin: 0; }
.header-actions .linkish {
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--dark-nav);
  font-family: var(--font-display); font-size: 15px; font-weight: 500;
}
.header-actions .linkish:hover { color: #fff; }
.btn-outline {
  font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--paper) !important;
  white-space: nowrap; text-decoration: none; border: 1px solid var(--dark-outline);
  border-radius: var(--radius-btn); padding: 9px 16px;
}
.btn-outline:hover { border-color: var(--paper); }
.btn-upload {
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  font-family: var(--font-display); font-size: 15px; font-weight: 650;
  color: var(--ink) !important; background: var(--orange);
  text-decoration: none; border-radius: var(--radius-btn); padding: 10px 16px;
}
.btn-upload:hover { background: var(--orange-dark); color: #fff !important; }
.btn-upload svg { display: block; }
.nav-toggle, .nav-burger { display: none; }
.filters-toggle, .filters-drawer-toggle, .drawer-close { display: none; }

/* ---------- hero ---------- */
.hero {
  background: var(--ink);
  background-image: linear-gradient(var(--grid-dark) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-dark) 1px, transparent 1px);
  background-size: 32px 32px;
}
.hero-inner {
  max-width: var(--content); margin: 0 auto; box-sizing: border-box;
  padding: 80px var(--gutter) 96px; display: flex; align-items: center; gap: 64px;
}
.hero-copy { display: flex; flex-direction: column; gap: 28px; flex-grow: 1; min-width: 0; }
.hero h1 { font-size: 72px; color: var(--paper); }
.hero-lede { font-family: var(--font-display); margin: 0; font-size: 20px; line-height: 1.55; color: var(--dark-nav); max-width: 600px; }
.hero-search { display: flex; gap: 10px; max-width: 640px; }
.hero-search .field {
  flex-grow: 1; display: flex; align-items: center; gap: 12px; height: 56px;
  box-sizing: border-box; padding: 0 18px; background: #fff; border-radius: var(--radius-input);
}
.hero-search .icon { display: flex; color: var(--muted); }
.hero-search input {
  font-family: var(--font-display); flex-grow: 1; min-width: 0; font-size: 17px;
  color: var(--ink); background: transparent; border: 0; outline: none;
}
.btn-primary {
  font-family: var(--font-display); height: 56px; padding: 0 26px; font-size: 16px;
  font-weight: 650; color: var(--ink); background: var(--orange); border: 0;
  border-radius: var(--radius-input); cursor: pointer;
}
.btn-primary:hover { background: var(--orange-dark); color: #fff; }
.hero-formats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero-formats .label { font-family: var(--font-display); font-size: 14px; color: var(--steel); margin-right: 4px; }
.chip-dark {
  font-family: var(--font-mono); letter-spacing: .06em; text-transform: uppercase;
  font-size: 12px; color: #D5D9DF; text-decoration: none;
  border: 1px solid var(--dark-chip-line); border-radius: 999px; padding: 6px 12px;
}
.chip-dark:hover { color: #fff; border-color: var(--paper); text-decoration: none; }
.hero-art { position: relative; width: 480px; height: 460px; flex-shrink: 0; }
.hero-mark { position: absolute; left: 50px; top: 30px; }
.hero-dims { position: absolute; left: 0; top: 0; width: 480px; height: 460px; }
.dim { position: absolute; font-family: var(--font-mono); letter-spacing: .06em; text-transform: uppercase; font-size: 11px; color: var(--orange); }
.dim-w { left: 210px; top: 408px; }
.dim-h { left: 410px; top: 212px; }
.dim-iso { left: 20px; top: 8px; }
.float-chip {
  position: absolute; font-family: var(--font-mono); letter-spacing: .06em;
  text-transform: uppercase; font-size: 12px; color: var(--paper);
  background: var(--dark-field); border: 1px solid var(--dark-chip-line);
  border-radius: 6px; padding: 7px 10px;
}
.float-chip.c1 { left: 0; top: 120px; }
.float-chip.c2 { left: 392px; top: 110px; }
.float-chip.c3 { left: 8px; top: 320px; }
.float-chip.c4 { left: 370px; top: 330px; }

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section.band { background: var(--paper-2); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-head > div { display: flex; flex-direction: column; gap: 12px; }
.section-link {
  display: flex; align-items: center; gap: 8px; font-family: var(--font-display);
  font-size: 15px; font-weight: 600; text-decoration: none; color: var(--link); white-space: nowrap;
}
.section-link svg { display: block; }

.category-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.category-tile {
  display: flex; flex-direction: column; gap: 18px; padding: 20px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink);
}
.category-tile:hover { border-color: var(--orange); text-decoration: none; }
.category-icon {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: var(--paper); border-radius: var(--radius-input); color: var(--ink);
}
.category-name { font-family: var(--font-display); font-size: 15px; font-weight: 600; line-height: 1.3; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.step-no { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: var(--orange-dark); }
.step-icon {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--orange); border-radius: var(--radius-btn);
}
.step h3 { font-size: 22px; margin-bottom: 10px; }
.step p { font-family: var(--font-display); margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }

.cta-section { padding-top: 0; }
.cta {
  background: var(--orange); border-radius: var(--radius); padding: 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.cta h2 { font-size: 34px; color: var(--ink); margin-bottom: 8px; }
.cta p { font-family: var(--font-display); margin: 0; font-size: 15px; color: var(--ink); }
.btn-ink {
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  font-family: var(--font-display); font-size: 15px; font-weight: 650;
  color: var(--paper); background: var(--ink); text-decoration: none;
  border-radius: var(--radius-btn); padding: 13px 20px;
}
.btn-ink:hover { color: #fff; text-decoration: none; }
.btn-ink svg { display: block; }

/* ---------- model card ---------- */
.model-grid { display: grid; gap: 24px; }
.model-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.model-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.model-card {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--ink);
}
.model-card:hover { border-color: var(--orange); text-decoration: none; }
.model-thumb { position: relative; border-bottom: 1px solid var(--line); aspect-ratio: 4 / 3; }
.thumb-svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.model-thumb img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; }
.badge-print {
  position: absolute; top: 10px; right: 10px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em;
  text-transform: uppercase; color: #fff; background: var(--orange-dark);
  border-radius: var(--radius-tag); padding: 4px 7px; line-height: 1;
}
.model-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.model-title { font-family: var(--font-display); font-size: 16px; font-weight: 620; line-height: 1.3; }
.model-formats { display: flex; gap: 6px; flex-wrap: wrap; }
.fmt-tag {
  font-family: var(--font-mono); letter-spacing: .06em; text-transform: uppercase;
  font-size: 10.5px; color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius-tag); padding: 3px 6px; line-height: 1;
}
.model-meta {
  display: flex; justify-content: space-between; gap: 12px; font-family: var(--font-display);
  font-size: 13px; color: var(--muted);
}
.model-meta .model-by { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- browse ---------- */
.page-head { padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: 48px; margin: 12px 0 10px; }
.page-lede { font-family: var(--font-display); margin: 0; font-size: 17px; color: var(--muted); }
.browse-layout { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 48px; padding-top: 40px; padding-bottom: 72px; }

.filters { align-self: start; }
.filters-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 14px; }
.filters-head h2 { font-size: 20px; }
.clear-all { font-family: var(--font-display); font-size: 14px; color: var(--link); text-decoration: underline; }
.filter-group { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 18px 0; }
.group-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 14px;
}
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  width: 38px; height: 22px; border-radius: 999px; background: var(--line);
  position: relative; flex-shrink: 0; transition: background .12s;
}
.switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: transform .12s;
}
.switch input:checked + .switch-track { background: var(--orange); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--orange); outline-offset: 2px; }
.switch-text { font-family: var(--font-display); font-size: 14.5px; font-weight: 500; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { cursor: pointer; }
.pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.pill span {
  display: inline-block; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; line-height: 1;
  background: transparent;
}
.pill input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pill input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }

.check-list { display: flex; flex-direction: column; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .box {
  width: 18px; height: 18px; flex-shrink: 0; border: 1px solid var(--line);
  border-radius: 4px; background: #fff; position: relative;
}
.check input:checked + .box { background: var(--ink); border-color: var(--ink); }
.check input:checked + .box::after {
  content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.check input:focus-visible + .box { outline: 2px solid var(--orange); outline-offset: 2px; }
.check-text { font-family: var(--font-display); font-size: 14.5px; }

.browse-controls { display: flex; gap: 16px; margin-bottom: 18px; }
.browse-search { flex-grow: 1; }
.browse-search .field {
  display: flex; align-items: center; gap: 12px; height: 52px; box-sizing: border-box;
  padding: 0 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-input);
}
.browse-search .icon { display: flex; color: var(--muted); }
.browse-search input {
  font-family: var(--font-display); flex-grow: 1; min-width: 0; font-size: 16px;
  color: var(--ink); background: transparent; border: 0; outline: none;
}
.browse-sort {
  display: flex; align-items: center; gap: 10px; height: 52px; box-sizing: border-box;
  padding: 0 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-input);
}
.sort-label { font-family: var(--font-display); font-size: 15px; color: var(--muted); }
.browse-sort select {
  font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--ink);
  border: 0; background: transparent; outline: none; cursor: pointer;
}
.browse-status { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; min-height: 34px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display);
  font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-btn); padding: 7px 12px;
}
.chip:hover { border-color: var(--orange); text-decoration: none; }
.chip-x { color: var(--muted); }
.result-count { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }

.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 40px; }
.page-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px;
  height: 40px; padding: 0 12px; box-sizing: border-box; font-family: var(--font-display);
  font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-btn);
}
.page-btn:hover { border-color: var(--orange); text-decoration: none; }
.page-btn.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--steel); margin-top: 0; padding: 72px 0 32px; border-top: 0; font-size: inherit; }
.footer-inner { max-width: var(--content); margin: 0 auto; padding: 0 var(--gutter); box-sizing: border-box; display: flex; gap: 64px; }
.footer-brand { max-width: 360px; display: flex; flex-direction: column; gap: 20px; }
.footer-brand p { font-family: var(--font-display); margin: 0; font-size: 15px; line-height: 1.55; color: var(--steel); }
.footer-cols { margin-left: auto; display: flex; gap: 64px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.col-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--steel); }
.footer-col a { font-family: var(--font-display); font-size: 15px; color: #D5D9DF; text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-rule {
  max-width: var(--content); margin: 48px auto 0; padding: 24px var(--gutter) 0; box-sizing: border-box;
  border-top: 1px solid var(--dark-line); display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--steel);
}

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  :root { --gutter: 48px; }
}
@media (max-width: 1080px) {
  .nav-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    margin-left: auto; width: 40px; height: 40px; padding: 0 8px; box-sizing: border-box;
    border: 1px solid var(--dark-outline); border-radius: var(--radius-btn); cursor: pointer;
  }
  .nav-burger span { display: block; height: 2px; background: var(--paper); border-radius: 2px; }
  .header-collapse {
    display: none; position: absolute; left: 0; right: 0; top: 72px; z-index: 20;
    background: var(--ink); border-bottom: 1px solid var(--dark-line);
    padding: 20px var(--gutter) 24px; flex-direction: column; gap: 18px;
  }
  .site-header { position: relative; }
  .nav-toggle:checked ~ .header-collapse { display: flex; }
  .header-nav { flex-direction: column; gap: 14px; }
  .header-search { margin-left: 0; }
  .header-search .field { width: 100%; }
  .header-actions { flex-wrap: wrap; gap: 12px; }
  .account { position: static; flex-direction: column; align-items: flex-start; gap: 12px; width: 100%; }
  .account-chip { display: none; }
  .account-menu {
    display: flex; position: static; padding: 0; min-width: 0;
    background: none; border: 0; border-radius: 0; box-shadow: none;
  }
  .hero h1 { font-size: 56px; }
  .hero-art { width: 380px; height: 380px; }
  .hero-mark { width: 300px; height: 300px; left: 40px; }
  .hero-dims, .dim, .float-chip { display: none; }
  .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .model-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .browse-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 768px) {
  :root { --gutter: 24px; }
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 32px; padding-top: 56px; padding-bottom: 64px; }
  .hero h1 { font-size: 44px; }
  .hero-art { display: none; }
  .section { padding: 56px 0; }
  h2 { font-size: 30px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-grid.three, .model-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; gap: 40px; }
  .footer-cols { margin-left: 0; flex-wrap: wrap; gap: 32px; }
  /* The rail becomes a drawer: closed by default, opened by its own label. */
  .browse-layout { grid-template-columns: minmax(0, 1fr); }
  .filters {
    position: fixed; inset: 0; z-index: 30; overflow-y: auto; display: none;
    background: var(--paper); padding: 24px;
  }
  .filters-toggle:checked ~ .filters { display: block; }
  .filters-drawer-toggle {
    display: inline-flex; align-items: center; align-self: flex-start;
    font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--ink);
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-btn);
    padding: 10px 16px; margin-bottom: 18px; cursor: pointer;
  }
  .drawer-close {
    display: inline-flex; font-family: var(--font-display); font-size: 14px;
    font-weight: 600; color: var(--link); cursor: pointer;
  }
}
@media (max-width: 480px) {
  .model-grid.three, .model-grid.four { grid-template-columns: minmax(0, 1fr); }
  .browse-controls { flex-direction: column; }
  .hero h1 { font-size: 36px; }
}

/* --- Preview provenance ---------------------------------------------------
   A render made from the geometry carries no label. An image the uploader
   chose always does, on the card and on the detail page. */
.badge-uploader {
  position: absolute;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(20, 23, 28, 0.78);
  color: #F3F0E8;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.3px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shot-note {
  margin: 10px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: #5B6270;
}
