/*
Theme Name: CoreBIM
Theme URI: https://corebim.co/
Author: CoreBIM
Author URI: https://corebim.co/
Description: Technical one-page theme for CoreBIM — BIM modeling, 2D CAD to BIM, point cloud to BIM, registration, MEP and construction documentation. Steel accent on a light technical ground, Barlow Condensed over Barlow, blueprint framing, and a plan room that presents every issued sheet.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: corebim
*/

/* Industry — design-system tokens and component classes. This file is the source of truth for the system's look; retune it here and see readme.md. */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;700&family=Barlow+Condensed:wght@400;600&display=swap');

:root {
  --color-bg: #f2f2f3;
  --color-surface: #e9e9ea;
  --color-text: #1d1f20;
  --color-accent: #5980a6;
  --color-accent-2: #728fab;
  --color-divider: color-mix(in srgb, #1d1f20 16%, transparent);

  /* Tonal ramps — generated in OKLCH on one shared lightness scale, so the
     same step of any role matches the others in visual value. */
  --color-neutral-100: #f5f5f8;
  --color-neutral-200: #e7e7ea;
  --color-neutral-300: #d4d4d7;
  --color-neutral-400: #b7b7ba;
  --color-neutral-500: #98989b;
  --color-neutral-600: #7a7a7d;
  --color-neutral-700: #5d5d60;
  --color-neutral-800: #424244;
  --color-neutral-900: #2b2b2d;

  --color-accent-100: #eef6ff;
  --color-accent-200: #d6ebff;
  --color-accent-300: #b5d9fd;
  --color-accent-400: #94bce3;
  --color-accent-500: #749dc4;
  --color-accent-600: #597ea3;
  --color-accent-700: #416180;
  --color-accent-800: #2c455d;
  --color-accent-900: #1d2d3d;

  --color-accent-2-100: #eef6ff;
  --color-accent-2-200: #d6ebff;
  --color-accent-2-300: #bdd8f2;
  --color-accent-2-400: #9ebbd8;
  --color-accent-2-500: #7e9cb8;
  --color-accent-2-600: #627d98;
  --color-accent-2-700: #486077;
  --color-accent-2-800: #314457;
  --color-accent-2-900: #1f2d3a;

  --font-heading: "Barlow Condensed", system-ui, sans-serif;
  --font-heading-weight: 600;
  --font-body: "Barlow", system-ui, sans-serif;

  --space-1: 3.4px;
  --space-2: 6.8px;
  --space-3: 10.2px;
  --space-4: 13.6px;
  --space-6: 20.4px;
  --space-8: 27.2px;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 7px;

  /* Elevation — derived from the ground: soft ink-tinted shadows on a
     light theme, a hairline edge + ambient darkness on a dark one. */
  --shadow-sm: 0 1px 2px color-mix(in srgb, #2b2b2d 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2b2b2d 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2b2b2d 22%, transparent);
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--font-heading-weight); }

.blueprint {
  position: relative;
  border: 1px solid var(--color-divider);
  border-radius: 0;
}
/* The overlay image treatments (halftone, duotone) clip their overlay
   (overflow:hidden); a blueprint wrapper draws its registration marks
   outside the box, so when both classes share a wrapper the frame must
   win. */
.blueprint.halftone, .blueprint.plate, .blueprint.duotone { overflow: visible; }
.blueprint > .corner {
  position: absolute; width: 11px; height: 11px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.blueprint > .corner::before, .blueprint > .corner::after {
  content: ""; position: absolute; background: currentColor;
}
.blueprint > .corner::before { left: 5px; top: 0; width: 1px; height: 100%; }
.blueprint > .corner::after  { top: 5px; left: 0; width: 100%; height: 1px; }
.blueprint > .corner.tl { top: -6px; left: -6px; }
.blueprint > .corner.tr { top: -6px; right: -6px; }
.blueprint > .corner.bl { bottom: -6px; left: -6px; }
.blueprint > .corner.br { bottom: -6px; right: -6px; }

.duotone{position:relative;overflow:hidden}
.duotone::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:var(--color-accent);mix-blend-mode:color}

/* ══════════════════════════════════════════════════════════════════════════
   Components — built with the tokens above. Plain CSS
   on plain HTML: no JavaScript, no build step. Each class is documented in
   readme.md and demonstrated in foundations/ and components/.
   ══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.55; font-weight: 400; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 var(--space-2);
}
h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h5 { font-size: 16px; }
h6 { font-size: 13px; }
h6 { letter-spacing: 0.08em; text-transform: uppercase; }
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
figcaption {
  font-size: 11px; margin-top: var(--space-1);
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.text-muted { color: color-mix(in srgb, var(--color-text) 55%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* — rules — */
.hr {
  height: 1px; border: 0; margin: var(--space-4) 0;
  background: var(--color-divider);
}

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text); /* matches the .input's 14px —
     the pair sits side by side in sign-up rows */
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
}
.btn svg { display: block; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-600); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-ghost { color: var(--color-accent); padding-inline: var(--space-1); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-block { width: 100%; margin-top: var(--space-2); }

/* — forms — */
.field > label {
  display: block; font-size: 12px; margin-bottom: 5px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.input {
  width: 100%; min-height: 36px; padding: 6px 10px; font: inherit;
  font-size: 14px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; }
.radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.radio input, .seg-opt input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.radio .dot {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--color-divider);
}
.radio:hover .dot { border-color: var(--color-accent); }
.radio input:checked + .dot {
  border-color: var(--color-accent); background: var(--color-accent);
  box-shadow: inset 0 0 0 4px var(--color-bg);
}
.radio input:focus-visible + .dot { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.seg {
  display: inline-flex; overflow: hidden;
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.seg-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; font-size: 13px; cursor: pointer;
}
.seg-opt + .seg-opt { border-left: 1px solid var(--color-divider); }
.seg-opt:has(input:checked) { background: var(--color-accent); color: var(--color-bg); }
.seg-opt:not(:has(input:checked)):hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: -2px; }

/* — cards — */
.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface);
}
.card-kicker { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); }
.card-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 17px; line-height: 1.2;
}
.card-body { margin: 0; font-size: 13px; opacity: 0.8; flex: 1; }
.card-meta {
  display: flex; align-items: center; gap: 6px; font-size: 11px;
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
}
.elev-sm { box-shadow: var(--shadow-sm); }
.elev-md { box-shadow: var(--shadow-md); }
.elev-lg { box-shadow: var(--shadow-lg); }

