:root {
  color-scheme: light;
  --ink: #14213d;
  --forest: #123447;
  --olive: #095c6b;
  --paper: #f7f8fb;
  --bright: #f7cc61;
  --white: #fff;
  --line: #e2e6ee;
  --muted: #5d6779;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-size: 1rem; line-height: 1.55; }
a { color: inherit; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, input:focus-visible { outline: 3px solid #a36816; outline-offset: 4px; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.wrap { max-width: 74rem; width: calc(100% - 3rem); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -10rem; z-index: 3; padding: .65rem 1rem; background: var(--white); }
.skip:focus { top: .5rem; }

.site-head { border-bottom: 1px solid var(--line); background: var(--white); }
.header-inner { display: flex; min-height: 4.5rem; justify-content: space-between; align-items: center; gap: .5rem 1.5rem; flex-wrap: wrap; padding-block: .75rem; }
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-size: clamp(1.4rem, 4vw, 1.85rem); letter-spacing: -.065em; line-height: 1; font-weight: 850; }
.logo::before { content: ""; width: 1.2rem; height: 1.2rem; display: inline-block; background: var(--bright); border: 3px solid var(--forest); border-radius: 40% 0 40% 0; }
.site-head nav, .site-footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem 1.2rem; }
.site-head nav a, .site-footer nav a { font-size: .92rem; font-weight: 650; text-decoration: none; }
.site-head nav a:hover, .site-footer nav a:hover, [aria-current="page"] { text-decoration: underline; }
.site-footer { margin-top: 4rem; padding: 2.4rem 0 2.75rem; background: var(--forest); color: var(--white); }
.foot-inner { display: grid; gap: 1.15rem; }
.foot-inner p { margin: 0; color: #e7eee8; }

.hero { display: grid; grid-template-columns: 1.04fr 1fr; margin-top: 2rem; background: var(--forest); color: var(--white); min-height: 24rem; border-radius: .8rem; overflow: hidden; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(1.6rem, 5.5vw, 4.2rem); }
.hero h1, .page-head h1, .reading h1 { font-size: clamp(2.35rem, 5.6vw, 4.7rem); line-height: .99; letter-spacing: -.062em; margin: 0 0 1rem; text-wrap: balance; }
.hero p { max-width: 31ch; font-size: clamp(1rem, 2vw, 1.17rem); margin: 0 0 1.55rem; color: #e0eee4; }
.hero img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.button { background: var(--bright); color: #17241a; padding: .62rem 1rem; border-radius: .3rem; font-weight: 760; text-decoration: none; }
.button:hover { background: #ffd66a; }

.shelf { margin-top: 2.7rem; }
.shelf h2, .related h2 { font-size: clamp(1.65rem, 3.2vw, 2.35rem); line-height: 1.1; letter-spacing: -.038em; margin: 0 0 1.15rem; }
.topics { display: flex; list-style: none; padding: 0; margin: 0; gap: .55rem; flex-wrap: wrap; }
.topics a { display: block; text-decoration: none; padding: .5rem .85rem; border: 1px solid #6f8b78; border-radius: 9rem; font-weight: 650; font-size: .9rem; }
.topics a:hover, .topics a[aria-current="page"] { background: var(--forest); color: var(--white); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .9rem; }
.card { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--accent, #548c6f); padding: 1.15rem 1.17rem 1.2rem; border-radius: .55rem; min-width: 0; }
.card :is(h2,h3) { margin: .46rem 0 .6rem; font-size: clamp(1.24rem, 2.15vw, 1.55rem); line-height: 1.18; letter-spacing: -.033em; }
.card :is(h2,h3) a { text-decoration: none; }
.card :is(h2,h3) a:hover { text-decoration: underline; }
.card p { margin: 0; color: var(--muted); }
.category { color: var(--olive); font-size: .87rem; font-weight: 740; text-decoration: none; }
.category:hover { text-decoration: underline; }
.card[data-topic=vehicle-technology] { --accent: #d39923; }
.card[data-topic=navigation] { --accent: #4a968a; }
.card[data-topic=fuel] { --accent: #7285ad; }
.card[data-topic=trip-costs] { --accent: #c97d58; }
.card[data-topic=electric-hybrid] { --accent: #a582ab; }
.all { margin-top: .95rem; display: inline-block; font-weight: 740; color: var(--forest); }

.page-head { margin: 2.65rem 0 1.6rem; }
.page-head h1 { font-size: clamp(2.35rem, 5vw, 3.75rem); }
.page-head p { max-width: 60ch; margin: 0 0 1rem; color: var(--muted); font-size: 1.08rem; }
.search { max-width: 32rem; display: grid; gap: .35rem; margin: 1.5rem 0 .4rem; }
.search label { font-weight: 700; }
.search input { appearance: none; width: 100%; padding: .7rem .85rem; border: 1px solid #6f8b78; background: var(--white); border-radius: .35rem; color: var(--ink); font: inherit; }
.results { min-height: 1.5em; margin: 0 0 .85rem; color: var(--muted); }

.reading { max-width: 48rem; }
.breadcrumb { display: flex; gap: .45rem; flex-wrap: wrap; margin: 1.35rem 0 2rem; font-size: .92rem; color: var(--muted); }
.reading h1 { font-size: clamp(2.2rem, 6vw, 4.1rem); }
.article-head { border-bottom: 1px solid var(--line); padding-bottom: 1.23rem; margin-bottom: 1.65rem; }
.byline { margin: 0; color: var(--muted); font-size: .93rem; }
.prose { max-width: 67ch; font-size: 1.09rem; line-height: 1.72; overflow-wrap: break-word; }
.prose h2 { font-size: clamp(1.28rem, 3vw, 1.67rem); line-height: 1.2; margin: 1.65em 0 .55em; letter-spacing: -.025em; }
.prose p { margin: 0 0 .95em; }
.sources { margin-top: 2.4rem; padding: .15rem 1.2rem 1.1rem; border-left: 3px solid #6f9d82; background: #edf3ea; border-radius: .4rem; }
.sources h2 { margin-top: 1rem; }
.sources ul { margin: 0; padding-inline-start: 1.25rem; }
.related { margin-top: 3rem; }

@media (max-width: 57rem) { .grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 39rem) {
  .wrap { width: calc(100% - 1.9rem); }
  .header-inner { padding-block: .82rem; }
  .site-head nav { gap: .48rem .65rem; }
  .site-head nav a { font-size: .875rem; }
  .hero { grid-template-columns: 1fr; min-height: 0; margin-top: 1rem; }
  .hero img { aspect-ratio: 16/8; }
  .hero h1 { max-width: 13ch; }
  .grid { grid-template-columns: 1fr; }
}

.logo::before { content: none; }
.logo .brand-mark { width: 2.1rem; height: 2.1rem; flex: 0 0 auto; }
.hero-copy { padding: clamp(1.5rem, 5vw, 3.2rem); }
.hero p { margin-bottom: 1.1rem; }
.quick-tools { margin-top: 1rem; padding: .8rem 1.05rem; border: 1px solid var(--line); background: var(--white); border-radius: .55rem; display: flex; flex-wrap: wrap; gap: .45rem 1.2rem; }
.quick-tools a, .article-tool a { color: var(--olive); font-weight: 700; }
.sources { background: #edf6f8; border-left-color: #0b7285; }
