/* ============================================================
   CFTEN Ltd — Design System  (v2.1 · Monochrome Industrial)
   Aesthetic: premium, spacious, graphite + white, Oswald + IBM Plex Sans.
   One accent: copper (--accent #a0522d) on links, buttons, active states, stats and the search; green (--ok) for stock.
   Single source of truth — every page uses these classes.
   Sections alternate white (.bg-surface) and grey (.bg-alt); the footer is the only dark block.
   ============================================================ */

:root{
  /* ---- Greyscale ladder (all text colours meet WCAG AA on their surfaces) ---- */
  --ink:#1f1f1f;            /* wordmark, footer background, strongest UI */
  --heading:#2e2e2e;        /* H1 / H2 */
  --heading-soft:#444;      /* H3 / secondary headings */
  --body:#666;              /* body copy */
  --muted:#6b6b6b;          /* captions, labels, placeholder notes — 4.7:1 on the darkest light surface */
  --hairline:#e2e2e2;       /* 1px rules, borders */
  --hairline-strong:#cfcfcf;
  --surface:#fff;           /* default background */
  --surface-alt:#f5f5f4;    /* alternate section */
  --surface-sink:#ededec;   /* placeholder fill */

  /* ---- Accent (19 Oct 2026): copper for links, buttons and active states; green for stock status ---- */
  --accent:#a0522d;         /* copper — chosen by Ryley 19 Oct 2026 over steel blue (#1d4f7c / #163d60 / #e9f0f6) */
  --accent-strong:#7f3f21;
  --accent-soft:#f6ece5;
  --ok:#2a7a4b;

  /* ---- On-dark (footer only) ---- */
  --on-dark:#d4d4d4;        /* footer body text */
  --on-dark-soft:#b8b8b8;
  --on-dark-muted:#9a9a9a;  /* footer labels / small print — 5.9:1 on --ink */
  --on-dark-hairline:rgba(255,255,255,.14);

  /* ---- Fonts ---- */
  --f-head:"Oswald","Arial Narrow",system-ui,sans-serif;
  --f-body:"IBM Plex Sans",system-ui,-apple-system,"Segoe UI",sans-serif;

  /* ---- Spacing (8pt) ---- */
  --sp-1:8px; --sp-2:16px; --sp-3:24px; --sp-4:32px; --sp-5:48px; --sp-6:64px;

  /* ---- Measures ---- */
  --measure:60ch; --measure-wide:760px; --text-col:640px;

  --header-h:76px;
  /* header bar: a distinct deep-copper band (the page below stays white/grey) */
  --head-bg:#7d3a1b; --head-bg-2:#6b3117; --head-ink:#fff; --head-soft:rgba(255,255,255,.84); --head-accent:#f6c9a4;
  --nav-gap:clamp(20px,2.5vw,40px);
  --ease:cubic-bezier(0.22,0.61,0.36,1);
  --container:1240px;
}

