/* Roadcast solution-page design system (body.ds).
   Source of truth: Figma "Fuel Monitoring – Desktop" (40010872:45753), measured at 1440. Every number below is that
   frame's number; clamps only scale it down for narrower screens. Loaded after the template styles
   (rc-passenger-v2, rc-vt-v2, rc-pgx / rc-fuel-v2) on every solution page. Notes: briefs/design-system.md

   1 tokens · 2 type · 3 badge + buttons · 4 hero · 5 section rhythm · 6 cards + bento · 7 feature panel
   8 dark panel · 9 closing sheet + FAQ */

/* ---------- 1. tokens ---------- */
body.ds {
  --ds-sec: clamp(88px, 13.9vw, 200px);        /* between two sections */
  --ds-sheet-top: clamp(72px, 11.7vw, 168px);  /* sheet edge -> first badge */
  --ds-head: clamp(32px, 3.3vw, 48px);         /* heading block -> its component */
  --ds-stack: 13px;                            /* badge -> h2 -> subline */
  --ds-grid: 20px;                             /* between cards */
  --ds-pad: clamp(20px, 2.15vw, 31px);         /* card padding */
  --ds-r-card: 24px;
  --ds-r-visual: 16px;
  --ds-r-panel: clamp(24px, 2.5vw, 36px);
  --ds-ink: #0F1F1D;
  --ds-body: #55606A;
  --ds-card: #F4F8F7;
  --ds-line: #E2EBE9;
  --ds-teal: #3EC6BB;
  --ds-dark-gap: clamp(56px, 6.95vw, 100px);   /* between blocks inside a dark panel */
  /* the template's own scale follows the system */
  --sec-y: var(--ds-sec);
  --head-gap: var(--ds-head);
}

