/* ViCargo — site-wide component library, built on the approved Direction D theme.
   Loads after colors.css + directions.css: reuses --blue-600, --steel-*, .btn, #top-bar,
   .a-modes, .c-facts as-is. Only new, additive rules live here. */

/* page chrome: any inner page without a full-viewport hero needs top padding so content
   doesn't sit under the fixed nav, and the nav needs to be permanently in its "solid" state */
.page { padding-top: var(--bar-h); }
.page section[id] { scroll-margin-top: var(--bar-h); }
#top-bar.is-static { background: var(--bar-bg); color: var(--bar-ink); backdrop-filter: saturate(160%) blur(14px); box-shadow: 0 1px 0 var(--border-hairline); }

/* navbar — logo at the left edge, every link and control grouped at the right.
   #top-bar nav { margin-left: auto } from directions.css would push BOTH halves
   right on its own; the halves are governed explicitly below instead. */
.nav-half { margin-left: 0; gap: 24px; }
.nav-half a { font-size: 15px; color: inherit; text-decoration: none; opacity: .78; transition: opacity 160ms ease; }
@media (hover: hover) and (pointer: fine) { .nav-half a:hover { opacity: 1; } }
.nav-half-left { flex: 1; justify-content: flex-end; }
.nav-half-right { flex: 1; justify-content: flex-start; }
#top-bar .name { flex: none; margin: 0 32px; display: flex; align-items: center; }
.name-logo { height: 34px; width: auto; display: block; }
/* .nav-cta (bare, on pages without a language switcher yet) and .nav-right-group (CTA + switcher,
   wrapped as one unit on Home) are real flex children of #top-bar, not absolutely positioned --
   .nav-half-right's own flex:1 already absorbs the space before them, so they sit at the right
   edge without needing to escape the flow. Absolute positioning here used to let a wide CTA +
   switcher pair overlap nav-half-right's links at narrower desktop widths (860-1300px): found
   2026-11-06, once "Richiedi un trasporto" (longer than "Request a load") plus the switcher made
   the overlap visible. */
.nav-cta { flex: none; }
.nav-right-group { flex: none; display: flex; align-items: center; gap: 14px; }

/* Desktop composition: logo dead centre, three links each side, and the CTA + language switcher
   as one group pinned to the bar's right edge (user call 2026-11-07, twice: no hamburger and no
   shortened bar on a desktop or laptop window). The group is absolute so it cannot push the logo
   off-centre; the halves are equal flex:1 so the logo stays at the viewport's midpoint.
   Everything between 861px and a wide monitor scales with the viewport (the --nav-* tokens, also
   read by contact.css's mirrored overlay) so the right half's links always end before the group
   begins; the hamburger exists only at phone width (<=860px), as it always did. */
:root {
  --nav-pad: clamp(12px, 3.4vw, 48px);
  --nav-gap: clamp(6px, 3vw - 14px, 24px);
  --nav-fs: clamp(11px, 0.7vw + 4.9px, 15px);
  --nav-logo-m: clamp(8px, 2.2vw, 32px);
}
@media (min-width: 861px) {
  #top-bar { gap: 0; padding-inline: var(--nav-pad); }
  #top-bar .name { margin: 0 var(--nav-logo-m); }
  #top-bar .nav-half { gap: var(--nav-gap); }
  #top-bar .nav-half a { font-size: var(--nav-fs); white-space: nowrap; }
  #top-bar nav.nav-half-left { flex: 1; justify-content: flex-end; margin-left: 0; }
  #top-bar nav.nav-half-right { flex: 1; justify-content: flex-start; margin-left: 0; }
  #top-bar > .nav-right-group, #top-bar > .nav-cta { position: absolute; right: var(--nav-pad); top: 50%; transform: translateY(-50%); }
  #top-bar .nav-right-group { gap: clamp(5px, 1vw, 14px); }
  #top-bar .nav-cta { font-size: var(--nav-fs); white-space: nowrap; padding-inline: clamp(9px, 1.5vw, 22px); }
  #top-bar .lang-dd-toggle { font-size: clamp(11px, 0.5vw + 6px, 14px); }
}

