/* The service-manual pages (/service/manuals/…), on top of site.css.
   Generated by tools/service-manuals/build.py — change the markup there,
   never in the generated HTML. The listing cards are the cards of /parts
   and /map (listing.css), repeated here because these pages load site.css
   rather than the listing shell; the three must look alike. */

.svc {
  --ink: var(--text);
  --wanted-soft: #ccf2eb;
}

/* The text column is the legal pages' one, widened for the part tables;
   running text keeps its reading measure. */
.legal-body.svc-body { max-width: 900px; }
.svc-body p, .svc-body ul.svc-tips { max-width: 74ch; }

.svc .legal-head { max-width: 900px; margin-bottom: 30px; }
.svc .legal-head p.lede { color: #2c3644; font-size: 1.06rem; max-width: 74ch; }

.crumbs {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0 0 22px;
}
.crumbs a { color: var(--slate); text-decoration: none; }
.crumbs a:hover { color: var(--coral); text-decoration: underline; }

/* The photo sits between the breadcrumbs and the heading, as wide as the
   text column; a tall photo is cropped rather than allowed to fill the
   screen, and the credit line stays with it. */
.svc-photo { margin: 0 0 26px; max-width: 900px; }
.svc-photo img {
  display: block;
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-2);
}
.svc-photo figcaption {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.svc-photo figcaption a { color: var(--muted); }

.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}
.jump a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
}
.jump a:hover { border-color: var(--coral); color: var(--coral); }
.jump a svg { flex: none; width: 16px; height: 16px; opacity: 0.85; }

/* ---------- documents ---------- */