/* ---------- 2. type ---------- */
body.ds .pcx-h1 { font-size: clamp(32px, 4.17vw, 60px); line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
body.ds h2.pcx-h2 { font-size: clamp(30px, 3.34vw, 48px); line-height: 1.23; font-weight: 600; letter-spacing: -.01em; }
body.ds .pcx-badge + h2.pcx-h2, body.ds .pcx-badge + .pcx-h2 { margin-top: var(--ds-stack); }
body.ds .pcx-head { margin-bottom: var(--ds-head); }
body.ds .pcx-head > p { margin-top: var(--ds-stack); font-size: clamp(16px, 1.25vw, 18px); line-height: 28px; color: var(--ds-body); max-width: 770px; }
body.ds .pcx-head.on-dark > p { color: #E3EEEC; }
body.ds .pcx-head .rc-btn-row { margin-top: 26px; }
body.ds .ds-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- 3. badge + buttons ---------- */
body.ds .pcx-badge { height: 32px; padding: 0 14px; border-radius: 6px; font: 500 14px/20px "Roboto", sans-serif; }
body.ds .rc-btn { min-height: 48px; border-radius: 12px; font-size: 15px; font-weight: 600; }
body.ds .rc-btn-row { gap: 12px; }

/* ---------- 4. hero: badge 10 h1 10 sub 42 buttons 60 frame ---------- */
body.ds .pcx-hero .pcx-hero-head .pcx-h1 { margin-top: 10px; }
body.ds .pcx-hero .pcx-hero-sub { margin-top: 10px; font-size: clamp(16px, 1.25vw, 18px); line-height: 28px; color: #C6C6C6; max-width: 560px; margin-left: auto; margin-right: auto; }
body.ds .pcx-hero .pcx-hero-head .rc-btn-row { margin-top: clamp(28px, 2.9vw, 42px); justify-content: center; }
body.ds .pcx-hero .pcx-hero-fig, body.ds .pcx-hero .pgx-frame { margin-top: clamp(40px, 4.2vw, 60px); }

/* ---------- 5. section rhythm ---------- */
body.ds .pcx-sheet > .pcx-sec:first-child, body.ds .pcx-sheet > section:first-child { padding-top: var(--ds-sheet-top); }
body.ds .pgx-sheet > .pgx-sec + .pgx-sec { padding-top: 0; }
body.ds .pgx-sheet .pgx-sec.vtx-fade { padding-bottom: var(--melt-p); }
/* dark bands keep the tighter rhythm of the dark panel (60 top, 100 between blocks) */
body.ds .pgx-dark { --sec-y: calc(var(--ds-dark-gap) / 2); }
body.ds .pgx-dark > section:first-child > .container { padding-top: clamp(40px, 4.2vw, 60px); }
body.ds .pgx-dark.pgx-after-sheet > section:first-child > .container { padding-top: clamp(16px, 2vw, 32px); }
body.ds .pgx-dark > section:last-child > .container { padding-bottom: clamp(56px, 6.95vw, 100px); }

/* ---------- 6. cards + bento ----------
   card: #F4F8F7, 1px #E2EBE9, r24, pad 31 · visual r16 · title 24/30 medium · text 16/24 · visual 36 title 10 text */
body.ds .ds-bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--ds-grid); }
body.ds .ds-card { grid-column: span 6; display: flex; flex-direction: column; padding: var(--ds-pad); border-radius: var(--ds-r-card); background: var(--ds-card); border: 1px solid var(--ds-line); text-align: left; min-width: 0; }
body.ds .ds-card.w7 { grid-column: span 7; } body.ds .ds-card.w5 { grid-column: span 5; } body.ds .ds-card.w4 { grid-column: span 4; }
body.ds .ds-card.w8 { grid-column: span 8; } body.ds .ds-card.w12 { grid-column: 1 / -1; }
body.ds .ds-card-v { position: relative; border-radius: var(--ds-r-visual); overflow: hidden; min-width: 0; }
body.ds .ds-card > h3 { margin: clamp(22px, 2.5vw, 36px) 0 0; font: 500 clamp(20px, 1.67vw, 24px)/1.25 "Roboto", sans-serif; color: var(--ds-ink); }
body.ds .ds-card > p { margin: 10px 0 0; font-size: 16px; line-height: 24px; color: #5D6D6A; }
body.ds .ds-card.c { text-align: center; align-items: center; }
@media (max-width: 1023px) { body.ds .ds-card, body.ds .ds-card.w7, body.ds .ds-card.w5, body.ds .ds-card.w4, body.ds .ds-card.w8 { grid-column: 1 / -1; } }
@media (min-width: 640px) and (max-width: 1023px) { body.ds .ds-card.w4 { grid-column: span 6; } body.ds .ds-card.w4:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* the template's icon cards and bento cards take the same card */
body.ds .pgx-bento { gap: var(--ds-grid); }
body.ds .pgx-card { min-height: 0; padding: var(--ds-pad); border-radius: var(--ds-r-card); background: var(--ds-card); border: 1px solid var(--ds-line); box-shadow: none; }
body.ds .pgx-card::after { display: none; }
body.ds .pgx-card:hover { transform: none; border-color: #CFE3E0; box-shadow: none; }
body.ds .pgx-card h3 { margin-top: clamp(40px, 5.5vw, 80px); padding-top: 0; font-size: clamp(20px, 1.67vw, 24px) !important; line-height: 1.25; font-weight: 500; color: var(--ds-ink); }
body.ds .pgx-card p { margin-top: 10px; font-size: 16px !important; line-height: 24px; color: #5D6D6A !important; }
body.ds .pgx-dark .pgx-card { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .1); }
body.ds .pgx-dark .pgx-card h3 { color: #fff; }
body.ds .pgx-dark .pgx-card p { color: #C6D3D1 !important; }
body.ds .pcx-bc { border-radius: var(--ds-r-card); background: var(--ds-card); border-color: var(--ds-line); box-shadow: none; }
body.ds .pcx-bc > h3 { font: 500 clamp(20px, 1.67vw, 24px)/1.25 "Roboto", sans-serif; color: var(--ds-ink); }
body.ds .pcx-bc > p { font-size: 16px; line-height: 24px; color: #5D6D6A; }
body.ds .pcx-cams-row { gap: var(--ds-grid); }
body.ds .pcx-cams-row + .pcx-cams-row { margin-top: var(--ds-grid); }
body.ds .pcx-fit { gap: 24px; }
body.ds .pcx-fit-card { border-radius: 20px; }

/* ---------- 7. feature panel: list on #F5F9F8, media on the right, r24 ---------- */
body.ds .pcx-feat { border-radius: var(--ds-r-card); border: 1px solid #E3EAE9; box-shadow: none; min-height: clamp(0px, 42vw, 605px); }
body.ds .pcx-feat-list { padding: 36px clamp(20px, 3.3vw, 48px); background: #F5F9F8; }
body.ds .pcx-feat-item button { padding: 22px 0; font: 500 20px/27px "Roboto", sans-serif; color: var(--ds-ink); }
body.ds .pcx-feat-item.is-open button { font-size: clamp(22px, 1.95vw, 28px); line-height: 38px; font-weight: 600; padding: 11px 0 6px; }
body.ds .pcx-feat-body p { font-size: 15.5px; line-height: 24px; color: var(--ds-body); }
@media (max-width: 1023px) { body.ds .pcx-feat { min-height: 0; } }

/* ---------- 8. dark panel: full-width, r36 top, 60 in, 100 between blocks ---------- */
body.ds .ds-dark { position: relative; border-radius: var(--ds-r-panel) var(--ds-r-panel) 0 0; background: linear-gradient(180deg, #0C3A36 0%, #072A27 18%, #03201E 46%, #021A18 100%); color: #fff; padding: clamp(48px, 5.6vw, 80px) 0 clamp(88px, 9.9vw, 142px); }
body.ds .ds-dark > section ~ section { margin-top: var(--ds-dark-gap); }
body.ds .ds-dark + .pcx-sheet, body.ds .pcx-sheet:has(> .ds-dark:last-child) + .pcx-sheet { margin-top: calc(-1 * clamp(24px, 4vw, 56px)); }
body.ds .pcx-sheet:has(> .ds-dark:last-child) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

/* ---------- 9. FAQ ---------- */
body.ds .pcx-faq-item { border-radius: 10px; }

/* ---------- 10. shared pieces ---------- */
body.ds h2.pcx-h2.ds-cap, body.ds .ds-cap1 { text-transform: capitalize; }
/* photo card: 4 + 4 + 4 case studies */
body.ds .ds-photo { aspect-ratio: 4 / 3; }
body.ds .ds-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.ds .ds-more { display: inline-flex; gap: 6px; margin-top: 18px; font-size: 15px; font-weight: 600; color: #0B6F66; }
body.ds .ds-more:hover { color: #08554E; }
/* AI Agent inside a dark panel: no box of its own, 1088 wide, no extra controls */
body.ds .ds-dark .rc4 > .container { padding-top: 0; padding-bottom: 0; }
/* on a dark band the block has no box of its own; on a white sheet it keeps its dark panel */
body.ds :is(.ds-dark, .pgx-dark .ds-ai, .vtx-dark .ds-ai) .rc4-band { padding: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
body.ds :is(.ds-dark, .pgx-dark .ds-ai, .vtx-dark .ds-ai) .rc4-band::before { display: none; }
body.ds .pcx-sheet > .rc4.ds-ai .rc4-band, body.ds .pcx-sheet > section .rc4.ds-ai .rc4-band { padding: clamp(40px, 4.2vw, 60px) clamp(16px, 3.9vw, 56px) clamp(32px, 3.4vw, 48px); border-radius: var(--ds-r-panel); background: linear-gradient(180deg, #0C3A36 0%, #072A27 30%, #03201E 100%); box-shadow: none; }
body.ds :is(.ds-dark, .ds-ai) .rc4-orb, body.ds :is(.ds-dark, .ds-ai) .rc4-chips, body.ds :is(.ds-dark, .ds-ai) .rc4-res .again { display: none; }
/* The footer keeps only the way through to the AI Agent page: centred, bright teal on the dark band, 44px tap target. */
body.ds :is(.ds-dark, .ds-ai) .rc4-foot { justify-content: center; margin-top: clamp(24px, 2.2vw, 32px); }
body.ds :is(.ds-dark, .ds-ai) .rc4-more { align-items: center; min-height: 44px; color: #3BEEE2; }
body.ds :is(.ds-dark, .ds-ai) .rc4-more:focus-visible { outline: 2px solid #3BEEE2; outline-offset: 4px; border-radius: 6px; }
body.ds :is(.ds-dark, .ds-ai) .rc4-head .pcx-badge { margin: 0; }
body.ds :is(.ds-dark, .ds-ai) .rc4-head h2.pcx-h2 { margin-top: var(--ds-stack); }
body.ds :is(.ds-dark, .ds-ai) .rc4-intro { margin: var(--ds-stack) auto 0; max-width: 600px; font-size: clamp(16px, 1.4vw, 20px); line-height: 28px; color: #fff; }
body.ds :is(.ds-dark, .ds-ai) .rc4-race, body.ds :is(.ds-dark, .ds-ai) .rc4-res { max-width: 1088px; margin-left: auto; margin-right: auto; }
body.ds :is(.ds-dark, .ds-ai) .rc4-race { margin-top: clamp(24px, 2.2vw, 32px); }
@media (min-width: 1024px) { body.ds :is(.ds-dark, .ds-ai) .rc4-res { grid-template-columns: auto 1fr; } body.ds :is(.ds-dark, .ds-ai) .rc4-res .tiles { justify-content: flex-end; } }
body.ds .ds-dark .ds-block { padding: 0; }
/* the containers of a system page line up at 1200 */
body.ds :is(.pcx-hero, .pcx-sheet, .vtx-dark, .ds-dark) .container { width: 100%; max-width: 1240px !important; margin-left: auto !important; margin-right: auto !important; padding-left: 20px; padding-right: 20px; }
/* split block inside a dark panel (visual + copy), left-aligned head */
body.ds .ds-split .pcx-badge + h2.pcx-h2 { margin-top: var(--ds-stack); }
body.ds .ds-split h2.pcx-h2, body.ds h2.pcx-h2.ds-left { text-align: left; }
body.ds .ds-lead { margin-top: var(--ds-stack); font-size: clamp(16px, 1.25vw, 18px); line-height: 28px; color: #E3EEEC; }
body.ds .ds-related { margin-top: var(--ds-sec); }
/* closing contact block (pages that end on a form instead of the FAQ) */
body.ds .ds-contact { padding: clamp(72px, 9vw, 128px) 0; background: linear-gradient(180deg, #04211F 0, rgba(4, 33, 31, 0) clamp(180px, 20vw, 300px)), linear-gradient(135deg, #001615, #002E23 50%, #001615); }
body.ds .ds-contact h2.pcx-h2 { margin-bottom: 24px; }
/* a single button under a card grid sits one heading-gap below it */
body.ds .pgx-bento + p:has(> .rc-btn), body.ds div:has(> .pgx-bento) + p:has(> .rc-btn), body.ds .pgx-bento + .rc-btn-row, body.ds .ds-bento + .rc-btn-row { margin-top: var(--ds-head); margin-bottom: 0; }
/* the AI Agent block anywhere on a system page takes the same form (Figma 40010872:44148): text badge, no orb,
   no request chips, four result tiles */
body.ds .rc4.ds-ai .rc4-head h2.pcx-h2 { margin-top: var(--ds-stack); }
/* Fleet: the how-it-works truck story opens the dark band; the 360 heading follows it */
body.ds .fl3-track + section > .container { padding-top: clamp(40px, 5.6vw, 80px); }
/* a dark band always ends with room before the next sheet's rounded edge, whatever its last block is */
body.ds .pgx-dark.pgx-band > section.rc5:last-of-type { padding-bottom: calc(clamp(24px, 4vw, 56px) + clamp(56px, 6.95vw, 100px)); }
/* a boxed panel that follows a heading block or its button sits one heading-gap below it */
body.ds .lm3-band { margin-top: var(--ds-head); }
