/* Stylesheet for the e-bike edition (American E-Bike News, working name), 2026-12-04.
   The look follows Lars's home page mockup (claude.ai Design canvas U7gSKY1sxZcR9YfbvT2QGr):
   navy header, lime only on navy, blue links, red for safety. Archivo for headings, Public Sans for text
   (loaded by site.masthead.fonts in config.json). No beige, cream, gold or orange. */
:root {
  --navy: #0b1233;
  --navy2: #1a2350;
  --lime: #c8f51e;
  --paper: #ffffff;
  --card: #eef2f8;
  --ink: #0b1233;
  --soft: #4a5573;
  --line: #d5dce8;
  --accent: #1f3bff;
  --alert: #c8102e;
  --visited: #5b4a8a;
  --head: Archivo, "Arial Narrow", system-ui, sans-serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #070b1f;
    --card: #10173a;
    --ink: #e8ecf6;
    --soft: #a4aecb;
    --line: #232c55;
    --accent: #9fb0ff;
    --alert: #ff8a98;
    --visited: #c2b4ee;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.45 var(--sans); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
a { color: inherit; text-decoration: none; }
a:hover, a:focus-visible { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
h3 a:visited, .more a:visited { color: var(--visited); }

/* Masthead: navy, with the e-bike riding along a road at the bottom */
.mast { background: var(--navy); color: #ffffff; padding: 28px 0 0; }
.mast .title { margin: 0; font: 900 clamp(34px, 7vw, 58px)/0.92 var(--head); font-stretch: 70%; text-transform: uppercase; letter-spacing: -0.01em; }
.mast .title .rest { color: var(--lime); }
.mast .tagline { margin: 10px 0 0; color: #c9d2e8; max-width: 52ch; font-size: 16.5px; }
.mast .updated { margin: 8px 0 0; font: 600 12.5px/1.4 var(--sans); color: #c9d2e8; text-transform: uppercase; letter-spacing: 0.06em; }
.mast .new-count { color: var(--lime); }
.road { position: relative; height: 64px; margin-top: 10px; overflow: hidden; }
.road::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9px; background: var(--navy2); }
.road-dash { position: absolute; left: 0; right: 0; bottom: 13px; height: 4px; background-image: linear-gradient(90deg, #ffe14d 0 24px, transparent 24px 48px); background-size: 48px 4px; animation: dash 1s linear infinite; }
.ride { position: absolute; bottom: 16px; width: 84px; height: 49px; animation: ride 14s linear infinite; }
.spin { transform-box: fill-box; transform-origin: center; animation: spin 0.6s linear infinite; }
@keyframes ride { from { left: -100px; } to { left: 100%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dash { to { background-position: -48px 0; } }
@media (prefers-reduced-motion: reduce) { .ride, .spin, .road-dash { animation: none; } .ride { left: 14%; } }

/* Section links */
.sections { position: sticky; top: 0; z-index: 2; background: var(--paper); border-bottom: 1px solid var(--line); }
.sections .wrap { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.sections .wrap::-webkit-scrollbar { display: none; }
.sections a { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--card); font: 600 14px/1.3 var(--sans); color: var(--ink); white-space: nowrap; }
.sections a:first-child { background: var(--navy); color: #ffffff; }
.sections a:hover, .sections a:focus-visible { background: var(--accent); color: #ffffff; text-decoration: none; }

h2 {
  margin: 40px 0 6px; padding-bottom: 8px; border-bottom: 4px solid var(--ink);
  font: 900 30px/1 var(--head); font-stretch: 75%; text-transform: uppercase; letter-spacing: 0;
  scroll-margin-top: 64px;
}
section { scroll-margin-top: 64px; }

/* Stories */
.story { padding: 16px 0; border-bottom: 1px solid var(--line); }
.story.ranked { display: grid; grid-template-columns: 48px 1fr; gap: 0 12px; }
.rank { align-self: start; margin-top: 20px; padding: 4px 0; border-radius: 6px; background: var(--navy); color: var(--lime); text-align: center; font: 900 18px/1.2 var(--head); font-stretch: 75%; }
.meta { margin: 0 0 4px; font: 600 12.5px/1.4 var(--sans); color: var(--soft); text-transform: uppercase; letter-spacing: 0.05em; }
.meta .outlet { color: var(--accent); font-weight: 700; }
.meta time::before { content: "· "; }
.story h3 { margin: 0; font: 800 21px/1.15 var(--head); font-stretch: 85%; letter-spacing: 0; text-wrap: balance; }
.top .story h3 { font-size: clamp(21px, 2.8vw, 26px); }
.top .story:first-of-type h3 { font-size: clamp(25px, 4vw, 34px); line-height: 1.08; }
#safety .meta .outlet { color: var(--alert); }

.more { margin-top: 10px; padding: 4px 0 4px 14px; border-left: 3px solid var(--lime); }
.more-label { margin: 0 0 4px; font: 700 11.5px/1.3 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); }
.more ul { margin: 0; padding: 0; list-style: none; }
.more li { padding: 3px 0; font-size: 15px; line-height: 1.38; }
.more .outlet { font-weight: 700; margin-right: 2px; }
.more .outlet::after { content: ":"; }
.more .extra { color: var(--soft); font-size: 13.5px; }

/* Sections sit two across on wide screens */
.grid { display: grid; grid-template-columns: 1fr; gap: 0 44px; }
.section .story h3 { font-size: 19px; }
.section .story:last-child { border-bottom: 0; }
@media (min-width: 860px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .top .story { max-width: 840px; }
}

.foot { margin-top: 48px; padding: 24px 0 40px; background: var(--navy); color: #c9d2e8; font-size: 14px; }
.foot p { margin: 0; max-width: 64ch; }

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .story.ranked { grid-template-columns: 38px 1fr; gap: 0 8px; }
  .rank { font-size: 15px; margin-top: 21px; }
  .mast { padding-top: 22px; }
  .ride { width: 66px; height: 39px; animation-duration: 9s; }
  h2 { font-size: 26px; }
}

/* Best of the week: a short list above Top stories */
.best { margin-top: 24px; padding: 4px 18px 10px; background: var(--card); border-radius: 12px; }
.best h2 { margin-top: 14px; font-size: 22px; border-bottom-width: 2px; }
.best ol { margin: 0; padding: 0; list-style: none; }
.best li { padding: 8px 0; border-bottom: 1px solid var(--line); font: 800 17px/1.25 var(--head); font-stretch: 85%; }
.best li:last-child { border-bottom: 0; }
.best a:visited { color: var(--visited); }
.best .meta { display: block; margin-top: 3px; font-family: var(--sans); font-stretch: 100%; }

/* Video, podcast and newsletter labels */
.fmt { margin-left: 4px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 3px; font: 700 10.5px/1.5 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); white-space: nowrap; }

/* New since the reader's last visit (added by the small script at the end of the page) */
.story.is-new .meta::before { content: "New"; margin-right: 7px; padding: 1px 6px; border-radius: 3px; background: var(--lime); color: var(--navy); font: 700 10.5px/1.5 var(--sans); letter-spacing: 0.06em; }
.new-count { font-weight: 700; }