.docs { list-style: none; padding: 0 !important; margin: 18px 0; }
.docs li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin: 0 0 10px !important;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.docs li a { font-weight: 700; }
.doc-type {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
  background: var(--bg-2);
  border-radius: 999px;
  padding: 2px 10px;
}
.doc-host { font-size: 0.85rem; color: var(--muted); }
.doc-host a { color: var(--muted); text-decoration: underline; text-decoration-style: dotted; }
.doc-host a strong { color: var(--ink, #1c2430); }

/* ---------- tables ---------- */

.svc-body table.svc-table { margin: 14px 0 8px; }
.svc-table td.num { white-space: nowrap; }
.svc-table code, .partno {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  font-weight: 600;
  color: var(--navy);
}
.svc-table .alt { display: block; color: #2c3644; }
.svc-table .alt + .alt { margin-top: 4px; }
.svc-table .was { display: block; font-size: 0.82rem; color: var(--muted); }
.svc-table th { white-space: nowrap; }
.svc-table td.note { color: var(--muted); font-size: 0.88rem; }

sup.src { font-size: 0.7em; line-height: 0; margin-left: 2px; }
sup.src a { text-decoration: none !important; color: var(--muted) !important; }
sup.src a:hover { color: var(--coral) !important; }

.svc-fine {
  font-size: 0.86rem;
  color: var(--muted) !important;
  margin: 10px 0 0;
}
.svc-fine a { color: var(--slate); }

/* ---------- listings ---------- */

.svc-listings { margin: 18px 0 0; }
.svc-listings h3 { font-size: 1.02rem; margin: 22px 0 12px; }
.svc-status { color: var(--muted) !important; }

.svc .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  margin: 0 0 12px;
}

.svc .card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none !important;
  color: var(--ink) !important;
}
.svc .card:hover { border-color: var(--coral); }

.svc .thumb {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e9edf2;
}
.svc .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.svc .card-body { display: block; padding: 12px 14px 14px; }
.svc .card-price { display: block; font-weight: 800; color: var(--coral); }
.svc .card-title {
  font-weight: 600;
  line-height: 1.35;
  margin: 2px 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.svc .card-sub { display: block; color: var(--muted); font-size: 0.85rem; }

.svc .card-wanted { border: 1.5px solid var(--wanted); }
.svc .card-wanted:hover { border-color: var(--wanted); box-shadow: 0 0 0 1px var(--wanted); }
.svc .card-wanted .thumb { background: var(--wanted-soft); }
.svc .card-wanted .thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d9488' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.6-3.6'/%3E%3C/svg%3E") center / 46px no-repeat;
}
.svc .card-wanted .thumb img { z-index: 1; }
.svc .card-wanted .card-price { color: var(--wanted); }
.svc .badge-wanted {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--wanted);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.svc .callout .btn-row { margin-top: 14px; }
.svc .btn-wanted { background: var(--wanted); color: #fff; }
.svc .btn-wanted:hover { background: #0f766e; }

/* ---------- sources ---------- */

ol.sources { font-size: 0.86rem; padding-left: 26px !important; }
ol.sources li { margin: 4px 0 !important; color: var(--muted) !important; word-break: break-word; }
ol.sources a { color: var(--muted) !important; }
ol.sources li:target { color: var(--text) !important; background: #fff8e6; border-radius: 4px; }

/* ---------- hub ---------- */

/* The search bar hides cards and groups with the hidden attribute; the
   cards' own display rule must not undo that. */
.svc [hidden] { display: none !important; }

.svc-search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
  margin: 0 0 14px;
  padding: 16px 18px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.svc-search label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 0 1 auto;
}
.svc-search label span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.svc-search .q { flex: 1 1 280px; }
.svc-search input, .svc-search select {
  font: inherit;
  font-size: 0.95rem;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}
.svc-search input:focus, .svc-search select:focus { outline: 2px solid var(--coral); outline-offset: 1px; }
.svc-search input[type="search"] { width: 100%; }
.svc-search input[type="number"] { width: 120px; }
.svc-search .btn { min-height: 44px; padding-top: 0; padding-bottom: 0; }

.hub-count { color: var(--muted); font-size: 0.9rem; margin: 0 0 22px; }
.hub-empty {
  margin: 0 0 30px;
  padding: 16px 20px;
  background: var(--card);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.hub-empty a { color: var(--slate); }
.hub-card .hub-match {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--navy);
  line-height: 1.5;
}
.hub-card .hub-match code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 600;
}

.hub-group { margin: 0 0 34px; }
.hub-group h2 { font-size: 1.22rem; margin: 0 0 14px; }
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.hub-card {
  display: block;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
}
.hub-card:hover { border-color: var(--coral); }
.hub-card .hub-brand {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.hub-card strong { display: block; font-size: 1.12rem; color: var(--navy); margin: 2px 0 6px; }
.hub-card .hub-line { display: block; font-size: 0.88rem; color: #2c3644; line-height: 1.5; }
.hub-card .hub-variants { display: block; font-size: 0.8rem; color: var(--muted); margin: 2px 0 4px; }

@media (max-width: 900px) {
  .svc .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .svc-photo img { max-height: 300px; }
  .svc-search .q { flex-basis: 100%; }
}

/* section headings with icon */
.svc-h { display: flex; align-items: flex-start; gap: 10px; }
.svc-h svg { flex: none; width: 22px; height: 22px; margin-top: 3px; color: var(--coral); }

/* ---------- /service landing: header photo ---------- */

/* The photo fills the band; a navy wash from the left keeps the text
   readable over the toolbox and leaves the face and the parts in view.
   On phones the photo becomes a strip above the text. */
.svc-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--on-navy);
}
.svc-hero-img {
  position: absolute;
  top: 0;
  right: 0;
  width: 64%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.svc-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, var(--navy) 0%, var(--navy) 36%, rgba(10, 21, 34, 0.72) 44%, rgba(10, 21, 34, 0.22) 54%, rgba(10, 21, 34, 0) 62%),
    linear-gradient(180deg, rgba(10, 21, 34, 0) 72%, rgba(10, 21, 34, 0.45) 100%);
}
.svc-hero-inner {
  position: relative;
  z-index: 2;
  min-height: 540px;
  padding-top: 84px;
  padding-bottom: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.svc-hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.3rem);
  line-height: 1.08;
  margin: 0 0 18px;
  max-width: 15ch;
  color: var(--on-navy);
}
.svc-hero .lede {
  font-size: 1.08rem;
  color: var(--on-navy-muted);
  max-width: 44ch;
  margin: 0 0 28px;
}
.svc-landing { padding-top: 36px; }

@media (max-width: 760px) {
  .svc-hero-img {
    position: relative;
    display: block;
    width: 100%;
    height: 300px;
    object-position: 52% 26%;
  }
  .svc-hero::before {
    background: linear-gradient(180deg, rgba(10, 21, 34, 0) 0, rgba(10, 21, 34, 0) 190px, var(--navy) 300px);
  }
  .svc-hero-inner {
    min-height: 0;
    margin-top: -36px;
    padding-top: 0;
    padding-bottom: 46px;
  }
  .svc-landing { padding-top: 28px; }
}
