/* Shared by the generated pages under /handledare-mc/ (municipalities,
   counties, guides). Built on base.css; same reading column as integritet.html.
   The pages are generated by scripts/build-seo-pages.mjs. */

.doc {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-block: clamp(1.25rem, 3vw, 2.25rem) clamp(4rem, 9vw, 7rem);
}

.doc__main {
  width: 100%;
  max-width: 38rem;
  margin: clamp(2.5rem, 7vh, 5rem) auto 0;
}

/* ---------- Breadcrumbs ---------- */

.doc .crumbs {
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.doc .crumbs li { margin: 0; }

.doc .crumbs li + li::before {
  content: "/";
  margin-inline: 0.5rem;
  color: rgba(16, 38, 26, 0.4);
}

.doc .crumbs a {
  color: var(--ink-soft);
  font-weight: 400;
  text-decoration: none;
}

.doc .crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Type ---------- */

.h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  font-stretch: 72%;
  line-height: 0.95;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.doc .lede { margin-top: 1.5rem; max-width: 34ch; }

.doc h2 {
  margin: clamp(3.25rem, 7vw, 4.25rem) 0 0;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  font-stretch: 78%;
  line-height: 1.05;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.doc h2 + p,
.doc h2 + ul,
.doc h2 + ol { margin-top: 0.75rem; }

.doc h3 {
  margin: 2rem 0 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.doc p {
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
}

.doc ul,
.doc ol {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  color: var(--ink-soft);
}

.doc li + li { margin-top: 0.4rem; }

.doc a {
  color: var(--ink);
  font-weight: 600;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

.doc a:hover { text-decoration-thickness: 2.5px; }

.doc strong { color: var(--ink); font-weight: 600; }

/* ---------- Facts: a test centre, plain rows under a rule ---------- */

.facts {
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1.5px solid rgba(16, 38, 26, 0.18);
}

.facts dt {
  font-weight: 700;
  color: var(--ink);
}

.facts dd {
  margin: 0.15rem 0 0;
  color: var(--ink-soft);
}

.facts dd + dt { margin-top: 0.9rem; }

/* ---------- Link lists (nearby municipalities, a county's municipalities) ---------- */

.links {
  list-style: none;
  padding: 0 !important;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.links li + li { margin-top: 0 !important; }

.links--columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.5rem 1.25rem;
}

/* Hub: one block per county */
.county + .county { margin-top: 2.25rem; }

.doc h2 + .county { margin-top: 1.5rem; }

.county h3 { margin-top: 0; }

.county h3 a { font-weight: 700; }

/* ---------- Ad slot (a local driving school), only rendered when filled ---------- */

.ad {
  margin-top: clamp(3.25rem, 7vw, 4.25rem);
  padding: 1.25rem 1.375rem 1.375rem;
  border: 1.5px solid rgba(16, 38, 26, 0.22);
  border-radius: 14px;
  background: rgba(253, 247, 232, 0.55);
}

.ad__label {
  margin: 0 !important;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.ad__name {
  margin: 0.4rem 0 0 !important;
  font-size: 1.25rem !important;
  font-weight: 800;
  font-stretch: 85%;
  color: var(--ink) !important;
}

/* ---------- Download ---------- */

.get {
  margin-top: clamp(3.75rem, 8vw, 5rem);
  padding-top: clamp(2.5rem, 5vw, 3rem);
  border-top: 1.5px solid rgba(16, 38, 26, 0.18);
}

.get h2 { margin-top: 0; }

.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.5rem;
}

.doc .store {
  display: block;
  line-height: 0;
  border-radius: 9px;
}

.store img { height: 48px; width: auto; }

/* Google's PNG has transparent padding around the badge; trim it so both
   badges share the same visible height (same as the start page) */
.store--play img { height: 71px; margin: -11.5px; }

@media (max-width: 480px) {
  .stores { gap: 0.75rem; }
  .store img { height: 40px; }
  .store--play img { height: 59px; margin: -9.5px; }
}

/* ---------- Sources and footer ---------- */

.sources {
  margin-top: clamp(3.25rem, 7vw, 4.25rem) !important;
  font-size: 0.9375rem;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: clamp(4rem, 9vw, 6rem);
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.footer p { margin: 0; }

.footer a {
  color: var(--ink);
  font-weight: 600;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

.footer a:hover { text-decoration-thickness: 2.5px; }

/* The fixed road would cross the reading column on narrow screens */
@media (max-width: 700px) {
  .lane { display: none; }
}

.doc .links + p { margin-top: 1.25rem; }
