/* Layout: graphite workshop. Sticky brand bar, one view at a time; the configurator is a three-zone bench (steps | parts tray | readout). */
:root {
  --bg: #0c0d0f;
  --panel: #141619;
  --panel-2: #1b1e22;
  --line: #2a2e34;
  --line-2: #383d45;
  --fg: #eceef1;
  --muted: #9aa1ab;
  --dim: #80878f;
  --red: #e0141c;
  --red-hi: #ff3b42;
  --red-wash: rgba(224, 20, 28, .12);
  --chrome: linear-gradient(180deg, #ffffff 0%, #c9ced6 45%, #8d949e 55%, #e7eaee 100%);
  --ok: #3cc47c;
  --warn: #f0b03a;
  --err: #ff5a5f;
  --info: #6ea8ff;
  --display: "Chakra Petch", "Rajdhani", "Segoe UI", system-ui, sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --r: 6px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--fg); }
body { font-family: var(--body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: .01em; }
p { margin: 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--red-hi); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.tag.red { border-color: var(--red); color: var(--red-hi); background: var(--red-wash); }
.tag.ok { border-color: color-mix(in srgb, var(--ok) 60%, transparent); color: var(--ok); }
.tag.warn { border-color: color-mix(in srgb, var(--warn) 60%, transparent); color: var(--warn); }
.tag.err { border-color: color-mix(in srgb, var(--err) 60%, transparent); color: var(--err); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--panel-2); font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)); }
.btn.primary:hover { background: var(--red-hi); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--red-hi); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }

/* Header */
header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 20px; padding-block: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 40px; width: auto; display: block; }
.brand-tag { display: none; margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--line-2); font-family: var(--mono); font-size: 10.5px; line-height: 1.35; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
@media (min-width: 1140px) { .brand-tag { display: block; } }
nav.main { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; min-width: 0; }
nav.main::-webkit-scrollbar { display: none; }
nav.main a { font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid transparent; white-space: nowrap; }
nav.main a:hover { color: var(--fg); }
nav.main a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--red); }
nav.main a.admin-link { color: var(--warn); }
@media (max-width: 860px) {
  header.top .wrap { gap: 4px; }
  nav.main { margin-left: 0; width: 100%; }
  .brand img { height: 34px; }
}

main { min-height: 70vh; }
section.view { padding-block: 40px 72px; }
.view-head { display: grid; gap: 10px; margin-bottom: 28px; max-width: 720px; }
.view-head h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1; text-transform: uppercase; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Admin is used all day, so its title is one short line and the tables start high on the screen. */
#view-admin .view-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; max-width: none; margin-bottom: 14px; }
#view-admin .view-head .eyebrow { display: none; }
#view-admin .view-head h1 { font-size: 24px; }
#view-admin .view-head p { font-size: 13px; color: var(--dim); }
.view-head p { color: var(--muted); font-size: 18px; }
.draft-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--muted); font-size: 14px; margin-bottom: 24px; }

