/* ViCargo: loading calculator. Loads after home.css (section, tag, reveal, nav rules) and
   before headings.css. Everything is prefixed cl- -- .field-* belongs to contact.css's rail
   and .au-* to the About page. */

.cl-first { padding-top: calc(var(--bar-h) + var(--sec-pt)); }
/* Intro is centred: the heading in two lines on a wide screen, wrapping freely on a phone.
   The section tag stays in the corner, like every other section's. */
.cl-first .home-inner { text-align: center; }
.cl-h1 { max-width: none; margin-inline: auto; }
@media (min-width: 640px) { .cl-h1 > span { display: block; } }
.cl-lede { margin: 22px auto 0; max-width: 36em; font-size: 18px; line-height: 1.65; color: var(--soft); text-wrap: pretty; }

/* ---------- vehicle choice: pill tabs, same pattern as the stackable/mode switches ---------- */
.cl-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.cl-tab {
  border: 1.5px solid var(--border-default); border-radius: 999px; padding: 10px 18px; background: #fff;
  color: var(--ink); font: inherit; font-size: 14px; cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.cl-tab b { font-family: var(--mono); font-weight: 400; font-size: 12px; margin-left: 8px; color: var(--steel-600); }
.cl-tab.is-on { background: var(--ink-900); color: #fff; border-color: var(--ink-900); }
.cl-tab.is-on b { color: #9CB0C4; }
.cl-tab:active { transform: scale(.98); }
.cl-tab:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.cl-vehicle-help { margin: 14px 0 0; font-size: 13px; color: var(--text-muted); }

/* ---------- the result: a full-width top view of the vehicle, then a figure strip ---------- */
.cl-plan { width: 100%; height: auto; display: block; margin-top: 30px; }
.cl-plan .floor { fill: var(--steel-050); stroke: var(--border-default); stroke-width: 1.5; }
.cl-plan .cab { fill: none; stroke: var(--steel-400); stroke-width: 1.5; }
.cl-plan .pal { fill: var(--blue-500); }
.cl-plan .pal.two { fill: var(--blue-700); }
.cl-plan .tick, .cl-plan .ruler { stroke: var(--border-default); stroke-width: 1; }
.cl-plan .mark { stroke: var(--blue-600); stroke-width: 1.5; }
.cl-plan text { font-family: var(--mono); font-size: 11px; fill: var(--steel-600); }
.cl-plan .mt { fill: var(--blue-700); font-size: 12px; }
.cl-plan .t2 { font-size: 9px; fill: #fff; }

.cl-figs { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 0; margin-top: 30px; border-top: 1px solid var(--border-hairline); }
.cl-figs > div { padding: 22px 24px 4px 0; }
.cl-figs > div + div { padding-left: 24px; border-left: 1px solid var(--border-hairline); }
.cl-figs dt { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--steel-600); }
.cl-figs dd { margin: 10px 0 0; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: clamp(24px, 2.4vw, 34px); letter-spacing: -.03em; color: var(--ink-900); }
.cl-figs dd small { white-space: nowrap; font-size: .45em; letter-spacing: 0; color: var(--steel-600); margin-left: 6px; }
.cl-figs .big dd { font-size: clamp(40px, 4.6vw, 64px); }
.cl-figs .big .cl-hint { display: block; margin-top: 12px; font-size: 14px; color: var(--steel-600); }

.cl-badge { display: inline-block; margin-top: 12px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; }
.cl-badge--yes { background: #E6F4EC; color: #116A3C; }
.cl-badge--tight { background: #FDF1DC; color: #8A5A08; }
.cl-badge--no { background: #FBE9E9; color: #A3231F; }

.cl-blocked { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--border-hairline); display: grid; gap: 12px; align-items: start; }
.cl-blocked p { margin: 0; max-width: 46em; font-size: 16px; line-height: 1.6; color: var(--ink); }

.cl-note { margin: 14px 0 0; max-width: 60ch; font-size: 12px; line-height: 1.6; color: var(--steel-600); text-wrap: pretty; }

/* ---------- the goods panel: a flat grey card, not a shadowed one -- it sits full width, not
   beside a result card any more ---------- */
.cl-panel { margin-top: 34px; padding: clamp(20px, 2.4vw, 28px); border-radius: 14px; background: var(--steel-050); border: 1px solid var(--border-hairline); }
.cl-k { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--steel-600); }

/* Gaps in the shared form kit, same two rules contact.css patches (contact.css:166-172). */
.field select {
  appearance: none; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6877' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; background-size: 18px;
}
.btn:disabled { opacity: .55; pointer-events: none; }
.cl-panel .field input, .cl-panel .field select { font-size: 15px; padding: 11px 14px; background: #fff; }
.cl-panel .field label { font-size: 13px; }

/* Pallets / colli switch, and the stackable switch: same control, two sizes. */
.cl-seg { display: inline-flex; border: 1.5px solid var(--border-default); border-radius: 999px; padding: 3px; background: #fff; }
.cl-seg-btn {
  border: 0; border-radius: 999px; padding: 8px 18px; background: none; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--steel-600);
  transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.cl-seg-btn.is-on { background: var(--ink-900); color: #fff; }
@media (hover: hover) and (pointer: fine) { .cl-seg-btn:not(.is-on):hover { color: var(--ink); } }
.cl-seg-btn:active { transform: scale(.97); }
.cl-seg-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.cl-modes { margin: 0 0 20px; }

/* One line of goods. */
.cl-line { padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--border-hairline); }
.cl-line:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
.cl-line-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.cl-del {
  border: 0; background: none; padding: 4px 0; cursor: pointer; font: inherit; font-size: 13px;
  color: var(--steel-600); text-decoration: underline; text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .cl-del:hover { color: var(--red-600); } }
.cl-del:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.cl-line-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 12px; }
.cl-line-grid .field { gap: 5px; }
.cl-pallet { grid-column: span 2; }
.cl-line-grid .field[hidden] { display: none; }
.cl-stack-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.cl-stack-row .cl-seg-btn { padding: 6px 15px; font-size: 13px; }

.cl-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 22px; }
.cl-add {
  border: 0; background: none; padding: 6px 0; cursor: pointer; font: inherit; font-size: 15px; font-weight: 500;
  color: var(--blue-700); text-decoration: underline; text-underline-offset: 4px;
  transition: color var(--dur-fast) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .cl-add:hover { color: var(--blue-800); } }
.cl-add:disabled { color: var(--steel-400); text-decoration: none; cursor: default; }
.cl-add:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

/* ---------- footer: always visible, independent of whether the load fits ---------- */
.cl-foot { display: flex; justify-content: space-between; align-items: center; gap: 18px 24px; flex-wrap: wrap; margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--border-hairline); }
.cl-foot p { margin: 0; font-size: 16px; font-weight: 500; color: var(--ink); }
.cl-foot-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.cl-foot-btns .btn { max-width: 100%; white-space: normal; text-align: center; }
.cl-warn { flex: 1 1 100%; margin-top: 14px; padding-left: 14px; border-left: 2px solid var(--steel-600); display: grid; gap: 6px; }
.cl-warn p, .cl-foot .cl-warn p { margin: 0; max-width: 72ch; font-size: 13px; font-weight: 400; line-height: 1.6; color: var(--ink); text-wrap: pretty; }

/* ---------- oversized strip and the three explainer cards ---------- */
.cl-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 20px 40px; flex-wrap: wrap;
  padding: clamp(24px, 2.4vw, 32px); border-radius: 14px; background: #fff;
  box-shadow: 0 22px 48px -26px rgba(0, 0, 0, .55);
}
.cl-strip > div { flex: 1 1 340px; display: grid; gap: 8px; }
.cl-strip h2 { margin: 0; font-size: 22px; font-weight: 500; line-height: 1.3; color: var(--ink-900); }
.cl-strip p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--steel-600); text-wrap: pretty; }