/* mobile nav toggle: a single fixed container (#top-bar itself, already fixed)
   grows to full height and wraps its children into a stacked dropdown, instead of
   each <nav> trying to be its own fixed overlay */
#nav-toggle { display: none; width: 40px; height: 40px; margin-left: auto; border: 0; background: none; cursor: pointer; color: inherit; }
#nav-toggle svg { width: 22px; height: 22px; }
/* Phone hamburger breakpoint: 860px and below, as it always has been. Every other nav-mode
   breakpoint in this file (services dropdown, link-underline, language switcher) stays in sync
   with it. Unrelated page-layout breakpoints (stat-row, footer grid, etc.) keep their own 860px
   and are untouched. */
@media (max-width: 860px) {
  #top-bar { flex-wrap: wrap; align-content: flex-start; gap: 0; }
  #top-bar .name { order: -3; margin: 0 auto 0 0; }
  /* The language switcher is pinned left of the hamburger at all times, closed or open (user call
     2026-11-10) -- it is not part of the collapsible sheet. .nav-right-group is a small inline box
     holding only the switcher while closed (.nav-cta inside it is display:none); once the sheet
     opens it becomes display:contents, so its two children lay out independently: the switcher
     keeps its pinned order, the CTA pill joins the stacked list below. */
  #top-bar .nav-right-group { display: flex; order: -2; flex: 0 0 auto; width: auto; margin-top: 0; gap: 0; }
  #nav-toggle { display: flex; align-items: center; justify-content: center; order: -1; margin-left: 0; }
  #top-bar .nav-half { display: none; flex: 0 0 100%; width: 100%; order: 1; }
  #top-bar .nav-half { flex-direction: column; gap: 2px; justify-content: flex-start; }
  .nav-half a { padding: 12px 0; font-size: 17px; opacity: 1; border-bottom: 1px solid var(--border-hairline); }
  .nav-cta { display: none; width: 100%; }
  #top-bar.nav-open .nav-right-group { display: contents; }
  #top-bar.nav-open .lang-dd { order: -2; }
  #top-bar.nav-open .nav-cta { display: flex; order: 1; }
  /* The open menu is a full-screen sheet, but it must NOT be position:fixed. iPhone Safari reads the
     colour of the status-bar / Dynamic Island area off the first full-width fixed box at the top of the
     page and keeps that colour after the box is gone — closing the menu left a dark strip up there and
     the page stopped running under the status bar. Absolute, with the page held at the top while the
     menu is open (components.js), looks identical and leaves nothing fixed behind. */
  #top-bar.nav-open { position: absolute; top: 0; height: 100dvh; overflow-y: auto; padding-bottom: 24px; box-shadow: 0 1px 0 var(--border-hairline); }
  /* the page is held still behind the open sheet; touch-action, because overflow:hidden alone
     does not stop a touch drag on iOS. The sheet keeps its own vertical scrolling. */
  html.nav-locked, html.nav-locked body { overflow: hidden; touch-action: none; }
  html.nav-locked #top-bar.nav-open { touch-action: pan-y; }
  #top-bar.nav-open .nav-half { display: flex; }
  /* open menu = solid navy sheet on every page (same as Home), white text and logo */
  #top-bar.nav-open { background: var(--ink-700); color: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  #top-bar.nav-open .nav-half a { color: #fff; text-shadow: none; border-bottom-color: rgba(255, 255, 255, .14); }
}

/* ---------- demo-only labels: identify each block in this reference page, never site content ---------- */
.kit-block { padding: clamp(56px, 7vw, 96px) var(--pad); border-top: 1px solid var(--border-hairline); }
.kit-block:first-child { border-top: 0; }
.kit-label { margin: 0 0 28px; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--text-muted); text-transform: uppercase; }

/* ---------- buttons: third variant, for secondary actions on light page sections ---------- */
.btn-outline { border-color: var(--steel-400); color: var(--ink); background: transparent; }
@media (hover: hover) and (pointer: fine) { .btn-outline:hover { border-color: var(--ink-800); background: var(--steel-100); } }

/* subtle navy-tinted lift on the primary action, chosen live via impeccable, 2026-10-06 */
.btn-solid { box-shadow: 0 7px 13px rgba(10, 23, 36, .14); }

