/* Services path and example samples. Loaded only on /services/ pages.
   Series colours are the shared --chart-* tokens. Text and lines use
   --ink, --ink-muted, --muted and --line. The path is SVG and CSS. */

:root {
  --sv-panel: var(--card);
  --sv-inset: var(--sunk);
  --sv-ink: var(--ink);
  --sv-ink-2: var(--ink-2);
  --sv-muted: var(--ink-muted, var(--muted));
  --sv-line: var(--line);
}
.sv-stop.is-muted { --sv-tone: var(--chart-muted); }
.sv-stop.is-c1 { --sv-tone: var(--chart-1); }
.sv-stop.is-c2 { --sv-tone: var(--chart-2); }
.sv-stop.is-c3 { --sv-tone: var(--chart-3); }
.sv-stop.is-c4 { --sv-tone: var(--chart-4); }
.sv-stop.is-c5 { --sv-tone: var(--chart-5); }
[data-sv-chart="usage"] {
  --sv-usage-fill: color-mix(in srgb, var(--chart-4) 24%, transparent);
}

.sv-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sv-stuck {
  max-width: 1100px;
  margin: 4px 0 28px;
  padding: 18px 18px 12px;
  background: var(--sv-panel);
  color: var(--sv-ink);
  border: 1px solid var(--sv-line);
  border-radius: 18px;
}
.sv-stuck h2 {
  margin: 0 0 8px;
  font: 500 22px/1.25 var(--display, Oswald, sans-serif);
  letter-spacing: 0;
  text-transform: none;
  color: var(--sv-ink);
}

