/* EWS-Solutions — shared styles
   Design direction: the brand mark itself. Graphite text on warm white,
   the logo's purple as the single accent, Archivo for everything.
   Purple is reserved for "this is the next thing you do" — never
   decoration. Light is the default; dark is a preference, not the brand.

   Class names are unchanged from the previous stylesheet, so pages that
   have not been re-cut (privacy, settings, shop-admin, console) pick the
   new system up without markup edits. */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&family=Archivo+Narrow:wght@600;700&display=swap');

:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --surface-raised: #f4f2ee;
  --border: #ddd9d2;
  --border-soft: #eeebe6;
  --field-border: #ccc7bf;
  --text: #2a2a2e;
  --text-dim: #6e6e74;
  --text-mute: #8a8a90;
  --accent: #681b79;
  --accent-hover: #56145f;
  --accent-tint: #f5edf7;
  --accent-border: #e4d2e9;
  --accent-ink: #ffffff;
  --ok: #17694a;
  --ok-tint: #edf4ef;
  --ok-border: #cfe2d6;
  --error: #a52222;
  --error-tint: #fbeeee;
  --error-border: #f0d4d4;
  --radius: 2px;
  --shadow: 0 1px 2px rgba(42, 42, 46, .05);
}

:root[data-theme="dark"] {
  --bg: #1b1a1d;
  --surface: #232227;
  --surface-raised: #2b2930;
  --border: #3a3841;
  --border-soft: #302e36;
  --field-border: #494650;
  --text: #f0eff2;
  --text-dim: #a7a4ad;
  --text-mute: #8d8a95;
  --accent: #b06ac0;
  --accent-hover: #c489d1;
  --accent-tint: #2e2334;
  --accent-border: #4a3654;
  --accent-ink: #17131a;
  --ok: #4fbf92;
  --ok-tint: #1f2c27;
  --ok-border: #2f4a3c;
  --error: #e98080;
  --error-tint: #352323;
  --error-border: #4d3234;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Archivo, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color .15s ease, color .15s ease;
}

body { min-height: 100vh; }

h1, h2, h3 { letter-spacing: -.02em; text-wrap: pretty; }
h1 { font-size: 2.125rem; font-weight: 700; line-height: 1.1; margin: 0 0 .35rem; }
h2 { font-size: 1.0625rem; font-weight: 400; color: var(--text-dim); margin: 0 0 1.75rem; letter-spacing: 0; }
h3 { font-size: 1.0625rem; font-weight: 700; margin: 0 0 .75rem; }

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

.mono { font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }

/* --- Layout ------------------------------------------------------------ */

.wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}
.wrap-wide { max-width: 1140px; }
.wrap-full { max-width: 1240px; }

.page-head { margin-bottom: 1.75rem; }
.lead {
  font-size: 1.0625rem;
  color: var(--text-dim);
  margin: 0;
  max-width: 62ch;
}
.head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

/* --- Header ------------------------------------------------------------ */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand { display: flex; align-items: center; gap: 1rem; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { height: 40px; width: auto; display: block; }
.brand .brand-dark { display: none; }
:root[data-theme="dark"] .brand .brand-light { display: none; }
:root[data-theme="dark"] .brand .brand-dark { display: block; }

.staff-tag {
  font-family: 'Archivo Narrow', Archivo, sans-serif;
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--accent-border);
  padding: .3rem .6rem;
}

/* Kept for pages not yet re-cut. */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.top-nav .logo { display: flex; align-items: center; text-decoration: none; font-weight: 700; font-size: 1rem; letter-spacing: -.02em; color: var(--text); }
.top-nav .logo:hover { text-decoration: none; }
.top-nav .logo span { color: var(--accent); }
.top-nav .logo img { height: 38px; width: auto; display: block; }

.nav-right { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }

.nav-link {
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
}
.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-link.is-current { color: var(--text); }

.lang-switcher {
  width: auto;
  background: var(--surface);
  border: 1px solid var(--field-border);
  color: var(--text-dim);
  font-family: inherit;
  font-size: .8125rem;
  font-weight: 600;
  border-radius: var(--radius);
  padding: .45rem .5rem;
}