/* — tags — */
.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px;
  border-radius: calc(var(--radius-md) * 0.75);
}
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-accent-2 { background: var(--color-accent-2-100); color: var(--color-accent-2-800); }
.tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }

/* — navigation — */
.nav {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: none;
}
.nav-brand {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 18px; margin-right: auto;
}
.nav a { color: inherit; text-decoration: none; font-size: 14px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--color-accent); }

/* — tables — */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  padding: var(--space-2); border-bottom: 1px solid var(--color-divider);
}
.table td {
  padding: var(--space-2);
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent);
}
.table tbody tr:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }

/* — dialog — */
.dialog-backdrop {
  position: fixed; inset: 0; display: grid; place-items: center;
  padding: var(--space-4);
  background: color-mix(in srgb, var(--color-neutral-900) 50%, transparent);
}
.dialog {
  width: min(440px, 100%); display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4); border-radius: var(--radius-lg);
  background: var(--color-surface); box-shadow: var(--shadow-lg);
}
.dialog-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 20px;
}
.dialog-body { font-size: 14px; opacity: 0.85; }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-2); }

/* — blueprint frame: components are wireframe objects (see .blueprint
     and .corner above) — square, transparent, hairline-bordered — */
.card, .btn, .input, .tag, .seg, .dialog { border-radius: 0; }
.card, .dialog { background: transparent; border: 1px solid var(--color-divider); }
.btn { border: 1px solid var(--color-divider); }
.btn-primary { border-color: var(--color-accent); }
.btn-ghost { border-color: transparent; }



/* ─────────────────────────────────────────────────────────────
   Theme page furniture
   ───────────────────────────────────────────────────────────── */
