@font-face {
  font-family: Inter;
  src: url('./assets/inter-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: Inter, system-ui, sans-serif;
  color: #17323b;
  background: #f3f7f8;
  --ink: #17323b;
  --muted: #51656f;
  --petrol: #145763;
  --line: #dfe8ea;
  --tint: #eaf4f3;
  --surface: #fff;
  --radius: 18px;
  --gutter: clamp(14px, 4vw, 34px);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
h1, h2, h3, p, figure, ul { margin: 0; }
button, select { font: inherit; color: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { flex: none; vertical-align: middle; }
:focus-visible { outline: 3px solid #0b7889; outline-offset: 3px; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 5;
  top: 8px;
  left: 12px;
  padding: 12px;
  border-radius: 9px;
  background: var(--surface);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  z-index: 3;
  top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner, .site-main {
  width: 100%;
  max-width: 1270px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 65px;
}

.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 780; letter-spacing: -.65px; }
.brand img { display: block; }
.brand span span { color: var(--petrol); }
.header-actions { display: flex; gap: 8px; align-items: center; }
.demo-label { color: #3c5962; background: #edf3f4; padding: 6px 8px; border-radius: 30px; font-size: 10px; font-weight: 680; }
.primary-button {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: #155863;
  font-size: 13px;
  font-weight: 690;
  white-space: nowrap;
}
.primary-button:hover { background: #103f49; }

.main-nav {
  position: fixed;
  z-index: 3;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.main-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 51px;
  padding: 4px 1px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 620;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--tint); color: #124e59; }

.site-main { padding-top: 25px; padding-bottom: calc(89px + env(safe-area-inset-bottom)); }
.notice { margin-bottom: 16px; padding: 12px 15px; border: 1px solid #b9d9d6; border-radius: 11px; background: var(--tint); font-size: 13px; }
.page-heading { display: grid; gap: 17px; align-items: end; margin-bottom: 17px; }
.eyebrow { margin-bottom: 5px; color: var(--petrol); font-size: 10px; font-weight: 760; text-transform: uppercase; letter-spacing: .12em; }
h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.06; letter-spacing: -.06em; font-weight: 790; }
.page-heading h1 + p { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.vehicle-select { display: grid; gap: 5px; font-size: 12px; font-weight: 650; }
.select-control { position: relative; display: flex; align-items: center; color: var(--petrol); }
.select-control > svg { position: absolute; left: 12px; pointer-events: none; }
.select-control > svg:last-child { left: auto; right: 12px; }
.select-control select, .history-filter select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d3e1e3;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}
.select-control select { appearance: none; padding: 0 34px 0 38px; font-size: 13px; font-weight: 670; }

.dashboard { display: grid; gap: 14px; grid-template-areas: 'overview' 'attention' 'recent'; }
.overview { grid-area: overview; display: grid; gap: 14px; min-width: 0; align-content: start; }
.attention { grid-area: attention; display: grid; gap: 14px; min-width: 0; align-content: start; }
.recent { grid-area: recent; min-width: 0; }
.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 2px 5px #183b4306;
}
.panel h2 { font-size: 17px; line-height: 1.25; font-weight: 740; letter-spacing: -.035em; }
.panel h2 + p { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.panel-heading { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 17px 16px 13px; }

.vehicle-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: radial-gradient(ellipse at 76% 80%, #2b6975, transparent 67%), linear-gradient(117deg, #102f3a, #154a55);
  color: #fff;
}
.vehicle-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(#a5ded414 1px, transparent 1px), linear-gradient(90deg, #a5ded414 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(115deg, transparent 13%, black);
  content: '';
}
.hero-copy { z-index: 1; padding: 17px 18px 0; }
.hero-label { display: inline-flex; align-items: center; gap: 7px; padding: 5px 8px; border: 1px solid #b8ded455; border-radius: 7px; color: #ddf4ee; font-size: 11px; font-weight: 630; }
.hero-copy h2 { margin-top: 10px; font-size: clamp(24px, 4vw, 38px); line-height: 1.08; font-weight: 770; letter-spacing: -.055em; }
.hero-type { display: flex; align-items: center; gap: 8px; margin-top: 7px; color: #c4e2e1; font-size: 13px; font-weight: 540; }
.hero-type span { width: 4px; height: 4px; background: #9ad2c6; border-radius: 100%; }
.hero-art { position: relative; justify-self: end; width: min(100%, 468px); padding: 0 10px 19px; }
.hero-art img { display: block; width: 100%; height: auto; }
.hero-art figcaption { position: absolute; right: 14px; bottom: 9px; color: #c7e5e4; font-size: 9px; font-weight: 570; }

.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.metric { padding: 13px 12px; }
.metric-label { display: flex; gap: 6px; align-items: center; margin-bottom: 9px; }
.metric h3 { color: var(--muted); font-size: 11px; line-height: 1.2; font-weight: 690; }
.tile-icon { display: grid; flex: none; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--petrol); background: var(--tint); }
.metric-label .tile-icon { width: 27px; height: 27px; border-radius: 7px; }
.distance, .metric-value { font-weight: 780; line-height: 1.15; letter-spacing: -.05em; }
.distance { font-size: clamp(23px, 5vw, 31px); white-space: nowrap; }
.distance small { color: var(--muted); font-size: 12px; font-weight: 620; letter-spacing: 0; }
.metric-value { font-size: 15px; }
.metric-note { margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.progress-row { display: flex; align-items: center; gap: 5px; margin-top: 7px; color: var(--petrol); font-size: 10px; font-weight: 730; }
progress { appearance: none; width: 100%; height: 5px; overflow: hidden; border: 0; border-radius: 10px; background: #e6eff0; accent-color: #2a817f; }
progress::-webkit-progress-bar { background: #e6eff0; }
progress::-webkit-progress-value { border-radius: 10px; background: #2a817f; }
progress::-moz-progress-bar { border-radius: 10px; background: #2a817f; }

.count { display: grid; place-items: center; min-width: 26px; min-height: 26px; padding: 2px 6px; border-radius: 8px; background: var(--tint); color: var(--petrol); font-size: 12px; font-weight: 760; }
.rows { padding: 0 16px; list-style: none; }
.record-row { display: flex; align-items: center; gap: 9px; padding: 10px 0; min-width: 0; border-top: 1px solid #e9eff0; }
.row-text { flex: 1; min-width: 0; }
.row-text strong, .row-text span { display: block; line-height: 1.35; }
.row-text strong { font-size: 13px; font-weight: 690; overflow-wrap: anywhere; }
.row-text span, .row-date { color: var(--muted); font-size: 11px; }
.row-text span { margin-top: 2px; }
.row-date { flex: none; text-align: right; }
.badge { flex: none; padding: 4px 7px; border-radius: 50px; background: #eef3f4; color: #415964; font-size: 10px; font-weight: 710; white-space: nowrap; }
.badge.soon, .tile-icon.warm { background: #fff1d9; color: #83500b; }
.panel-link, .text-link { display: inline-flex; gap: 5px; align-items: center; color: var(--petrol); font-size: 12px; font-weight: 720; }
.panel-link { justify-content: space-between; width: 100%; min-height: 44px; padding: 0 16px; border: 0; border-top: 1px solid #e9eff0; border-radius: 0 0 var(--radius) var(--radius); background: transparent; text-align: left; }
.panel-link:hover, .text-link:hover { text-decoration: underline; }
.text-link { white-space: nowrap; align-self: center; min-height: 44px; }
.issue-heading { display: flex; align-items: center; gap: 10px; padding: 15px 16px; }
.issue-heading .tile-icon { width: 39px; height: 39px; }
.recent .rows, .secondary-panel .rows { padding-bottom: 5px; }

.quick-actions, .more-options, .dialog-actions { display: grid; gap: 7px; padding: 0 16px 14px; }
.quick-actions, .dialog-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature-button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 44px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fbfb;
  text-align: left;
}
.feature-button:hover { background: var(--tint); border-color: #c4dedc; }
.feature-button .tile-icon { width: 27px; height: 27px; border-radius: 6px; }
.feature-copy { flex: 1; min-width: 0; }
.feature-copy strong { display: block; font-size: 11px; font-weight: 690; overflow-wrap: anywhere; }
.feature-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.more-options .feature-button { padding: 10px; }
.more-options .feature-copy strong { font-size: 13px; }
.more-options .tile-icon { width: 34px; height: 34px; }
.secondary-panel { max-width: 820px; }
.history-filter { display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 650; }
.history-filter select { min-width: 124px; padding-inline: 7px; font-size: 13px; }
.empty { padding: 0 16px 18px; color: var(--muted); font-size: 13px; }

dialog {
  width: min(calc(100% - 28px), 460px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 14px 55px #092c3a50;
}
dialog::backdrop { background: #142b36a1; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 20px; letter-spacing: -.04em; }
.close-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 9px; background: var(--tint); font-size: 23px; }
.dialog-note { padding: 14px 16px; color: var(--muted); font-size: 13px; line-height: 1.5; }

@media (min-width: 560px) {
  .page-heading { grid-template-columns: 1fr minmax(205px, 235px); }
  .vehicle-hero { grid-template-columns: minmax(180px, .76fr) minmax(0, 1fr); min-height: 205px; }
  .hero-copy { padding: 22px; }
  .hero-art { align-self: end; padding-bottom: 24px; }
  .quick-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .header-inner { min-height: 72px; }
  .brand { font-size: 20px; }
  .main-nav { position: static; display: flex; gap: 4px; padding: 0; border: 0; }
  .main-nav a { flex-direction: row; gap: 6px; padding: 0 9px; min-height: 42px; font-size: 12px; }
  .main-nav a svg { width: 17px; height: 17px; }
  .header-actions { gap: 12px; }
  .demo-label { padding: 6px 10px; font-size: 11px; }
  .primary-button { padding: 0 16px; }
  .site-main { padding-top: 36px; padding-bottom: 40px; }
  .page-heading { gap: 24px; margin-bottom: 23px; }
  .page-heading h1 + p { font-size: 15px; }
  .dashboard { grid-template: 'overview attention' auto 'recent attention' auto / minmax(0, 2.05fr) minmax(300px, 1fr); gap: 17px 20px; }
  .overview, .attention { gap: 17px; }
  .vehicle-hero { min-height: 217px; }
  .hero-copy { padding: 25px 27px; }
  .hero-art { padding-right: 16px; }
  .hero-art figcaption { right: 18px; bottom: 11px; }
  .metrics { gap: 14px; }
  .metric { padding: 14px 16px; }
  .metric-label { gap: 8px; }
  .metric h3, .metric-note { font-size: 12px; }
  .metric-value { font-size: 18px; }
  .panel-heading { padding: 18px 19px 13px; }
  .rows { padding-inline: 19px; }
  .record-row { gap: 10px; }
  .quick-actions { padding-inline: 19px; }
  .feature-button { gap: 8px; padding-inline: 7px; }
  .feature-copy strong { font-size: 12px; }
  .issue-heading, .panel-link { padding-inline: 19px; }
}
