/* e-bike.ph — "electric ride field guide" visual system */
:root {
  --ink: #1f2328;
  --muted: #5b6470;
  --line: #e3e6ea;
  --wash: #f5f6f8;
  --paper: #ffffff;
  --link: #0b5cad;
  --k-2w: #0f7f81;
  --k-3w: #a75f00;
  --k-4w: #6343a8;
  --k-ebicycle: #2b7a2f;
  --k-emoto: #b8392c;
  --k-scooter: #235cc0;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--font);
  overflow-wrap: break-word;
}
a { color: var(--link); text-underline-offset: 2px; }
a:focus-visible, label:focus-visible { outline: 3px solid var(--k-scooter); outline-offset: 2px; }
img, svg { max-width: 100%; height: auto; }

.disclosure {
  margin: 0;
  padding: 6px 16px;
  background: var(--wash);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.site-header {
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 16px 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 24px;
}
.brand { text-decoration: none; color: var(--ink); display: inline-flex; align-items: baseline; gap: 8px; }
.brand-name { font-weight: 800; font-size: 24px; letter-spacing: -0.02em; }
.brand-by { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.site-nav { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.site-nav ul { list-style: none; margin: 0; padding: 0 0 4px; display: flex; gap: 6px; white-space: nowrap; }
.site-nav a {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
}
.site-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
@media (min-width: 900px) {
  .site-nav { width: auto; }
}

.breadcrumb { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.breadcrumb a { color: var(--muted); }

h1 { font-size: 30px; line-height: 1.2; letter-spacing: -0.02em; margin: 18px 0 8px; }
h2 { font-size: 23px; line-height: 1.3; margin: 40px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
h3 { font-size: 18px; line-height: 1.35; margin: 24px 0 6px; }
@media (min-width: 700px) { h1 { font-size: 38px; } }

.byline { font-size: 14px; color: var(--muted); margin: 0 0 4px; }
.method { font-size: 14px; color: var(--muted); margin: 0 0 20px; }
.lede {
  font-size: 19px;
  line-height: 1.6;
  border-left: 4px solid var(--ink);
  padding-left: 14px;
  margin: 20px 0;
}

.callout { background: var(--wash); border-radius: var(--radius); padding: 14px 16px; margin: 20px 0; }
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }

/* Vehicle kinds: line silhouettes with one colour per category */
.kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 20px 0; }
.kind {
  margin: 0;
  padding: 12px 10px 10px;
  border: 1.5px solid currentColor;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.kind svg { width: 120px; height: 72px; }
.kind figcaption { margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--ink); }
.kind-2w { color: var(--k-2w); }
.kind-3w { color: var(--k-3w); }
.kind-4w { color: var(--k-4w); }
.kind-ebicycle { color: var(--k-ebicycle); }
.kind-emoto { color: var(--k-emoto); }
.kind-scooter { color: var(--k-scooter); }
a.kind-link { text-decoration: none; }

/* Spec badges: V, Ah, W, km/h */
.badge {
  display: inline-block;
  font: 600 14px/1.4 var(--mono);
  padding: 1px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  white-space: nowrap;
}

/* Tables are the main exhibit */
.table-wrap {
  overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: var(--radius);
  /* edge shadows show that a wide table scrolls sideways on phones */
  background:
    linear-gradient(to right, var(--paper) 30%, rgba(255, 255, 255, 0)) left / 40px 100% no-repeat local,
    linear-gradient(to left, var(--paper) 30%, rgba(255, 255, 255, 0)) right / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.16), transparent) left / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.16), transparent) right / 12px 100% no-repeat scroll;
}
/* keep the caption in view while the table scrolls sideways */
.table-wrap caption { position: sticky; left: 0; max-width: calc(100vw - 34px); }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
caption { caption-side: top; text-align: left; padding: 10px 12px 0; font-size: 14px; color: var(--muted); }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: var(--wash); font-size: 14px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--muted); }
tbody th { font-weight: 700; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

sup.ref { font-size: 14px; line-height: 0; }
sup.ref a { text-decoration: none; }
sup.ref + sup.ref::before { content: ","; color: var(--muted); }

.faq h3 { margin-top: 20px; }

.model-card { border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 14px 16px; margin: 20px 0; }
.model-card .table-wrap { border: 0; margin: 8px 0; }
.model-kicker { margin: 0 0 2px; font-size: 14px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.model-name { font-weight: 800; margin: 0; }
.model-price, .model-source { font-size: 14px; color: var(--muted); margin: 6px 0 0; }

.model-card picture img { display: block; width: 100%; max-width: 260px; height: auto; margin: 10px 0 4px; }

/* Media: photos, SVG diagrams and videos. width/height attributes reserve space, so nothing jumps while loading. */
.photo, .fig, .video { margin: 24px 0; }
.photo img, .fig img { display: block; width: 100%; height: auto; border-radius: var(--radius); background: var(--wash); }
.photo.portrait img { max-width: 420px; }
.fig img { max-width: 560px; border: 1px solid var(--line); background: var(--paper); }
.video video { display: block; width: 100%; height: auto; border-radius: var(--radius); background: #111; }
.video.portrait video { max-width: 360px; max-height: 80vh; }
.photo figcaption, .fig figcaption, .video figcaption { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.media-kicker { font-size: 14px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.credit { white-space: nowrap; font-size: 14px; }
.video-meta { font-weight: 700; color: var(--ink); }
.transcript { margin-top: 6px; }
.transcript summary { cursor: pointer; color: var(--link); }
.transcript p { margin: 6px 0; }

.publisher-note { border-left: 4px solid var(--k-2w); background: var(--wash); padding: 10px 14px; font-size: 15px; margin: 24px 0; }

/* Advertising (PROJECT_CONTRACT: one unit per view, labelled, non-intrusive, no layout shift) */
.ad { border: 1px dashed #aeb6c0; background: #fffaf0; border-radius: var(--radius); padding: 12px 16px; }
.ad-label { margin: 0 0 4px; font-size: 14px; font-weight: 700; letter-spacing: 0.04em; color: #4a525c; }
.ad-headline { margin: 0; font-weight: 700; }
.ad-body { margin: 4px 0 10px; font-size: 15px; }
.ad-cta { display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.ad-inline { margin: 28px 0; }
.ad-banner { min-height: 132px; margin: 24px 0; padding: 12px 16px; display: flex; flex-direction: column; justify-content: center; }
.ad-banner .ad-body { margin-bottom: 8px; }
@media (min-width: 700px) { .ad-banner { min-height: 120px; } }
.ad-close-toggle { position: absolute; opacity: 0; pointer-events: none; }
.ad-sticky { display: none; }

/* Layout: single column; two columns with an ad sidebar on wide screens for articles */
.layout { max-width: 1120px; margin: 0 auto; }
.layout > main { max-width: 760px; margin: 0 auto; padding: 0 16px 48px; }
.sidebar { display: none; }
@media (min-width: 1100px) {
  .layout.has-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding: 0 16px; }
  .layout.has-sidebar > main { max-width: none; margin: 0; padding: 0 0 48px; }
  .layout.has-sidebar .sidebar { display: block; padding-top: 18px; }
  .sidebar .ad-sidebar { position: sticky; top: 16px; min-height: 280px; }
  .layout.has-sidebar .ad-inline { display: none; }
}

.guide-list { list-style: none; padding: 0; margin: 16px 0; }
.guide-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.guide-list a { font-weight: 700; font-size: 18px; }
.guide-desc { display: block; color: var(--muted); font-size: 15px; margin-top: 2px; }

.sources { font-size: 14px; }
.sources ol { padding-left: 22px; }
.sources li { margin: 4px 0; }

.site-footer { border-top: 1px solid var(--line); background: var(--wash); padding: 20px 16px 28px; font-size: 14px; color: var(--muted); }
.site-footer p { max-width: 760px; margin: 6px auto; }
.site-footer a { color: var(--muted); }
.small { font-size: 14px; }

/* Print (checklists are meant to be printed or saved as PDF): no ads, no navigation; keep the
   disclosure, byline dates and sources so a printout shows who published it and when it was checked. */
@media print {
  .ad, .sidebar, .ad-sticky, .site-nav, .breadcrumb, .transcript summary { display: none !important; }
  .layout, .layout.has-sidebar { display: block; max-width: none; padding: 0; }
  .layout > main { max-width: none; padding: 0; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; }
  .table-wrap { overflow: visible; background: none; border: 0; }
  .table-wrap caption { position: static; }
  figure, table, .model-card { break-inside: avoid; }
  h2 { break-after: avoid; }
}