/* Home */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; padding-block: 56px 40px; }
.hero h1 { font-size: clamp(38px, 6.2vw, 72px); text-transform: uppercase; letter-spacing: .005em; }
.hero h1 .chrome { background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h1 .red { color: var(--red); }
.hero .lede { font-size: 19px; color: var(--muted); max-width: 52ch; margin-top: 18px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.readout { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; position: relative; overflow: hidden; }
.readout::after { content: ""; position: absolute; inset: 0 0 auto auto; width: 120px; height: 3px; background: var(--red); }
.readout h3 { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.readout dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 14px 0 0; font-size: 14px; }
.readout dt { font-family: var(--mono); color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding-top: 2px; }
.readout dd { margin: 0; min-width: 0; }
.readout .pi { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.readout .pi b { font-family: var(--display); font-size: 40px; line-height: 1; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; } }
main { overflow-x: clip; }
.hero { position: relative; isolation: isolate; }
.hero-bg { position: absolute; z-index: -1; top: -56px; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); pointer-events: none; overflow: hidden; background: radial-gradient(55% 75% at 72% 42%, rgba(224, 20, 28, .16), transparent 70%); }
.hero-bg::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(65% 70% at 60% 40%, #000 25%, transparent 80%); mask-image: radial-gradient(65% 70% at 60% 40%, #000 25%, transparent 80%); }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 55%, var(--bg)); }
.hero-bg .sweep { position: absolute; top: -50%; left: -50%; width: 50%; height: 200%; background: linear-gradient(100deg, transparent 35%, rgba(255, 59, 66, .09) 50%, transparent 65%); animation: sweep 10s ease-in-out infinite; }
@keyframes sweep { 0% { transform: translateX(0) rotate(8deg); } 100% { transform: translateX(400%) rotate(8deg); } }
.hero-bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .32; }
.hero-bg canvas.pc3d { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.hero-bg.live canvas.pc3d { opacity: .95; }
.hero-bg.live.narrow canvas.pc3d { opacity: .38; }
.hero-bg.live .sweep { display: none; }
.hero .readout { background: rgba(20, 22, 25, .7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
/* The 3D PC is the backdrop of the whole hero: large, behind the headline and the spec sheet, faded on the left so the
   headline stays readable. The sample build's spec sheet sits on the right, in front of it. */
@media (min-width: 861px) {
  .hero { min-height: min(720px, calc(100vh - 72px)); }
  .hero-stage { display: grid; justify-items: end; }
  .hero .readout { width: min(400px, 100%); }
  .hero-bg.live::after { background: linear-gradient(90deg, var(--bg) 0%, rgba(12, 13, 15, .82) 28%, rgba(12, 13, 15, .25) 52%, transparent 66%), linear-gradient(to bottom, transparent 60%, var(--bg)); }
}
.readout .rd-specs { font-size: 13.5px; gap: 5px 14px; }

.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.service { display: grid; gap: 10px; align-content: start; padding: 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); text-decoration: none; transition: border-color .15s, transform .15s; }
.service:hover { border-color: var(--red); transform: translateY(-2px); }
.service h3 { font-size: 22px; text-transform: uppercase; }
.service p { color: var(--muted); }
.service .go { font-family: var(--mono); font-size: 13px; color: var(--red-hi); }
@media (max-width: 860px) { .services { grid-template-columns: 1fr; } }
.services.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; }
@media (max-width: 700px) { .services.two { grid-template-columns: 1fr; } }
button.service { font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; }
/* Upgrade Lab choices: a 3D GPU or PC, in the hero's style, fades in on hover */
.service.up { position: relative; overflow: hidden; min-height: 176px; }
.service.up > :not(.up-art) { position: relative; z-index: 1; max-width: 60%; }
.service.up .up-art { position: absolute; right: 0; top: 0; width: 48%; height: 100%; opacity: 0; transition: opacity .6s ease; pointer-events: none; -webkit-mask-image: linear-gradient(to right, transparent, #000 30%); mask-image: linear-gradient(to right, transparent, #000 30%); }
.service.up:hover .up-art, .service.up:focus-visible .up-art { opacity: 1; }
@media (hover: none) { .service.up .up-art { opacity: .9; } }
#shopSection, #upgradeForm { scroll-margin-top: 96px; }

.home-sec { margin-top: 80px; }
.feature + .home-sec { margin-top: 48px; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 12px 32px; flex-wrap: wrap; margin-bottom: 24px; }
.sec-head h2, .sec-title { margin-top: 8px; font-size: clamp(30px, 4.6vw, 48px); line-height: 1; text-transform: uppercase; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sec-head > p { color: var(--muted); max-width: 46ch; }
.kick { display: inline-flex; align-items: center; gap: 10px; }
.kick::before { content: ''; width: 22px; height: 2px; background: var(--red); }
/* From spec to desk: four steps on a rail. The red part of the rail runs across once the section is in view. */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; }
.process::before, .process::after { content: ''; position: absolute; left: 0; top: 0; height: 2px; }
.process::before { right: 0; background: var(--line-2); }
.process::after { width: 25%; background: var(--red); box-shadow: 0 0 12px rgba(225, 29, 46, .5); transition: width 1.6s cubic-bezier(.3,.7,.2,1); }
.process.run::after { width: 100%; }
.process li { padding: 22px 28px 0 0; display: grid; gap: 8px; align-content: start; }
.process .n { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--red-hi); }
.process h3 { font-size: 24px; text-transform: uppercase; }
.process p { color: var(--muted); }
@media (max-width: 860px) {
  .process { grid-template-columns: 1fr; padding-left: 22px; }
  .process::before, .process::after { top: 0; bottom: 0; width: 2px; height: auto; }
  .process::before { right: auto; }
  .process::after { height: 25%; width: 2px; transition-property: height; }
  .process.run::after { width: 2px; height: 100%; }
  .process li { padding: 0 0 22px; }
}
@media (prefers-reduced-motion: reduce) { .process::after { transition: none; } }
/* Pick a resolution: the three starting builds. */
.rez-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 960px) { .rez-grid { grid-template-columns: 1fr; } }
.rez { display: grid; grid-template-rows: auto auto 1fr; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; transition: border-color .2s, transform .2s; }
.rez:hover { border-color: color-mix(in srgb, var(--red) 55%, var(--line)); transform: translateY(-2px); }
.rez-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 18px 18px 0; }
.rez-top h3 { font-size: 26px; text-transform: uppercase; margin-top: 6px; }
.rez-price { text-align: right; }
.rez-price .eyebrow { color: var(--muted); }
.rez-price b { display: block; margin-top: 4px; font-family: var(--display); font-size: 22px; line-height: 1.1; white-space: nowrap; }
.rez-shot { margin: 16px 18px 0; aspect-ratio: 16 / 7; border: 1px solid var(--line); border-radius: 6px; display: grid; align-content: end; gap: 6px; padding: 14px 16px; position: relative; overflow: hidden;
  background: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 22px 22px, linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 22px 22px, radial-gradient(120% 90% at 80% 10%, #2a1416 0%, #15171a 55%, #0f1012 100%); }
.rez-shot .gpu { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 3.4vw, 40px); line-height: 1; text-transform: uppercase; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rez-shot .cpu { font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; color: var(--muted); }
.rez-shot .tier { position: absolute; top: 12px; right: 12px; }
.rez-body { display: grid; gap: 14px; padding: 16px 18px 18px; align-content: start; }
.rez-body .specs { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.rez-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rez-foot .fineprint { margin: 0; }
/* Upgrade Lab strip at the foot of Home. */
.shelf { display: flex; justify-content: space-between; align-items: center; gap: 18px 32px; flex-wrap: wrap; padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--r); position: relative; overflow: hidden;
  background: radial-gradient(70% 140% at 100% 50%, #2a1416 0%, transparent 60%), var(--panel); }
.shelf h2 { font-size: clamp(28px, 4vw, 42px); line-height: 1; text-transform: uppercase; margin-top: 8px; }
.shelf p { color: var(--muted); margin-top: 8px; max-width: 60ch; }
.shelf .ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; }
.section-title h2 { font-size: 28px; text-transform: uppercase; }

/* Featured build: sticky stage on the left assembles the PC as the beats on the right scroll past. */
.feature { margin-top: 72px; }
.feature-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.feature-head h2 { font-size: clamp(30px, 4.6vw, 48px); text-transform: uppercase; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.scrolly { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; margin-top: 24px; }
.stage { position: sticky; top: 92px; height: min(calc(100vh - 132px), 520px); display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: radial-gradient(90% 70% at 50% 40%, #241214 0%, var(--panel) 60%, var(--bg) 100%); overflow: hidden; }
.stage svg { width: 100%; height: 100%; max-width: 100%; display: block; }
.stage-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.stage-foot b { font-family: var(--display); font-size: 22px; color: var(--fg); }
.stage-bar { flex: 1; height: 4px; background: var(--panel-2); border-radius: 2px; overflow: hidden; }
.stage-bar i { display: block; height: 100%; width: 0; background: var(--red); transition: width .5s ease; }
.pc-shell { fill: rgba(255,255,255,.02); stroke: var(--line-2); stroke-width: 2; }
.pc-glass { fill: none; stroke: rgba(255,255,255,.06); stroke-width: 1; }
.pc-part { transform-box: view-box; transform: translate(var(--dx, 0px), var(--dy, 0px)); opacity: .12; transition: transform .7s cubic-bezier(.2,.8,.2,1), opacity .5s ease; }
.pc-part.in { transform: translate(0, 0); opacity: 1; }
.pc-part .body { fill: var(--panel-2); stroke: var(--line-2); stroke-width: 1.5; transition: stroke .3s, fill .3s; }
.pc-part .detail { fill: none; stroke: var(--dim); stroke-width: 1; }
.pc-part .solid { fill: var(--line-2); }
.pc-part .accent { fill: var(--red); opacity: .35; transition: opacity .3s; }
.pc-part.hot .body { stroke: var(--red-hi); fill: #2a1517; }
.pc-part.hot .accent { opacity: 1; }
.pc-part.in .accent { opacity: .8; }
.pc-part .fan { transform-box: fill-box; transform-origin: center; }
.pc-part.in .fan { animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pc-label { font-family: var(--mono); font-size: 11px; fill: var(--red-hi); letter-spacing: .1em; opacity: 0; transition: opacity .3s; }
.pc-part.hot .pc-label { opacity: 1; }
.beats { display: grid; gap: 14px; align-content: start; }
.beat { display: grid; align-content: start; opacity: .45; transition: opacity .4s ease; }
.beat:last-child { gap: 10px; padding: 18px 0 min(10vh, 80px); }
.beat-card { display: grid; gap: 10px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .4s ease, transform .4s ease; }
.beat.active .beat-card { border-color: color-mix(in srgb, var(--red) 55%, var(--line)); }
.beat-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.beat-card .specs { padding-top: 10px; border-top: 1px solid var(--line); grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 4px 12px; font-size: 13.5px; }
@media (max-width: 1100px) { .beat-card .specs { grid-template-columns: auto minmax(0, 1fr); } }
.beat-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--line); }
.beat-foot b { color: var(--fg); font-weight: 500; }
.beat.active { opacity: 1; }
.beat .k { font-family: var(--mono); font-size: 12px; color: var(--red-hi); letter-spacing: .14em; text-transform: uppercase; }
.beat h3 { font-size: clamp(20px, 2.2vw, 26px); }
.beat p { color: var(--muted); font-size: 17px; max-width: 46ch; }
.beat .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.beat .bigpi { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.beat .bigpi b { font-family: var(--display); font-size: clamp(48px, 6vw, 72px); line-height: 1; color: var(--fg); }
.beat .ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
@media (max-width: 860px) {
  .scrolly { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .stage { top: 104px; height: 40vh; z-index: 2; padding: 12px; }
  .beats { margin-top: 14px; }
  .beat-card { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) { .pc-part { transform: none; opacity: 1; } .beat { opacity: 1; } }

/* Performance Index meter: value, tier word, track with tier ticks, scale labels. */
.pim { display: grid; gap: 6px; }
.pim-head { display: flex; align-items: center; gap: 8px; }
.pim-label { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; display: inline-flex; gap: 8px; align-items: center; }
.pim-help { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); font-family: var(--mono); font-size: 12px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.pim-help:hover { border-color: var(--red); color: var(--fg); }
.pim-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pim-val { font-family: var(--display); font-weight: 700; font-size: 38px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.pim-tier { font-family: var(--display); font-weight: 600; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--red-hi); }
.pim-track { position: relative; height: 10px; border-radius: 5px; background: linear-gradient(90deg, #1d1f23 0 33.33%, #22191b 33.33% 50%, #2a1719 50% 66.67%, #33151a 66.67% 100%); overflow: hidden; border: 1px solid var(--line); }
.pim-track i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #7a0a10, var(--red) 60%, var(--red-hi)); border-radius: 5px; transition: width .6s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 12px rgba(224,20,28,.5); }
.pim-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.18); }
.pim-scale { position: relative; height: 14px; font-family: var(--mono); font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.pim-scale span { position: absolute; top: 0; white-space: nowrap; }
.pim-scale span.on { color: var(--fg); }
.pim.compact .pim-val { font-size: 28px; }
.pim.big .pim-val { font-size: clamp(56px, 8vw, 88px); line-height: 1; }
.pim.big .pim-track { height: 14px; border-radius: 7px; }
.pim.big .flame .fs { width: 30px; height: 42px; margin-left: -15px; }
.pim.big .flame .f1 { width: 28px; height: 28px; }
.pim.big .flame .f2 { width: 18px; height: 18px; }
.pim.big .flame .f3 { width: 9px; height: 9px; }
.pim.big .flame .spark { bottom: 22px; }
.pim-sub { font-size: 13px; color: var(--muted); }
.vim .pim-track { background: linear-gradient(90deg, #1d1f23 0 50%, #1f2329 50% 65%, #17291f 65% 100%); }
.vim .pim-track i { background: linear-gradient(90deg, #1d5c3c, var(--ok)); box-shadow: 0 0 12px rgba(60,196,124,.35); }
.vim.t-good .pim-track i { background: linear-gradient(90deg, #3d5874, #9fc3e6); box-shadow: 0 0 12px rgba(159,195,230,.3); }
.vim.t-premium .pim-track i { background: linear-gradient(90deg, #7a5a12, #e6b93a); box-shadow: 0 0 12px rgba(230,185,58,.35); }
.vi-tier { display: inline-flex; align-items: center; gap: 6px; }
.vim.t-great .pim-tier { color: var(--ok); }
.vim.t-good .pim-tier { color: #9fc3e6; }
.vim.t-premium .pim-tier { font-weight: 700; background: linear-gradient(100deg, #b07d12 0%, #e6b93a 35%, #fff1b8 50%, #e6b93a 65%, #b07d12 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gleam 3s linear infinite; }
@keyframes gleam { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.vi-icon { display: inline-grid; place-items: center; }
.vi-icon svg { display: block; overflow: visible; }
.vi-icon.leaf svg { transform-origin: 20% 85%; animation: flutter 2.4s ease-in-out infinite; }
@keyframes flutter { 0%, 100% { transform: rotate(-8deg) translateY(0); } 25% { transform: rotate(10deg) translateY(-2px); } 50% { transform: rotate(-4deg) translateY(-1px); } 75% { transform: rotate(7deg) translateY(-2px); } }
.vi-icon.coin svg { animation: coinflip 2.6s ease-in-out infinite; }
@keyframes coinflip { 0%, 60%, 100% { transform: scaleX(1); } 70% { transform: scaleX(.1); } 80% { transform: scaleX(-1); } 90% { transform: scaleX(.1); } }
.vi-icon.ingot .shine { animation: shine 2.8s ease-in-out infinite; }
@keyframes shine { 0%, 55% { transform: translateX(0) skewX(-20deg); } 100% { transform: translateX(44px) skewX(-20deg); } }

/* Flame on the Performance Index bar */
.pim-bar { position: relative; margin-top: 4px; }
.flame { position: absolute; bottom: 1px; width: 0; height: 0; pointer-events: none; z-index: 1; --fsc: calc(.8 + var(--heat) * 1.1); }
.flame .fs { position: absolute; left: 0; bottom: 0; width: 22px; height: 32px; margin-left: -11px; transform-origin: 50% 100%; transform: scale(var(--fsc)); }
.flame.ignite .fs { animation: ignite .7s cubic-bezier(.2,.9,.3,1.3) both; }
@keyframes ignite { 0% { transform: scale(0); opacity: 0; filter: brightness(2.5); } 45% { transform: scale(calc(var(--fsc) * 1.35)); opacity: 1; } 100% { transform: scale(var(--fsc)); filter: brightness(1); } }
.flame .fx { position: absolute; inset: 0; transform-origin: 50% 100%; animation: flicker calc(.9s - var(--heat) * .55s) ease-in-out infinite alternate; filter: drop-shadow(0 0 calc(4px + var(--heat) * 8px) rgba(255, 90, 20, .8)); }
@keyframes flicker { 0% { transform: scale(1, 1) skewX(0); } 30% { transform: scale(.94, 1.1) skewX(3deg); } 60% { transform: scale(1.05, .93) skewX(-3deg); } 100% { transform: scale(.97, 1.06) skewX(1deg); } }
.flame i { position: absolute; left: 50%; bottom: 0; border-radius: 50% 0 50% 50%; transform: translateX(-50%) rotate(-45deg); }
.flame .f1 { width: 20px; height: 20px; bottom: 1px; background: linear-gradient(45deg, #ff3b1f, #ff7a1a 60%, rgba(255,122,26,.2)); }
.flame .f2 { width: 13px; height: 13px; bottom: 2px; background: linear-gradient(45deg, #ff9a1f, #ffd34d); }
.flame .f3 { width: 6px; height: 6px; bottom: 3px; background: #fff6c8; }
.flame .spark { position: absolute; bottom: 18px; width: 3px; height: 3px; border-radius: 50%; background: #ffd34d; box-shadow: 0 0 4px #ff9a1f; opacity: 0; animation: spark 1s ease-out infinite; }
.flame .sp1 { left: 4px; animation-delay: .1s; }
.flame .sp2 { left: 14px; animation-delay: .45s; }
.flame .sp3 { left: 9px; animation-delay: .8s; }
@keyframes spark { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(3px, -22px); opacity: 0; } }
.vim.compact .pim-val { font-size: 22px; }
.pi-explain { display: grid; gap: 12px; }
.pi-explain .tiers { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 15px; }
.pi-explain .tiers dt { font-family: var(--mono); color: var(--red-hi); font-size: 13px; padding-top: 2px; }
.pi-explain .tiers dd { margin: 0; }

/* Pre-Built page when nothing is for sale: build-to-order starting points */
.pb-empty { display: grid; gap: 18px; padding: clamp(18px, 3vw, 28px); margin-bottom: 28px; border: 1px solid var(--line-2); border-radius: var(--r); background: radial-gradient(90% 120% at 100% 0%, rgba(224, 20, 28, .16) 0%, transparent 60%), var(--panel); }
.pb-empty[hidden] { display: none; }
.pb-empty h2 { font-size: clamp(24px, 3.4vw, 34px); text-transform: uppercase; }
.pb-empty .pb-lead { color: var(--muted); max-width: 62ch; }
.pb-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.pb-tile { display: grid; gap: 10px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); }
.pb-tile .eyebrow { color: var(--red); }
.pb-tile .gpu { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.05; text-transform: uppercase; }
.pb-tile .btn { justify-self: start; }
.pcard.diy .shot { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .03) 0 12px, transparent 12px 24px), radial-gradient(120% 90% at 80% 10%, #2a1416 0%, #15171a 55%, #0f1012 100%); }

/* Product cards (pre-built + portfolio) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 18px; }
.shop-group { grid-column: 1 / -1; font-family: var(--mono); font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .12em; padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-top: 6px; }
.shop-filter .sep { width: 1px; align-self: stretch; background: var(--line-2); margin: 4px 6px; }
.enq-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.enq-or { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .12em; }
.enq-or::before, .enq-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.pcard { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.pcard .shot { aspect-ratio: 16 / 9; max-width: 100%; position: relative; background: radial-gradient(120% 90% at 80% 10%, #2a1416 0%, #15171a 55%, #0f1012 100%); display: grid; place-items: end start; padding: 16px; border-bottom: 1px solid var(--line); }
.pcard .shot .gpu { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 4vw, 34px); line-height: 1; text-transform: uppercase; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pcard .shot .tag { position: absolute; top: 12px; left: 12px; }
.pcard .shot .shot-txt { display: grid; gap: 6px; }
.pcard .shot .sub { font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; color: var(--muted); }
.pcard .shot .tag + .tag { left: auto; right: 12px; }
.pcard .body { display: grid; gap: 14px; padding: 18px; align-content: start; }
.pcard h3 { font-size: 19px; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 14px; }
.specs dt { font-family: var(--mono); font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; padding-top: 3px; }
.specs dd { margin: 0; min-width: 0; }
.pcard.folio .shot.photo { padding: 0; border: 0; border-bottom: 1px solid var(--line); cursor: zoom-in; overflow: hidden; width: 100%; font: inherit; color: inherit; }
.pcard.folio .shot.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
/* Upgrade Lab part photos are square product shots: show them whole. */
.pcard.part.folio .shot, .pcard.folio .shot.photo { aspect-ratio: 1 / 1; }
/* Pre-built and Portfolio photos are square too. */
.pcard.folio .shot.photo img { object-fit: contain; background: #000; }
.pcard.folio .shot.photo:hover img { transform: scale(1.04); }
.pcard.folio .shot .tag { z-index: 1; }
.pcard.folio .shot .tag.count { left: auto; right: 12px; background: rgba(12, 13, 15, .75); }
/* Photos often carry their own title top-left and logo bottom-left, so the tags (Portfolio and Pre-Built PCs) sit together bottom-right on a solid backing. */
.pcard.folio .shot-tags { position: absolute; bottom: 12px; right: 12px; z-index: 1; display: flex; gap: 6px; }
.pcard.folio .shot-tags .tag { position: static; background: rgba(12, 13, 15, .88); border-color: rgba(255, 255, 255, .22); color: #d9dbe0; box-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.pcard.folio .shot-tags .tag.status { color: #fff; border-color: var(--red); }
.pcard.folio .shot-tags .tag.ok { color: var(--ok); border-color: var(--ok); }
.pcard.folio .shot-tags .tag.warn { color: var(--warn); border-color: var(--warn); }
.folio-meta { margin-top: 4px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--red-hi); }
.specs.full { padding-top: 12px; border-top: 1px solid var(--line); gap: 6px 14px; }
.pcard.folio .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.vid-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vid-row .vid-lbl { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.pcard.folio .actions .vid-row .btn.vid { flex: 0 0 auto; min-width: 40px; justify-content: center; padding-inline: 10px; }
.gallery { width: min(1000px, 100%); gap: 14px; }
.gal-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.gal-stage { position: relative; background: #000; border-radius: var(--r); overflow: hidden; display: grid; place-items: center; aspect-ratio: 1 / 1; max-height: 68vh; margin-inline: auto; max-width: 100%; }
.gal-stage img { width: 100%; height: 100%; object-fit: contain; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(12, 13, 15, .7); color: var(--fg); font-size: 26px; line-height: 1; cursor: pointer; }
.gal-nav.prev { left: 10px; } .gal-nav.next { right: 10px; }
.gal-nav:hover { border-color: var(--red); }
.gal-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.gal-thumbs button { flex: none; width: 76px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; background: var(--panel-2); cursor: pointer; }
.gal-thumbs button[aria-current="true"] { border-color: var(--red); }
.gal-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pf-admin { display: grid; gap: 10px; }
.pf-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.pf-row.off { opacity: .55; }
.pf-row .spec { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-thumb { position: relative; width: 72px; height: 50px; border-radius: 4px; overflow: hidden; background: var(--panel-2); }
.pf-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pf-thumb span { position: absolute; right: 3px; bottom: 2px; font-family: var(--mono); font-size: 11px; color: var(--fg); text-shadow: 0 1px 2px #000; }
.pf-form { padding: 18px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel-2); margin-bottom: 4px; }
.pf-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pf-ph { position: relative; aspect-ratio: 4 / 3; border-radius: 4px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.pf-ph img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.pf-row .tag.pf-link { font-size: 10.5px; padding: 1px 6px; vertical-align: 1px; }
.pf-linked { display: grid; gap: 8px; }
.pf-form .check { display: flex; gap: 8px; align-items: center; font-family: inherit; font-size: 14px; text-transform: none; letter-spacing: 0; color: inherit; cursor: pointer; }
.pf-form .check input { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--red); }
.pf-form .check .fineprint { text-transform: none; letter-spacing: 0; }
.pf-linked-shots { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pf-linked-shots img { width: 72px; height: 50px; object-fit: cover; border-radius: 6px; background: #000; }
.pf-ph-tools { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; align-items: center; padding: 4px; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.pf-ph-tools button { min-width: 30px; height: 30px; border-radius: 4px; border: 1px solid var(--line-2); background: rgba(12,13,15,.8); color: var(--fg); cursor: pointer; }
.pf-ph-tools .cover { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg); padding-left: 4px; }
.pf-add { display: grid; place-items: center; aspect-ratio: 4 / 3; border: 1px dashed var(--line-2); border-radius: 4px; color: var(--muted); cursor: pointer; font-size: 14px; }
.pf-add:hover, .pf-add:focus-within { border-color: var(--red); color: var(--fg); }
@media (max-width: 640px) { .pf-row { grid-template-columns: 56px minmax(0, 1fr) auto; } .pf-row > div:last-child { grid-column: 1 / -1; text-align: left !important; } .pf-thumb { width: 56px; height: 42px; } }
.pcard .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.price { font-family: var(--display); font-weight: 700; font-size: 26px; }
.pcard .actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* Parts for sale on Upgrade Lab: stock lots marked for sale in Admin → Inventory */
.pcard.part:not(.folio) { grid-template-rows: 1fr; }
#shopEmpty[hidden] { display: none; }
.pcard.part .tags { display: flex; gap: 8px; flex-wrap: wrap; }
.pcard.part .price { font-size: 22px; }
.shop-head { margin-top: 36px; display: grid; gap: 6px; }

/* Contact + upgrade lists */
.list-panel { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.list-panel > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 18px; border-top: 1px solid var(--line); }
.list-panel > div:first-child { border-top: 0; }
.list-panel h3 { font-size: 18px; }
.list-panel .val { font-family: var(--mono); font-size: 14px; color: var(--muted); user-select: all; }

/* Configurator */
.cfg { display: grid; grid-template-columns: 270px minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.cfg-side { position: sticky; top: 80px; display: grid; gap: 10px; align-content: start; max-height: calc(100vh - 96px); overflow-y: auto; scrollbar-width: thin; }
.cfg-side .cfg-step { padding: 7px 10px; }
.cfg-steps { display: grid; gap: 4px; }
.cfg-preview { display: grid; gap: 6px; padding: 10px 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: radial-gradient(120% 80% at 50% 100%, rgba(224, 20, 28, .12), transparent 70%), var(--panel); }
.cfg-preview canvas { width: 100%; height: 200px; display: block; cursor: grab; touch-action: pan-y; }
/* The 3D build is the showcase at the top of the sticky left column, so it stays in view while parts are picked. */
.cfg-side .cfg-preview { padding: 0 0 12px; overflow: hidden;
  background: radial-gradient(90% 70% at 50% 85%, rgba(224, 20, 28, .22), transparent 70%), linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 24px 24px, #0f1012; }
.cfg-side .cfg-preview canvas { height: 250px; }
.cfg-side .cfg-preview .cap, .cfg-side .cfg-preview .seen { margin-inline: 12px; }
.cfg-preview canvas:active { cursor: grabbing; }
.cfg-preview.no3d canvas { display: none; }
.cfg-preview .cap { display: grid; gap: 1px; }
.cfg-preview .cap b { font-size: 13px; font-weight: 600; line-height: 1.3; }
.cfg-preview .cap .fineprint { font-size: 11px; }
.cfg-preview .cap .maker { margin-top: 4px; font-size: 12.5px; color: var(--red-hi); text-decoration: underline; text-underline-offset: 3px; justify-self: start; }
.cfg-preview .seen { display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.cfg-preview .seen .shots { display: flex; gap: 6px; flex-wrap: wrap; }
.cfg-preview .seen .shots button { width: 56px; height: 42px; padding: 0; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; background: var(--panel-2); cursor: pointer; }
.cfg-preview .seen .shots button:hover { border-color: var(--red); }
.cfg-preview .seen .shots img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cfg-preview .seen a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.opt .note.seen-note { color: var(--muted); }
.cfg-step { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 2px 10px; align-items: center; text-align: left; padding: 10px; border: 1px solid transparent; border-radius: var(--r); background: none; cursor: pointer; }
.cfg-step:hover { background: var(--panel); }
.cfg-step[aria-current="step"] { background: var(--panel); border-color: var(--line-2); }
.cfg-step .dot { grid-row: span 2; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.cfg-step.done .dot { background: var(--red); border-color: var(--red); color: #fff; }
.cfg-step.own .dot { border-color: var(--muted); color: var(--fg); }
.cfg-step .lbl { font-family: var(--display); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }
.cfg-step .pick { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tray-head h2 { font-size: 26px; text-transform: uppercase; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.presets .lbl { font-family: var(--mono); font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; margin-right: 4px; }
.chip { min-height: 36px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); cursor: pointer; font-size: 14px; }
.chip:hover { border-color: var(--red); }
.options { display: grid; gap: 10px; }
.preset-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; flex: 1 1 100%; }
.preset { display: grid; gap: 2px; align-content: start; text-align: left; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); cursor: pointer; transition: border-color .15s, background .15s; }
.preset:hover { border-color: var(--red); background: var(--panel-2); }
.preset b { margin-bottom: 2px; font-family: var(--display); font-size: 15px; text-transform: uppercase; letter-spacing: .04em; }
.preset .mono { font-size: 12px; color: var(--muted); }
.list-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.list-tools .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.list-tools .chip { min-height: 32px; font-size: 13px; }
.chip.on { border-color: var(--red); background: var(--red-wash); color: var(--fg); }
.sort { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.sort select { min-height: 32px; padding: 4px 8px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); color: var(--fg); font: inherit; text-transform: none; letter-spacing: 0; font-size: 13px; }
.fit-note { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.opt-group { font-family: var(--mono); font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .12em; padding: 8px 2px 0; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.opt-group:first-child { padding-top: 0; }
.opt.nofit { opacity: .62; }
.opt.nofit:hover { opacity: .85; }
.opt.fixable { opacity: .88; }
.opt.fixable:hover { opacity: 1; }
.opt .note.fix { color: var(--info); }
.fit-fix { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line-2); border-left: 3px solid var(--info); border-radius: var(--r); background: var(--panel); font-size: 14px; line-height: 1.45; }
.fit-fix .msg { flex: 1 1 320px; }
.fit-fix .msg b { color: var(--fg); font-weight: 600; }
.fit-fix .acts { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.fit-fix .x { font-size: 18px; line-height: 1; color: var(--dim); }
.opt .delta { grid-column: 2 / 4; display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.opt .delta .up { color: var(--muted); }
.opt .delta .down { color: var(--ok); }
.opt .name .tag.rec, .opt .name .tag.stock { margin-left: 8px; vertical-align: 2px; font-size: 10px; padding: 2px 6px; }
.tag.stock { border-color: transparent; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.list-tools .chip.stock-chip.on { border-color: color-mix(in srgb, var(--ok) 60%, transparent); color: var(--ok); }
.budget-in { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg); padding: 0 10px; margin-top: 4px; }
.budget-in:focus-within { border-color: var(--red); }
.budget-in span { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.budget-in input { flex: 1; min-width: 0; min-height: 38px; border: 0; background: none; color: var(--fg); font-family: var(--mono); font-size: 16px; outline: none; }
.bbar { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; margin-top: 8px; }
.bbar i { display: block; height: 100%; background: var(--ok); transition: width .4s ease; }
.bbar.over i { background: var(--err); }
@media (max-width: 860px) { .preset-cards { grid-template-columns: 1fr; } }
.opt { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; text-align: left; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover { border-color: var(--line-2); background: var(--panel-2); }
.opt[aria-pressed="true"] { border-color: var(--red); background: linear-gradient(90deg, var(--red-wash), transparent 70%), var(--panel); }
.opt .radio { width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; border: 2px solid var(--line-2); }
.opt[aria-pressed="true"] .radio { border-color: var(--red); background: radial-gradient(circle, var(--red) 0 4px, transparent 5px); }
.opt .name { font-weight: 600; font-size: 16px; }
.opt .spec { font-family: var(--mono); font-size: 12.5px; color: var(--muted); grid-column: 2; }
.opt .p { font-family: var(--mono); font-size: 15px; text-align: right; white-space: nowrap; }
.opt .notes { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 6px; }
.opt .note { font-size: 13px; }
.opt .note.err { color: var(--err); }
.opt .note.warn { color: var(--warn); }
.opt.own { border-style: dashed; }
.tray-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.empty { padding: 28px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--muted); display: grid; gap: 10px; justify-items: start; }

.summary { position: sticky; top: 80px; display: grid; gap: 16px; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.summary h2 { font-size: 16px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.metric { display: grid; gap: 2px; }
.metric .k { font-family: var(--mono); font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; display: flex; gap: 8px; align-items: center; }
.metric .v { font-family: var(--display); font-weight: 700; font-size: 38px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.metric .v.sm { font-size: 24px; }
.metric .sub { font-size: 13px; color: var(--muted); }
.bar { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--red-hi)); width: 0; transition: width .4s ease; }
.issues { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.issues li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; }
.issues li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--muted); }
.issues li.ok::before { background: var(--ok); }
.issues li.warn::before { background: var(--warn); }
.issues li.err::before { background: var(--err); }
.issues li.info::before { background: var(--muted); }
.parts-mini { display: grid; gap: 4px; margin: 0; font-size: 13px; }
.parts-mini div { display: flex; justify-content: space-between; gap: 10px; }
.parts-mini span:first-child { color: var(--dim); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; flex: none; }
.parts-mini span:last-child { text-align: right; min-width: 0; }
.fineprint { font-size: 12px; color: var(--dim); }
.privacy-note { max-width: 62ch; }
.foot-priv { color: var(--muted); text-decoration: none; }
.foot-priv:hover { color: var(--fg); }
.foot-legal { display: inline-flex; gap: 18px; }
.terms h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg); margin-top: 6px; }
.terms ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); font-size: 15px; }
.terms ul b { color: var(--fg); }
.hr { height: 1px; background: var(--line); }

.mobile-bar { display: none; }
@media (max-width: 1080px) {
  .cfg { grid-template-columns: minmax(0, 1fr) 320px; }
  .cfg-side { grid-column: 1 / -1; position: static; max-height: none; overflow: visible; }
  .cfg-steps { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .cfg-step { flex: none; width: 150px; }
  .cfg-side .cfg-preview { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); align-items: center; padding: 0; }
  .cfg-side .cfg-preview canvas { grid-row: span 2; height: 230px; }
}
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  .cfg { grid-template-columns: minmax(0, 1fr); }
  .cfg-side .cfg-preview { grid-template-columns: minmax(0, 1fr); padding-bottom: 12px; }
  .cfg-side .cfg-preview canvas { grid-row: auto; }
  .summary { position: static; }
  .mobile-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; gap: 12px; align-items: center; justify-content: space-between; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: var(--panel); border-top: 1px solid var(--line-2); }
  .mobile-bar .m { display: flex; gap: 16px; font-family: var(--mono); font-size: 13px; }
  .mobile-bar b { font-family: var(--display); font-size: 18px; }
  section.view.custom { padding-bottom: 120px; }
}

/* Forms */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field .label { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); outline: none; }
.field .err-msg { color: var(--err); font-size: 13px; }
.seg { display: flex; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.seg label { position: relative; flex: 1; text-align: center; padding: 10px; cursor: pointer; font-family: var(--body); font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--fg); }
.seg input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--red); color: #fff; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--red-hi); outline-offset: -2px; }
.upgrade-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; margin-top: 24px; }
.contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 860px) { .upgrade-grid { grid-template-columns: 1fr; } }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

/* Modal sheet */
.sheet-back { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.sheet { width: min(640px, 100%); max-height: 100%; overflow-y: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); padding: 24px; display: grid; gap: 18px; }
.sheet h2 { font-size: 26px; text-transform: uppercase; }
.sheet .bar-row { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.copybox { font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; max-height: 220px; overflow: auto; user-select: all; }

/* Admin */
.admin-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.admin-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); cursor: pointer; white-space: nowrap; }
.admin-tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--red); }
.admin-tabs .count { font-family: var(--mono); font-size: 11px; background: var(--red); color: #fff; border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
.notice { padding: 12px 14px; border-left: 3px solid var(--warn); background: color-mix(in srgb, var(--warn) 8%, transparent); color: var(--fg); font-size: 14px; margin-bottom: 18px; border-radius: 0 var(--r) var(--r) 0; }
.lead { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 18px; display: grid; gap: 14px; }
.lead.new { border-color: color-mix(in srgb, var(--red) 70%, var(--line)); }
.lead-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: start; }
.lead-head h3 { font-size: 20px; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) { .lead-grid { grid-template-columns: 1fr; } }
.leads { display: grid; gap: 14px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table.parts { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
table.parts th { text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
table.parts td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.parts tr:last-child td { border-bottom: 0; }
table.parts tr.off td:not(:first-child) { opacity: .5; }
table.parts .spec { font-family: var(--mono); font-size: 12px; color: var(--muted); }
table.parts input.price-in { width: 96px; min-height: 36px; padding: 6px 8px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); font-family: var(--mono); text-align: right; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--fg); transition: transform .15s; }
.switch input:checked + span { background: var(--red); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--red-hi); outline-offset: 2px; }
.cat-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.lead-filters { display: grid; gap: 10px; margin-bottom: 16px; }
.lead-hist { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12px; display: grid; gap: 2px; }
.del-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-right: auto; font-size: 14px; color: var(--err); }
.btn.danger { border-color: var(--err); color: var(--err); background: color-mix(in srgb, var(--err) 10%, transparent); }
.btn.danger-ghost { color: var(--err); border-color: color-mix(in srgb, var(--err) 45%, transparent); }
.lead-add { padding: 18px; margin-bottom: 18px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); }
.lead-add-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; }
.lead-filters .field { max-width: 360px; }
.cat-filter .chip[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

/* Admin: back office */
.admin-nav { display: grid; gap: 2px; margin-bottom: 22px; }
.admin-nav .admin-tabs { margin-bottom: 0; align-items: center; }
.admin-group { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); min-width: 74px; padding-right: 6px; }
.lab-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.inv-views { margin-bottom: 12px; }
.lab-bar select[data-sales-year] { margin-left: auto; min-height: 40px; padding: 8px 12px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); color: inherit; font: inherit; }
table.lab tr[data-prod-open], table.lab tr[data-batch-open] { cursor: pointer; }
table.lab tr[data-prod-open]:hover td, table.lab tr[data-batch-open]:hover td { background: var(--panel-2); }
table.lab .sub { display: block; font-size: 12px; color: var(--muted); }
table.lab tfoot td { font-weight: 600; border-top: 1px solid var(--line-2); }
.prod-batches { display: grid; gap: 8px; }
.prod-diff { font-size: 13px; color: var(--warn); display: grid; gap: 6px; }
.prod-diff .check { display: flex; gap: 8px; align-items: center; color: var(--fg); cursor: pointer; }
.prod-diff .check input { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--red); }
.lab-bar .cat-filter { flex: 1; }
.lab-search { min-height: 40px; width: min(280px, 100%); padding: 8px 12px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); }
table.lab { width: 100%; border-collapse: collapse; font-size: 14px; }
table.lab th { text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; padding: 9px 10px; border-bottom: 1px solid var(--line); background: var(--panel); white-space: nowrap; }
table.lab td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.lab tbody tr:last-child td { border-bottom: 0; }
table.lab .num { text-align: right; font-family: var(--mono); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.lab .mono { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; color: var(--muted); }
table.lab td.wide { min-width: 220px; }
table.lab tr[data-lab-open] { cursor: pointer; }
table.lab tr[data-lab-open]:hover td, table.lab tr[data-lab-open]:focus-visible td { background: var(--panel-2); }
table.lab tr.tot td { font-weight: 600; border-top: 1px solid var(--line-2); }
/* Wide summary tables: headings wrap onto two lines so every column fits without sideways scrolling. */
table.lab.fit th { white-space: normal; vertical-align: bottom; line-height: 1.35; }
table.lab.fit th, table.lab.fit td { padding-inline: 8px; }
table.lab tr.muted td { color: var(--dim); }
table.lab tfoot td { border-top: 1px solid var(--line); border-bottom: 0; color: var(--muted); }
table.lines { min-width: 760px; }
table.lines td { padding: 6px; }
table.lines input, table.lines select { width: 100%; min-height: 36px; padding: 6px 8px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); font-size: 13.5px; }
table.lines input[type=number] { font-family: var(--mono); text-align: right; min-width: 72px; }
table.lines td:nth-child(1) { width: 120px; }
table.lines td:nth-child(2) input { min-width: 260px; }
table.lines td:nth-child(3) { width: 76px; }
table.lines td:nth-child(4), table.lines td:nth-child(5) { width: 112px; }
table.lines td:last-child { width: 48px; }
.chip-s { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.chip-s.s-in-stock, .chip-s.s-listed, .chip-s.s-paid, .chip-s.s-completed, .chip-s.s-accepted { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.chip-s.s-in-build { color: var(--info); border-color: color-mix(in srgb, var(--info) 50%, transparent); }
.chip-s.s-partially-used, .chip-s.s-sent, .chip-s.s-reserved, .chip-s.s-deposit-paid, .chip-s.s-open, .chip-s.s-assembling, .chip-s.s-testing, .chip-s.s-sourcing { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.chip-s.s-balance-due, .chip-s.s-unpaid, .chip-s.s-overpaid, .chip-s.s-unconfirmed, .chip-s.s-written-off, .chip-s.s-enter-price { color: var(--err); border-color: color-mix(in srgb, var(--err) 50%, transparent); }
.flag { font-family: var(--mono); font-size: 11px; color: var(--err); white-space: nowrap; }
.flag::before { content: "● "; }
.neg { color: var(--err); }
.spark { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.qrow { background: none; border: 0; padding: 0; color: var(--fg); cursor: pointer; text-align: left; font-size: inherit; }
.qrow .car { color: var(--muted); display: inline-block; width: 12px; }
input.pick, .pick-gap { display: inline-block; width: 16px; height: 16px; margin: 0 8px 0 0; vertical-align: -3px; accent-color: var(--red); }
.pick-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
table.market .price-in { width: 92px; }
table.review td { vertical-align: top; }
table.review tr.under > td:first-child { box-shadow: inset 3px 0 0 var(--err); }
table.review .rule-in { min-height: 32px; padding: 4px 6px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); color: var(--fg); font: inherit; font-size: 13px; }
table.review .spec.neg { color: var(--err); }
table.review .spec.pos { color: var(--ok); }
table.review .flags { display: flex; flex-wrap: wrap; gap: 4px; }
.bulk-rule { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.bulk-rule .rule-in { min-height: 32px; padding: 4px 6px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); color: var(--fg); font: inherit; font-size: 13px; }
tr.qdetail > td { background: var(--panel); }
.qd-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; padding: 6px 0; }
.qd-grid h4, #quoteForm h4 { font-size: 14px; margin-bottom: 8px; }
.qlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.pchart svg { width: 100%; height: auto; display: block; }
.pchart .ax { font-family: var(--mono); font-size: 11px; fill: var(--dim); }
.plegend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.plegend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--fg); }
.lg.band { height: 10px; border: 0; background: var(--muted); opacity: .35; border-radius: 2px; }
.lg.pcpp { border-top: 2px dashed var(--dim); }
.lg.site { border-top-color: var(--red-hi); }
@media (max-width: 900px) { .qd-grid { grid-template-columns: 1fr; } }
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pcard { padding: 18px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel-2); min-width: 0; }
.pcard.wide { grid-column: 1 / -1; }
.pcard h3 { font-size: 18px; margin-bottom: 4px; }
.fx-now { font-size: 26px; font-weight: 600; margin-top: 6px; }
.tier-grid { display: grid; grid-template-columns: auto 110px auto 90px; gap: 8px 10px; align-items: center; font-size: 14px; }
.q-grid { display: grid; grid-template-columns: 2fr 1.2fr 1fr 1fr 1.4fr 1.4fr; gap: 10px; }
.qhist summary { font-family: var(--mono); font-size: 12px; color: var(--muted); cursor: pointer; margin-top: 2px; }
.qhist ul { margin: 6px 0 0; padding-left: 16px; font-size: 12.5px; display: grid; gap: 3px; }
@media (max-width: 900px) { .pgrid { grid-template-columns: 1fr; } .q-grid { grid-template-columns: 1fr 1fr; } }
.ok-t { color: var(--ok); }
.warn-t { color: var(--warn); }
.info-t { color: var(--info); }
.draft-note[hidden] { display: none; }
table.lab tr.peak td { background: color-mix(in srgb, var(--info) 10%, transparent); }
.lab-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lab-act { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel-2); padding: 14px; display: grid; gap: 12px; }
.lab-act h3 { font-size: 16px; text-transform: uppercase; letter-spacing: .04em; }
.lab-act .check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.backup-note { font-size: 12.5px; color: var(--dim); align-self: end; padding-bottom: 12px; }
.bk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 14px; margin: 0 0 16px; border: 1px solid var(--line); border-left: 3px solid var(--ok); border-radius: var(--r); background: var(--panel); font-size: 14px; }
.bk-bar[hidden] { display: none; }
.bk-bar.due { border-color: color-mix(in srgb, var(--err) 55%, var(--line)); border-left-color: var(--err); background: color-mix(in srgb, var(--err) 7%, var(--panel)); }
.bk-bar.due .bk-status > span b { color: var(--err); }
.bk-status { display: grid; gap: 3px; margin-right: auto; min-width: 0; }
.bk-status small { color: var(--dim); font-size: 12.5px; }
.bk-status small b { color: var(--muted); font-weight: 600; }
.bk-at, .bk-bar .dim { color: var(--dim); }
.bk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bk-bar .linkish { background: none; border: 0; padding: 0; color: var(--info); font: inherit; cursor: pointer; text-decoration: underline; }
.bk-why { width: 100%; font-size: 13.5px; color: var(--muted); max-width: 760px; }
.bk-restore { width: 100%; display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 2px; }
.bk-restore h3 { font-size: 17px; }
.bk-restore .table-wrap { background: var(--bg); max-width: 760px; }
.bk-restore .check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
table.bk-diff td.dim { font-size: 13px; }
.backup-note.due { color: var(--warn); }
.hist { list-style: none; margin: 0; padding: 0; display: grid; }
.hist > li { display: grid; grid-template-columns: 150px 1fr auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hist > li:last-child { border-bottom: 0; }
.hist time { font-family: var(--mono); font-size: 12px; color: var(--dim); padding-top: 2px; }
.hist b { font-weight: 600; font-size: 14px; }
.hist ul { margin: 4px 0 0; padding-left: 16px; font-size: 13px; color: var(--muted); }
.hist > li.undone b, .hist > li.undone ul { color: var(--dim); text-decoration: line-through; }
.hist .tag { margin-left: 8px; }
.qt-opt { border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px; display: grid; gap: 12px; margin-bottom: 12px; }
.qt-head, .qt-foot { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.qt-head .field { flex: 1; min-width: 240px; }
table.qt { min-width: 820px; }
table.qt td { padding: 5px 6px; }
table.qt input { width: 100%; min-height: 34px; padding: 5px 8px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); font-size: 13.5px; }
table.qt input[type=number] { font-family: var(--mono); text-align: right; }
table.qt td:nth-child(1) { width: 92px; }
table.qt td:nth-child(2) input { min-width: 250px; }
table.qt td:nth-child(3) { width: 70px; }
table.qt td:nth-child(4), table.qt td:nth-child(5) { width: 104px; }
table.qt td:nth-child(6), table.qt td:nth-child(7) { width: 104px; color: var(--muted); }
.qt-sum { display: grid; justify-items: end; gap: 2px; }
.qt-sum span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.qt-sum b { font-family: var(--display); font-size: 24px; }
.qt-sum small { font-size: 13px; color: var(--muted); }
img.qt-card { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r); margin-top: 8px; }
.lab-sheet details.hist-box summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.lab-dash-tools { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.lab-dash-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.kpis.small { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 12px 0; }
@media (max-width: 1000px) { .kpis, .kpis.small { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 4px; align-content: start; }
.kpi span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kpi b { font-family: var(--display); font-size: 22px; font-variant-numeric: tabular-nums; }
.kpis.small .kpi b { font-size: 18px; }
.kpi small { font-size: 12px; color: var(--dim); }
.kpi.neg b { color: var(--err); }
.kpi.ok b { color: var(--ok); }
.lab-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; display: grid; gap: 10px; align-content: start; }
.lab-panel.year-end { grid-template-columns: 1fr auto; align-items: center; border-color: var(--warn); }
.lab-panel .table-wrap { background: var(--bg); }
.lab-panel table.lab th { background: var(--bg); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel-head h3 { font-size: 17px; text-transform: uppercase; letter-spacing: .04em; }
.lab-panel details summary { cursor: pointer; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.lab-two { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 1000px) { .lab-two { grid-template-columns: 1fr; } }
.queue { list-style: none; margin: 0; padding: 0; display: grid; }
.queue li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.queue li:last-child { border-bottom: 0; }
.queue li > b { font-family: var(--mono); font-size: 15px; color: var(--dim); text-align: right; }
.queue li.hot > b { color: var(--warn); }
.queue li span { display: block; font-size: 14px; }
.queue li small { display: block; font-size: 12px; color: var(--dim); }
.queue li:not(.hot) span { color: var(--muted); }
.lab-chart { width: 100%; height: auto; display: block; }
.lab-chart .b-rev { fill: #5f8fc9; }
.lab-chart .b-net { fill: #e0141c; }
.lab-chart path { stroke: var(--panel); stroke-width: 1; }
.lab-chart path:hover { opacity: .8; }
.lab-chart .grid { stroke: var(--line); stroke-width: 1; }
.lab-chart .base { stroke: var(--line-2); stroke-width: 1; }
.lab-chart .ax { fill: var(--dim); font-family: var(--mono); font-size: 11px; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.legend .sw.rev { background: #5f8fc9; }
.legend .sw.net { background: #e0141c; }
.sheet.lab-sheet { width: min(980px, 100%); }
.lab-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; align-items: start; }
.lab-grid .field { align-content: start; }   /* boxes line up along the top of each row, whatever hint sits under a neighbour */
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) { .lab-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.lab-grid .span2 { grid-column: span 2; }
.lab-calc { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.lab-calc > div { background: var(--panel-2); padding: 10px 12px; display: grid; gap: 2px; }
.lab-calc span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.lab-calc b { font-family: var(--mono); font-size: 14px; font-weight: 500; }
.lines-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

footer.site { position: relative; overflow: hidden; margin-top: 24px; padding-top: 52px; color: var(--muted); font-size: 15px; background: linear-gradient(180deg, transparent, rgba(224, 20, 28, .05)); border-top: 1px solid var(--line); }
footer.site::before { content: ""; position: absolute; top: -1px; left: 50%; width: min(720px, 80%); height: 2px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--red), transparent); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.1fr 1.1fr; gap: 40px; position: relative; z-index: 1; }
.foot-brand img { height: 48px; width: auto; }
.foot-tag { margin-top: 14px; font-family: var(--display); font-weight: 700; font-size: 20px; text-transform: uppercase; letter-spacing: .01em; }
.foot-tag .chrome { background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.foot-tag .red { color: var(--red); }
.foot-expand { margin-top: 4px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.foot-brand > p.muted { margin-top: 12px; max-width: 36ch; }
.foot-perks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.foot-perks li { display: flex; gap: 10px; align-items: baseline; }
.foot-perks li::before { content: ""; flex: none; width: 8px; height: 8px; transform: translateY(-1px) rotate(45deg); background: var(--red); }
.foot-col { display: grid; align-content: start; gap: 10px; }
.foot-col h4 { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin: 0 0 4px; }
.foot-col > a, .foot-contact a { color: var(--muted); text-decoration: none; width: fit-content; transition: color .15s, transform .15s; }
.foot-col > a:hover, .foot-col > a:focus-visible, .foot-contact a:hover { color: var(--fg); transform: translateX(3px); }
.foot-contact { display: grid; gap: 2px; }
.foot-contact small { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.foot-contact + .foot-contact { margin-top: 6px; }
.foot-col .socials { display: grid; gap: 10px; justify-items: start; }
.foot-mark { position: relative; z-index: 0; margin-top: 36px; text-align: center; font-family: var(--display); font-weight: 700; font-size: clamp(64px, 15vw, 210px); line-height: .8; letter-spacing: .04em; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .07); background: linear-gradient(180deg, rgba(224, 20, 28, .14), transparent 75%); -webkit-background-clip: text; background-clip: text; user-select: none; pointer-events: none; white-space: nowrap; }
.foot-bottom { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding-block: 18px calc(22px + env(safe-area-inset-bottom, 0px)); margin-top: -12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.foot-loc { display: inline-flex; align-items: center; gap: 8px; }
.foot-loc .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(224, 20, 28, .6); animation: footPulse 2.4s ease-out infinite; }
@keyframes footPulse { 0% { box-shadow: 0 0 0 0 rgba(224, 20, 28, .55); } 100% { box-shadow: 0 0 0 9px rgba(224, 20, 28, 0); } }
.to-top { color: var(--muted); text-decoration: none; }
.to-top:hover { color: var(--fg); }
@media (max-width: 960px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .foot-grid { gap: 32px 20px; } .foot-grid > .foot-col:last-child { grid-column: 1 / -1; } .foot-col .socials { grid-auto-flow: column; justify-content: start; } .foot-bottom { flex-direction: column; align-items: flex-start; } }
@media (max-width: 400px) { .foot-col .socials { grid-auto-flow: row; } }
.foot-contact a { overflow-wrap: anywhere; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) { footer.site { padding-bottom: 64px; } }
.socials a { color: var(--muted); display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; min-height: 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); text-decoration: none; transition: color .15s, border-color .15s; }
.socials a:hover, .socials a:focus-visible { color: var(--brand); border-color: var(--brand); }
.socials a:hover span, .socials a:focus-visible span { color: var(--fg); }
.socials svg { width: 18px; height: 18px; flex: none; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 50; background: var(--panel-2); border: 1px solid var(--line-2); border-left: 3px solid var(--red); padding: 12px 16px; border-radius: var(--r); font-size: 14px; max-width: min(520px, calc(100vw - 32px)); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) { .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
/* ===== Phone layout (up to 760 px wide, or a touch screen up to 500 px tall: a phone turned sideways).
   Computers keep everything above unchanged. ===== */
.m-tools, .m-only, .sum-close, .spec-more { display: none; }
.wa-acts { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.mobile-bar[hidden] { display: none !important; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  :root { --hh: 53px; }
  html.m-lock { overflow: hidden; }   /* the page only: hiding body too makes it the scroll box and unpins the header */
  .m-only { display: revert; }
  .m-hide { display: none; }
  /* Header: logo, WhatsApp and a menu button; the menu opens full screen under the bar. */
  header.top .wrap { flex-wrap: nowrap; gap: 8px; padding-block: 0; min-height: var(--hh); }
  .brand img { height: 30px; }
  .m-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
  .m-wa { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 12px; border: 1px solid color-mix(in srgb, var(--ok) 55%, var(--line-2)); border-radius: 999px; color: var(--fg); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
  .m-wa svg { width: 18px; height: 18px; color: var(--ok); }
  .m-menu { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); cursor: pointer; }
  .m-menu span, .m-menu span::before, .m-menu span::after { display: block; width: 18px; height: 2px; background: var(--fg); border-radius: 1px; position: relative; transition: transform .2s, background .2s; }
  .m-menu span::before, .m-menu span::after { content: ""; position: absolute; left: 0; }
  .m-menu span::before { top: -6px; } .m-menu span::after { top: 6px; }
  header.top.menu-open .m-menu span { background: transparent; }
  header.top.menu-open .m-menu span::before { transform: translateY(6px) rotate(45deg); }
  header.top.menu-open .m-menu span::after { transform: translateY(-6px) rotate(-45deg); }
  nav.main { display: none; }
  header.top.menu-open nav.main { display: flex; flex-direction: column; gap: 0; position: absolute; top: 100%; left: 0; right: 0; width: auto; height: calc(100dvh - var(--hh) - env(safe-area-inset-top, 0px)); overflow-y: auto; margin: 0; padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: var(--bg); border-top: 1px solid var(--line); }
  header.top.menu-open nav.main a { font-size: 22px; padding: 18px 4px 18px 14px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; color: var(--fg); }
  header.top.menu-open nav.main a[aria-current="page"] { border-bottom-color: var(--line); border-left-color: var(--red); color: var(--red-hi); }
  header.top.menu-open nav.main a.admin-link { color: var(--warn); }

  /* Type, spacing and forms. 16 px inputs stop iPhones zooming in on tap. */
  section.view { padding-block: 22px 56px; }
  .view-head { gap: 8px; margin-bottom: 20px; }
  .view-head h1 { font-size: 30px; }
  .view-head p { font-size: 16px; }
  input, select, textarea, .lab-search, .sort select { font-size: 16px !important; }
  /* iPhone Safari draws date and month boxes at their own fixed width, centred, so they stick out of the form */
  input[type="date"], input[type="month"], input[type="time"] { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; text-align: left; }
  input[type="date"]::-webkit-date-and-time-value, input[type="month"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
  .sec-head { margin-bottom: 16px; }
  .sec-head h2, .sec-title, .feature-head h2 { font-size: 28px; }
  .sec-head > p { font-size: 15px; }
  .home-sec { margin-top: 48px; }
  .feature + .home-sec { margin-top: 40px; }

  /* Swipe rows: cards side by side, the next one peeking in from the right. */
  #featBeats, .process, .rez-grid, #homeFolioCards, .preset-cards { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; overscroll-behavior-x: contain; margin-inline: -16px; padding: 0 16px 6px; scrollbar-width: none; }
  #featBeats::-webkit-scrollbar, .process::-webkit-scrollbar, .rez-grid::-webkit-scrollbar, #homeFolioCards::-webkit-scrollbar, .preset-cards::-webkit-scrollbar { display: none; }
  #featBeats > *, .process > li, .rez-grid > *, #homeFolioCards > * { flex: 0 0 86%; scroll-snap-align: start; }

  /* Home */
  .hero { padding-block: 18px 4px; gap: 18px; }
  .hero h1 { font-size: 36px; margin-top: 10px !important; }
  .hero .eyebrow { font-size: 11px; letter-spacing: .1em; }
  .hero .lede { font-size: 16px; margin-top: 12px; }
  .hero .ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
  .hero .ctas .btn { padding: 10px 8px; font-size: 13px; }
  .hero .readout { padding: 16px; }
  .hero-stage { padding-top: min(340px, 82vw); }
  .readout .rd-specs { font-size: 13px; }
  .home .services { gap: 8px; }
  .home .service { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 14px 16px; }
  .home .service .eyebrow { grid-column: 1; font-size: 11px; }
  .home .service h3 { grid-column: 1; font-size: 19px; }
  .home .service p { display: none; }
  .home .service .go { grid-column: 2; grid-row: 1 / span 2; font-size: 0; }
  .home .service .go::after { content: "→"; font-size: 22px; }
  .feature { margin-top: 44px; }
  .feature-head .tag { display: none; }
  .scrolly { margin-top: 14px; }
  .stage { position: relative; top: auto; height: 250px; padding: 10px; }
  .stage-foot { font-size: 12px; }
  .stage-foot b { font-size: 18px; }
  .swipe-hint { margin: 12px 0 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
  .beats { margin-top: 0; align-items: start; }
  #featPi > div:last-child:not(.pim) { display: none; }
  .beat { opacity: .55; }
  .beat:last-child { padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); gap: 8px; }
  .beat-card { height: 100%; align-content: start; }
  .beat p { font-size: 15px; }
  .beat .bigpi b { font-size: 48px; }
  .beat .pim.big .pim-val { font-size: 52px; }
  .beat .ctas { display: grid; gap: 8px; }
  .process { padding-left: 16px; }
  .process::before, .process::after { display: none; }
  .process li { padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); border-top: 2px solid var(--red); }
  .process h3 { font-size: 20px; }
  .process p { font-size: 15px; }
  .rez-top h3 { font-size: 22px; }
  .rez-shot { aspect-ratio: 16 / 6; }
  .shelf { padding: 18px; }
  .shelf h2 { font-size: 26px; }
  .shelf .ctas { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; }
  .shelf .ctas .btn { padding: 10px 8px; font-size: 13px; }

  /* Product cards (Pre-Built, Portfolio) */
  .cards { gap: 14px; }
  .pcard .body { padding: 14px; gap: 12px; }
  .pcard h3 { font-size: 18px; }
  .pcard .shot { padding: 14px; }
  .pcard.folio .specs.full:not(.open) > :nth-child(n + 7) { display: none; }
  .spec-more { display: block; justify-self: start; font-size: 14px; margin-top: -4px; }
  .pcard .actions .btn, .pcard.folio .actions .btn { flex: 1 1 auto; }

  /* Upgrade Lab: two parts across, filters in one sideways row */
  .services.two { gap: 10px; margin-top: 16px; }
  .service.up { min-height: 0; padding: 16px; gap: 6px; }
  .service.up > :not(.up-art) { max-width: 66%; }
  .service.up p { font-size: 14px; }
  .service.up h3 { font-size: 20px; }
  .shop-head h2 { font-size: 24px !important; }
  .shop-filter, .list-tools .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px !important; padding: 0 16px 4px; scrollbar-width: none; }
  .shop-filter::-webkit-scrollbar, .list-tools .chips::-webkit-scrollbar { display: none; }
  .shop-filter .chip, .list-tools .chip { flex: none; }
  #shopCards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #shopCards .pcard.part { padding: 6px; }
  #shopCards .pcard.part .body { padding: 8px 6px 6px; gap: 8px; }
  #shopCards .pcard.part .tags .tag:first-child:not(:only-child) { display: none; }
  #shopCards .pcard.part .tags .tag { font-size: 10px; padding: 2px 6px; }
  #shopCards .pcard.part h3 { font-size: 14px; line-height: 1.25; }
  #shopCards .pcard.part .muted { font-size: 12.5px !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  #shopCards .pcard.part .row { gap: 2px 8px; }
  #shopCards .pcard.part .price { font-size: 18px; }
  #shopCards .pcard.part .row .mono { font-size: 11px !important; }
  #shopCards .pcard.part .actions { display: grid; }
  #shopCards .pcard.part .actions .btn { width: 100%; padding: 6px 4px; font-size: 11.5px; letter-spacing: .02em; }
  #shopCards .pcard .shot .tag.count { top: 6px; right: 6px; font-size: 9.5px; padding: 2px 5px; }
  #upgradeForm, #askForm { padding: 16px !important; }

  /* Contact: WhatsApp and Call first, full width */
  .list-panel > div { padding: 14px; flex-direction: column; align-items: flex-start; gap: 10px; }   /* every button under its text */
  #contactList > div:first-child .wa-acts { display: grid; grid-template-columns: 1fr auto; width: 100%; }
  #contactList > div:first-child .btn { min-height: 46px; font-size: 15px; }

  /* Configurator: 3D preview, then a pinned row of step chips, the parts list, and the bottom bar.
     Review & send opens the build summary full screen. */
  .cfg { gap: 14px; }
  .cfg-side { display: contents; }
  .cfg-side .cfg-preview canvas { height: 170px; }
  .cfg-steps { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--hh)); z-index: 12; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 8px 16px; background: color-mix(in srgb, var(--bg) 96%, transparent); border-bottom: 1px solid var(--line); }
  .cfg-steps::-webkit-scrollbar { display: none; }
  .cfg-side .cfg-step, .cfg-step { flex: none; width: auto; grid-template-columns: 18px auto; gap: 6px; padding: 6px 12px 6px 7px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); }
  .cfg-step .dot { grid-row: auto; width: 18px; height: 18px; font-size: 9px; }
  .cfg-step .lbl { font-size: 12px; white-space: nowrap; }
  .cfg-step .pick { display: none; }
  .cfg-step[aria-current="step"] { border-color: var(--red); background: var(--red-wash); }
  .presets { margin-bottom: 14px; }
  .preset-cards { flex: 1 1 100%; }
  .preset { flex: 0 0 46%; scroll-snap-align: start; padding: 10px 12px; }
  .preset b { font-size: 13px; }
  .preset .mono { font-size: 11px; }
  .tray-head { margin-bottom: 10px; }
  .tray-head h2 { font-size: 22px; }
  .list-tools { gap: 8px; }
  .list-tools .chips { flex: 1 1 100%; }
  .opt { gap: 2px 10px; padding: 11px 12px; }
  .opt .name { font-size: 15px; line-height: 1.3; }
  .opt .spec { font-size: 11.5px; }
  .opt .p { font-size: 14px; }
  .opt .note { font-size: 12.5px; }
  .fit-fix { padding: 10px 12px; font-size: 13.5px; }
  .fit-fix .msg { flex-basis: 100%; }
  .summary { scroll-margin-top: calc(var(--hh) + 50px); }
  body.sum-open .summary { position: fixed; inset: 0; z-index: 35; overflow-y: auto; overscroll-behavior: contain; border: 0; border-radius: 0; padding: calc(12px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); align-content: start; }
  body.sum-open .sum-close { display: inline-flex; position: sticky; top: 0; z-index: 1; justify-self: start; align-items: center; min-height: 44px; padding: 8px 14px; margin: 0 0 -4px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel-2); color: var(--fg); font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
  .mobile-bar { background: color-mix(in srgb, var(--panel) 96%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--line-2); }

  /* Pop-ups fill the screen */
  .sheet-back { padding: 0; place-items: stretch; }
  .sheet { width: 100%; max-height: none; height: 100%; border: 0; border-radius: 0; padding: calc(18px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); align-content: start; }
  .sheet h2 { font-size: 22px; }
  .sheet { grid-template-columns: minmax(0, 1fr); }   /* a wide parts-lines table scrolls in its own box instead of widening the pop-up */
  body:has(#sheetHost > *) .fps-adminbar, body.sum-open .fps-adminbar { display: none; }   /* the hosted sign-in bar would cover Save */
  #view-admin { padding-bottom: 96px; }
  .sheet .bar-row { position: sticky; bottom: calc(-24px - env(safe-area-inset-bottom, 0px)); margin-inline: -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--panel); border-top: 1px solid var(--line); }
  .sheet .bar-row .btn { flex: 1 1 auto; }

  /* Admin: quick checks and actions work in place; wide tables scroll sideways. */
  .bk-bar { padding: 8px 10px; gap: 6px 10px; font-size: 13px; }
  .bk-bar .btn { min-height: 34px; padding: 6px 10px; font-size: 12px; }
  .admin-tabs { margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tabs button { padding: 10px 10px; font-size: 14px; }
  .lab-two { grid-template-columns: minmax(0, 1fr); }
  .lab-panel { grid-template-columns: minmax(0, 1fr); }   /* a wide table inside scrolls in its own box instead of stretching the panel */
  .lab-panel.year-end { grid-template-columns: 1fr; }
  .lab-search { width: 100%; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .lead { padding: 14px; }
  .lead-head h3 { font-size: 18px; }

  /* Phone review fixes (v73) */
  .btn.m-only { display: inline-flex; }
  .parts-mini.m-only { display: grid; }
  .rez { min-width: 0; }
  .rez-top { flex-direction: column; gap: 6px; }
  .rez-top > div { min-width: 0; }
  .rez-price { text-align: left; }
  .rez-price .eyebrow { display: none; }
  .rez-price b { margin-top: 0; font-size: 20px; }
  .rez-shot { min-width: 0; aspect-ratio: auto; padding-top: 44px; }
  .rez-shot .gpu { font-size: 26px; overflow-wrap: anywhere; }
  .rez-shot .tier { top: 10px; right: 10px; font-size: 10px; }
  .rez-body { min-width: 0; }
  .rez-foot .btn { width: 100%; }
  body:not(.sum-open) .summary { display: none; }
  .summary .parts-mini { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .summary h2, .summary .sub, .summary .pim-sub, .summary .fineprint { overflow-wrap: anywhere; }
  .opt .spec, .fit-note { font-size: 13px; }
  .pcard.part .tags .tag, #shopCards .pcard.part .tags .tag { font-size: 12px; }
  #shopCards .pcard.part { display: flex; flex-direction: column; }
  #shopCards .pcard.part .body { flex: 1; display: flex; flex-direction: column; }
  #shopCards .pcard.part .actions { margin-top: auto; }
  #shopCards .pcard.part .actions .btn { min-height: 40px; font-size: 12.5px; }
  .service.up .up-art { width: 34%; }
  /* Bigger tap areas, same look */
  .pim-help { position: relative; }
  .pim-help::after { content: ""; position: absolute; inset: -11px; }
  .spec-more, [data-clear], .summary [data-pi-help] { padding-block: 10px; margin-block: -10px; }
  .foot-col { gap: 0; }
  .foot-col h4 { margin-bottom: 6px; }
  .foot-col > a { padding-block: 10px; }
  .sheet .bar-row .btn, .enq-quick .btn { min-height: 44px; }
  form { scroll-margin-top: calc(var(--hh) + 12px); }
  .sheet:has(> .bar-row) { padding-bottom: 0; }
  .sheet:has(> .bar-row) > .bar-row { bottom: 0; }
  /* Admin backup banner on one line: status and Back up now */
  .bk-status small, .bk-bar .bk-at, .bk-actions [data-bk-folder] { display: none; }
  .bk-bar { flex-wrap: nowrap; }
  .bk-bar .bk-actions { flex-wrap: nowrap; }
  .bk-bar:has(.bk-restore) { flex-wrap: wrap; }

  /* Footer */
  .foot-perks { display: none; }
}
/* Phone, tall enough: the 3D build stays pinned under the header while its caption, the presets and the parts scroll
   underneath, so each pick shows on the model straight away (like the sticky left column on a computer). */
@media (max-width: 760px) and (min-height: 600px) {
  :root { --pv: 150px; }
  .cfg-side .cfg-preview { display: contents; }
  .cfg-side .cfg-preview canvas { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--hh)); z-index: 13; height: var(--pv); margin-inline: -16px; width: calc(100% + 32px); border-bottom: 1px solid var(--line);
    background: radial-gradient(90% 70% at 50% 85%, rgba(224, 20, 28, .22), transparent 70%), linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 24px 24px, #0f1012; }
  .cfg-side .cfg-preview .cap, .cfg-side .cfg-preview .seen { margin-inline: 0; }
  .cfg-steps { top: calc(env(safe-area-inset-top, 0px) + var(--hh) + var(--pv)); background: var(--bg); }
}
@media (max-width: 760px) and (min-height: 600px) and (max-height: 740px) { :root { --pv: 120px; } }
@media (max-width: 380px) {
  .hero h1 { font-size: 32px; }
  .hero .ctas .btn, .shelf .ctas .btn { font-size: 12px; padding-inline: 6px; letter-spacing: .02em; }
  .mobile-bar { gap: 8px; }
  .mobile-bar .m { gap: 10px; }
  .mobile-bar small { font-size: 9px !important; }
  .mobile-bar .btn { padding-inline: 10px; font-size: 12px; white-space: nowrap; }
  .m-wa { padding-inline: 10px; }
}

/* Admin sign-in and the signed-in admin bar (web/shim.js). Uses the site's colour tokens. */
.fps-gate { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 16px; background: rgba(8, 9, 11, .92); backdrop-filter: blur(6px); overflow-y: auto; }
.fps-gate-card { width: min(420px, 100%); background: var(--panel, #141619); border: 1px solid var(--line, #2a2e34); border-radius: 14px; padding: 28px 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.fps-gate h2 { margin: 0 0 8px; font-size: 22px; }
.fps-gate-sub { margin: 0 0 18px; color: var(--muted, #9aa1ab); font-size: 15px; line-height: 1.5; }
.fps-gate-form { display: grid; gap: 12px; }
.fps-gate-form label { display: grid; gap: 6px; font-size: 14px; color: var(--muted, #9aa1ab); }
.fps-gate-form input, .fps-gate-form select { font: inherit; font-size: 16px; color: var(--fg, #eceef1); background: var(--panel-2, #1b1e22); border: 1px solid var(--line-2, #383d45); border-radius: 8px; padding: 10px 12px; }
.fps-gate-form input:focus-visible, .fps-gate-form select:focus-visible { outline: 2px solid var(--red-hi, #ff3b42); outline-offset: 1px; }
.fps-gate-form .btn { justify-content: center; }
.fps-gate-hint { margin: 0; color: var(--dim, #80878f); font-size: 13px; }
.fps-gate-hint code, .fps-gate-key code { word-break: break-all; }
.fps-gate-msg { margin: 0; min-height: 1.2em; font-size: 14px; color: var(--muted, #9aa1ab); }
.fps-gate-msg.bad { color: var(--red-hi, #ff3b42); }
.fps-gate-alt { margin: 14px 0 0; font-size: 14px; }
.fps-gate-leave { display: inline-block; margin-top: 14px; font-size: 14px; color: var(--muted, #9aa1ab); }
.fps-gate-qr { display: block; margin: 0 auto 12px; background: #fff; border-radius: 8px; padding: 8px; }
.fps-gate-key { margin-bottom: 14px; font-size: 14px; color: var(--muted, #9aa1ab); }
.fps-gate-key code { display: block; margin-top: 6px; padding: 8px; background: var(--panel-2, #1b1e22); border-radius: 6px; color: var(--fg, #eceef1); }
.fps-adminbar { position: fixed; right: 12px; bottom: 12px; z-index: 800; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; max-width: calc(100vw - 24px); padding: 8px 14px; font-size: 13px; color: var(--muted, #9aa1ab); background: var(--panel, #141619); border: 1px solid var(--line, #2a2e34); border-radius: 10px; }
.fps-adminbar[hidden] { display: none; }
.fps-ts { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 9500; }
