/* RG 2026 — the car-hire pages' sections, card 1 of docs rg-next-sections (atlas 2026-11-05-rg-page-restyle; Carla's
   picks 2026-11-30 on docs rg-car-pages: "1 leave as is · 3 C · 5 B · 6 frame removed · 8 A · 9 leave as is", then
   "2D 4A 7B"). LIVE on every RG build since Carla's "push what ive approved live" (2026-11-30): served at
   /_rg2026/pages.css, linked by Rg2026Head (src/brand-2026.ts). Ported from the mock sheets (branch mocks/rg-section-mocks,
   planning-notes/2026-11-30-rg-section-mocks/mock/: decided.css + tbl-common.css + tbl-D.css + ans-1.css + tips-2.css).

   Scope: every /cars/rental/ page (cities, regions, airports, countries, suburbs, one-way routes, minivan and long-term
   pages) and its translations — a translated page's own path is local (/de/autos/vermietung/…), so it is found by its
   hreflang link back to the English /cars/rental/ page. The homes, statistics, EV and campervan pages are untouched. Untouched sections, as
   Carla picked: the link tiles, the FAQs, the navy top box (sections.css).

   Order: this sheet loads BEFORE the page's own CSS, so every rule wins on specificity (the scope below). !important
   only where the producer stamps an inline style on the element (price tiles, the tips' list) — the only lever over an
   inline style. The colours are the brand tokens (packages/tokens road-genius.css + road-genius-2026.css). */