.theme-toggle {
  width: auto;
  background: var(--surface);
  border: 1px solid var(--field-border);
  color: var(--text-dim);
  font-size: .875rem;
  line-height: 1;
  border-radius: var(--radius);
  padding: .5rem .6rem;
  cursor: pointer;
}
.theme-toggle:hover { background: var(--surface-raised); color: var(--text); }

/* An icon in the bar - the settings gear. Sized to sit level with the two
   buttons beside it rather than to the text around them. */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  flex: none;
}
.icon-btn:hover { background: var(--surface-raised); color: var(--text); }
.icon-btn svg { display: block; }

/* Everything the bar only shows once somebody is signed in starts hidden
   and is revealed by account-nav.js. Declared with !important because these
   are flex items, and a display from a class would otherwise win over the
   browser's own rule for [hidden] and show them to everybody. */
[hidden] { display: none !important; }

/* --- Eyebrow ----------------------------------------------------------- */

.eyebrow {
  font-family: 'Archivo Narrow', Archivo, sans-serif;
  font-weight: 700;
  font-size: .8125rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .14em;
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .85rem;
}
.eyebrow::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 9px solid currentColor;
  display: inline-block;
}
.eyebrow a { color: inherit; }

/* --- Cards & fields ---------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 1rem; }
.card-accent { border-top: 3px solid var(--accent); }
.card-tight { padding: 1.25rem 1.5rem; }
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.field { margin-bottom: 1.25rem; }
.field-row { display: flex; gap: 1rem; }
.field-row > div { flex: 1; }

label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: .4rem;
  letter-spacing: 0;
}
label .optional { font-weight: 400; color: var(--text-mute); }

/* The asterisk on a required field. Its own colour rather than bold, so a
   row of labels still reads as a row of labels. */
label .req { color: var(--accent); font-weight: 700; }

/* Spec-sheet groups. Sixteen boxes in one column is a form nobody finishes;
   three short blocks with a heading each is the same information in a shape
   somebody will actually fill in. */
.field-group { margin-bottom: 1.75rem; }
.field-group-head {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border-soft);
}

/* The spec as read back on a file card: label and value in pairs, so a
   buyer can check the part number against the unit in front of them
   without opening anything. */
.spec-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .2rem .7rem;
  font-size: .8125rem;
  margin: .55rem 0;
}
.spec-grid dt { color: var(--text-mute); }
.spec-grid dd { margin: 0; color: var(--text-dim); overflow-wrap: anywhere; }

input, textarea, select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  padding: .8rem .875rem;
}
input::placeholder, textarea::placeholder { color: var(--text-mute); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
textarea { resize: vertical; min-height: 5.5rem; }
input[type="file"] { padding: .6rem; font-size: .875rem; }

.hint { font-size: .875rem; color: var(--text-dim); margin-top: .4rem; }
.hint-center { text-align: center; }

.check-row {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin-bottom: 1.25rem;
}
.check-row input { width: auto; margin-top: .3rem; accent-color: var(--accent); }
.check-row label {
  margin: 0;
  font-size: .9375rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.45;
}

/* --- Buttons ----------------------------------------------------------- */

button, .btn {
  width: 100%;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  padding: .95rem 1.25rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  line-height: 1.25;
}
button:hover, .btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-ink);
  text-decoration: none;
}
button:disabled { opacity: .45; cursor: not-allowed; }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--field-border);
}
.btn-secondary:hover { background: var(--surface-raised); color: var(--text); border-color: var(--text-mute); }

.btn-danger { background: transparent; color: var(--error); border: 1px solid var(--error); }
.btn-danger:hover { background: var(--error-tint); color: var(--error); border-color: var(--error); }

.btn-auto { width: auto; }
.btn-sm { padding: .6rem 1rem; font-size: .9375rem; }

.danger-zone {
  border: 1px solid var(--error-border);
  background: var(--error-tint);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: .5rem;
}
.danger-zone .hint { color: var(--error); }

.ok-box {
  background: var(--ok-tint);
  border: 1px solid var(--ok-border);
  color: var(--ok);
  border-radius: var(--radius);
  padding: .8rem 1rem;
  font-size: .9375rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  display: none;
}