body { margin: 0; background: var(--color-bg); text-wrap: pretty; }
a { color: var(--color-accent-700); text-decoration: none; }
a:hover { color: var(--color-accent); }
html { scroll-behavior: smooth; }
section[id], article[id], header[id] { scroll-margin-top: 104px; }
summary::-webkit-details-marker { display: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
img { max-width: 100%; height: auto; }
*:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* ─────────────────────────────────────────────────────────────
   Plan room
   ───────────────────────────────────────────────────────────── */
.cb-planroom { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px) 96px; display: flex; flex-direction: column; gap: 26px; }
.cb-planroom-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(20px, 4vw, 56px); align-items: end; }
.cb-kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cb-chip { font-family: var(--font-heading); font-weight: 600; font-size: 13px; letter-spacing: 0.06em; background: var(--color-accent-900); color: #f2f2f3; padding: 5px 9px; font-variant-numeric: tabular-nums; }
.cb-kicker-label { font-family: var(--font-heading); font-weight: 600; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-accent-700); }
.cb-h2 { font-family: var(--font-heading); font-weight: 500; font-size: clamp(30px, 4vw, 50px); line-height: 1.02; text-transform: uppercase; margin: 0; max-width: 18ch; }
.cb-lede { margin: 0 0 6px; font-size: 15px; max-width: 42ch; color: color-mix(in srgb, var(--color-text) 76%, transparent); border-left: 2px solid var(--color-accent); padding-left: 18px; }

