  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    font-family: system-ui, -apple-system, sans-serif;
    background: #f0f2f5;
    color: #1a1a1a;
    padding: 0.58rem 0.88rem 0.12rem;
    min-height: 100vh;
  }

  header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.7rem;
    margin-bottom: 0.44rem;
  }
  h1     { font-size: 1.26rem; font-weight: 600; }
  .meta  { font-size: 0.73rem; color: #666; margin-top: 0.02rem; }
  .meta.is-stale { color: #9f3a00; font-weight: 600; }
  .site-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    padding: 0.16rem;
    border: 1px solid #d8dde3;
    border-radius: 8px;
    background: rgba(255,255,255,0.86);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
  }
  .site-nav a {
    display: inline-grid;
    place-items: center;
    width: 1.72rem;
    height: 1.72rem;
    border-radius: 6px;
    color: #3f4b59;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1;
  }
  .site-nav a:hover { background: #eef2f5; }
  .site-nav a.active {
    background: #457b9d;
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
  }

  .filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.63rem;
    background: #fff;
    border-radius: 8px;
    padding: 0.35rem 0.64rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    font-size: 0.84rem;
  }
  .filter label { color: #555; }
  .date-field {
    position: relative;
    display: inline-flex;
    align-items: center;
  }
  .date-display {
    width: 8.1rem;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    padding: 0.24rem 2.35rem 0.24rem 0.45rem;
    font-size: 0.84rem;
    font-family: inherit;
  }
  .date-display:focus {
    outline: 2px solid #457b9d;
    border-color: transparent;
  }
  .picker-btn {
    position: absolute;
    right: 0.18rem;
    top: 50%;
    transform: translateY(-50%);
    min-width: 1.9rem;
    padding: 0.14rem 0.32rem;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #f5f5f5;
    font-size: 0.72rem;
    cursor: pointer;
  }
  .picker-btn:hover { background: #e8e8e8; }
  .native-date-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
  }
  .nav-btn {
    min-width: 2.05rem;
    padding: 0.24rem 0.52rem;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    background: #f5f5f5;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
  }
  .nav-btn:hover:not(:disabled) { background: #e8e8e8; }
  .nav-btn:disabled {
    opacity: 0.45;
    cursor: default;
  }
  .filter-actions {
    margin-left: auto;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    align-items: center;
  }
  .toggle-option {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #555;
    font-size: 0.78rem;
    white-space: nowrap;
  }
  .toggle-option input {
    accent-color: #457b9d;
    cursor: pointer;
  }
  .filter-toggles {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    margin-left: clamp(0.5rem, 6vw, 8rem);
    flex-wrap: wrap;
  }
  .filter button {
    padding: 0.24rem 0.66rem;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    background: #f5f5f5;
    font-size: 0.81rem;
    cursor: pointer;
  }
  .filter button:hover { background: #e8e8e8; }

  .grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
  }
  @media (max-width: 680px) {
    header { align-items: center; }
    .grid { grid-template-columns: 1fr; }
    .filter-actions { margin-left: 0; }
  }

  .card {
    background: #fff;
    border-radius: 10px;
    padding: 0.86rem 0.95rem 0.82rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
  }
  .card h2 { font-size: 0.9rem; font-weight: 600; color: #444; margin-bottom: 0.56rem; }

  .fuel-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.7rem;
  }
  .stat-card {
    min-width: 0;
    padding: 0.6rem 0.68rem;
    border: 1px solid #e6e8eb;
    border-radius: 9px;
    background: linear-gradient(180deg, #fbfcfd, #f6f7f9);
  }
  .stat-card:last-child {
    grid-column: 1 / -1;
  }
  .stat-label {
    display: block;
    margin-bottom: 0.22rem;
    color: #666;
    font-size: 0.69rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
  .stat-value {
    display: block;
    font-size: 0.97rem;
    font-weight: 700;
    color: #20242a;
    line-height: 1.15;
  }
  .stat-note {
    display: block;
    margin-top: 0.18rem;
    color: #667085;
    font-size: 0.72rem;
    line-height: 1.25;
  }
  .delta-up   { color: #c0392b; }
  .delta-down { color: #1a7f4b; }
  .delta-flat { color: #667085; }
  @media (max-width: 520px) {
    .fuel-stats { grid-template-columns: 1fr; }
    .stat-card:last-child { grid-column: auto; }
  }

  #error,
  #empty,
  #data-warning {
    display: none;
    border-radius: 8px;
    padding: 0.78rem;
    margin-bottom: 1rem;
  }
  #error {
    background: #fff3f3;
    border: 1px solid #f5c0c0;
    color: #c00;
  }
  #empty,
  #data-warning {
    background: #fff9e9;
    border: 1px solid #f0d58a;
    color: #7a5800;
  }
  #data-warning {
    font-size: 0.88rem;
    margin-top: -0.35rem;
  }