/* Contact form. Same two-column proportions as the hero so the page keeps
   one rhythm rather than introducing a second grid. */
.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 3.5rem;
  align-items: start;
}
.contact-points { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.contact-points li {
  padding: .55rem 0 .55rem 1.5rem;
  position: relative;
  color: var(--text-dim);
  font-size: .9375rem;
}
.contact-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.05rem;
  width: .5rem; height: .5rem;
  background: var(--accent);
  border-radius: 50%;
}

/* Honeypot. Positioned away rather than display:none, which some bots
   detect and skip; anyone who can see the page never meets it. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.error-box {
  background: var(--error-tint);
  border: 1px solid var(--error-border);
  color: var(--error);
  border-radius: var(--radius);
  padding: .8rem 1rem;
  font-size: .9375rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  display: none;
}

/* --- Status ------------------------------------------------------------ */

.status {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .8125rem;
  font-weight: 600;
  padding: .35rem .7rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text-dim);
  white-space: nowrap;
}
.status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.status-pending_payment { background: var(--surface-raised); color: var(--text-dim); border-color: var(--border); }
.status-paid,
.status-received,
.status-in_progress { background: var(--accent-tint); color: var(--accent); border-color: var(--accent-border); }
.status-completed,
.status-shipped { background: var(--ok-tint); color: var(--ok); border-color: var(--ok-border); }
.status-cancelled { background: var(--error-tint); color: var(--error); border-color: var(--error-border); }

/* --- Order rows (portal) ----------------------------------------------- */

.order-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-mute);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.375rem 1.75rem;
  margin-bottom: .875rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.order-row.is-active { border-left-color: var(--accent); }
.order-row.is-done { border-left-color: var(--ok); }
.order-row.is-waiting { border-left-color: var(--text-mute); }
.order-row.is-stuck { border-left-color: var(--error); }

.order-row .job { font-size: 1.125rem; font-weight: 700; }
.order-row .id { color: var(--text-dim); font-size: .9375rem; }
.order-row-main { display: flex; flex-direction: column; gap: .25rem; min-width: 15rem; }
.order-row-right { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }

.pay-btn { width: auto; padding: .65rem 1.1rem; font-size: .9375rem; }

/* Stage timeline — a customer should see progress, not a status word. */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  width: 100%;
  margin-top: 1.25rem;
}
.tl-step { display: flex; flex-direction: column; gap: .6rem; }
.tl-track { display: flex; align-items: center; }
.tl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--border);
  flex: none;
}
.tl-line { flex: 1; height: 2px; background: var(--border-soft); }
.tl-step.is-done .tl-dot { background: var(--accent); }
.tl-step.is-done .tl-line { background: var(--accent); }
.tl-step.is-now .tl-dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.tl-label { font-size: .875rem; font-weight: 700; }
.tl-step.is-now .tl-label { color: var(--accent); }
.tl-step.is-todo .tl-label { color: var(--text-mute); font-weight: 600; }
.tl-when { font-size: .8125rem; color: var(--text-mute); }

