/* KiVo Engineering Services: public site styles.
   Brand colours (--accent, --ink and the derived --band colours) are set in
   Admin > Settings > Logo and colours and injected in the page head. */

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2-variations'), url('/fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations'), url('/fonts/inter-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-wght-italic.woff2') format('woff2-variations'), url('/fonts/inter-latin-wght-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2212;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/space-grotesk-latin-wght-normal.woff2') format('woff2-variations'), url('/fonts/space-grotesk-latin-wght-normal.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/space-grotesk-latin-ext-wght-normal.woff2') format('woff2-variations'), url('/fonts/space-grotesk-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --paper: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #e6f1f7;
  --ink: #1e2328;
  --text-soft: #55606b;
  --rule: #dbe3ea;
  --rule-strong: #a7b5c2;
  --accent: #004673;
  --accent-hover: #00395e;
  --on-accent: #ffffff;
  --accent-text: #004673;
  --accent-soft: #e6edf1;
  --band: #002f4d;
  --band-deep: #001e31;
  --on-band: #ffffff;
  --on-band-soft: #c3d6e4;
  --band-line: #8cc4e8;
  --band-rule: rgba(140, 196, 232, 0.22);
  --danger: #b42318;
  --success: #1b7f4b;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 76px;
  --lift: 0 18px 40px -22px rgba(0, 47, 77, 0.35);
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --paper: #00182a;
  --surface: #002238;
  --surface-2: #001f33;
  --ink: #e6eef4;
  --text-soft: #a5b8c8;
  --rule: #12395a;
  --rule-strong: #2c5a7c;
  --danger: #f2877d;
  --success: #5fcf91;
  --lift: 0 18px 40px -20px rgba(0, 0, 0, 0.6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --paper: #00182a;
    --surface: #002238;
    --surface-2: #001f33;
    --ink: #e6eef4;
    --text-soft: #a5b8c8;
    --rule: #12395a;
    --rule-strong: #2c5a7c;
    --danger: #f2877d;
    --success: #5fcf91;
    --lift: 0 18px 40px -20px rgba(0, 0, 0, 0.6);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss03';
}
img, svg, picture { max-width: 100%; }
img { height: auto; }
picture { display: block; }
a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); margin: 0 0 0.4em; font-weight: 650; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0 0 0.5em; }
h3 { font-size: 1.25rem; margin: 0 0 0.4em; letter-spacing: -0.01em; }
p { text-wrap: pretty; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
.icon { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: var(--radius-sm); text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-tint { background: var(--surface-2); }
.section-flush-top { padding-top: clamp(32px, 4vw, 48px); }
.section-tight-top { padding-top: 24px; }
.section-after { margin-top: 48px; }
.section-head { margin-bottom: clamp(28px, 4vw, 48px); max-width: 720px; }
.section-head h2 { margin-bottom: 0.3em; }
.section-head-split { display: flex; justify-content: space-between; align-items: end; gap: 24px; max-width: none; flex-wrap: wrap; }
.section-intro { margin: 0; color: var(--text-soft); max-width: 60ch; font-size: 1.08rem; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.28rem); line-height: 1.55; }
.empty { color: var(--text-soft); padding: 24px 0; margin: 0; }
.empty-large { padding: clamp(28px, 5vw, 56px); border: 1px dashed var(--rule-strong); border-radius: var(--radius); display: grid; gap: 18px; justify-items: start; background: var(--surface); }
.empty-large p { margin: 0; max-width: 60ch; font-size: 1.1rem; color: var(--ink); }

/* ---------- Buttons and links ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 11px 20px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font: inherit; font-weight: 600; font-size: 0.98rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.button:active { transform: translateY(1px); }
.button-primary { background: var(--accent); color: var(--on-accent); }
.button-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.button-secondary { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); }
.button-secondary:hover { border-color: var(--accent); color: var(--accent-text); }
.button-light { background: #fff; color: var(--band); }
.button-light:hover { background: #e6f1f7; color: var(--band); }
.button-ghost { background: transparent; color: var(--on-band); border-color: rgba(255, 255, 255, 0.36); }
.button-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); color: #fff; }
.button-large { min-height: 54px; padding: 14px 26px; font-size: 1.04rem; }
.button-small { min-height: 38px; padding: 7px 14px; font-size: 0.9rem; }
.button-block { width: 100%; }
.button .icon { width: 18px; height: 18px; }
.text-link {
  font-weight: 600; color: var(--accent-text); text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.text-link .icon { width: 18px; height: 18px; transition: transform 0.2s ease; }
.text-link:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.text-link:hover .icon { transform: translateX(3px); }
.icon-button {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink); cursor: pointer;
}
.icon-button:hover { background: var(--accent-soft); color: var(--accent-text); }

/* ---------- Brand logo ---------- */
.brand { display: inline-flex; align-items: center; margin-right: auto; color: var(--ink); text-decoration: none; flex: none; }
.brand-logo { display: block; height: 44px; width: auto; max-width: 220px; object-fit: contain; }
.brand-logo-dark { display: none; }
:root[data-theme='dark'] .brand-logo-light { display: none; }
:root[data-theme='dark'] .brand-logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .brand-logo-light { display: none; }
  :root:not([data-theme='light']) .brand-logo-dark { display: block; }
}
.wordmark { display: inline-flex; align-items: baseline; gap: 9px; line-height: 1; }
.wordmark-name { font-family: var(--display); font-weight: 700; font-size: 1.7rem; letter-spacing: -0.03em; color: var(--accent-text); }
.wordmark-sub { font-weight: 500; font-size: 0.95rem; color: var(--text-soft); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; gap: 18px; min-height: var(--header-h); }
.main-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  position: relative; display: block; padding: 9px 13px; border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.97rem;
}
.main-nav a:hover { color: var(--accent-text); background: var(--accent-soft); }
.main-nav a[aria-current] { color: var(--accent-text); font-weight: 600; }
.main-nav a[aria-current]::after { content: ''; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 2px; }
.header-phone { display: inline-flex; align-items: center; gap: 8px; margin: 0 10px 0 6px; font-weight: 600; font-size: 0.97rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.header-phone .icon { width: 18px; height: 18px; color: var(--accent-text); }
.header-phone:hover { color: var(--accent-text); }
.header-cta { margin-left: 8px; }
.theme-icon-dark { display: none; }
.theme-icon-light { display: inline-grid; }
:root[data-theme='dark'] .theme-icon-light { display: none; }
:root[data-theme='dark'] .theme-icon-dark { display: inline-grid; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-icon-light { display: none; }
  :root:not([data-theme='light']) .theme-icon-dark { display: inline-grid; }
}
.menu-toggle { display: none; }
.menu-close { display: none; }
.menu-toggle[aria-expanded='true'] .menu-open { display: none; }
.menu-toggle[aria-expanded='true'] .menu-close { display: inline; }
.mobile-menu { border-top: 1px solid var(--rule); background: var(--surface); padding-block: 8px 28px; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); overflow-y: auto; }
.mobile-menu ul { list-style: none; margin: 0 0 18px; padding: 0; }
.mobile-menu li a {
  display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--rule);
  font-family: var(--display); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; color: var(--ink);
}
.mobile-menu li a[aria-current] { color: var(--accent-text); }
.mobile-menu-contact { display: grid; gap: 12px; margin: 8px 0 22px; }
.mobile-menu-contact a { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; font-weight: 600; color: var(--ink); }
.mobile-menu-contact .icon { color: var(--accent-text); }
.header-call { display: none; }
@media (max-width: 1240px) { .header-phone { display: none; } .header-call { display: inline-grid; } }
@media (max-width: 1060px) {
  .main-nav, .header-cta { display: none; }
  .menu-toggle { display: inline-grid; }
  :root { --header-h: 68px; }
  .brand-logo { height: 40px; }
}
@media (min-width: 1061px) { .mobile-menu { display: none !important; } }