/* The three explainer cells are Home's Services cells (.svc-grid / .svc-cell), reused as they
   are. They are not links, so the hover wash, the rule that draws in and the title nudge are
   switched off: motion that promises a click this cell does not offer. */
.svc-grid--static .svc-cell { cursor: default; }
.svc-grid--static .svc-cell::before, .svc-grid--static .svc-cell::after { display: none; }
.svc-grid--static .svc-cell:active { transform: none; }
.svc-grid--static h3.svc-t, .svc-grid--static p.svc-d { margin-bottom: 0; }
.svc-grid--static p.svc-d { margin-top: 10px; text-wrap: pretty; }

@media (max-width: 980px) {
  .cl-figs { grid-template-columns: 1fr 1fr; }
  .cl-figs > div, .cl-figs > div + div { border-left: 0; padding-left: 0; }
  .cl-figs .big { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .cl-line-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl-pallet { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .cl-tab:active, .cl-seg-btn:active { transform: none; }
}

/* "Reading the result": the three explainers sit one under another at every width, each a full row with a
   hairline above it. Home's Services grid (4 columns) is only borrowed for the look of a cell, so its
   column rules are reset here. */
.svc-grid.svc-grid--static { grid-template-columns: 1fr; }
.svc-grid.svc-grid--static .svc-cell:nth-child(n) { border-left: 0; padding-left: 0; padding-right: 0; }
.svc-grid.svc-grid--static p.svc-d { max-width: 44em; }