.empty {
  text-align: center;
  color: var(--text-dim);
  font-size: .9375rem;
  padding: 3rem 1.25rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.muted-link { text-align: center; margin-top: 1.5rem; font-size: .9375rem; color: var(--text-dim); }

/* --- Home ------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 3.5rem;
  align-items: start;
  padding: 3.5rem 0 3rem;
}
.hero h1 { font-size: 3.25rem; line-height: 1.02; letter-spacing: -.03em; margin: 0 0 1.25rem; }
.hero p.lead { font-size: 1.1875rem; max-width: 52ch; }
.hero-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.75rem; }
.hero-actions .btn { width: auto; }
.trust-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
  font-size: .875rem;
  color: var(--text-dim);
}
.trust-row span { display: flex; align-items: center; gap: 1.5rem; }
.trust-row .sep { width: 1px; height: 14px; background: var(--border); display: inline-block; }

.price-list {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.price-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  padding: 1.125rem 1.375rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}
.price-list-head .note { font-weight: 400; font-size: .8125rem; color: var(--text-dim); }
.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .875rem 1.375rem;
  border-bottom: 1px solid var(--border-soft);
  font-size: .9375rem;
}
.price-row strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.price-note {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  padding: 1.125rem 1.375rem;
  background: var(--accent-tint);
  color: var(--accent);
  font-size: .875rem;
  line-height: 1.5;
}
.price-note::before {
  content: '';
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 9px solid currentColor;
  margin-top: .35rem;
  flex: none;
}

.section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--border);
}
.section-label {
  font-family: 'Archivo Narrow', Archivo, sans-serif;
  font-weight: 700;
  font-size: .8125rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 1.75rem;
}

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.step:first-child { border-top-color: var(--accent); }
.step-n { font-size: .8125rem; font-weight: 700; letter-spacing: .06em; color: var(--text-mute); margin-bottom: .75rem; }
.step:first-child .step-n { color: var(--accent); }
.step h3 { margin: 0 0 .5rem; font-size: 1.125rem; }
.step p { margin: 0; font-size: .9375rem; color: var(--text-dim); line-height: 1.5; }

.cta-banner {
  border: 1px solid var(--border);
  background: var(--surface-raised);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}
.cta-banner .btn { width: auto; flex: none; }
.cta-banner strong { display: block; font-size: 1.0625rem; }
.cta-banner span { font-size: .9375rem; color: var(--text-dim); }

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.site-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}
.site-footer img { height: 80px; width: auto; display: block; }
.site-footer .brand-dark { display: none; }
:root[data-theme="dark"] .site-footer .brand-light { display: none; }
:root[data-theme="dark"] .site-footer .brand-dark { display: block; }
.footer-cols { display: flex; gap: 4rem; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: .5rem; }
.footer-col-head {
  font-family: 'Archivo Narrow', Archivo, sans-serif;
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.footer-col a, .footer-col span { font-size: .875rem; color: var(--text-dim); }

/* --- Order form ------------------------------------------------------- */

.steps-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.steps-bar .sb-step { display: flex; align-items: center; gap: .6rem; font-size: .9375rem; color: var(--text-mute); }
.steps-bar .sb-n {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--field-border);
  color: var(--text-mute);
  font-size: .8125rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.steps-bar .sb-step.is-current { color: var(--text); font-weight: 700; }
.steps-bar .sb-step.is-current .sb-n { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.steps-bar .sb-line { flex: 1; height: 2px; background: var(--border); min-width: 1.5rem; }

.order-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2.5rem;
  align-items: start;
}
.order-aside { position: sticky; top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .9375rem;
  padding: .3rem 0;
}
.summary-row .num { font-variant-numeric: tabular-nums; }
.summary-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--border-soft);
  margin-top: .75rem;
  padding-top: 1rem;
}
.summary-total .label { font-weight: 700; }
.summary-total .value { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* Job tick list. A dropdown can only express one job; an ECU usually
   needs several, and the running total has to stay visible. */
.job-picker {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  max-height: 22rem;
  overflow-y: auto;
}
.job-option {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .95rem 1.125rem;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
}
.job-option:last-child { border-bottom: none; }
.job-option:hover { background: var(--surface-raised); }
.job-option input { width: auto; flex: none; margin: 0; accent-color: var(--accent); width: 18px; height: 18px; }
.job-option label {
  margin: 0;
  flex: 1;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
}
.job-option .job-price { font-size: .9375rem; color: var(--text-dim); flex: none; font-variant-numeric: tabular-nums; }
.job-option.is-picked { background: var(--accent-tint); }
.job-option.is-picked label { font-weight: 600; }
.job-option.is-picked .job-price { color: var(--accent); font-weight: 600; }

.job-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  margin-top: .75rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
}
.job-total .job-total-label { font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); }
.job-total .job-total-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.job-total-breakdown { font-size: .875rem; color: var(--text-dim); margin-top: .4rem; }