.sv-map {
  position: relative;
  aspect-ratio: 1000 / 500;
}
.sv-map-wide,
.sv-map-narrow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.sv-map-narrow { display: none; }
.sv-road {
  fill: none;
  stroke: var(--chart-1);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sv-branch {
  fill: none;
  stroke-width: 2.5;
  stroke-dasharray: 5 7;
  stroke-linecap: round;
}
.sv-branch.is-c5 { stroke: var(--chart-5); stroke-width: 3.5; }
.sv-branch.is-c2 { stroke: var(--chart-2); }
.sv-stops {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sv-stop {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 0;
  height: 0;
}
.sv-stop a,
.sv-pin {
  position: absolute;
  left: 0;
  top: 0;
  width: 128px;
  transform: translate(-50%, -22px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  text-align: center;
}
.sv-stop.is-above a {
  transform: translate(-50%, calc(-100% + 22px));
  flex-direction: column-reverse;
}
.sv-node {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--sv-inset);
  border: 2px solid var(--sv-tone, var(--chart-1));
  color: var(--sv-tone, var(--chart-1));
  box-shadow: 0 0 0 4px var(--sv-panel);
}
.sv-node svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sv-label {
  max-width: 124px;
  font: 500 13px/1.3 var(--display, Oswald, sans-serif);
  color: var(--sv-ink);
}
.sv-stop a:hover .sv-label,
.sv-stop a:focus-visible .sv-label { color: var(--red-text); }
.sv-stop a:focus-visible .sv-node,
.sv-stop a[aria-current="true"] .sv-node {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.sv-stop a[aria-current="true"] .sv-label {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sv-stop.is-c5 .sv-node,
.sv-stop.is-muted .sv-node {
  outline: 1px solid var(--ink);
  outline-offset: 1px;
}
.sv-stop.is-c5 a:focus-visible .sv-node,
.sv-stop.is-muted a:focus-visible .sv-node,
.sv-stop.is-c5 a[aria-current="true"] .sv-node,
.sv-stop.is-muted a[aria-current="true"] .sv-node {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.sv-intl {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--sv-muted);
}
.sv-intl a {
  color: var(--sv-ink);
  font-weight: 600;
}
.sv-intl a:focus-visible {
  outline: 2px solid var(--red-text);
  outline-offset: 3px;
}
.sv-plain {
  margin: 12px 0 0;
  padding-left: 1.2em;
}
.sv-plain a {
  color: var(--sv-ink);
  text-decoration: underline;
}

/* Offer cards: the sample sits inside the card, outside the title link. */
main.sv .sv-offers > li.sv-offer {
  display: flex;
  flex-direction: column;
  scroll-margin-top: 96px;
  border: 1px solid var(--rule);
  border-top: 4px solid var(--c, var(--red));
  background: var(--glass-card, var(--panel));
}
main.sv .sv-offers > li.sv-offer > a {
  border: 0;
  background: transparent;
  height: auto;
  padding: 22px 22px 8px;
}
main.sv .sv-offer:target {
  outline: 2px solid var(--c, var(--chart-1));
  outline-offset: 3px;
}
main.sv-detail .sv-sample-page { scroll-margin-top: 96px; }

.sv-sample {
  margin: 4px 14px 14px;
  padding: 12px 12px 14px;
  background: var(--sv-panel);
  color: var(--sv-ink);
  border: 1px solid var(--sv-line);
  border-radius: 14px;
}
.sv-sample-page { margin: 0 0 28px; }
.sv-sample figcaption { margin: 0 0 10px; }
.sv-ex {
  display: block;
  margin: 0 0 4px;
  font: 500 11px/1.3 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sv-muted);
}
.sv-sum {
  display: block;
  font: 400 14px/1.45 var(--body, "Open Sans", sans-serif);
  color: var(--sv-ink-2);
}
.sv-chart { position: relative; height: 220px; }
.sv-sample-page .sv-chart { height: 240px; }
.sv-plot[data-sv-chart="hbar"][data-n="2"] .sv-chart { height: 180px; }
.sv-plot[data-sv-chart="hbar"][data-n="4"] .sv-chart { height: 280px; }
.sv-plot[data-sv-chart="hbar"][data-n="5"] .sv-chart { height: 360px; }
.sv-plot[data-sv-chart="donut"] .sv-chart { height: 260px; max-width: 420px; }
/* Card previews keep the earlier sample size. Detail pages keep the heights above. */
.sv-sample:not(.sv-sample-page) .sv-chart,
.sv-sample:not(.sv-sample-page) .sv-plot[data-sv-chart] .sv-chart,
.sv-sample:not(.sv-sample-page) .sv-plot[data-sv-chart="hbar"][data-n] .sv-chart,
.sv-sample:not(.sv-sample-page) .sv-plot[data-sv-chart="donut"] .sv-chart {
  height: 150px;
  max-width: none;
}
.svc-card.svc-need > a {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.svc-card.svc-need > .sv-sample,
.sp .svc-card > .sv-sample {
  margin: 4px 0 0;
}
.sv-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.sv-panel p {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.sv-hours {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.sv-hours span {
  width: 28px;
  height: 36px;
  border-radius: 4px;
  background: var(--chart-5);
}
.sv-hours-label,
.sv-chart-title {
  display: block;
}
.sv-chart-title {
  margin: 0 0 8px;
  font-weight: 600;
}
.sv-hours-label {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.sv-stat strong { font-size: 1.2em; }
main.sv-detail .cs-body.is-single {
  grid-template-columns: minmax(0, 760px);
}
@media (max-width: 720px) {
  .sv-panels { grid-template-columns: 1fr; }
}
.sv-chart canvas { display: block; width: 100%; height: 100%; }

.sv-challenge {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--sv-inset);
  border: 1px solid var(--sv-line);
  border-radius: 12px;
}
.sv-challenge p { margin: 0; color: var(--sv-ink); font-size: 14px; line-height: 1.45; }
.sv-challenge .sv-ex { margin-bottom: 4px; }

.sv-ready-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
}
.sv-ready-top p { margin: 0; font-weight: 600; }
.sv-gauge { width: 54px; height: 54px; transform: rotate(-90deg); }
.sv-gauge-track { fill: none; stroke: var(--line); stroke-width: 4; }
.sv-gauge-val { fill: none; stroke: var(--chart-3); stroke-width: 4; stroke-linecap: round; }
.sv-ready { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sv-ready li {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  background: var(--sv-inset);
  border: 1px solid var(--sv-line);
  border-radius: 10px;
  font-size: 14px;
}
.sv-tick {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--chart-muted);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.sv-ready .is-ready .sv-tick { background: var(--chart-3); }
.sv-ready .is-open .sv-tick { background: var(--chart-5); }
.sv-ready .is-wait .sv-tick { background: var(--chart-2); }
.sv-ready b { font-weight: 600; color: var(--sv-ink); }

.sv-ask {
  margin: 0 0 8px auto;
  max-width: 92%;
  width: fit-content;
  padding: 8px 10px;
  background: var(--sv-inset);
  border: 1px solid var(--sv-line);
  border-radius: 12px 12px 4px 12px;
  font-size: 14px;
  line-height: 1.4;
}
.sv-ans {
  padding: 10px 12px;
  background: var(--sv-inset);
  border: 2px solid var(--chart-5);
  box-shadow: inset 0 0 0 1px var(--ink);
  border-radius: 12px 12px 12px 4px;
}
.sv-ans p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--sv-ink); }
.sv-chip {
  display: inline-flex;
  margin-top: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--sv-line);
  background: var(--sv-inset);
  color: var(--sv-muted);
  font-size: 12px;
  font-weight: 600;
}

.sv-triage {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.sv-triage li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px;
  background: var(--sv-inset);
  border: 1px solid var(--sv-line);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.3;
}
.sv-triage i { width: 10px; height: 10px; border-radius: 3px; flex: none; box-shadow: inset 0 0 0 1px var(--ink); }
.sv-triage span { flex: 1; }
.sv-triage b { font-weight: 600; color: var(--sv-ink); }
.sv-triage [data-state="keep"] i { background: var(--chart-3); }
.sv-triage [data-state="fix"] i { background: var(--chart-5); }
.sv-triage [data-state="retire"] i { background: var(--chart-2); }

@media (max-width: 720px) {
  .sv-map { aspect-ratio: auto; min-height: 0; }
  .sv-map-wide { display: none; }
  .sv-map-narrow { display: block; width: 48px; height: 100%; right: auto; }
  .sv-stops {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 6px 0 6px 68px;
  }
  .sv-stop {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
  }
  .sv-stop a,
  .sv-pin,
  .sv-stop.is-above a {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    flex-direction: row;
    width: auto;
    gap: 10px;
    text-align: left;
    min-height: 48px;
  }
  .sv-node {
    position: absolute;
    left: -58px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
  }
  .sv-label { max-width: none; }
  .sv-stop.is-side { margin-left: 28px; }
  .sv-stop.is-side .sv-node { left: -86px; }
  .sv-stop.is-side::before {
    content: "";
    position: absolute;
    left: -28px;
    top: 22px;
    width: 24px;
    height: 3px;
    border-radius: 2px;
    background: var(--chart-muted);
    box-shadow: 0 0 0 1px var(--ink);
  }
  .sv-stop.is-side.is-c5::before { background: var(--chart-5); }
  .sv-stop.is-side.is-c2::before { background: var(--chart-2); box-shadow: none; }
  .sv-triage { grid-template-columns: 1fr; }
}

/* Other offers, just above the footer. Cards reuse the services card; accents are chart tokens. */
.sv-more {
  max-width: 1100px;
  margin: 48px 0 12px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.sv-more h2 {
  margin: 0 0 16px;
  font: 300 clamp(26px, 3vw, 32px) / 1.2 var(--display, Oswald, sans-serif);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
}
.sv-more .sv-offers { margin-bottom: 18px; }
.sv-more a[style*="--chart-5"] {
  box-shadow: inset 0 0 0 1px var(--ink);
}
.sv-more-all { margin: 0; }
.sv-more-all a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sv-more-all a:hover,
.sv-more-all a:focus-visible { color: var(--red-text); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .sv-road { transition: none !important; animation: none !important; }
}
/* Offer pages: the service number, the same as on the homepage cards */
.sv-n-head { display: block; margin: 0 0 8px; }
