/* ── pebble bar chart — fleet experience ───────────────────────────── */
:root {
  --pebble-bg: #faf8f2;
  --pebble-surface: #ffffff;
  --pebble-border: #e2e0db;
  --pebble-text: #1a1a1c;
  --pebble-text-secondary: #5a5852;
  --pebble-text-muted: #8a8780;
  --pebble-grid: #87867F;

  /* aliases used by page chrome */
  --paper: #f4f0e6;
  --paper-light: #fcfaf5;
  --ink: var(--pebble-text);
  --muted: var(--pebble-text-secondary);
  --hairline: rgba(52, 43, 29, 0.18);
  --shadow: 0 22px 65px rgba(58, 43, 19, 0.16);

  color: var(--pebble-text);
  background: var(--pebble-bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --pebble-bg: #141416;
    --pebble-surface: #1e1e22;
    --pebble-border: #2e2e34;
    --pebble-text: #e8e6e2;
    --pebble-text-secondary: #a8a6a0;
    --pebble-text-muted: #6a6862;
    --pebble-grid: #55554F;
    --paper: #1a1a1e;
    --paper-light: #222226;
    --ink: var(--pebble-text);
    --muted: var(--pebble-text-secondary);
    --hairline: rgba(200, 195, 185, 0.15);
  }
}
:root[data-theme="dark"] {
  --pebble-bg: #141416;
  --pebble-surface: #1e1e22;
  --pebble-border: #2e2e34;
  --pebble-text: #e8e6e2;
  --pebble-text-secondary: #a8a6a0;
  --pebble-text-muted: #6a6862;
  --pebble-grid: #55554F;
  --paper: #1a1a1e;
  --paper-light: #222226;
  --ink: var(--pebble-text);
  --muted: var(--pebble-text-secondary);
  --hairline: rgba(200, 195, 185, 0.15);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  background: var(--pebble-bg);
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--pebble-bg);
}
button,
a {
  font: inherit;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #245c9a;
  outline-offset: 3px;
}

/* ── page layout ──────────────────────────────────────────────────── */
.experience {
  margin: 0 auto;
  padding: 24px clamp(18px, 4vw, 40px) 60px;
}
.masthead {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.brand {
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.quiet-button {
  min-height: 44px;
  cursor: pointer;
  border: 0;
  background: none;
  border-bottom: 1px solid currentColor;
  padding: 1px 0;
  color: var(--muted);
  font-size: 13px;
}
.quiet-button:hover {
  color: var(--ink);
}

/* ── intro ────────────────────────────────────────────────────────── */
.intro {
  min-width: 0;
  max-width: 1100px;
  margin-bottom: 28px;
}
.eyebrow {
  margin: 0 0 7px;
  color: var(--pebble-text-muted);
  font-size: 11px;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}
h1,
h2 {
  margin: 0;
  font-weight: 700;
}
h1 {
  font-size: 1.5rem;
  line-height: 1.1;
}
.dek {
  margin: 4px 0 0;
  max-width: 520px;
  color: var(--pebble-text-secondary);
  font-size: 0.875rem;
  line-height: 1.4;
}

/* ── category nav ────────────────────────────────────────────────── */
.category-nav {
  margin-bottom: 10px;
}
.category-nav-track {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0;
}
.category-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border: 1px solid var(--hairline);
  border-radius: 100px;
  background: transparent;
  color: var(--pebble-text-secondary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  min-height: 32px;
}
.category-pill:hover {
  background: var(--paper);
  color: var(--ink);
}
.category-pill .pill-count {
  opacity: 0.5;
  font-weight: 400;
}

/* ── chart area ───────────────────────────────────────────────────── */
.chart-region {
  min-width: 0;
  min-height: 0;
  position: relative;
}
.chart {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 60px;
  padding-left: 0;
  scroll-behavior: smooth;
}

/* ── scroll arrows ───────────────────────────────────────────────── */
.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: rgba(250, 248, 242, 0.85);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  transition: opacity 0.2s, transform 0.2s;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .scroll-arrow {
    background: rgba(30, 30, 34, 0.9);
  }
}
:root[data-theme="dark"] .scroll-arrow {
  background: rgba(30, 30, 34, 0.9);
}
.scroll-arrow:hover {
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}
.scroll-arrow--right {
  right: 12px;
  animation: nudge-right 1.5s ease-in-out 3;
}
.scroll-arrow--left {
  left: 12px;
}
@keyframes nudge-right {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-50%) translateX(6px); }
}