/* reusable layout for a row of button examples, and a dark demo backdrop for .btn-line */
.btn-swatch { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.btn-swatch-dark { padding: 18px 22px; border-radius: 12px; background: var(--ink-700); border: 1px solid rgba(255, 255, 255, .08); }

/* ---------- section header: headline + optional lede, no eyebrow, used site-wide ---------- */
.section-head { max-width: 40em; }
.section-head h2 { font-size: clamp(32px, 3.6vw, 56px); font-weight: 300; line-height: 1.08; }
.section-head p { margin: 20px 0 0; max-width: 32em; font-size: 18px; color: var(--soft); }
.section-head.is-wide { max-width: 50em; }

/* optional accent: a key word or two set apart from the sans headline, color only.
   Sparingly, on a single word pair at most — chosen live via impeccable, 2026-10-06;
   switched from italic serif to color-only (blue-500) 2026-10-08. */
.section-head--accent p { max-width: 30em; color: var(--text-muted); }
.accent-serif { color: var(--blue-500); }
/* CTA headline accent, navy background -- same color-only treatment;
   blue-500 passes contrast at 4.08:1 on --ink-700 and 3.91:1 on --steel-050. */
.accent-serif-dark { color: var(--blue-500); }

/* ---------- link row: compact one-line service links (same pattern as Home's .a-modes) ---------- */
.link-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px clamp(28px, 4.4vw, 76px); }
.link-row a { font-size: clamp(20px, 2vw, 32px); font-weight: 300; letter-spacing: -.02em; color: var(--ink); text-decoration: underline 2px transparent; text-underline-offset: 9px; transition: text-decoration-color 240ms ease, color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .link-row a:hover { text-decoration-color: var(--blue-500); color: var(--blue-700); } }

/* ---------- stat row: mono figures with a hairline rule, for defensible numbers only ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.stat-row div { border-top: 2px solid var(--steel-950); padding-top: 16px; }
.stat-row dt { font-size: 15px; color: var(--soft); }
.stat-row dd { margin: 8px 0 0; font-size: clamp(24px, 2.4vw, 40px); font-weight: 650; letter-spacing: -.03em; color: var(--steel-600); font-family: var(--mono); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .stat-row { grid-template-columns: 1fr; } }

/* stat row, divided variant: a single row with vertical rules instead of top-border blocks — chosen 2026-10-07 */
.stat-row-divided { display: flex; margin: 0; padding: 0; }
.stat-row-divided div { flex: 1; padding: 0 28px; border-left: 1px solid var(--border-default); }
.stat-row-divided div:first-child { padding-left: 0; border-left: 0; }
.stat-row-divided dt { font-size: 15px; color: var(--soft); }
.stat-row-divided dd { margin: 10px 0 0; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: clamp(22px, 2vw, 34px); font-weight: 600; letter-spacing: -.02em; color: var(--steel-600); }
@media (max-width: 760px) { .stat-row-divided { flex-direction: column; gap: 20px; } .stat-row-divided div { border-left: 0; border-top: 1px solid var(--border-default); padding: 16px 0 0; } .stat-row-divided div:first-child { border-top: 0; padding-top: 0; } }

/* ---------- steps: "how we work", numbered but the verb is the label, not the number ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 40px); counter-reset: step; }
.steps li { border-top: 2px solid var(--steel-300); padding-top: 18px; counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: 14px; font-family: var(--mono); font-size: 14px; color: var(--text-faint); }
.steps h3 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -.01em; }
.steps p { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: var(--soft); max-width: 26em; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 28px; } }

/* steps, connected-timeline variant: a line across numbered dots — chosen 2026-10-07 */
.steps-timeline { list-style: none; margin: 0; padding: 32px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2.6vw, 32px); position: relative; }
.steps-timeline::before { content: ""; position: absolute; left: 20px; right: 20px; top: 0; height: 2px; background: var(--border-default); }
.steps-timeline li { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; align-content: flex-start; column-gap: 8px; padding-top: 18px; }
.tl-dot { font-family: var(--mono); font-weight: 400; font-size: 15px; color: var(--blue-500); }
.steps-timeline h3 { margin: 0; font-size: 19px; font-weight: 500; }
.steps-timeline p { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--soft); flex-basis: 100%; }
@media (max-width: 760px) { .steps-timeline { grid-template-columns: 1fr; gap: 28px; } .steps-timeline::before { left: 19px; top: 0; bottom: 0; right: auto; width: 2px; height: auto; } }