:root[data-template='car-rental']:has(link:is([rel='canonical'], [rel='alternate'])[href*='/cars/rental/']) .article-page[data-article-themed] .prism-publication.prism-publication--rg {
  --rgp-navy: var(--rg26-navy);
  --rgp-panel: var(--color-tint-blue); /* the pale panel */
  --rgp-line: var(--color-field-border-strong); /* hairlines between items */
  --rgp-sky: var(--color-primary); /* the answer's price-tag icon, the tips' big numbers */
  --rgp-on-navy: var(--rg26-panel-text); /* light slate on navy */
  --rgp-on-navy-strong: var(--rg26-panel-title);
  /* every block sits on the text column (844 at 1440), like the navy top boxes, instead of the 20px-wider furniture
     lane publication.css gives tables, tiles, charts and card grids — resetting the lane var zeroes its !important
     margins */
  --article-outer-lane: 100%;

  /* on a pale band the pale panel turns white (flat, no shadow) so it still reads as one panel */
  & .prism-topic-band {
    --rgp-panel: var(--color-surface);
  }

  /* 2 — tables, D "navy frame": today's table (navy header bar, white rows) without its shadow, on a navy mat that
     runs round it as a thin frame; the note under the table in light slate on the navy */
  & table[role='table'] {
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 12px 12px 10px 10px;
    box-shadow: none;
  }
  & table[role='table'] tbody tr:last-child :is(td, th) {
    border-bottom: 0;
  }
  & table[role='table'] > caption {
    padding: 0.7em 0.6em 0.3em;
    color: var(--rgp-on-navy);
  }
  & section > div:has(> table[role='table']) {
    margin-block: 14px;
    padding: 0 6px 6px;
    overflow-x: auto;
    background: var(--rgp-navy);
    border-radius: 16px;
  }

  /* 3 — lists under a heading, C "open lines": a navy line on top, hairlines between items, no bullets */
  & main section > div > :is(h2, h3) + ul {
    padding-left: 0;
    list-style: none;
    border-top: 2px solid var(--rgp-navy);

    & > li {
      margin: 0;
      padding: 0.6em 0;
    }
    & > li + li {
      border-top: 1px solid var(--rgp-line);
    }
  }
  & main section > div > h3 {
    color: var(--rgp-navy);
  }

  /* 4 — the price answer box, A "navy question bar": the question on a navy strip with a sky price-tag icon, the
     answer on the pale panel below with hairlines between its sentences */
  & aside[data-callout='qa'] {
    padding: 0;
    overflow: hidden;
    background: var(--rgp-panel);
    border: 0;
    border-radius: 14px;
  }
  & aside[data-callout='qa'] [data-callout-part='question'] {
    position: relative;
    margin: 0;
    padding: 0.9em 1.4em 0.9em 3.3em;
    font-size: 1.05em;
    color: var(--rgp-on-navy-strong);
    background: var(--rgp-navy);
  }
  & aside[data-callout='qa'] [data-callout-part='question']::before {
    position: absolute;
    top: 50%;
    left: 1.3em;
    width: 1.25em;
    height: 1.25em;
    content: '';
    background: var(--rgp-sky);
    transform: translateY(-50%);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.6 2.6 21 11a2 2 0 0 1 0 2.8L13.8 21a2 2 0 0 1-2.8 0L2.6 12.6A2 2 0 0 1 2 11.2V4a2 2 0 0 1 2-2h7.2a2 2 0 0 1 1.4.6Z'/%3E%3Ccircle cx='7.5' cy='7.5' r='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.6 2.6 21 11a2 2 0 0 1 0 2.8L13.8 21a2 2 0 0 1-2.8 0L2.6 12.6A2 2 0 0 1 2 11.2V4a2 2 0 0 1 2-2h7.2a2 2 0 0 1 1.4.6Z'/%3E%3Ccircle cx='7.5' cy='7.5' r='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  & aside[data-callout='qa'] > div {
    padding: 0.5em 1.4em 0.7em;
  }
  & aside[data-callout='qa'] > div > p {
    margin: 0;
    padding: 0.6em 0;
  }
  & aside[data-callout='qa'] > div > p + p {
    border-top: 1px solid var(--rgp-line);
  }
  & aside[data-callout='qa'] strong {
    color: var(--rgp-navy);
  }

  /* 5 — price tiles, B "pale panel": one panel, three columns split by hairlines, the numbers keep their colours
     (!important: the producer stamps each tile's card look and the grid gap inline) */
  & section > dl {
    gap: 0 !important;
    padding: 0.2em 0.4em;
    background: var(--rgp-panel);
    border-radius: 14px;
  }
  & section > dl > div {
    padding: 1.1em 1.2em !important;
    background: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  & section > dl > div::before,
  & section > dl > div > span {
    display: none;
  }
  & section > dl > div + div {
    border-left: 1px solid var(--rgp-line);
  }

  /* 6 — the price chart, "frame removed": the outer white frame goes; the chart keeps its own pale panel */
  & :is(figure:has(.prism-chart-figure), .prism-chart-figure) {
    margin-inline: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  /* 7 — the tips box (ONE card with no icon and no photo: a heading over a list), B "big numbers, no box": two columns
     under a navy line, each tip numbered 01 02 03 in sky, hairlines between (!important: the producer stamps the list's
     indent inline). One card only: the route pages' town boxes and route cards are card grids too, and are not tips. */
  & section[data-cards]:not(:has(span[data-cards-icon], [data-cards-card] > div > span[aria-hidden], img, [data-cards-card] ~ [data-cards-card])) {
    & [data-cards-card] {
      padding: 0;
      background: none;
      border-radius: 0;
      box-shadow: none;
    }
    & h3 {
      margin-top: 0;
      color: var(--rgp-navy);
    }
    & ul {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0 2.4em;
      padding-inline-start: 0 !important;
      list-style: none;
      border-top: 2px solid var(--rgp-navy);
      counter-reset: tip;
    }
    & li {
      margin: 0;
      padding: 1em 0 1.1em;
      border-bottom: 1px solid var(--rgp-line);
      counter-increment: tip;
    }
    & li::before {
      display: block;
      margin-bottom: 0.4em;
      font-size: 1.55em;
      font-weight: 800;
      line-height: 1;
      color: var(--rgp-sky);
      content: counter(tip, decimal-leading-zero);
    }
    & li :is(strong, b) {
      color: var(--rgp-navy);
    }
  }

  /* 8 — words + photo, A "navy panel": the words on one navy panel, the photo beside it on its own (no card) */
  & section[data-cards]:not(:has(span[data-cards-icon], [data-cards-card] > div > span[aria-hidden])):has([data-cards-card] > img) {
    & > div {
      gap: 1.6em;
      align-items: start;
    }
    & [data-cards-card] {
      box-shadow: none;
    }
    & [data-cards-card]:not(:has(> img)) {
      padding: 1.3em 1.5em;
      background: var(--rgp-navy);
      border-radius: 14px;
    }
    & [data-cards-card]:has(> img) {
      padding: 0;
      background: none;
      border-radius: 0;
    }
    & [data-cards-card] > img {
      width: 100%;
      max-width: none;
      margin: 0;
      border-radius: 12px;
    }
    & [data-cards-card]:has(> img) > div {
      padding: 0.6em 0 0;
    }
    & [data-cards-card]:not(:has(> img)) h3 {
      margin-top: 0;
      color: var(--rgp-on-navy-strong);
    }
    & [data-cards-card]:not(:has(> img)) :is(li, p) {
      color: var(--rgp-on-navy);
    }
    & [data-cards-card]:not(:has(> img)) :is(strong, b, a) {
      color: var(--rgp-on-navy-strong);
    }
  }

  /* phones: the price tiles and the tips stack in one column */
  @media (max-width: 600px) {
    & section > dl {
      grid-template-columns: minmax(0, 1fr) !important;
    }
    & section > dl > div {
      padding: 0.8em 1.1em !important;
    }
    & section > dl > div + div {
      border-top: 1px solid var(--rgp-line);
      border-left: 0;
    }
    & section[data-cards]:not(:has(span[data-cards-icon], [data-cards-card] > div > span[aria-hidden], img, [data-cards-card] ~ [data-cards-card])) ul {
      grid-template-columns: minmax(0, 1fr);
    }
  }
}