/* ---------- Signed-in bar ---------- */
.admin-bar {
  position: fixed; left: 16px; bottom: 16px; z-index: 80;
  display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 14px;
  background: var(--band-deep); color: #fff; border-radius: 999px; font-size: 0.88rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.admin-bar:not(:has(span)) { padding-left: 6px; }
.admin-bar span { max-width: 32ch; }
.admin-bar a { background: #fff; color: var(--band); padding: 6px 14px; border-radius: 999px; font-weight: 600; text-decoration: none; }

/* ---------- Deep band (hero, page headers, call to action, footer) ---------- */
.band {
  position: relative; isolation: isolate;
  background-color: var(--band); color: var(--on-band-soft);
  background-image:
    linear-gradient(rgba(140, 196, 232, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 196, 232, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(140, 196, 232, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 196, 232, 0.045) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  background-position: -1px -1px;
}
.band::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 85% 10%, transparent 0%, transparent 40%, color-mix(in srgb, var(--band-deep) 85%, transparent) 100%);
}
.band h1, .band h2, .band h3 { color: var(--on-band); }
.band a:not(.button) { color: var(--on-band); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(44px, 6vw, 88px) 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero-title { font-size: clamp(2.5rem, 5vw, 4.25rem); font-weight: 650; line-height: 1.02; letter-spacing: -0.035em; margin: 0 0 24px; max-width: 14ch; }
.hero-text { font-size: clamp(1.08rem, 1.4vw, 1.22rem); line-height: 1.6; color: var(--on-band-soft); max-width: 56ch; margin: 0 0 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.credentials {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(40px, 6vw, 72px) 0 0; border-top: 1px solid var(--band-rule);
}
.credentials > div { padding: 22px 22px 26px; border-left: 1px solid var(--band-rule); min-width: 0; }
.credentials > div:first-child { border-left: 0; padding-left: 0; }
.credentials dt { font-family: var(--display); font-weight: 600; font-size: 1.06rem; line-height: 1.25; color: var(--on-band); letter-spacing: -0.01em; }
.credentials dd { margin: 4px 0 0; font-size: 0.9rem; color: var(--on-band-soft); line-height: 1.4; }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-drawing { max-width: 540px; }
  .credentials { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .credentials > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .credentials > div:nth-child(n + 3) { border-top: 1px solid var(--band-rule); }
}
@media (max-width: 520px) {
  .credentials > div { padding: 16px 14px 18px; }
  .credentials > div:nth-child(odd) { padding-left: 0; }
  .credentials dt { font-size: 0.98rem; }
}

/* Detail drawing, drawn in light lines on the deep band */
.hero-drawing { margin: 0; color: #e6f1f7; }
.drawing { display: block; width: 100%; height: auto; color: inherit; overflow: visible; }
.drawing path, .drawing circle { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.drawing .d-thick { stroke-width: 2.4; }
.drawing .d-thin { stroke-width: 1; opacity: 0.7; }
.drawing .d-hatch { --o: 0.32; opacity: 0.32; }
.drawing .d-anchor path { fill: var(--band); stroke-width: 1.7; }
.drawing .d-cone path { stroke: var(--band-line); stroke-width: 1.6; stroke-dasharray: 7 6; }
.drawing .d-tick { stroke-width: 1.4; }
.drawing .d-load { stroke: var(--band-line); stroke-width: 2.6; }
.drawing .d-load-head { fill: var(--band-line); stroke: none; }
.drawing text { fill: currentColor; stroke: none; font-family: var(--font); font-size: 17px; }
.drawing .d-label-load text { fill: var(--band-line); font-weight: 600; font-style: italic; font-size: 19px; }
.drawing .d-ref circle { stroke-width: 1.6; }
.drawing .d-ref text { font-family: var(--display); font-weight: 600; font-size: 20px; }
.hero-drawing figcaption {
  display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; padding-top: 12px;
  border-top: 1px solid var(--band-rule); font-size: 0.86rem; color: var(--on-band-soft);
}
.drawing-ref { font-weight: 600; color: var(--on-band); }
@media (prefers-reduced-motion: no-preference) {
  .js .drawing .d-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: d-draw 0.9s cubic-bezier(0.45, 0, 0.2, 1) var(--d, 0s) forwards; }
  .js .drawing .d-fade { opacity: 0; animation: d-fade 0.6s ease var(--d, 0s) forwards; }
}
@keyframes d-draw { to { stroke-dashoffset: 0; } }
@keyframes d-fade { to { opacity: var(--o, 1); } }

/* ---------- Services list ---------- */
.schedule { list-style: none; margin: 0; padding: 0; --row-pad: 20px; }
.schedule-row {
  position: relative; display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) minmax(0, 4fr) 40px;
  gap: 8px 36px; align-items: center;
  padding: 26px var(--row-pad); margin-inline: calc(-1 * var(--row-pad));
  border-radius: var(--radius-sm);
  background: linear-gradient(var(--rule), var(--rule)) no-repeat center bottom / calc(100% - 2 * var(--row-pad)) 1px;
  transition: background-color 0.18s ease;
}
.schedule-row:first-child {
  background-image: linear-gradient(var(--rule), var(--rule)), linear-gradient(var(--rule), var(--rule));
  background-position: center top, center bottom;
  background-size: calc(100% - 2 * var(--row-pad)) 1px;
}
.schedule-row:hover { background-color: var(--surface); }
.section-tint .schedule-row:hover { background-color: var(--paper); }
.schedule-title { margin: 0; font-size: clamp(1.18rem, 1.6vw, 1.4rem); font-weight: 600; letter-spacing: -0.015em; }
.schedule-title a { color: var(--ink); text-decoration: none; }
.schedule-title a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.schedule-row:hover .schedule-title a { color: var(--accent-text); }
.schedule-summary { margin: 0; color: var(--text-soft); font-size: 1rem; }
.schedule-standards { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.schedule-arrow {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--rule-strong); color: var(--accent-text);
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.schedule-arrow .icon { width: 18px; height: 18px; }
.schedule-row:hover .schedule-arrow { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: translateX(3px); }
.std {
  font-size: 0.78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--accent-soft); color: var(--accent-text);
}
.schedule-compact .schedule-row { grid-template-columns: minmax(0, 1fr) 40px; align-items: start; gap: 8px 24px; }
.schedule-compact .schedule-title { grid-column: 1; }
.schedule-compact .schedule-summary { grid-column: 1; }
.schedule-compact .schedule-standards { grid-column: 1; justify-content: flex-start; margin-top: 4px; }
.schedule-compact .schedule-arrow { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
@media (max-width: 900px) {
  .schedule { --row-pad: 14px; }
  .schedule-row { grid-template-columns: minmax(0, 1fr) 40px; align-items: start; gap: 8px 20px; }
  .schedule-title, .schedule-summary, .schedule-standards { grid-column: 1; }
  .schedule-standards { justify-content: flex-start; margin-top: 4px; }
  .schedule-arrow { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}

.services-split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.services-split .section-head { position: sticky; top: calc(var(--header-h) + 32px); margin-bottom: 0; }
.services-split .section-head .text-link { margin-top: 22px; }
@media (max-width: 960px) {
  .services-split { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .services-split .section-head { position: static; margin-bottom: 20px; }
}

/* ---------- Projects ---------- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 40px 28px; }
.project-grid-feature { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project-grid-feature .project-card-large { grid-column: span 2; grid-row: span 2; }
.project-grid-feature .project-card-large .project-card-image { aspect-ratio: 16 / 11; }
.project-grid-feature .project-card-large h3 { font-size: 1.6rem; }
@media (max-width: 900px) {
  .project-grid-feature { grid-template-columns: minmax(0, 1fr); }
  .project-grid-feature .project-card-large { grid-column: auto; grid-row: auto; }
}
.project-card[hidden] { display: none; }
.project-card-link { display: block; color: inherit; text-decoration: none; }
.project-card-image { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); border-radius: var(--radius); }
.project-card-image picture, .project-card-image img { width: 100%; height: 100%; }
.project-card-image img { object-fit: cover; transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
.project-card-link:hover img { transform: scale(1.04); }
.image-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: #e6f1f7; }
.image-placeholder svg { width: 54%; max-width: 260px; height: auto; opacity: 0.9; }
.image-placeholder svg path, .image-placeholder svg rect { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.image-placeholder svg .ph-accent { stroke: var(--band-line); stroke-dasharray: 5 5; }
.project-card-sector {
  position: absolute; left: 14px; top: 14px; padding: 4px 11px; border-radius: 999px;
  background: rgba(0, 30, 49, 0.72); color: #fff; font-size: 0.8rem; font-weight: 600;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.project-card-body { padding-top: 16px; }
.project-card h3 { margin: 0 0 6px; font-size: 1.24rem; transition: color 0.15s ease; }
.project-card-link:hover h3 { color: var(--accent-text); }
.project-card-meta { margin: 0 0 6px; font-size: 0.88rem; color: var(--text-soft); }
.project-card-meta:empty { display: none; }
.project-card-summary { margin: 0; color: var(--text-soft); font-size: 0.98rem; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.filters { display: grid; gap: 12px; margin-bottom: 40px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-status { margin: 0; font-size: 0.9rem; color: var(--text-soft); min-height: 1.2em; }
.chip {
  display: inline-flex; align-items: center; min-height: 38px; padding: 6px 16px;
  border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--surface);
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.92rem; cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent-text); }
.chip[aria-current='true'] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip-quiet { background: transparent; }
.chip-small { min-height: 30px; padding: 3px 12px; font-size: 0.84rem; }

.project-hero { margin: 0 0 48px; }
.project-hero img { width: 100%; max-height: 660px; object-fit: cover; border-radius: var(--radius-lg); }
.gallery { margin-top: 56px; }
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 16px; }
.gallery-item { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); border-radius: var(--radius-sm); cursor: zoom-in; }
.gallery-item picture, .gallery-item img { width: 100%; height: 100%; }
.gallery-item img { object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-caption { margin: 6px 0 0; font-size: 0.86rem; color: var(--text-soft); }

.lightbox {
  position: fixed; inset: 0; z-index: 120;
  display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center;
  background: rgba(0, 16, 28, 0.95); color: #eef4f8;
}
.lightbox[hidden] { display: none; }
.lightbox .icon-button { color: #fff; width: 48px; height: 48px; justify-self: center; }
.lightbox .icon-button:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.lightbox-close { position: absolute; top: 14px; right: 14px; }
.lightbox-figure { margin: 0; display: grid; justify-items: center; gap: 12px; }
.lightbox-figure img { max-width: 100%; max-height: 84vh; object-fit: contain; border-radius: var(--radius-sm); }
.lightbox-figure figcaption { font-size: 0.95rem; text-align: center; max-width: 70ch; }
@media (max-width: 640px) { .lightbox { grid-template-columns: 44px minmax(0, 1fr) 44px; } }

/* ---------- Who we work with ---------- */
.audiences { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.audience { padding: 24px 0 30px; border-top: 1px solid var(--rule-strong); }
.audience h3 { font-size: 1.15rem; margin: 0 0 8px; }
.audience p { margin: 0; color: var(--text-soft); font-size: 0.98rem; }
@media (max-width: 900px) { .audiences { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .audiences { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Process ---------- */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.process-step { position: relative; padding-top: 68px; }
.process-step::before { content: ''; position: absolute; top: 23px; left: 60px; right: -20px; height: 1px; background: var(--rule-strong); }
.process-step:last-child::before { display: none; }
.process-number {
  position: absolute; top: 0; left: 0; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 1.15rem;
  background: var(--accent); color: var(--on-accent);
}
.process-step h3 { margin: 0 0 8px; }
.process-step p { margin: 0; color: var(--text-soft); }
@media (max-width: 960px) {
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-step::before { display: none; }
}
@media (max-width: 560px) { .process { grid-template-columns: minmax(0, 1fr); } }

/* ---------- About ---------- */
.about-split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.about-split-photo { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-lg); }
.about-copy h2 { max-width: 18ch; }
.about-copy .lead { margin: 0 0 26px; color: var(--text-soft); }
.engineer-card { background: var(--band); color: var(--on-band-soft); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 40px); }
.engineer-card-name { margin: 0; font-family: var(--display); font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; color: var(--on-band); line-height: 1.15; }
.engineer-card-role { margin: 6px 0 22px; }
.engineer-card-creds { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.engineer-card-creds li { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--band-rule); color: var(--on-band); font-size: 0.88rem; font-weight: 600; }
.engineer-card-regs { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--band-rule); font-size: 0.93rem; line-height: 1.7; }
@media (max-width: 860px) {
  .about-split, .about-split-photo { grid-template-columns: minmax(0, 1fr); }
  .about-photo { max-width: 380px; }
}

.person { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; margin-bottom: 48px; }
.person-no-photo { grid-template-columns: minmax(0, 1fr); max-width: 780px; }
.person-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-lg); }
.person h3 { font-size: 1.75rem; margin: 0 0 6px; }
.person-role { margin: 0 0 16px; color: var(--text-soft); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.person-role span { font-weight: 600; color: var(--accent-text); }
.person p { max-width: 66ch; }
@media (max-width: 760px) { .person { grid-template-columns: minmax(0, 1fr); } .person-photo { max-width: 300px; } }
.register { width: 100%; max-width: 900px; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.register-title { margin: 8px 0 12px; }
.register th, .register td { text-align: left; vertical-align: top; padding: 14px 18px; border-top: 1px solid var(--rule); }
.register tr:first-child th, .register tr:first-child td { border-top: 0; }
.register th { width: 52%; font-weight: 600; }
.register td { color: var(--text-soft); }

.testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 28px; }
.testimonial { margin: 0; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--rule); }
.testimonial blockquote { margin: 0 0 18px; font-size: 1.1rem; line-height: 1.6; }
.testimonial blockquote p { margin: 0; }
.testimonial figcaption { display: grid; gap: 2px; font-size: 0.93rem; }
.testimonial figcaption span { color: var(--text-soft); }

/* ---------- Articles ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 24px; }
.post-card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 28px 28px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--rule);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.section-tint .post-card { border-color: transparent; }
.post-card:hover { border-color: var(--accent); box-shadow: var(--lift); transform: translateY(-2px); }
.post-card-topic { margin: 0; font-size: 0.84rem; font-weight: 600; color: var(--accent-text); }
.post-card h3 { margin: 0; font-size: 1.28rem; line-height: 1.22; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.post-card-excerpt { margin: 0; color: var(--text-soft); font-size: 0.97rem; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-meta { margin: auto 0 0; padding-top: 14px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.86rem; color: var(--text-soft); }

.reading-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.reading-progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.post-header { padding-block: clamp(36px, 6vw, 72px) clamp(28px, 4vw, 44px); }
.post-header h1 { max-width: 24ch; font-size: clamp(2rem, 4.2vw, 3.1rem); }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 0; margin: 0; color: var(--text-soft); font-size: 0.96rem; }
.post-meta > * + * { margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--rule-strong); }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; }
.post-cover { margin: 0 0 48px; }
.post-cover img { width: 100%; border-radius: var(--radius-lg); }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr); padding-bottom: 80px; }
.post-layout-toc { grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }
.toc { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; font-size: 0.92rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc a { display: block; margin-left: -1px; padding: 6px 0 6px 16px; border-left: 2px solid transparent; color: var(--text-soft); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--accent-text); border-left-color: var(--accent); font-weight: 600; }
.toc .toc-l3 a { padding-left: 30px; }
@media (max-width: 1000px) {
  .post-layout-toc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; margin-bottom: 32px; padding: 16px 20px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
}
.post-footer { display: grid; gap: 28px; max-width: 70ch; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--rule); }
.post-related-service ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.post-related-service a { font-weight: 600; font-size: 1.08rem; }
.post-related-service span { display: block; color: var(--text-soft); font-size: 0.95rem; }
.share { display: flex; flex-wrap: wrap; gap: 10px; }
.author-box { display: grid; gap: 4px; padding: 22px 24px; border-radius: var(--radius); background: var(--surface-2); }
.author-box p { margin: 0; }

/* ---------- Page header, breadcrumbs, content layout ---------- */
.page-header { padding-block: clamp(40px, 6vw, 80px) clamp(40px, 5vw, 64px); }
.page-header h1 { margin: 16px 0 14px; max-width: 22ch; }
.page-intro { margin: 0; max-width: 60ch; font-size: clamp(1.08rem, 1.5vw, 1.22rem); color: var(--text-soft); }
.band .page-intro { color: var(--on-band-soft); }
.page-header-standards { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; }
.band .std { background: rgba(140, 196, 232, 0.14); color: var(--on-band); }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 0.88rem; }
.breadcrumbs li + li::before { content: '/'; margin-right: 8px; color: var(--rule-strong); }
.breadcrumbs a { color: var(--text-soft); }
.breadcrumbs [aria-current] { color: var(--ink); }
.band .breadcrumbs li + li::before { color: var(--band-line); opacity: 0.6; }
.band .breadcrumbs a { color: var(--on-band-soft); }
.band .breadcrumbs [aria-current] { color: var(--on-band); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 6vw, 88px); align-items: start; padding-block: clamp(40px, 6vw, 72px) clamp(56px, 7vw, 96px); }
.content-aside { position: sticky; top: calc(var(--header-h) + 28px); display: grid; gap: 28px; }
.content-cover { margin-bottom: 36px; }
.content-cover img { width: 100%; border-radius: var(--radius-lg); }
@media (max-width: 960px) {
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .content-aside { position: static; }
}

/* Side panels */
.spec { margin: 0; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.spec-row { padding: 18px 22px; border-top: 1px solid var(--rule); }
.spec-row:first-child { border-top: 0; }
.spec-label { display: block; margin: 0 0 8px; font-family: var(--font); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0; color: var(--text-soft); line-height: 1.3; }
.spec dd { margin: 0; }
.spec-facts dd { font-weight: 500; }
.spec-list { margin: 0; padding-left: 18px; }
.spec-list li + li { margin-top: 6px; }
.spec-list li::marker { color: var(--accent-text); }
.spec-list-plain { list-style: none; padding: 0; }
.spec-action { display: grid; gap: 14px; background: var(--surface-2); }
.spec-phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; color: var(--ink); }
.spec-phone .icon { color: var(--accent-text); }
.side-nav ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.side-nav a { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-size: 0.97rem; }
.side-nav a:hover { color: var(--accent-text); }
.side-nav a[aria-current] { font-weight: 600; color: var(--accent-text); box-shadow: inset 3px 0 0 var(--accent); padding-left: 14px; }

/* ---------- Prose (Markdown content) ---------- */
.prose { max-width: 70ch; }
.prose-page { padding-block: clamp(40px, 6vw, 72px) 88px; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.45rem, 2.3vw, 1.85rem); margin: 2em 0 0.55em; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h3 { font-size: 1.25rem; margin: 1.7em 0 0.45em; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h4 { font-size: 1.06rem; margin: 1.4em 0 0.4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.05em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--accent-text); }
.prose strong { font-weight: 650; }
.prose a { text-decoration-thickness: 1px; }
.prose blockquote { margin: 1.8em 0; padding: 18px 22px; border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-2); color: var(--ink); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose figure { margin: 2em 0; }
.prose img { border-radius: var(--radius-sm); }
.prose figcaption { margin-top: 8px; font-size: 0.88rem; color: var(--text-soft); }
.prose code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-2); padding: 0.12em 0.36em; border-radius: 4px; }
.prose pre { overflow-x: auto; padding: 16px 18px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 0.9rem; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }
.prose sub, .prose sup { font-size: 0.72em; line-height: 0; }
.table-wrap { overflow-x: auto; margin: 1.6em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.prose thead th { border-bottom: 2px solid var(--ink); font-weight: 600; }

/* ---------- FAQs ---------- */
.faqs { max-width: 800px; margin-top: 64px; }
.faqs h2 { margin-bottom: 20px; font-size: clamp(1.45rem, 2.3vw, 1.85rem); }
.faq { border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--surface); }
.faq + .faq { margin-top: 10px; }
.faq summary { position: relative; padding: 18px 56px 18px 22px; font-weight: 600; font-size: 1.04rem; cursor: pointer; list-style: none; border-radius: inherit; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-text); }
.faq summary::after {
  content: ''; position: absolute; right: 24px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s ease;
}
.faq[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq p { margin: 0; padding: 0 22px 20px; max-width: 68ch; color: var(--text-soft); }

/* ---------- Call to action ---------- */
.cta-band { padding-block: clamp(64px, 8vw, 104px); }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.cta-inner h2 { margin: 0 0 10px; max-width: 20ch; font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.cta-inner p { margin: 0; max-width: 54ch; color: var(--on-band-soft); font-size: 1.08rem; }
.cta-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; flex: none; }
.cta-phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; color: var(--on-band); }
.cta-phone .icon { color: var(--band-line); }
@media (max-width: 760px) { .cta-inner { flex-direction: column; align-items: flex-start; } }

/* ---------- Forms ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(32px, 5vw, 64px); align-items: start; padding-block: clamp(40px, 6vw, 72px) 0; }
.contact-form-wrap { padding: clamp(24px, 4vw, 44px); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); }
.contact-aside { position: sticky; top: calc(var(--header-h) + 28px); }
.contact-card { margin: 0; padding: clamp(26px, 3vw, 34px); border-radius: var(--radius-lg); background: var(--band); color: var(--on-band-soft); }
.contact-card > div + div { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--band-rule); }
.contact-card dt { font-size: 0.8125rem; font-weight: 600; color: var(--band-line); margin-bottom: 4px; }
.contact-card dd { margin: 0; color: var(--on-band); }
.contact-card a { color: var(--on-band); text-decoration: none; }
.contact-card a:hover { text-decoration: underline; }
.contact-card-phone { font-family: var(--display); font-size: 1.6rem; font-weight: 600; letter-spacing: -0.01em; }
@media (max-width: 960px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-aside { position: static; order: -1; }
}
.contact-form-wrap h2 { margin-top: 0; font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.form-intro { margin: 0 0 28px; color: var(--text-soft); }
.form { display: grid; gap: 20px; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 640px) { .field-row { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 7px; align-content: start; min-width: 0; margin: 0; padding: 0; border: 0; }
.field label, .field legend { font-weight: 600; font-size: 0.95rem; padding: 0; }
.field legend { margin-bottom: 10px; }
.optional { font-weight: 400; font-size: 0.86rem; color: var(--text-soft); }
input[type='text'], input[type='email'], input[type='tel'], input[type='search'], input[type='number'], input[type='date'], select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule-strong); border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
input:hover, select:hover, textarea:hover { border-color: var(--accent); }
textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
input[type='file'] { font: inherit; font-size: 0.95rem; color: var(--text-soft); max-width: 100%; }
input[type='file']::file-selector-button {
  margin-right: 12px; padding: 9px 16px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
}
input[type='file']::file-selector-button:hover { border-color: var(--accent); color: var(--accent-text); }
input[type='checkbox'] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; margin-top: 3px; }
.has-error input, .has-error textarea { border-color: var(--danger); }
.field-error { margin: 0; color: var(--danger); font-size: 0.88rem; }
.field-error:empty { display: none; }
.form-error { margin: 0; padding: 12px 16px; border-left: 3px solid var(--danger); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: color-mix(in srgb, var(--danger) 9%, var(--surface)); }
.form-error[hidden] { display: none; }
.choice-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; display: inline-flex; }
.choice input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 40px; padding: 7px 15px; border: 1px solid var(--rule-strong); border-radius: 999px; font-size: 0.93rem; cursor: pointer; background: var(--paper); transition: border-color 0.15s ease, background-color 0.15s ease; }
.choice:hover span { border-color: var(--accent); }
.choice input:checked + span { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.choice input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; cursor: pointer; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 0.9rem; color: var(--text-soft); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 6px; }
.form-note { margin: 0; font-size: 0.88rem; color: var(--text-soft); }
.form-success { display: flex; gap: 14px; align-items: flex-start; padding: 22px; border-radius: var(--radius); border: 1px solid var(--success); background: color-mix(in srgb, var(--success) 9%, var(--surface)); }
.form-success[hidden] { display: none; }
.form-success .icon { width: 26px; height: 26px; color: var(--success); }
.form-success p { margin: 0; font-size: 1.06rem; }
.enquiry-form[hidden] { display: none; }
.button[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Search, pagination, errors ---------- */
.search-form { display: flex; gap: 10px; max-width: 640px; margin-top: 22px; }
.search-form input { flex: 1; }
.band .search-form input { background: #fff; color: #1e2328; border-color: transparent; }
.search-results { padding-block: 40px 96px; }
.search-count { color: var(--text-soft); }
.result-list { list-style: none; margin: 0; padding: 0; max-width: 800px; display: grid; gap: 12px; }
.result-list li { padding: 20px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--rule); }
.result-list h2 { font-size: 1.25rem; margin: 0 0 6px; }
.result-list h2 a { color: var(--ink); text-decoration: none; }
.result-list h2 a:hover { color: var(--accent-text); }
.result-list p { margin: 0; color: var(--text-soft); }
.result-kind { margin: 0 0 4px !important; font-size: 0.82rem; font-weight: 600; color: var(--accent-text) !important; }
mark { background: color-mix(in srgb, var(--accent) 18%, transparent); color: inherit; padding: 0 2px; border-radius: 3px; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 40px; }
.pagination-status { color: var(--text-soft); font-size: 0.92rem; }
.error-page h1 { max-width: 20ch; }
.error-code { margin: 0; font-family: var(--display); font-size: clamp(4rem, 12vw, 8rem); font-weight: 700; line-height: 1; letter-spacing: -0.04em; color: var(--accent-text); }
.error-links { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------- Footer ---------- */
.site-footer { padding: clamp(56px, 7vw, 88px) 0 0; background-color: var(--band-deep); background-image: none; }
.site-footer.band::after { display: none; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 1.2fr); gap: 40px; padding-bottom: clamp(40px, 5vw, 64px); }
.footer-logo { display: block; height: 52px; width: auto; max-width: 220px; object-fit: contain; }
.footer-logo-filter { filter: brightness(0) invert(1); }
.footer-text { margin: 18px 0 0; font-size: 0.95rem; max-width: 34ch; }
.footer-label { margin: 0 0 14px; font-size: 0.8125rem; font-weight: 600; color: var(--band-line); }
.footer-links, .footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 0.95rem; }
.footer-links a, .footer-contact a { color: var(--on-band); text-decoration: none; }
.footer-links a:hover, .footer-contact a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-contact li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; overflow-wrap: anywhere; }
.footer-contact .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--band-line); }
.footer-social { display: flex; gap: 4px; margin-top: 18px; margin-left: -10px; }
.footer-social .icon-button { color: var(--on-band); }
.footer-social .icon-button:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.footer-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 22px 0 28px; border-top: 1px solid var(--band-rule); font-size: 0.86rem; }
.footer-bar p { margin: 0; }
.footer-bar-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