.cb-room { display: flex; flex-wrap: wrap; align-items: stretch; border: 1px solid var(--color-neutral-400); background: #fbfbfc; }
.cb-register { display: flex; flex-direction: column; flex: 1 1 250px; min-width: 240px; border-right: 1px solid var(--color-neutral-400); }
.cb-register-head { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--color-neutral-400); background: var(--color-accent-900); color: #f2f2f3; font-family: var(--font-heading); font-weight: 600; font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; }
.cb-register-head span:first-child { margin-right: auto; white-space: nowrap; }
.cb-register-count { color: #b5d9fd; }

.cb-reg-row { text-align: left; cursor: pointer; font: inherit; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 14px 16px; border: none; border-bottom: 1px solid var(--color-divider); border-left: 3px solid transparent; background: transparent; transition: background 120ms linear, border-color 120ms linear; }
.cb-reg-row:hover { background: var(--color-accent-100); }
.cb-reg-row.is-on { background: var(--color-accent-100); border-left-color: var(--color-accent); }
.cb-reg-num { font-family: var(--font-heading); font-weight: 600; font-size: 13px; letter-spacing: 0.06em; color: var(--color-accent-700); font-variant-numeric: tabular-nums; }
.cb-reg-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cb-reg-title { font-family: var(--font-heading); font-weight: 600; font-size: 17px; line-height: 1.08; text-transform: uppercase; color: var(--color-text); }
.cb-reg-meta { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: color-mix(in srgb, var(--color-text) 62%, transparent); }
.cb-register-foot { margin-top: auto; padding: 16px; border-top: 1px solid var(--color-neutral-400); display: flex; flex-direction: column; gap: 8px; }
.cb-total { font-family: var(--font-heading); font-weight: 500; font-size: 30px; line-height: 0.9; font-variant-numeric: tabular-nums; }

.cb-stage-wrap { display: flex; flex-direction: column; flex: 3 1 460px; min-width: 0; }
.cb-stage { display: none; flex-direction: column; }
.cb-stage.is-on { display: flex; }
.cb-stage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--color-neutral-400); background: #f2f2f3; }
.cb-tag { font-family: var(--font-heading); font-weight: 600; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; color: var(--color-accent-700); border: 1px solid var(--color-accent); padding: 5px 9px; }
.cb-tag:hover { background: var(--color-accent); color: #f2f2f3; }
.cb-stage-title { font-family: var(--font-heading); font-weight: 600; font-size: 19px; line-height: 1; text-transform: uppercase; margin-right: auto; }
.cb-sheet-no { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: color-mix(in srgb, var(--color-text) 62%, transparent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cb-pdf { font-family: var(--font-heading); font-weight: 600; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; color: #f2f2f3; background: var(--color-accent); padding: 8px 13px; }
.cb-pdf:hover { background: var(--color-accent-600); color: #f2f2f3; }

.cb-view { position: relative; background: #fff; aspect-ratio: 16 / 9; min-height: 300px; overflow: hidden; }
.cb-sheet { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: none; }
.cb-sheet.is-on { display: block; }
.cb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; cursor: pointer; border: 1px solid var(--color-neutral-400); background: rgba(242,242,243,0.9); font-family: var(--font-heading); font-size: 16px; line-height: 1; color: var(--color-text); }
.cb-nav:hover { border-color: var(--color-accent); color: var(--color-accent-700); }
.cb-prev { left: 10px; }
.cb-next { right: 10px; }

.cb-rail { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--color-neutral-400); overflow-x: auto; background: #f2f2f3; }
.cb-thumb { flex: 0 0 auto; width: 74px; aspect-ratio: 16 / 11; padding: 0; cursor: pointer; background: #fff; border: 1px solid var(--color-neutral-300); overflow: hidden; display: block; }
.cb-thumb:hover { border-color: var(--color-accent); }
.cb-thumb.is-on { border-color: var(--color-accent); }
.cb-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; opacity: 0.62; }
.cb-thumb.is-on img { opacity: 1; }

.cb-stage-foot { display: flex; flex-wrap: wrap; gap: 18px; align-items: baseline; padding: 16px 18px; border-top: 1px solid var(--color-divider); }
.cb-stage-foot p { margin: 0; font-size: 14.5px; max-width: 60ch; flex: 1 1 320px; color: color-mix(in srgb, var(--color-text) 80%, transparent); }
.cb-spec { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-accent-700); white-space: nowrap; }

/* No JS: show every project stacked rather than one hidden panel. */
.no-js .cb-stage { display: flex; }
.no-js .cb-sheet { display: block; position: static; }

@media (max-width: 700px) {
  .cb-view { aspect-ratio: 4 / 3; min-height: 220px; }
  .cb-stage-title { font-size: 17px; }
}

/* ─────────────────────────────────────────────────────────────
   Interaction polish
   ───────────────────────────────────────────────────────────── */
.cb-navlink { padding-bottom: 3px; border-bottom: 2px solid transparent; transition: color 120ms linear, border-color 120ms linear; }
.cb-navlink:hover, .cb-navlink[data-active] { color: var(--color-accent); border-bottom-color: var(--color-accent); }

.table tbody tr { transition: background 120ms linear; }
.table tbody tr:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }

details > summary { transition: color 120ms linear; }
details > summary:hover { color: var(--color-accent-700); }
details[open] > summary > span:first-child { transform: rotate(45deg); }
details > summary > span:first-child { display: inline-block; transition: transform 150ms ease; }

/* ── Nav dropdowns ── */
.cb-menu-summary { cursor: pointer; list-style: none; }
.cb-menu-summary::-webkit-details-marker { display: none; }
.cb-menu-summary:hover, .cb-menu[open] > .cb-menu-summary { color: var(--color-accent); border-bottom-color: var(--color-accent); }
.cb-menu-item:hover { background: var(--color-accent-100); color: var(--color-accent-700); }
.cb-menu-item:last-child { border-bottom: none; }
@media (max-width: 700px) { .cb-menu > div { position: static !important; min-width: 0 !important; box-shadow: none !important; margin-top: 8px; } }

/* ── Phones ── */
@media (max-width: 1024px) {
  table.table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  nav .btn { flex: 1 1 100%; text-align: center; }
  nav details > div { position: static !important; right: auto !important; max-width: none !important; min-width: 0 !important; box-shadow: none !important; margin-top: 8px; width: 100%; }
  nav a, nav summary { min-height: 44px; display: flex; align-items: center; }
  .cb-reg-row { min-height: 56px; }
  .cb-thumb { width: 64px; }
  .cb-nav { width: 44px; height: 44px; }
}

@media (max-width: 620px) { header#hero > span[style*="position: absolute; top: 26px"] { display: none; } }

/* ── Content protection ── */
body { -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, select { -webkit-user-select: text; user-select: text; }
img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }

  @media (max-width: 1024px) {
    /* utility strip: stack, no cramped inline row */
    nav > div:first-child { flex-direction: column !important; align-items: flex-start !important; gap: 4px !important; }
    /* brand row first, then a full-width menu column */
    nav { row-gap: 10px !important; padding-bottom: 12px !important; }
    nav details { width: 100%; border-top: 1px solid var(--color-divider); }
    nav details summary { justify-content: space-between; width: 100%; padding: 4px 0 !important; border-bottom: none !important; font-size: 17px !important; }
    nav details > div { position: static !important; right: auto !important; max-width: none !important; min-width: 0 !important; box-shadow: none !important; border: none !important; border-top: 1px solid var(--color-divider) !important; margin: 0 0 8px !important; background: transparent !important; }
    nav details > div a { padding-left: 0 !important; padding-right: 0 !important; }
    nav > a[href^="#"]:not(.btn) { width: 100%; border-top: 1px solid var(--color-divider); padding: 10px 0 !important; }
    nav > a[href^="tel"] { width: 100%; border-top: 1px solid var(--color-divider); padding-top: 12px !important; }
    nav .btn { flex: 1 1 100%; text-align: center; justify-content: center; }
  }


  /* phones — vertical header, single-column content */
  @media (max-width: 860px) {
    /* service rows: number, copy, then steps stacked */
    article[id^="svc-"] { grid-template-columns: 1fr !important; gap: 18px !important; }
    /* two-up sections collapse */
    #faq, #formats, #quote > div { grid-template-columns: 1fr !important; }
  }
  /* the hamburger only exists on small screens */
  #nav-toggle, #nav-toggle-label { display: none; }
  @media (max-width: 1024px) {
    table.table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    nav a, nav summary, details summary { min-height: 44px; }

    /* one compact bar: brand left, hamburger right, panel hidden until tapped */
    nav { display: grid !important; grid-template-columns: 1fr auto; align-items: center; row-gap: 0 !important; column-gap: 12px; padding: 10px clamp(16px, 5vw, 24px) !important; }
    nav .nav-brand { margin-right: 0 !important; grid-column: 1; grid-row: 1; }
    nav .nav-brand svg { width: 34px !important; height: 37px !important; }
    nav .nav-brand > span > span:first-child { font-size: 27px !important; }
    nav .nav-brand > span > span:last-child { font-size: 8.5px !important; letter-spacing: 0.13em !important; }

    #nav-toggle-label { display: flex; grid-column: 2; grid-row: 1; flex-direction: column; justify-content: center; gap: 5px; width: 46px; height: 44px; padding: 0 10px; cursor: pointer; border: 1px solid var(--color-neutral-300); background: #fbfbfc; }
    #nav-toggle-label i { display: block; height: 2px; background: var(--color-text); }
    #nav-toggle:checked ~ #nav-toggle-label { background: var(--color-accent-900); border-color: var(--color-accent-900); }
    #nav-toggle:checked ~ #nav-toggle-label i { background: #f2f2f3; }

    /* the collapsible panel */
    nav > span:not(.nav-brand) { display: none !important; }
    nav > a[href^="tel"], nav .btn { display: none; }
    #nav-toggle:checked ~ span:not(.nav-brand) { display: flex !important; flex-direction: column !important; flex-wrap: nowrap !important; overflow-x: hidden; align-items: stretch !important; gap: 0 !important; grid-column: 1 / -1; width: 100%; max-height: calc(100vh - 150px); overflow-y: auto; -webkit-overflow-scrolling: touch; margin-top: 8px; }
    #nav-toggle:checked ~ a[href^="tel"] { display: block; grid-column: 1 / -1; width: 100%; border-top: 1px solid var(--color-divider); padding: 14px 0 6px !important; }
    #nav-toggle:checked ~ .btn { display: flex; grid-column: 1 / -1; width: 100%; text-align: center; justify-content: center; margin-bottom: 4px; }

    nav details { width: 100%; border-top: 1px solid var(--color-divider); }
    nav details summary { justify-content: space-between !important; width: 100%; padding: 12px 0 !important; border-bottom: none !important; font-size: 17px !important; white-space: normal !important; }
    nav details[open] summary { color: var(--color-accent); }
    nav details > div { position: static !important; top: auto !important; right: auto !important; max-width: none !important; min-width: 0 !important; box-shadow: none !important; border: none !important; margin: 0 0 8px !important; background: transparent !important; }
    nav details > div a { padding: 12px 0 12px 14px !important; border-left: 2px solid var(--color-accent-200); border-bottom: none !important; }
    nav > span:not(.nav-brand) > a { width: 100%; border-top: 1px solid var(--color-divider); padding: 12px 0 !important; border-bottom: none !important; }
  }
  /* service rows: number, copy and checklist stack on small screens */
  @media (max-width: 900px) {
    #services article { grid-template-columns: 1fr !important; gap: 18px !important; padding: 28px clamp(16px, 5vw, 24px) !important; }
    #services article > div:last-child { border-left: 2px solid var(--color-accent); padding-left: 16px !important; }
    #services article ul, #services article ol { max-width: none !important; }
  }
  @media (max-width: 620px) { header#hero > span[style*="position: absolute; top: 26px"] { display: none; } }

  /* native select on the dark quote panel: light option list, readable either way */
  select.input option { color: #1d1f20; background: #ffffff; }