/* --- Shop ------------------------------------------------------------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.product-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(42, 42, 46, .08);
  text-decoration: none;
  color: var(--text);
}
.product-card.is-reserved { opacity: .75; }

.product-thumb {
  aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(45deg, var(--surface-raised) 0 10px, var(--bg) 10px 20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-noimg {
  font-family: 'Archivo Narrow', Archivo, sans-serif;
  font-weight: 700;
  color: var(--text-mute);
  font-size: .8125rem;
  letter-spacing: .14em;
}
.product-noimg-lg {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, var(--surface-raised) 0 12px, var(--bg) 12px 24px);
  border: 1px solid var(--border);
}

.product-body { padding: 1.25rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.product-title {
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.product-meta { font-size: .875rem; color: var(--text-dim); overflow-wrap: anywhere; }
.product-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
  gap: .75rem;
}
.product-price { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.product-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 3rem;
  align-items: start;
}
.product-gallery { display: flex; flex-direction: column; gap: .75rem; }
.product-gallery-main { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.product-gallery-main img { width: 100%; display: block; }
.product-gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.product-gallery-thumbs img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}
.product-gallery-thumbs img.is-current { border-color: var(--accent); }

.spec-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); }
.spec-table th {
  text-align: left;
  font-size: .875rem;
  color: var(--text-dim);
  font-weight: 400;
  padding: .8rem 1.125rem;
  white-space: nowrap;
  vertical-align: top;
  border-bottom: 1px solid var(--border-soft);
}
.spec-table td {
  padding: .8rem 1.125rem;
  font-size: .9375rem;
  font-weight: 600;
  text-align: right;
  border-bottom: 1px solid var(--border-soft);
}
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }

.product-desc { white-space: pre-wrap; font-size: .9375rem; color: var(--text-dim); line-height: 1.6; }

.product-buy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.product-price-lg { font-size: 2.375rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.buy-notes { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }
.buy-notes span { font-size: .875rem; color: var(--text-dim); }

/* --- Radio cards (ship-to) -------------------------------------------- */

.radio-cards { display: flex; flex-direction: column; gap: .625rem; }
.radio-card {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  font-weight: 400;
  margin: 0;
}
.radio-card:hover { border-color: var(--text-mute); }
.radio-card input { width: auto; margin: .2rem 0 0; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.radio-card .rc-title { font-size: 1rem; font-weight: 600; color: var(--text); display: block; }
.radio-card .rc-note { font-size: .875rem; color: var(--text-dim); display: block; }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }

.done-panel { display: flex; flex-direction: column; gap: 1.25rem; }
.kv { display: flex; flex-direction: column; gap: 0; }
.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .9375rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--border-soft);
}
.kv-row:last-child { border-bottom: none; }
.kv-row .k { color: var(--text-dim); }
.kv-row .v { font-weight: 600; }
.next-box {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem;
}
.next-box strong { display: block; font-size: .875rem; margin-bottom: .35rem; }
.next-box span { font-size: .875rem; color: var(--text-dim); line-height: 1.55; }

/* --- Admin ------------------------------------------------------------ */

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.metric { padding: 1.375rem 1.75rem; border-right: 1px solid var(--border-soft); }
.metric:last-child { border-right: none; }
.metric .m-label { font-size: .8125rem; font-weight: 600; color: var(--text-mute); }
.metric .m-value { font-size: 1.875rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.metric.is-urgent .m-value { color: var(--accent); }
.metric .m-sub { font-size: .9375rem; font-weight: 600; color: var(--text-dim); }

.filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.filter {
  font-size: .875rem;
  font-weight: 500;
  padding: .55rem .875rem;
  border: 1px solid var(--field-border);
  background: var(--surface);
  color: var(--text-dim);
  border-radius: var(--radius);
  cursor: pointer;
  width: auto;
}
.filter:hover { background: var(--surface-raised); color: var(--text); }
.filter.is-active {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent);
  font-weight: 600;
}

.admin-search { max-width: 300px; }

.admin-product { margin-bottom: 1rem; }
.admin-product-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.admin-product-head .id { color: var(--text-dim); font-size: .875rem; margin-top: .15rem; }

.admin-thumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0 0; }
.admin-thumb { position: relative; display: inline-block; }
.admin-thumb img {
  width: 72px; height: 72px; object-fit: cover;
  border: 1px solid var(--border); border-radius: var(--radius);
}
.thumb-del {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; padding: 0;
  border-radius: 50%; background: var(--error); color: #fff;
  font-size: .8rem; line-height: 1; border: none; cursor: pointer;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
  flex-wrap: wrap;
}
.admin-actions .photo-input { flex: 1; font-size: .8125rem; padding: .35rem; }