/* ---------- CTA band: full-width dark close, direct contact channels + the quote CTA ---------- */
.cta-band { position: relative; overflow: hidden; padding: clamp(64px, 8vw, 128px) var(--pad); background: var(--ink-700); color: #fff; }
.cta-band .section-head h2 { color: #fff; }
.cta-band .section-head p { color: var(--text-on-inverse-muted); }

/* decorative line accent -- ViCargo "V" symbol's traced contours, approved position/colors 2026-10-08 */
.cta-line-layer { position: absolute; inset: 0; pointer-events: none; display: flex; align-items: center; justify-content: center; }
.cta-line-layer svg { width: 140%; height: 140%; max-width: none; transform: translate(41px, 67px) scale(1.94); transform-origin: center center; }
.cta-line-layer .line-path { fill: none; stroke: #003F8F; stroke-width: .5; }
.cta-band > *:not(.cta-line-layer) { position: relative; z-index: 1; }
.cta-center-head h2 { font-size: clamp(34px, 4vw, 64px); }
.cta-contacts { margin-top: clamp(36px, 5vw, 56px); display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.cta-contacts a.channel { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; color: #fff; text-decoration: none; }
.cta-contacts a.channel svg { width: 20px; height: 20px; flex: none; color: var(--cyan-400); }
.cta-contacts .btn-solid { margin-left: auto; }
@media (max-width: 640px) { .cta-contacts .btn-solid { margin-left: 0; width: 100%; } }

/* CTA, centered single-focus variant — chosen 2026-10-07 */
.cta-center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; }
.cta-center-head { max-width: 36em; }
.cta-center-head h2, .cta-center-head p { text-align: center; }
/* .section-head p's own max-width (32em) is narrower than .cta-center-head's (36em) and its base
   margin has no auto, so with no fix here it sits flush against the left edge of the centred
   h2/wrapper instead of centring as its own block -- only its text re-centres within that
   left-pinned narrow box. Bug found + reported by the user 2026-11-06, present on every page's
   bottom CTA band (shared component). */
.cta-center-head p { margin-inline: auto; }
.btn-lg { min-height: 60px; padding: 0 40px; font-size: 18px; }
.cta-contacts-mini { display: flex; align-items: center; gap: 24px; }
.cta-contacts-mini .channel { font-size: 15px; color: #fff; text-decoration: none; opacity: .86; }
@media (hover: hover) and (pointer: fine) { .cta-contacts-mini .channel:hover { opacity: 1; } }

/* WhatsApp button: the house button in WhatsApp's own green (option A of the colour demo), smaller than the blue one, with the
   WhatsApp glyph inline so nothing is requested from outside. Dark text on #25D366 (about 9:1); white on it would be under 2:1. */
.btn-wa {
  gap: 8px; min-height: 40px; padding: 0 16px 0 14px; font-size: 14px; color: #06231A; background: #25D366;
  box-shadow: 0 7px 13px rgba(10, 23, 36, .14);
}
.btn-wa .wa-ic { display: block; width: 18px; height: 18px; flex: none; fill: currentColor; }
@media (hover: hover) and (pointer: fine) { .btn-wa:hover { background: #1FBE5B; } }
.btn-wa:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

/* ---------- footer: brand + nav columns + legal row, always on ink-700 per brand system ---------- */
#site-footer { background: var(--ink-700); color: var(--text-on-inverse-muted); padding: clamp(56px, 7vw, 96px) var(--pad) 28px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-bottom: clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--border-inverse); }
.footer-brand .name { display: inline-block; font-family: "Outfit", system-ui, sans-serif; font-weight: 600; font-size: 21px; letter-spacing: -.02em; color: #fff; text-decoration: none; }
.footer-brand p { margin: 16px 0 0; max-width: 26em; font-size: 15px; line-height: 1.6; }
.footer-nap { margin: 20px 0 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.9; }
.footer-nap a { color: inherit; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .footer-nap a:hover { color: #fff; } }
.footer-col h3 { margin: 0 0 16px; font-size: 13px; font-weight: 500; color: #fff; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 15px; color: inherit; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .footer-col a:hover { color: #fff; } }
.footer-legal { padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 13px; }
.footer-legal .legal-links { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.footer-legal a { color: inherit; text-decoration: none; }
.footer-co { display: flex; flex-direction: column; gap: 6px; max-width: 72ch; }
.footer-co a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .footer-legal a:hover { color: #fff; } }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- form: quote request / contact, label above, helper/error below ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 24px; max-width: 46em; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.is-wide { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 500; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 16px; border-radius: 10px; border: 1.5px solid var(--border-default);
  background: var(--white); color: var(--ink); font: inherit; font-size: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px var(--blue-100);
}
.field .help { font-size: 13px; color: var(--text-muted); }
.field.has-error input, .field.has-error textarea { border-color: var(--red-600); }
.field .error { font-size: 13px; color: var(--red-600); }
.form-grid .btn { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* privacy notice + acknowledgment on the three forms: Italian master text first, English twin under it */
.form-notice { grid-column: 1 / -1; margin: 0 0 14px; font-size: 13px; line-height: 1.6; color: var(--ink); text-wrap: pretty; }
.form-notice a { color: var(--blue-800); text-decoration: underline; text-underline-offset: 3px; }
.ack-en { display: block; margin-top: 2px; font-size: 13px; color: inherit; }
.error .ack-en, .error [lang="en"] { display: inline; font-size: inherit; margin: 0; color: inherit; }

/* honeypot: out of sight and out of the tab order, but still a real field a bot will fill */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ===== Services dropdown + top-bar link rule ===== */
/* Services dropdown in the top bar. Opens on hover or keyboard focus; the text follows the bar
   (white over dark sections, ink over light ones) and each item gets the house gradient rule. */

.nav-dd { position: relative; display: flex; align-items: center; }
.nav-dd-toggle { display: none; }

/* The menu starts a little below the bar's text so the pointer can travel down without leaving the hover area:
   the invisible padding at the top is part of .nav-dd-menu and therefore part of the hover target. */
.nav-dd-menu {
  position: absolute; left: -20px; top: 100%; z-index: 5; padding-top: 16px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), visibility 0s linear var(--dur-fast);
}
.nav-dd:focus-within .nav-dd-menu {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), visibility 0s;
}
/* :hover is real-mouse only -- gated, not left bare. Ungated, a tap on a touchscreen leaves a
   "sticky" :hover state (the known mobile WebKit/Chromium quirk): by the time the toggle's own
   click handler runs and calls shown() to decide open-vs-close, :hover already reports the menu
   visible, so the handler reads "already open" and instantly closes what it just opened -- found
   2026-11-10 once the language switcher had to open on tap outside the hamburger sheet too. */
@media (hover: hover) and (pointer: fine) {
  .nav-dd:hover .nav-dd-menu {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), visibility 0s;
  }
}
.nav-dd.is-dismissed .nav-dd-menu { opacity: 0; visibility: hidden; transform: translateY(6px); }

.nav-dd-menu ul {
  margin: 0; padding: 10px 0; list-style: none; min-width: 300px;
  background: rgba(15, 30, 46, .97); color: #fff; border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px;
  backdrop-filter: saturate(160%) blur(14px);
}
#top-bar.on-light .nav-dd-menu ul, #top-bar.is-static .nav-dd-menu ul, #top-bar.is-solid .nav-dd-menu ul {
  background: rgba(248, 250, 251, .97); color: var(--ink-800); border-color: var(--border-default);
}

#top-bar .nav-dd-menu a {
  display: block; padding: 10px 22px; font-size: 15px; line-height: 1.3; color: inherit; opacity: 1;
  text-shadow: none; text-decoration: none;
}
.nav-dd-menu a span { position: relative; display: inline-block; padding-bottom: 5px; }
.nav-dd-menu a span::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--gradient-swoosh);
  transform: scaleX(0); transform-origin: left; transition: transform 260ms var(--ease-sweep);
}
@media (hover: hover) and (pointer: fine) { .nav-dd-menu a:hover span::after { transform: scaleX(1); } }
.nav-dd-menu a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -4px; border-radius: 6px; }
.nav-dd-menu a:focus-visible span::after { transform: scaleX(1); }
.nav-dd-menu a:active span { transform: scale(.985); }

/* Phone/hamburger mode (matches the nav-toggle threshold above): the eight links sit in a nested
   list under "Services" that a small chevron opens. Scoped away from .lang-dd/.lang-dd-menu --
   the language switcher keeps its compact floating-pill look at every width (2026-11-10), it is
   not part of this full-width in-sheet accordion pattern. */
@media (max-width: 860px) {
  .nav-dd:not(.lang-dd) { flex-wrap: wrap; align-items: stretch; width: 100%; }
  .nav-dd > a { flex: 1 1 auto; }
  .nav-dd-toggle {
    display: flex; align-items: center; justify-content: center; width: 44px; border: 0; background: none; cursor: pointer;
    color: inherit; border-bottom: 1px solid var(--border-hairline);
  }
  .nav-dd-toggle svg { width: 16px; height: 16px; transition: transform var(--dur-fast) var(--ease-out); }
  .nav-dd.is-open .nav-dd-toggle svg { transform: rotate(180deg); }
  .nav-dd-menu:not(.lang-dd-menu) {
    position: static; flex: 0 0 100%; padding: 0; display: none; opacity: 1; visibility: visible; transform: none; transition: none;
  }
  .nav-dd.is-open .nav-dd-menu:not(.lang-dd-menu) { display: block; }
  .nav-dd:hover .nav-dd-menu:not(.lang-dd-menu), .nav-dd:focus-within .nav-dd-menu:not(.lang-dd-menu) { transition: none; }
  .nav-dd-menu:not(.lang-dd-menu) ul { min-width: 0; padding: 0 0 6px 16px; background: none; border: 0; backdrop-filter: none; border-radius: 0; color: inherit; }
  #top-bar .nav-dd-menu:not(.lang-dd-menu) a { padding: 10px 0; font-size: 16px; border-bottom: 0; }
  #top-bar.on-light .nav-dd-menu:not(.lang-dd-menu) ul, #top-bar.is-static .nav-dd-menu:not(.lang-dd-menu) ul, #top-bar.is-solid .nav-dd-menu:not(.lang-dd-menu) ul { background: none; color: inherit; border: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-dd-menu, .nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu { transition: none; transform: none; }
  .nav-dd-menu a span::after { transition: none; }
}

/* Top-bar links: the same thin gradient rule as the dropdown items, drawn under the word on hover or focus.
   "Services" keeps its rule while its menu is open. Desktop only: below the hamburger threshold the links are a stacked list. */
@media (min-width: 861px) {
  #top-bar .nav-half > a, #top-bar .nav-dd > a { position: relative; }
  #top-bar .nav-half > a::after, #top-bar .nav-dd > a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px; background: var(--gradient-swoosh);
    transform: scaleX(0); transform-origin: left; transition: transform 260ms var(--ease-sweep);
  }
  @media (hover: hover) and (pointer: fine) {
    #top-bar .nav-half > a:hover::after, #top-bar .nav-dd:hover > a::after { transform: scaleX(1); }
  }
  #top-bar .nav-half > a:focus-visible::after, #top-bar .nav-dd:focus-within > a::after { transform: scaleX(1); }
  .nav-dd.is-dismissed > a::after { transform: scaleX(0); }
}
@media (prefers-reduced-motion: reduce) { #top-bar .nav-half > a::after, #top-bar .nav-dd > a::after { transition: none; } }

/* ===== Language switcher: same dropdown visuals/panel as Services (.nav-dd-menu is reused as-is),
   but the trigger is a button (nothing to navigate to directly), not a link + separate toggle, so
   it gets its own small ruleset instead of overloading `.nav-dd > a`. Nav bar, far right of
   "Request a load" -- user decision 2026-11-06. */
.lang-dd-toggle {
  display: flex; align-items: center; gap: 5px; height: 40px; padding: 0 2px;
  border: 0; background: none; color: inherit; font: inherit; font-size: 14px; letter-spacing: .02em;
  cursor: pointer; opacity: .82; transition: opacity 160ms ease;
}
@media (hover: hover) and (pointer: fine) { .lang-dd-toggle:hover { opacity: 1; } }
.lang-dd.is-open .lang-dd-toggle, .lang-dd:focus-within .lang-dd-toggle { opacity: 1; }
.lang-dd-toggle:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }
.lang-current { font-family: var(--mono); text-transform: uppercase; }
.lang-chev { width: 13px; height: 13px; transition: transform var(--dur-fast) var(--ease-out); }
.lang-dd.is-open .lang-chev { transform: rotate(180deg); }
/* A tap/click (.is-open) behaves the same as hover/focus-within -- never feels different from a
   hover reveal. Unconditional (not just >=861px) since 2026-11-10: the switcher is a pinned,
   always-visible pill on the phone too, not folded into the hamburger sheet. */
.lang-dd.is-open:not(.is-dismissed) .nav-dd-menu { opacity: 1; visibility: visible; transform: none; }
.lang-dd-menu ul { min-width: 170px; }
@media (max-width: 860px) {
  /* Pinned near the right edge next to the hamburger: anchor the panel to the switcher's right
     edge instead of its left (the base rule's left:-20px), so it opens toward the middle of the
     screen instead of off the right edge of the viewport. */
  .lang-dd .nav-dd-menu { left: auto; right: -12px; }
}
.lang-dd-menu li[aria-disabled="true"] a, .lang-dd-menu span.lang-soon {
  display: block; padding: 10px 22px; font-size: 15px; color: inherit; opacity: .38; cursor: default;
}
.lang-dd-menu span.lang-here {
  display: block; padding: 10px 22px; font-size: 15px; font-weight: 500; color: inherit; cursor: default;
}

/* ---------- touch targets on phones: at least 44 x 44 CSS px (Apple HIG) ----------------------
   Nothing is made visibly bigger. Text links and small controls get an invisible extension
   (padding cancelled by an equal negative margin, so layout stays put); real buttons that were
   40 px or less are raised to 44. Audit 2026-11-05. */
@media (max-width: 860px), (pointer: coarse) {
  #nav-toggle { width: 44px; height: 44px; }
  .btn, .cl-seg-btn, .cl-add, .tm-spot-pill { min-height: 44px; }
  #top-bar a.name, #site-footer a, a.channel, a.pair-mail,
  .tm-spot-link, .sv-link, .lg-toc a { padding-block: 12px; margin-block: -12px; }
  #top-bar a.name { padding-inline: 3px; margin-left: -3px; }
  .hero-skip { position: absolute; }
  .hero-skip::before { content: ""; position: absolute; inset: -6px; }
  .hs-arrow { position: relative; }
  .hs-arrow::before { content: ""; position: absolute; inset: -6px; }
}

/* plain links have no hover on a phone: give the press itself a response (Apple HIG: respond on touch) */
@media (hover: none) {
  #top-bar a:not(.btn):active, #site-footer a:active, .legal-links .cc-open:active, .lg-toc a:active,
  .tm-spot-link:active, .sv-link:active, a.channel:active, a.pair-mail:active { opacity: .6; }
}

/* footer company line: each fact is kept whole; dots between them on a wide screen, one per line on a phone,
   so a line never ends on a dangling dot or starts in the middle of a sentence */
.co-reg { display: flex; flex-wrap: wrap; }
.co-br { flex-basis: 100%; height: 0; }   /* line 1: VAT, REA, register. line 2: share capital, PEC */
.co-reg > span { display: inline-block; white-space: nowrap; }
.co-reg > span + span::before { content: "·"; margin: 0 .5em; }
@media (max-width: 860px) {
  .co-br { display: none; }
  .co-reg > span { display: block; white-space: normal; }
  .co-reg > span + span::before { content: none; }
  .co-reg { display: grid; gap: 2px; }
}

/* Nothing may widen the page: decorative bleeds (V-mark, truck, hidden language menu) are clipped at the viewport edge. */
html { overflow-x: clip; }