/* ---- Reset ---- */
*,*::before,*::after{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body{
  font-family:var(--f-body); background:var(--surface); color:var(--body);
  font-size:18px; line-height:1.6;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
body.nav-open{ overflow:hidden; }
img{ max-width:100%; height:auto; display:block; }
[hidden]{ display:none!important; }   /* the hidden attribute must win over component display rules */
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; }
button{ font:inherit; cursor:pointer; border:none; background:none; color:inherit; }
main:focus{ outline:none; }

/* ---- Focus & skip link (keyboard accessibility) ---- */
:focus-visible{ outline:2px solid var(--accent); outline-offset:3px; }
.site-footer :focus-visible{ outline-color:#fff; }
.skip-link{ position:absolute; left:8px; top:-60px; z-index:200; background:var(--accent); color:#fff; font-family:var(--f-head); font-weight:500; font-size:14px; letter-spacing:.06em; text-transform:uppercase; padding:12px 20px; transition:top .2s var(--ease); }
.skip-link:focus{ top:8px; }

/* ---- Layout primitives ---- */
.container{ max-width:var(--container); margin-inline:auto; padding-inline:clamp(24px,5vw,80px); }
.section{ padding-block:clamp(36px,4.2vw,60px); }
.bg-surface{ background:var(--surface); }
.bg-alt{ background:var(--surface-alt); }

/* ---- Typography ---- */
h1,h2,h3,h4{ font-family:var(--f-head); font-weight:600; color:var(--heading); }
h1{ font-size:clamp(36px,4.6vw,60px); line-height:1.06; letter-spacing:-.025em; max-width:20ch; }
h2{ font-size:clamp(26px,3.2vw,36px); line-height:1.14; letter-spacing:-.02em; max-width:26ch; }
h3{ font-size:clamp(21px,2vw,24px); line-height:1.15; letter-spacing:-.01em; font-weight:500; color:var(--heading-soft); }
p{ color:var(--body); max-width:680px; }
strong{ font-weight:600; color:var(--heading-soft); }

.lead{ font-size:clamp(18px,1.5vw,20px); line-height:1.55; color:var(--body); max-width:var(--text-col); }

/* Section heading block */
/* section headings sit centred above full-width content, so the page reads with equal space either side */
.sec-head{ margin:0 auto var(--sp-4); max-width:var(--measure); text-align:center; }
.sec-head h2, .sec-head h1{ margin-inline:auto; }
.sec-head .lead{ margin:var(--sp-2) auto 0; }

/* ---- Header / nav: deep-copper bar — logo · wide search · links · basket · phone & email ---- */
.site-header{
  position:sticky; top:0; z-index:100; color:var(--head-ink);
  background:linear-gradient(180deg,var(--head-bg) 0%,var(--head-bg-2) 100%);
  border-bottom:1px solid #56260f; transition:box-shadow .3s var(--ease);
}
.site-header.is-scrolled{ box-shadow:0 10px 28px -16px rgba(0,0,0,.5); }
.site-header :focus-visible{ outline-color:#fff; }
/* inside the white panels (dropdowns, suggestions) the focus ring goes back to copper */
.site-header .dropdown :focus-visible, .site-header .suggest :focus-visible{ outline-color:var(--accent); }
/* the bar spans the full width with a small, equal edge margin */
.site-header > .container{ max-width:none; padding-inline:clamp(16px,2vw,28px); }
.nav{ min-height:var(--header-h); display:flex; align-items:center; gap:clamp(16px,1.8vw,28px); }
.brand{ display:inline-flex; flex:none; color:var(--head-ink); line-height:0; }
.nav > .brand{ margin-right:auto; }   /* no search bar (22 Nov 2026): logo on the left, links, basket and contact on the right */
/* desktop bar (22 Nov 2026): logo left · six links centred across the bar · phone and email right */
@media (min-width:1121px){
  .site-header:not(.admin-header) .nav{ display:grid; grid-template-columns:1fr auto 1fr; }
  .site-header:not(.admin-header) .nav > .brand{ justify-self:start; margin-right:0; }
  .site-header:not(.admin-header) .nav > .nav-links{ justify-self:center; gap:clamp(20px,2.6vw,44px); }
  .site-header:not(.admin-header) .nav > .nav-contact{ justify-self:end; }
}
.brand small{ display:block; font-family:var(--f-head); font-size:11px; font-weight:500; letter-spacing:.18em; text-transform:uppercase; line-height:1; color:var(--muted); margin-top:8px; }
/* outlined wordmark from tools/make-logo.py: CFTEN + LTD. set vertically */
.logo{ display:block; height:46px; width:auto; }
.logo-ltd{ fill:var(--head-accent); }
.brand:hover .logo-ltd{ fill:#fff; }

.nav-links{ display:flex; align-items:center; align-self:stretch; gap:clamp(16px,1.6vw,26px); white-space:nowrap; flex:none; }
.nav-links > .has-dropdown{ align-self:stretch; }   /* full bar height, so the dropdown opens at the bar's bottom edge */
.nav-links a{
  font-family:var(--f-head); font-weight:500; font-size:15px;
  letter-spacing:.08em; text-transform:uppercase; color:var(--head-ink);
  position:relative; padding-block:8px; white-space:nowrap;
}
.nav-links a::after{ content:""; position:absolute; left:0; bottom:-2px; height:2px; width:0; background:var(--head-accent); transition:width .3s var(--ease); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after,
.nav-links a.is-section::after{ width:100%; }
.nav-links a[aria-current="page"], .nav-links a.is-section{ font-weight:600; }
.nav-menu-contact{ display:none; }

/* phone above, email below — where "Get in touch" used to be */
.nav-contact{ display:flex; flex-direction:column; align-items:flex-end; gap:3px; flex:none; line-height:1.15; }
.nav-phone{ font-family:var(--f-head); font-weight:600; font-size:19px; letter-spacing:.03em; color:#fff; }
.nav-email{ font-size:13.5px; color:var(--head-soft); }
.nav-phone:hover, .nav-email:hover{ color:#fff; text-decoration:underline; text-underline-offset:3px; }

.nav-toggle{ display:none; width:44px; height:44px; flex:none; }
.nav-toggle span{ display:block; width:22px; height:2px; background:#fff; margin:5px auto; transition:transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle.is-open span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2){ opacity:0; }
.nav-toggle.is-open span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* ---- Header search: takes the free space in the bar; submits to components.html?q= ---- */
.sr-only{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.nav-search{
  position:relative; display:flex; align-items:center; flex:1 1 420px; min-width:200px; max-width:900px; height:46px; margin-inline:auto;   /* on very wide screens it centres in the free space and the right-hand group stays at the edge */
  background:#fff; border:2px solid transparent; border-radius:4px; transition:border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.nav-search:focus-within{ border-color:var(--head-accent); box-shadow:0 0 0 3px rgba(246,201,164,.35); }
.nav-search input{ flex:1; min-width:0; height:100%; border:0; background:transparent; font:inherit; font-size:16px; color:var(--heading); padding:0 16px; outline:none; border-radius:4px 0 0 4px; }
.nav-search input::placeholder{ color:var(--muted); }
.nav-search input::-webkit-search-cancel-button{ -webkit-appearance:none; }
.nav-search button{ width:56px; height:100%; flex:0 0 56px; display:inline-flex; align-items:center; justify-content:center; color:#fff; background:var(--ink); border-radius:0 2px 2px 0; }
.nav-search button:hover{ background:#000; }
.nav-search .suggest{ top:calc(100% + 6px); left:-2px; right:-2px; min-width:320px; border:1px solid var(--hairline); color:var(--body); }

/* ---- Capabilities disclosure (hover for mouse, button for keyboard/touch) ---- */
.has-dropdown{ position:relative; display:inline-flex; align-items:center; }
.dd-toggle{ display:inline-flex; align-items:center; justify-content:center; width:24px; height:32px; margin-left:2px; color:var(--head-soft); }
.dd-toggle .caret{ font-size:9px; display:block; transition:transform .2s var(--ease); }
.has-dropdown:hover .caret, .has-dropdown.is-open .caret{ transform:rotate(180deg); }
.dropdown{
  position:absolute; top:100%; left:-12px; min-width:300px; background:var(--surface);
  border:1px solid var(--hairline); box-shadow:0 14px 34px -18px rgba(0,0,0,.3);
  padding:10px; display:grid; gap:2px;
  opacity:0; visibility:hidden; transform:translateY(8px);
  transition:opacity .2s var(--ease), transform .2s var(--ease), visibility .2s; z-index:120;
}
.dropdown::before{ content:""; position:absolute; top:-12px; left:0; right:0; height:12px; }
.nav-links > .has-dropdown:nth-last-child(2) .dropdown{ left:auto; right:-12px; }   /* the last group opens leftwards so it never leaves the viewport */
.has-dropdown:hover .dropdown, .has-dropdown.is-open .dropdown{ opacity:1; visibility:visible; transform:none; }
.nav-links .dropdown a{
  display:block; padding:11px 16px; font-family:var(--f-head); font-weight:500;
  font-size:13px; letter-spacing:.05em; text-transform:uppercase; color:var(--ink);
  white-space:nowrap; transition:background .2s var(--ease);
}
.nav-links .dropdown a::after{ content:none; }
.nav-links .dropdown a:hover, .nav-links .dropdown a[aria-current="page"]{ background:var(--surface-alt); }

/* ---- Buttons & links ---- */
.btn{
  display:inline-flex; align-items:center; gap:10px;
  font-family:var(--f-head); font-weight:500; font-size:14px;
  letter-spacing:.08em; text-transform:uppercase;
  padding:14px 28px; background:transparent; color:var(--accent);
  border:1px solid var(--accent); border-radius:0;
  transition:background .3s var(--ease), color .3s var(--ease);
}
.btn:hover{ background:var(--accent); color:#fff; }
.btn .arr{ transition:transform .3s var(--ease); }
.btn:hover .arr{ transform:translateX(4px); }
.btn--lg{ padding:18px 34px; font-size:15px; }

.tlink{
  display:inline-flex; align-items:center; gap:8px;
  font-weight:500; font-size:16px; color:var(--accent); position:relative;
}
.tlink--inherit{ font-size:inherit; }
.tlink::after{ content:""; position:absolute; left:0; bottom:-3px; height:1px; width:0; background:var(--accent); transition:width .3s var(--ease); }
.tlink:hover::after{ width:100%; }
.tlink .arr{ transition:transform .3s var(--ease); }
.tlink:hover .arr{ transform:translateX(4px); }

/* ---- Dividers ---- */
.divider{ height:1px; border:0; background:var(--hairline); margin-block:var(--sp-5); }
.divider--top{ margin-top:clamp(32px,5vw,56px); }

/* ---- Hero (home) and page hero (inner): compact — the page content starts on the first screen ---- */
.hero, .page-hero{ padding-block:clamp(40px,5vw,72px); }
.page-hero{ border-bottom:1px solid var(--hairline); }
.hero .lead, .page-hero .lead{ margin-top:var(--sp-3); }
.hero-actions{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--sp-4); margin-top:var(--sp-4); }
/* a hero with no image is centred, so it has equal space either side */
.page-hero > .container:not(.split){ text-align:center; }
.page-hero > .container:not(.split) > h1, .page-hero > .container:not(.split) > .lead{ margin-inline:auto; }

/* ---- Split / editorial layout ---- */
.split{ display:grid; grid-template-columns:1fr 1fr; gap:clamp(32px,4vw,56px); align-items:center; }
/* images in two-column blocks are capped, so a block never towers over its text */
.split .placeholder, .split .media{ max-height:360px; width:100%; }
.split--text-led{ grid-template-columns:1.05fr .95fr; }
.split--narrow{ grid-template-columns:1.15fr .85fr; }
.split--gap{ margin-bottom:clamp(32px,5vw,56px); }
.split--flip > :first-child{ order:2; }   /* text first in the DOM, image shown first */
.split--flip > :last-child{ order:1; }
.split > .col-text{ max-width:var(--text-col); }
.split > *{ min-width:0; }   /* grid items may shrink, so wide content never pushes the page sideways */
:where(.split) .lead, :where(.split) p{ margin-top:var(--sp-3); }   /* component default; .mt-* utilities win */
/* single text blocks are centred in the page (equal space left and right) */
.offset-right .inner, .measure{ max-width:720px; margin-inline:auto; text-align:center; }
.offset-right .inner > *, .measure > *{ margin-inline:auto; }
.band-center{ max-width:760px; margin-inline:auto; text-align:center; }
.band-center > *{ margin-inline:auto; }

/* ---- Hairline-lattice card grid (editorial blocks) ---- */
.cards{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:1px; margin-top:var(--sp-4);
}
/* hairlines are drawn per cell, so a short last row leaves clean white space, not a grey block */
.cards > *{ box-shadow:0 0 0 1px var(--hairline); }
.cards--two{ grid-template-columns:repeat(2,1fr); }
/* Odd card count: the last card spans the full final row (no orphan gap); laid out as heading | text */
.cards--span-last > .card:last-child{ grid-column:1 / -1; min-height:0; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,2fr); gap:var(--sp-3) var(--sp-5); align-items:start; }
.cards--span-last > .card:last-child h3{ margin-bottom:0; }
.cards--span-last > .card:last-child p{ margin-top:0; max-width:64ch; }
.card{
  background:var(--surface); padding:var(--sp-4);
  display:flex; flex-direction:column; position:relative;
  transition:background .3s var(--ease);
}
.bg-alt .card{ background:var(--surface-alt); }
.card:hover{ background:var(--surface-alt); }
.bg-alt .card:hover{ background:#efefee; }
.card h3, .card .card-title{ margin-bottom:var(--sp-1); }
.card-title{ font-size:clamp(21px,2vw,24px); line-height:1.15; letter-spacing:-.01em; font-weight:500; color:var(--heading-soft); max-width:none; }
:where(.card) p{ font-size:16px; margin-top:var(--sp-1); }   /* component default; .mt-* utilities win */

/* Spec / feature list */
.spec-list{ display:grid; gap:16px; margin-top:var(--sp-4); }
.spec-list--wide{ width:fit-content; max-width:min(100%, var(--measure-wide)); margin-inline:auto; }   /* shrinks to its longest line, so the centred list has even space both sides */
.spec-list li{ position:relative; padding-left:28px; font-size:16px; line-height:1.55; color:var(--body); }
.spec-list li::before{ content:"—"; position:absolute; left:0; top:0; color:var(--muted); }

/* ---- Quantified stat strip: equal columns, centred ---- */
.stats{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:var(--sp-3);
  border-top:1px solid var(--hairline); border-bottom:1px solid var(--hairline);
  padding-block:var(--sp-3); align-items:end; text-align:center;
}
.stat{ display:flex; flex-direction:column; align-items:center; gap:6px; }
.stat .n{ font-family:var(--f-head); font-weight:600; font-size:clamp(34px,4.2vw,52px); line-height:1; letter-spacing:-.02em; color:var(--accent); }
.stat .l{ font-size:13px; font-weight:500; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); }

/* ---- Certification chips ---- */
.cert-chip{ display:inline-block; font-family:var(--f-head); font-weight:500; font-size:14px; letter-spacing:.06em; text-transform:uppercase; color:var(--heading-soft); border:1px solid var(--hairline); padding:8px 14px; }
.chip-stack{ display:flex; flex-direction:column; align-items:flex-start; gap:16px; }
.chip-row{ display:flex; flex-wrap:wrap; justify-content:center; gap:12px; }

/* Process / numbered steps */
.steps{ display:grid; grid-template-columns:repeat(4,1fr); gap:1px; background:var(--hairline); border:1px solid var(--hairline); margin-top:var(--sp-4); }
.step{ background:var(--surface); padding:var(--sp-4); }
.step .n{ font-family:var(--f-head); font-weight:600; font-size:28px; color:var(--accent); letter-spacing:-.01em; }
.step h3{ color:var(--heading); margin-top:var(--sp-2); font-size:18px; }
.step p{ color:var(--body); font-size:15px; margin-top:var(--sp-1); }

/* ---- Placeholders (calm, marked, monochrome) ---- */
.placeholder{
  position:relative; aspect-ratio:3/2; background:var(--surface-sink);
  border:1px solid var(--hairline); display:grid; place-items:center; overflow:hidden;
}
.placeholder--tall{ aspect-ratio:4/5; }
.placeholder--wide{ aspect-ratio:16/9; }
.placeholder--square{ aspect-ratio:1/1; }
.card .placeholder--square{ aspect-ratio:3/2; }   /* team photos in cards: landscape, so cards stay short */
.placeholder::before{ content:""; position:absolute; inset:0; background:repeating-linear-gradient(45deg,rgba(0,0,0,.025) 0 14px,transparent 14px 28px); }
.placeholder::after{
  content:attr(data-label); position:relative;
  font-family:var(--f-head); font-size:12px; font-weight:500; letter-spacing:.14em;
  text-transform:uppercase; color:var(--muted); text-align:center;
  padding:8px 16px; border:1px solid var(--hairline-strong); max-width:80%; line-height:1.4;
}

/* ---- Real photography ---- */
.media{ display:block; width:100%; object-fit:cover; border:1px solid var(--hairline); }
.media--photo{ aspect-ratio:940/411; }   /* native ratio of the CFTEN photos — shown uncropped */
.media--fill{ aspect-ratio:4/3; max-height:400px; }   /* home hero photo: capped so the first screen also shows what comes next */

/* ---- Map (Google Maps embed, full colour) ---- */
.map{ display:block; width:100%; aspect-ratio:21/9; min-height:300px; max-height:440px; border:1px solid var(--hairline); background:var(--surface-alt); }
/* Map placeholder: the Google map only loads after "Show map" is clicked (no Google cookies before then) */
.map--consent{ display:flex; align-items:center; justify-content:center; text-align:center; padding:24px; background:var(--surface-sink); aspect-ratio:auto; height:clamp(300px,34vw,440px); min-width:0; }
.map-consent{ max-width:440px; }
.map-consent-title{ font-weight:600; color:var(--ink); }
.map-consent-note{ margin-top:8px; color:var(--muted); font-size:.92rem; }
.map-consent-actions{ margin-top:18px; display:flex; flex-wrap:wrap; gap:12px 22px; align-items:center; justify-content:center; }

/* ---- Contact details in page content ---- */
.phone-lg{ font-family:var(--f-head); font-weight:500; font-size:28px; line-height:1.2; color:var(--ink); }
.addr{ font-style:normal; line-height:1.7; color:var(--body); }

/* Unconfirmed text / placeholder notes (calm grey, not amber) */
.tbc{ color:var(--muted); font-style:normal; }

/* ---- Footer (the only dark block on the site) ---- */
.site-footer{ background:var(--ink); color:var(--on-dark-soft); padding-block:var(--sp-5) var(--sp-3); font-size:15px; }
.footer-lead{ padding-bottom:var(--sp-4); border-bottom:1px solid var(--on-dark-hairline); }
.footer-lead{ text-align:center; }
.footer-lead h2{ color:#fff; max-width:none; }
.footer-lead p{ margin-inline:auto; }
.footer-lead p{ color:var(--on-dark); margin-top:var(--sp-3); }
.footer-grid{ display:grid; grid-template-columns:1.6fr 1fr 1fr 1.2fr; gap:var(--sp-5); padding-block:var(--sp-5) var(--sp-4); border-bottom:1px solid var(--on-dark-hairline); }
.site-footer .brand{ color:#fff; flex-direction:column; align-items:flex-start; }
.site-footer .logo{ height:40px; }
.site-footer .brand small{ color:var(--on-dark-muted); }
.footer-blurb{ color:var(--on-dark); margin-top:var(--sp-2); max-width:34ch; }
.footer-chip{ margin-top:20px; }
.site-footer .cert-chip{ color:var(--on-dark); border-color:rgba(255,255,255,.2); }
.footer-col h3{ font-family:var(--f-head); font-weight:600; font-size:13px; letter-spacing:.16em; text-transform:uppercase; color:var(--on-dark-muted); margin-bottom:var(--sp-2); }
.footer-links{ display:grid; gap:12px; }
.site-footer a:hover{ color:#fff; }
.footer-addr{ font-style:normal; line-height:1.7; color:var(--on-dark); }
.footer-addr a{ color:var(--on-dark); }
.footer-phone{ font-family:var(--f-head); font-weight:500; font-size:22px; color:#fff; }
.footer-bottom{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:16px; padding-top:var(--sp-3); font-size:13px; color:var(--on-dark-muted); }
.site-footer .tbc{ color:var(--on-dark-muted); }

/* ---- Reveal motion ---- */
.js .reveal{ opacity:0; transform:translateY(20px); transition:opacity .3s var(--ease), transform .3s var(--ease); }
.reveal.is-visible{ opacity:1; transform:none; }
.reveal[data-d="1"]{ transition-delay:.08s; }
.reveal[data-d="2"]{ transition-delay:.16s; }
.reveal[data-d="3"]{ transition-delay:.24s; }

/* ---- Utilities ---- */
.mt-2{ margin-top:var(--sp-2);} .mt-3{ margin-top:var(--sp-3);} .mt-4{ margin-top:var(--sp-4);} .mt-5{ margin-top:var(--sp-5);}
.muted{ color:var(--muted);}

/* ---- Responsive ---- */
@media (max-width:1100px){
  .steps{ grid-template-columns:1fr 1fr; }
  .footer-grid{ grid-template-columns:1fr 1fr; }
}
/* Nav: compact bar between 1025px and 1180px, menu button at 1024px and below (measured: the full bar needs ~800px) */
@media (max-width:1280px){
  .nav-links{ gap:16px; }
  .nav-links a{ font-size:14px; letter-spacing:.06em; }
  .nav-phone{ font-size:17px; }
  .nav-email{ font-size:13px; }
  .logo{ height:42px; }
}
/* tablet (≤1120px, matches main.js): links fold into the menu; logo, search, basket and contact stay in the bar */
@media (max-width:1120px){
  .nav-links{
    display:none; position:absolute; top:100%; left:0; right:0; flex-direction:column;
    align-items:flex-start; gap:var(--sp-3); background:var(--surface); white-space:normal; color:var(--ink);
    border-bottom:1px solid var(--hairline); box-shadow:0 18px 30px -20px rgba(0,0,0,.35); padding:var(--sp-4) clamp(16px,2vw,28px);
    max-height:calc(100vh - var(--header-h)); max-height:calc(100dvh - var(--header-h)); overflow-y:auto;
  }
  .nav-links a{ font-size:15px; letter-spacing:.08em; color:var(--ink); }
  .nav-links a::after{ background:var(--accent); }
  .nav-links :focus-visible{ outline-color:var(--accent); }
  .nav-links.open{ display:flex; }
  .nav-toggle{ display:block; }
  .has-dropdown{ display:block; width:100%; }
  .dd-toggle{ display:none; }   /* the list is always open in the menu */
  .dropdown{
    position:static; opacity:1; visibility:visible; transform:none;
    box-shadow:none; border:0; border-left:1px solid var(--hairline);
    margin:10px 0 4px 4px; padding:0 0 0 12px; min-width:0;
  }
  .dropdown::before{ content:none; }
  .nav-links .dropdown a{ padding:8px 0; }
}
@media (max-width:760px){
  .nav-contact{ display:none; }
  .nav-menu-contact{ display:flex; flex-direction:column; gap:8px; padding-top:var(--sp-2); border-top:1px solid var(--hairline); width:100%; }
  .nav-links .nav-menu-contact a{ font-family:var(--f-body); text-transform:none; letter-spacing:0; font-size:17px; color:var(--accent); }
  .nav-links .nav-menu-contact a::after{ content:none; }
}
/* phone: logo, basket and menu on the first row; the search gets the full second row */
@media (max-width:640px){
  .nav{ flex-wrap:wrap; gap:10px 12px; padding-block:10px; min-height:0; }
  .brand{ margin-right:auto; }
  .logo{ height:36px; }
  .nav-search{ order:5; flex:1 1 100%; max-width:none; height:44px; }
  .nav-search .suggest{ min-width:0; }
  .nav-links{ max-height:calc(100dvh - 120px); }
}
@media (max-width:900px){
  .split,.split--text-led,.split--narrow{ grid-template-columns:1fr; gap:var(--sp-5); }
  .steps{ grid-template-columns:1fr; }
  .stats{ gap:var(--sp-5); }
}
@media (max-width:640px){
  .cards--two{ grid-template-columns:1fr; }
  .cards--span-last > .card:last-child{ grid-template-columns:1fr; }
}
@media (max-width:560px){
  body{ font-size:17px; }
  .footer-grid{ grid-template-columns:1fr; }
  .footer-bottom{ flex-direction:column; gap:8px; }
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{ animation:none!important; transition:none!important; }
  .reveal{ opacity:1!important; transform:none!important; }
  html{ scroll-behavior:auto; }
}
@media print{
  .reveal{ opacity:1!important; transform:none!important; }
  .site-header{ position:static; }
  .nav-toggle, .skip-link, .map{ display:none; }
}

/* ============================================================
   Components catalogue (Phase B) — search, listing, part detail
   ============================================================ */
.page-hero--short{ min-height:0; padding-block:clamp(40px,6vw,72px); }
.suggest{
  position:absolute; left:0; right:0; top:100%; z-index:50; background:var(--surface);
  border:1px solid var(--hairline); border-top:0; box-shadow:0 14px 34px -18px rgba(0,0,0,.3); max-height:60vh; overflow:auto;
}
.suggest li a{ display:grid; grid-template-columns:auto 1fr; gap:4px 12px; padding:12px 20px; border-top:1px solid var(--hairline); }
.suggest li:first-child a{ border-top:0; }
.suggest li a strong{ font-family:var(--f-head); font-weight:500; color:var(--ink); letter-spacing:.02em; }
.suggest li a span{ font-size:14px; color:var(--muted); align-self:center; }
.suggest li a small{ grid-column:1 / -1; font-size:14px; color:var(--body); }
.suggest li[aria-selected="true"] a, .suggest li a:hover{ background:var(--accent-soft); }

.catalogue{ display:grid; grid-template-columns:200px minmax(0,1fr); gap:clamp(24px,3vw,40px); align-items:start; }
.filters{ position:sticky; top:calc(var(--header-h) + 24px); }
.filters h2{ font-size:13px; letter-spacing:.16em; text-transform:uppercase; font-weight:600; color:var(--heading-soft); margin-bottom:var(--sp-2); }
.filters h2 + *{ margin-bottom:var(--sp-4); }
.facet-list li a{ display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid var(--hairline); font-size:15px; color:var(--body); }
.facet-list li a span{ color:var(--muted); font-size:13px; }
.facet-list li a:hover, .facet-list li a.is-on{ color:var(--accent); }
.facet-list li a.is-on{ font-weight:600; }
.select{ width:100%; font:inherit; font-size:15px; padding:10px 12px; border:1px solid var(--hairline-strong); background:var(--surface); color:var(--body); border-radius:0; }
.check{ display:flex; align-items:center; gap:10px; font-size:15px; color:var(--body); cursor:pointer; }
.check input{ width:18px; height:18px; accent-color:var(--accent); }
.filters .btn{ padding:10px 18px; font-size:13px; }
.result-meta{ font-size:15px; color:var(--muted); margin-bottom:var(--sp-3); min-height:1.6em; }
.results{ display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:1px; }
.results > *{ box-shadow:0 0 0 1px var(--hairline); }
.results[aria-busy="true"]{ opacity:.5; }
.part{ background:var(--surface); display:flex; }
.part-link{ display:flex; flex-direction:column; gap:4px; padding:16px 16px 18px; width:100%; transition:background .2s var(--ease); }
.part-link:hover{ background:var(--accent-soft); }
.part-no{ font-family:var(--f-head); font-weight:600; font-size:17px; line-height:1.2; color:var(--ink); letter-spacing:.01em; word-break:break-word; }
.part-mfr{ font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); max-width:none; }
.part-desc{ font-size:13px; line-height:1.45; color:var(--body); max-width:none; flex:1; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.part-stock{ font-size:12px; font-weight:500; color:var(--ok); margin-top:4px; max-width:none; }
.part--out .part-stock, .stock.is-out{ color:var(--muted); }
.part-price{ display:flex; align-items:baseline; flex-wrap:wrap; gap:0 6px; font-size:13px; color:var(--body); margin-top:2px; max-width:none; }
.part-price strong{ font-family:var(--f-head); font-weight:600; font-size:16px; color:var(--ink); }
.part-price span{ font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; }
.part-price small{ font-size:12px; color:var(--muted); margin-left:auto; }
.part-from{ font-size:12px; color:var(--accent); max-width:none; }
.empty{ grid-column:1 / -1; background:var(--surface); padding:var(--sp-5); }
.empty p{ margin-top:var(--sp-2); }
.pager{ margin-top:var(--sp-4); }
.pager nav{ display:flex; flex-wrap:wrap; gap:6px; }
.pg{ display:inline-block; min-width:40px; text-align:center; padding:8px 12px; border:1px solid var(--hairline); font-family:var(--f-head); font-weight:500; font-size:14px; letter-spacing:.06em; text-transform:uppercase; color:var(--ink); }
.pg:hover{ border-color:var(--accent); color:var(--accent); }
.pg.is-on{ background:var(--accent); color:#fff; border-color:var(--accent); }
.note{ font-size:14px; color:var(--muted); border:1px solid var(--hairline-strong); padding:10px 14px; display:inline-block; }
.error{ background:var(--surface-alt); border-left:2px solid var(--ink); padding:12px 16px; font-size:15px; color:var(--heading-soft); margin-bottom:var(--sp-3); }

/* part detail */
.back{ font-size:14px; color:var(--muted); display:inline-flex; gap:8px; align-items:center; margin-bottom:var(--sp-3); }
.back:hover{ color:var(--ink); }
.part-head h1{ font-size:clamp(32px,4.5vw,56px); max-width:none; word-break:break-word; }
.part-head .part-mfr{ margin-top:var(--sp-1); font-size:14px; }
.part-head .lead{ margin-top:var(--sp-2); max-width:none; }
.detail{ display:grid; grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr); gap:clamp(32px,4vw,64px); align-items:start; margin-top:var(--sp-4); }
.specs{ display:grid; grid-template-columns:1fr 1fr; gap:1px; background:var(--hairline); border:1px solid var(--hairline); }
.specs > div{ background:var(--surface); padding:14px 16px; }
.specs dt{ font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); }
.specs dd{ margin-top:2px; color:var(--heading-soft); font-size:15px; }
.buy{ border:1px solid var(--ink); padding:var(--sp-4); position:sticky; top:calc(var(--header-h) + 24px); background:var(--surface); }
.buy h2{ font-size:13px; letter-spacing:.16em; text-transform:uppercase; font-weight:600; color:var(--accent); }
.stock{ font-family:var(--f-head); font-weight:500; font-size:18px; color:var(--ok); margin-top:var(--sp-1); }
.price-table{ width:100%; border-collapse:collapse; margin-top:var(--sp-3); font-size:15px; }
.price-table th{ text-align:left; font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); font-weight:500; padding:0 0 8px; }
.price-table td{ padding:8px 0; border-top:1px solid var(--hairline); color:var(--body); }
.price-table td:nth-child(2){ font-family:var(--f-head); font-weight:500; color:var(--ink); font-size:16px; }
.price-table tr.is-on td{ background:var(--accent-soft); }
.qty-row{ display:flex; align-items:center; gap:12px; margin-top:var(--sp-3); }
.qty-row label{ font-size:14px; color:var(--muted); }
.stepper{ display:inline-flex; border:1px solid var(--hairline-strong); }
.stepper button{ width:40px; height:44px; font-family:var(--f-head); font-size:18px; color:var(--ink); }
.stepper button:hover{ background:var(--surface-alt); }
.stepper input{ width:64px; text-align:center; border:0; border-inline:1px solid var(--hairline-strong); font:inherit; font-size:16px; color:var(--heading); -moz-appearance:textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
.line-total{ margin-top:var(--sp-2); font-size:15px; color:var(--body); min-height:1.6em; }
.line-total strong{ font-family:var(--f-head); font-weight:600; font-size:20px; color:var(--ink); }
.buy .btn{ width:100%; justify-content:center; margin-top:var(--sp-3); background:var(--accent); color:#fff; }
.buy .btn:hover{ background:var(--accent-strong); border-color:var(--accent-strong); }
.buy .btn:disabled{ opacity:.45; cursor:not-allowed; }
.buy .btn:disabled:hover{ background:var(--accent); }
.buy-notes{ margin-top:var(--sp-3); font-size:13px; color:var(--muted); display:grid; gap:6px; }
.added{ margin-top:var(--sp-2); font-size:14px; color:var(--heading-soft); background:var(--surface-alt); padding:10px 12px; }
.related{ margin-top:var(--sp-6); }
.related .results{ margin-top:var(--sp-3); grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); }

@media (max-width:900px){
  .catalogue{ grid-template-columns:1fr; }
  .filters{ position:static; }
  .filters details summary{ cursor:pointer; font-family:var(--f-head); font-weight:500; letter-spacing:.08em; text-transform:uppercase; font-size:14px; color:var(--ink); padding:12px 0; border-bottom:1px solid var(--hairline); list-style:none; }
  .filters details summary::-webkit-details-marker{ display:none; }
  .filters details summary::after{ content:" ▾"; font-size:11px; color:var(--muted); }
  .filters details[open] summary::after{ content:" ▴"; }
  .filters details > div{ padding-top:var(--sp-3); }
  .detail{ grid-template-columns:1fr; }
  .buy{ position:static; }
}
@media (min-width:901px){
  .filters details summary{ display:none; }
}
@media (max-width:560px){
  .specs{ grid-template-columns:1fr; }
}

/* ============================================================
   Basket & checkout (Phase C)
   ============================================================ */
.nav-basket{ position:relative; display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; flex:none; color:#fff; }
.nav-basket:hover{ color:var(--head-accent); }
.nav-links .nav-basket::after{ content:none; }
.nav-basket-count{ position:absolute; top:2px; right:0; min-width:18px; height:18px; padding:0 5px; border-radius:9px; background:#fff; color:var(--head-bg); font-family:var(--f-head); font-size:11px; font-weight:600; line-height:18px; text-align:center; letter-spacing:0; }
.notice{ background:var(--accent-soft); border-left:2px solid var(--accent); padding:12px 16px; font-size:15px; color:var(--heading-soft); max-width:680px; }
.basket{ display:grid; grid-template-columns:minmax(0,1.5fr) minmax(300px,.6fr); gap:clamp(32px,4vw,64px); align-items:start; }
.basket-table{ width:100%; border-collapse:collapse; }
.basket-table th{ text-align:left; font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); font-weight:500; padding:0 12px 10px 0; border-bottom:1px solid var(--hairline); }
.basket-table td{ padding:16px 12px 16px 0; border-bottom:1px solid var(--hairline); vertical-align:top; font-size:15px; color:var(--body); }
.basket-table .part-no{ display:block; font-size:17px; }
.basket-table .part-mfr{ display:block; margin-top:2px; }
.basket-desc{ display:block; font-size:13px; color:var(--body); margin-top:4px; max-width:40ch; }
.basket-stock{ display:block; font-size:12px; color:var(--ok); margin-top:6px; }
.basket-table strong{ font-family:var(--f-head); font-weight:600; font-size:17px; color:var(--ink); }
.stepper--sm button{ width:34px; height:38px; font-size:16px; }
.stepper--sm input{ width:56px; font-size:15px; }
.remove{ font-size:13px; color:var(--muted); text-decoration:underline; text-underline-offset:3px; }
.remove:hover{ color:var(--accent); }
.totals{ border:1px solid var(--ink); padding:var(--sp-4); position:sticky; top:calc(var(--header-h) + 24px); background:var(--surface); }
.totals h2{ font-size:13px; letter-spacing:.16em; text-transform:uppercase; font-weight:600; color:var(--accent); margin-bottom:var(--sp-2); }
.totals-list > div{ display:flex; justify-content:space-between; gap:16px; padding:8px 0; border-top:1px solid var(--hairline); font-size:15px; color:var(--body); }
.totals-list dd{ color:var(--heading-soft); }
.totals-grand dt, .totals-grand dd{ font-family:var(--f-head); font-weight:600; font-size:20px; color:var(--ink); }
.field{ display:block; }
.field span{ display:block; font-size:13px; color:var(--muted); margin-bottom:6px; }
.field input{ width:100%; font:inherit; font-size:15px; padding:10px 12px; border:1px solid var(--hairline-strong); background:var(--surface); color:var(--heading); border-radius:0; }
.field input:focus{ outline:none; border-color:var(--accent); }
.totals .btn{ width:100%; justify-content:center; margin-top:var(--sp-3); background:var(--accent); color:#fff; }
.totals .btn:hover{ background:var(--accent-strong); border-color:var(--accent-strong); }
.totals .btn:disabled{ opacity:.55; cursor:wait; }
.totals .buy-notes{ display:grid; gap:6px; font-size:13px; color:var(--muted); }
.fallback{ background:var(--surface-alt); padding:16px; font-size:14px; color:var(--heading-soft); }
.fallback .btn{ background:transparent; color:var(--accent); width:auto; margin-top:0; }
.fallback .btn:hover{ background:var(--accent); color:#fff; }
.empty-basket .lead{ color:var(--heading-soft); }
.order-summary{ display:grid; grid-template-columns:1fr 1fr; gap:1px; background:var(--hairline); border:1px solid var(--hairline); max-width:560px; }
.order-summary > div{ background:var(--surface); padding:14px 16px; }
.order-summary dt{ font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); }
.order-summary dd{ margin-top:2px; color:var(--heading-soft); font-family:var(--f-head); font-size:18px; }
.legal{ max-width:760px; }
.legal h2{ font-size:clamp(20px,2vw,24px); margin-top:var(--sp-4); }
.legal p{ margin-top:var(--sp-2); }
.footer-legal a{ color:var(--on-dark-muted); }
@media (max-width:900px){
  .basket{ grid-template-columns:1fr; }
  .totals{ position:static; }
  .basket-table thead{ display:none; }
  .basket-table tr{ display:grid; grid-template-columns:1fr auto; gap:6px 16px; padding:14px 0; border-bottom:1px solid var(--hairline); }
  .basket-table td{ border:0; padding:0; }
  .basket-table td:first-child{ grid-column:1 / -1; }
  .basket-table td[data-label]::before{ content:attr(data-label); display:block; font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin-bottom:4px; }
  .basket-table td:last-child{ grid-column:1 / -1; }
}
@media (max-width:560px){ .order-summary{ grid-template-columns:1fr; } }

/* ============================================================
   Stock admin (Phase D) — admin.html only
   ============================================================ */
.admin-body{ background:var(--surface-alt); }
.admin-header .brand small{ color:var(--accent); }
.admin-who{ display:flex; align-items:center; gap:12px; font-size:14px; color:var(--body); }
.admin-wrap{ padding-block:var(--sp-4) var(--sp-6); }
.admin-login{ display:grid; place-items:center; min-height:calc(100svh - var(--header-h) - 64px); padding-inline:16px; }
.card-form{ background:var(--surface); border:1px solid var(--hairline); padding:var(--sp-5); width:min(100%,420px); }
.card-form h1{ font-size:clamp(28px,4vw,40px); }
.btn--fill{ background:var(--accent); color:#fff; }
.btn--fill:hover{ background:var(--accent-strong); border-color:var(--accent-strong); }
.btn--sm{ padding:9px 16px; font-size:13px; }
.btn--xs{ padding:6px 12px; font-size:12px; }
.input{ font:inherit; font-size:15px; padding:10px 12px; border:1px solid var(--hairline-strong); background:var(--surface); color:var(--heading); border-radius:0; }
.input:focus{ outline:none; border-color:var(--accent); }
.select--auto{ width:auto; }
.tabs{ display:flex; gap:4px; border-bottom:1px solid var(--hairline-strong); margin-bottom:var(--sp-4); overflow-x:auto; }
.tabs button{ font-family:var(--f-head); font-weight:500; font-size:15px; letter-spacing:.08em; text-transform:uppercase; color:var(--body); padding:14px 18px; border-bottom:2px solid transparent; margin-bottom:-1px; white-space:nowrap; display:inline-flex; gap:8px; align-items:center; }
.tabs button[aria-selected="true"]{ color:var(--ink); border-bottom-color:var(--accent); }
.toolbar{ display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-bottom:var(--sp-3); }
.toolbar .input{ min-width:280px; flex:1 1 280px; max-width:480px; }
.toolbar-spacer{ flex:1; }
.toast{ position:fixed; left:50%; bottom:24px; transform:translateX(-50%); background:var(--ink); color:#fff; padding:10px 18px; font-size:14px; z-index:300; }
.data-table{ width:100%; border-collapse:collapse; background:var(--surface); border:1px solid var(--hairline); }
.data-table th{ text-align:left; font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); font-weight:500; padding:12px 14px; border-bottom:1px solid var(--hairline-strong); background:var(--surface); }
.data-table td{ padding:12px 14px; border-bottom:1px solid var(--hairline); font-size:15px; color:var(--body); vertical-align:middle; }
.data-table tr.is-off td{ opacity:.55; }
.data-table .num{ text-align:right; white-space:nowrap; }
.data-table .part-no{ display:block; font-size:16px; }
.data-table .part-mfr{ display:block; }
.data-table .basket-desc{ max-width:46ch; }
.data-table--compact td, .data-table--compact th{ padding:8px 10px; font-size:13px; }
.data-table [data-order]{ cursor:pointer; }
.data-table [data-order]:hover td{ background:var(--accent-soft); }
.table-scroll{ overflow-x:auto; }
.row-actions{ white-space:nowrap; display:flex; gap:8px; justify-content:flex-end; }
.stock-edit{ display:inline-flex; gap:6px; align-items:center; }
.stock-edit input{ width:84px; font:inherit; font-size:15px; padding:6px 8px; border:1px solid var(--hairline-strong); text-align:right; border-radius:0; }
.stock-edit input:focus{ outline:none; border-color:var(--accent); }
.switch{ position:relative; display:inline-block; width:40px; height:22px; }
.switch input{ opacity:0; width:0; height:0; }
.switch span{ position:absolute; inset:0; background:var(--hairline-strong); border-radius:11px; transition:background .2s; }
.switch span::before{ content:""; position:absolute; width:18px; height:18px; left:2px; top:2px; background:#fff; border-radius:50%; transition:transform .2s; }
.switch input:checked + span{ background:var(--ok); }
.switch input:checked + span::before{ transform:translateX(18px); }
.switch input:focus-visible + span{ outline:2px solid var(--accent); outline-offset:2px; }
.pill{ display:inline-block; font-family:var(--f-head); font-size:11px; letter-spacing:.08em; text-transform:uppercase; padding:3px 8px; border:1px solid var(--hairline-strong); color:var(--heading-soft); border-radius:2px; }
.pill--muted{ color:var(--muted); }
.pill--paid, .pill--review{ background:var(--accent); border-color:var(--accent); color:#fff; }
.pill--fulfilled{ background:var(--ok); border-color:var(--ok); color:#fff; }
.pill--cancelled, .pill--refunded{ color:var(--muted); }
.tabs .pill{ background:var(--accent); border-color:var(--accent); color:#fff; }
.orders-layout{ display:grid; grid-template-columns:minmax(0,1fr) minmax(320px,.8fr); gap:var(--sp-4); align-items:start; }
.order-detail{ background:var(--surface); border:1px solid var(--hairline); padding:var(--sp-4); position:sticky; top:calc(var(--header-h) + 16px); }
.order-detail h2{ font-size:24px; display:flex; align-items:center; gap:10px; max-width:none; }
.order-detail .specs dd{ white-space:normal; }
.num-right{ text-align:right; max-width:none; }
.two-col{ display:grid; grid-template-columns:1fr 1fr; gap:var(--sp-5); }
.two-col h2{ font-size:22px; }
.plain-list li{ padding:8px 0; border-bottom:1px solid var(--hairline); font-size:15px; }
.field textarea{ width:100%; font:inherit; font-size:15px; padding:10px 12px; border:1px solid var(--hairline-strong); background:var(--surface); color:var(--heading); border-radius:0; resize:vertical; }
.field textarea:focus{ outline:none; border-color:var(--accent); }
.field input[type="file"]{ padding:8px 0; border:0; }
.editor{ border:1px solid var(--ink); padding:0; width:min(100% - 32px, 760px); }
.editor::backdrop{ background:rgba(31,31,31,.5); }
.editor-form{ padding:var(--sp-4); }
.editor-form h2{ font-size:24px; margin-bottom:var(--sp-3); }
.editor-grid{ display:grid; grid-template-columns:1fr 1fr; gap:14px 20px; }
.field--wide{ grid-column:1 / -1; }
.editor-actions{ display:flex; justify-content:flex-end; gap:10px; margin-top:var(--sp-4); }
code{ font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:14px; background:var(--surface); padding:2px 6px; border:1px solid var(--hairline); }
@media (max-width:900px){
  .orders-layout, .two-col, .editor-grid{ grid-template-columns:1fr; }
  .order-detail{ position:static; }
  .data-table thead{ display:none; }
  .data-table tr{ display:grid; grid-template-columns:1fr 1fr; gap:6px 12px; padding:12px 14px; border-bottom:1px solid var(--hairline); }
  .data-table td{ border:0; padding:0; }
  .data-table td[data-label]::before{ content:attr(data-label); display:block; font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin-bottom:2px; }
  .data-table td[data-label="Part"], .data-table td[data-label="Order"]{ grid-column:1 / -1; }
  .data-table .num{ text-align:left; }
  .data-table .row-actions{ grid-column:1 / -1; justify-content:flex-start; }
  .data-table--compact tr{ display:table-row; } .data-table--compact td{ display:table-cell; padding:8px 10px; }
  .data-table--compact thead{ display:table-header-group; }
}

/* ============================================================
   Chat (Phase E) — fallback launcher shown until Crisp is configured
   ============================================================ */
.chat-fallback{ position:fixed; right:20px; bottom:20px; z-index:250; display:flex; flex-direction:column; align-items:flex-end; gap:12px; }
.chat-fallback--raised{ bottom:64px; }   /* clears Netlify's staging badge */
.chat-launch{ display:inline-flex; align-items:center; gap:10px; background:var(--accent); color:#fff; padding:12px 18px 12px 14px; border-radius:28px; font-family:var(--f-head); font-weight:500; font-size:14px; letter-spacing:.06em; text-transform:uppercase; box-shadow:0 10px 28px -12px rgba(0,0,0,.45); transition:background .2s var(--ease), transform .2s var(--ease); }
.chat-launch:hover{ background:var(--accent-strong); transform:translateY(-1px); }
.chat-panel{ width:min(340px, calc(100vw - 40px)); background:var(--surface); border:1px solid var(--hairline-strong); box-shadow:0 20px 50px -20px rgba(0,0,0,.4); padding:18px; }
.chat-panel-head{ display:flex; justify-content:space-between; align-items:center; font-family:var(--f-head); font-size:18px; color:var(--ink); }
.chat-close{ width:32px; height:32px; font-size:22px; line-height:1; color:var(--muted); }
.chat-close:hover{ color:var(--ink); }
.chat-lead{ font-size:14px; color:var(--body); margin-top:6px; }
.chat-contacts{ display:flex; flex-direction:column; gap:4px; margin-top:12px; font-size:15px; }
.chat-contacts a{ color:var(--accent); font-weight:500; }
.chat-form{ margin-top:14px; display:grid; gap:10px; }
.chat-form label span{ display:block; font-size:12px; color:var(--muted); margin-bottom:4px; }
.chat-form textarea, .chat-form input{ width:100%; font:inherit; font-size:14px; padding:8px 10px; border:1px solid var(--hairline-strong); background:var(--surface); color:var(--heading); border-radius:0; resize:vertical; }
.chat-form textarea:focus, .chat-form input:focus{ outline:none; border-color:var(--accent); }
.chat-form .btn{ justify-self:start; }
@media (max-width:560px){
  .chat-fallback{ right:12px; bottom:12px; }
  .chat-fallback.chat-fallback--raised{ bottom:56px; }
  .chat-launch span{ display:none; }
  .chat-launch{ padding:14px; border-radius:50%; }
  .chat-fallback.is-open .chat-launch{ display:none; }
}
@media print{ .chat-fallback{ display:none; } }

/* admin header on the copper bar */
.admin-header .nav{ gap:16px; }
.admin-label{ font-family:var(--f-head); font-size:13px; font-weight:500; letter-spacing:.16em; text-transform:uppercase; color:var(--head-accent); }
.admin-who{ margin-left:auto; color:var(--head-soft); }
.admin-header .btn{ color:#fff; border-color:rgba(255,255,255,.6); }
.admin-header .btn:hover{ background:#fff; color:var(--head-bg); }

/* ---- Capabilities: six service cards ---- */
.cap-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.cap-link{ display:flex; flex-direction:column; height:100%; background:var(--surface); border:1px solid var(--hairline); transition:border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
.cap-link:hover{ border-color:var(--accent); transform:translateY(-2px); box-shadow:0 14px 28px -20px rgba(0,0,0,.35); }
.cap-link .placeholder{ aspect-ratio:16/9; border:0; border-bottom:1px solid var(--hairline); }
.cap-link .media{ height:auto; aspect-ratio:16/9; border:0; border-bottom:1px solid var(--hairline); }
.cap-body{ display:flex; flex-direction:column; gap:8px; padding:20px 22px 22px; flex:1; }
.cap-body h3{ font-size:20px; color:var(--heading); }
.cap-body p{ font-size:15px; line-height:1.55; flex:1; }
.cap-body .tlink{ font-size:15px; margin-top:6px; }
.cap-link:hover .tlink::after{ width:100%; }
@media (max-width:900px){ .cap-grid{ grid-template-columns:repeat(2,1fr); gap:16px; } }
@media (max-width:560px){ .cap-grid{ grid-template-columns:1fr; } .cap-link .placeholder, .cap-link .media{ aspect-ratio:21/9; } }

/* ---- Card grid modifiers that avoid a short last row ---- */
@media (min-width:901px){ .cards--four{ grid-template-columns:repeat(4,1fr); } }
@media (min-width:561px) and (max-width:900px){ .cards--four{ grid-template-columns:repeat(2,1fr); } }
@media (min-width:1101px){
  .cards--links{ grid-template-columns:repeat(5,1fr); }
  .cards--links .card{ padding:22px 20px; }
  .cards--links .card h3{ font-size:19px; }
  .cards--links .card p:last-child{ margin-top:auto; padding-top:14px; }
}
@media (min-width:641px) and (max-width:1100px){
  .cards--links{ grid-template-columns:repeat(6,1fr); }
  .cards--links .card{ grid-column:span 2; }
  .cards--links .card:nth-child(n+4){ grid-column:span 3; }
}
@media (max-width:640px){
  .cards--links .card{ padding:16px 20px; }
  .cards--links .card p:not(:last-child){ display:none; }
  .cards--links .card p:last-child{ margin-top:4px; }
}

/* ---- Small centring utilities ---- */
.center{ text-align:center; margin-inline:auto; }
.empty-basket{ text-align:center; }
.empty-basket > *{ margin-inline:auto; }
#basket-page:has([data-empty]:not([hidden])) h1{ text-align:center; margin-inline:auto; }
.result-meta{ scroll-margin-top:calc(var(--header-h) + 16px); }
@media (max-width:640px){ .result-meta{ scroll-margin-top:136px; } }

/* ---- Pictures side by side, information underneath (replaces stacked picture/text rows, 22 Oct 2026) ---- */
.pic-row, .pic-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:clamp(16px,2vw,24px); }
.pic-row > .media, .pic-row > .placeholder{ width:100%; height:auto; aspect-ratio:3/2; object-fit:cover; }   /* standard photo shape: phone and camera photos fit with little cropping */
/* ISO certification badge shown in a photo-sized white tile, so it sits level with the photo beside it */
.cert-tile{ aspect-ratio:3/2; display:flex; align-items:center; justify-content:center; background:#fff; border:1px solid var(--hairline); padding:clamp(20px,4vw,48px); }
.cert-tile img{ display:block; width:100%; max-width:371px; height:auto; }
.pic-card{ display:flex; flex-direction:column; background:var(--surface); border:1px solid var(--hairline); }
.pic-card > .media, .pic-card > .placeholder{ width:100%; height:auto; aspect-ratio:3/2; object-fit:cover; border:0; border-bottom:1px solid var(--hairline); }
.pic-body{ display:flex; flex-direction:column; align-items:flex-start; gap:10px; padding:22px 24px 24px; flex:1; }
.pic-body p{ margin-top:0; }
.pic-body .pic-cta{ margin-top:auto; padding-top:8px; }
@media (max-width:700px){ .pic-row, .pic-grid{ grid-template-columns:1fr; } }
.pic-cta .btn{ white-space:nowrap; }
@media (max-width:760px){ .pic-body{ padding:18px 18px 20px; } .pic-cta .btn{ padding:12px 18px; letter-spacing:.06em; } }

/* ---- Legal pages and policy pages (30 Oct 2026) ---- */
.legal h2{ max-width:none; }
.legal p .tlink, .legal li .tlink{ display:inline; font-size:inherit; }   /* links in running text wrap with the sentence */
.notice > :first-child{ margin-top:0; }
/* Homepage "focused partner": the photo fills the height of the text beside it */
.split-media-fill{ align-self:stretch; }
.split-media-fill > .media{ height:100%; min-height:280px; max-height:none; aspect-ratio:auto; object-fit:cover; }
@media (max-width:900px){ .split-media-fill > .media{ height:auto; min-height:0; aspect-ratio:940/411; } }