.status-select { flex: 1; min-width: 10rem; font-size: .9375rem; padding: .6rem .7rem; }

.msg-toggle-btn {
  width: auto;
  padding: .6rem 1rem;
  font-size: .9375rem;
  background: var(--surface);
  border: 1px solid var(--field-border);
  color: var(--text);
}
.msg-toggle-btn:hover { background: var(--surface-raised); color: var(--text); border-color: var(--text-mute); }

.msg-box { margin-top: 1rem; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.125rem; }
.msg-input { min-height: 5rem; margin-bottom: .75rem; }
.msg-send-btn { width: auto; padding: .6rem 1.1rem; font-size: .9375rem; }

.tabs { display: flex; gap: .5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.tab-btn {
  width: auto;
  background: var(--surface);
  border: 1px solid var(--field-border);
  color: var(--text-dim);
  padding: .6rem 1.1rem;
  font-size: .9375rem;
  font-weight: 500;
}
.tab-btn:hover { background: var(--surface-raised); color: var(--text); border-color: var(--text-mute); }
.tab-btn.is-active {
  background: var(--accent-tint);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.legend { font-size: .875rem; color: var(--text-dim); margin-top: 1rem; }

/* --- Responsive ------------------------------------------------------- */

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 2.5rem; }
  .hero h1 { font-size: 2.5rem; }
  .order-layout { grid-template-columns: 1fr; }
  .order-aside { position: static; }
  .product-layout { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric { border-bottom: 1px solid var(--border-soft); }
}

@media (max-width: 620px) {
  h1 { font-size: 1.75rem; }
  .hero h1 { font-size: 2.125rem; }
  .wrap { padding: 1.5rem 1.125rem 3.5rem; }
  .site-header-inner { padding: .875rem 1.125rem; flex-wrap: wrap; }
  .brand img { height: 34px; }
  .steps { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(2, 1fr); row-gap: 1.25rem; }
  .field-row { flex-direction: column; gap: 0; }
  .order-row { flex-direction: column; align-items: flex-start; }
  .order-row-right { width: 100%; }
  .pay-btn { flex: 1; }
  .site-footer-inner { gap: 2rem; }
  .footer-cols { gap: 2rem; }
  .hero-actions .btn, .cta-banner .btn { width: 100%; }
}

@media print {
  .site-header, .site-footer, .theme-toggle, .lang-switcher, button, .btn { display: none !important; }
  body { background: #fff; }
}

/* The sign-in dialog on the files page: pressing Buy without an account
   asks here rather than silently moving you to another tab. */
.auth-dialog {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 1.75rem;
  max-width: 27rem;
  width: calc(100vw - 2rem);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
}
.auth-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.auth-dialog h2 { margin: 0 0 .6rem; font-size: 1.15rem; }
/* A file is named the way tools name them - one long run with nothing to
   break on - and the dialog says which file you are buying. */
.auth-dialog p { margin: 0 0 .9rem; overflow-wrap: anywhere; }
.auth-dialog-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.1rem 0 .3rem; }

/* A button that has to read as a link, for "Not now". */
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

/* A nav item that happens to be a button: same type, same colour, same
   line as the anchors beside it. Declared after .link-button so it wins
   where an element carries both. */
button.nav-link {
  background: none;
  border: 0;
  padding: 0;
  width: auto;
  font-family: inherit;
  font-size: .9375rem;
  font-weight: 500;
  line-height: inherit;
  color: var(--text-dim);
  text-decoration: none;
  cursor: pointer;
}
button.nav-link:hover { color: var(--text); text-decoration: none; }

/* The two header buttons, kept side by side so a wrapping bar moves them
   as one rather than stranding the second on a row of its own. */
.nav-actions { display: inline-flex; gap: .6rem; align-items: center; }

/* The order status beside a job in the upload form's "which repair is it
   for?" list. Quieter than the job itself: it is context for choosing,
   not the thing being chosen. */
.job-state {
  color: var(--muted);
  font-size: 0.88em;
  margin-left: 0.35em;
}

#jobList .check-row + .check-row { margin-top: 2px; }