/* ---------- Client quote and invoice page ---------- */
.doc-body { background: var(--paper); }
.doc-site-header { background: var(--surface); border-bottom: 1px solid var(--rule); }
.doc-site-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; min-height: 72px; }
.doc-site-contact { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: 0.92rem; }
.doc { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 32px; align-items: start; padding-block: 40px 80px; }
@media (max-width: 960px) { .doc { grid-template-columns: minmax(0, 1fr); } }
.doc-paper { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: clamp(22px, 4vw, 52px); min-width: 0; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 22px; border-bottom: 2px solid var(--ink); }
.doc-head h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.doc-number { color: var(--text-soft); font-weight: 600; }
.doc-project { margin: 6px 0 0; font-size: 1.1rem; }
.status { display: inline-flex; align-items: center; padding: 4px 12px; border: 1px solid currentColor; border-radius: 999px; font-size: 0.85rem; font-weight: 600; white-space: nowrap; color: var(--accent-text); }
.status-paid, .status-accepted { color: var(--success); }
.status-overdue, .status-declined, .status-void { color: var(--danger); }
.status-expired, .status-draft { color: var(--text-soft); }
.doc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 0; border-bottom: 1px solid var(--rule); }
.doc-facts > div { padding: 16px 0; }
.doc-facts dt, .doc-pay dt { font-size: 0.8125rem; font-weight: 600; color: var(--text-soft); }
.doc-facts dd { margin: 2px 0 0; font-weight: 600; }
.doc-parties { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.doc-parties p { margin: 0; }
@media (max-width: 600px) { .doc-parties { grid-template-columns: minmax(0, 1fr); } }
.doc-site { margin: 16px 0 0; }
.doc-scope { margin-top: 22px; }
.doc-scope p { margin: 0; }
.doc-items { width: 100%; border-collapse: collapse; margin-top: 26px; font-size: 0.95rem; }
.doc-items th { text-align: left; padding: 10px; background: var(--surface-2); font-size: 0.8125rem; font-weight: 600; color: var(--text-soft); }
.doc-items th:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.doc-items th:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.doc-items td { padding: 14px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.doc-totals { margin: 18px 0 0 auto; max-width: 380px; display: grid; }
.doc-totals > div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; font-variant-numeric: tabular-nums; }
.doc-totals dd { margin: 0; }
.doc-total { margin-top: 4px; padding-top: 10px !important; border-top: 2px solid var(--ink); font-weight: 700; }
.doc-balance { margin-top: 8px; padding: 12px 14px !important; border-radius: var(--radius-sm); background: var(--accent); color: var(--on-accent); font-weight: 700; }
.doc-notes { margin-top: 30px; }
.doc-notes p { margin: 0; color: var(--text-soft); }
.doc-aside { display: grid; gap: 16px; position: sticky; top: 24px; }
.doc-box { padding: 24px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.doc-box p { margin: 0 0 12px; }
.doc-box p:last-child { margin-bottom: 0; }
.doc-box-title { font-size: 1.15rem; margin: 0 0 4px; }
.doc-box-amount { display: grid; gap: 2px; margin: 0 0 18px !important; }
.doc-box-amount strong { font-family: var(--display); font-size: 2.2rem; line-height: 1.1; letter-spacing: -0.02em; }
.doc-box-amount span { color: var(--text-soft); font-size: 0.92rem; }
.doc-box-good .icon, .doc-box-good-text .icon { color: var(--success); }
.doc-pay { display: grid; gap: 8px; margin: 0 0 16px; }
.doc-pay div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 1px dashed var(--rule); }
.doc-pay dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.doc-payid { font-size: 0.95rem; }
.doc-decline { margin-top: 14px; }
.doc-decline summary { cursor: pointer; color: var(--text-soft); }
.doc-decline form { margin-top: 12px; }
.doc-help { margin: 0; font-size: 0.9rem; color: var(--text-soft); }

/* ---------- Motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
}
@media print {
  .site-header, .site-footer, .cta-band, .admin-bar, .doc-aside, .doc-site-header, .reading-progress, .toc, .share, .skip-link, .filters { display: none !important; }
  body, .doc-body { background: #fff; color: #000; }
  .band { background: #fff !important; color: #000; }
  .band h1, .band h2, .band .page-intro, .band a { color: #000 !important; }
  .doc { display: block; padding: 0; }
  .doc-paper { border: 0; padding: 0; }
  .content-grid, .post-layout-toc { display: block; }
  a { text-decoration: none; }
}

/* An uploaded logo without a dark version turns white in dark mode. */
:root[data-theme='dark'] .brand-logo-auto { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .brand-logo-auto { filter: brightness(0) invert(1); } }
.project-card-large .image-placeholder svg { max-width: 380px; }