/* pebble bar component styles */
.pebble-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}
.pebble-bar-label {
  font-size: 0.75rem;
  color: var(--pebble-text-secondary);
  text-align: center;
  white-space: nowrap;
}

/* ── loading / error ──────────────────────────────────────────────── */
.loading {
  display: grid;
  place-items: center;
  min-height: 200px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.loading.error {
  max-width: 350px;
  margin: auto;
  text-align: center;
  line-height: 1.5;
}
.retry {
  min-height: 44px;
  margin-left: 5px;
  border: 0;
  border-bottom: 1px solid;
  background: none;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}

/* ── footer ───────────────────────────────────────────────────────── */
.footer,
.no-script {
  display: flex;
  min-width: 0;
  gap: 7px;
  color: var(--pebble-text-muted);
  font-size: 11px;
  margin-top: 16px;
}
.no-script a {
  color: var(--ink);
}

/* ── dialogs ──────────────────────────────────────────────────────── */
dialog {
  color: var(--ink);
  border: 0;
  padding: 0;
  background: transparent;
}
dialog::backdrop {
  background: rgba(32, 27, 20, 0.38);
}
body:has(dialog[open]) {
  overflow: hidden;
}
.circle-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  cursor: pointer;
  background: rgba(252, 250, 245, 0.65);
  font-size: 18px;
  line-height: 1;
}
.circle-button:hover {
  background: var(--paper-light);
  border-color: rgba(40, 31, 19, 0.45);
}
.report-dialog {
  width: min(680px, calc(100vw - 28px));
  max-width: none;
  max-height: min(86svh, 860px);
  margin: auto 28px auto auto;
}
.about-dialog {
  width: min(540px, calc(100vw - 32px));
  max-width: none;
  margin: auto;
}
.dialog-shell {
  overflow: auto;
  max-height: inherit;
  padding: clamp(21px, 3vw, 34px);
  border: 1px solid rgba(68, 52, 29, 0.2);
  border-radius: 9px;
  background: var(--paper-light);
  box-shadow: var(--shadow);
}
.report-shell {
  padding-top: 0;
}
.dialog-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.report-shell .dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: clamp(21px, 3vw, 34px) 0 17px;
  margin-bottom: 0;
  background: var(--paper-light);
  box-shadow: 0 10px 12px -14px rgba(0, 0, 0, 0.5);
}
.close-button {
  flex: 0 0 auto;
  font-size: 24px;
}
.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 11px;
}
.report {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.report img {
  display: block;
  width: 100%;
  aspect-ratio: 1/0.83;
  border-radius: 3px;
  object-fit: cover;
  background: #e8e1d4;
}
.report:hover img,
.report:focus-visible img {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.report-meta {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}
.dialog-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 25px;
  padding-top: 17px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 12px;
}
.page-button {
  min-height: 44px;
  cursor: pointer;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: transparent;
  padding: 5px 10px;
  font-size: 12px;
}
.about-copy {
  max-width: 58ch;
  color: var(--pebble-text-secondary);
  font-size: 15px;
  line-height: 1.52;
}
.about-copy p {
  margin: 0 0 15px;
}
.about-copy a {
  color: var(--ink);
  text-underline-offset: 3px;
}

/* ── mobile ───────────────────────────────────────────────────────── */
@media (max-width: 650px) {
  .experience {
    padding: 16px 16px 40px;
  }
  .scroll-arrow {
    width: 40px;
    height: 40px;
  }
  .scroll-arrow--right { right: 6px; }
  .scroll-arrow--left { left: 6px; }
  .report-dialog {
    width: 100%;
    max-height: min(91svh, 900px);
    margin: auto 0 0;
  }
  .report-dialog .dialog-shell {
    border-radius: 13px 13px 0 0;
  }
  .dialog-shell {
    padding: 21px 17px 28px;
  }
  .report-shell {
    padding-top: 0;
  }
  .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
