/* Glovebox on the web.
   Every colour and type size is the phone's: transcribed from Theme.kt, by way of the design
   harness in .ui-review/common.css, so the two clients read as one product. */

@font-face { font-family: PlexC; src: url("fonts/plex_condensed_regular.ttf");  font-weight: 400; font-display: swap; }
@font-face { font-family: PlexC; src: url("fonts/plex_condensed_medium.ttf");   font-weight: 500; font-display: swap; }
@font-face { font-family: PlexC; src: url("fonts/plex_condensed_semibold.ttf"); font-weight: 600; font-display: swap; }
@font-face { font-family: PlexM; src: url("fonts/plex_mono_medium.ttf");        font-weight: 500; font-display: swap; }

/* Light (Theme.kt LightColors) by default, dark (DarkColors) when the system asks for it. */
:root {
  --bg: #EDEFF0; --surface: #FFFFFF; --outline: #D4DADD;
  --on-bg: #16222B; --on-var: #5B6C77;
  --primary: #A9660F; --on-primary: #FFFFFF; --error: #C42B30; --secondary: #186A85;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1418; --surface: #161E24; --outline: #26313A;
    --on-bg: #E9EEF1; --on-var: #869AA6;
    --primary: #F2A73B; --on-primary: #201203; --error: #E5484D; --secondary: #7FD1E8;
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg); color: var(--on-bg);
  font: 400 17px/24px PlexC, "IBM Plex Sans Condensed", "Arial Narrow", system-ui, sans-serif;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---- the type scale (Theme.kt GloveboxTypography) ---- */
.headline { font-size: 27px; line-height: 32px; font-weight: 600; }
.title    { font-size: 20px; line-height: 26px; font-weight: 600; }
.subtitle { font-size: 17px; line-height: 22px; font-weight: 500; }
.body     { font-size: 15px; line-height: 22px; }
/* The mono gauge labels, upper-cased as the phone does it. */
.gauge    { font-family: PlexM, ui-monospace, monospace; font-size: 12px; line-height: 16px;
            font-weight: 500; letter-spacing: 1.4px; text-transform: uppercase; color: var(--on-var); }
.mono     { font-family: PlexM, ui-monospace, monospace; font-weight: 500; }
.muted    { color: var(--on-var); }
.warn     { color: var(--error); }
.note     { font-size: 15px; line-height: 22px; color: var(--on-var); }

/* ---- chrome ---- */
.bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--outline); background: var(--surface);
  position: sticky; top: 0; z-index: 1;
}
.wordmark {
  font-family: PlexM, ui-monospace, monospace; font-weight: 500; font-size: 14px;
  letter-spacing: 2.4px; text-transform: uppercase; color: var(--on-bg);
}
.wordmark:hover { text-decoration: none; color: var(--primary); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.who { font-size: 14px; color: var(--on-var); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* On a phone-width screen the account name crowds the buttons until "Sign out" breaks over two lines;
   the buttons matter more than the name. */
@media (max-width: 560px) { .who { display: none; } }

.main { max-width: 1120px; margin: 0 auto; padding: 24px 16px 64px; }

button { font: inherit; cursor: pointer; }
.quiet {
  height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--outline);
  background: transparent; color: var(--on-bg); font-size: 15px; font-weight: 500;
  white-space: nowrap; flex: none;
}
.quiet:hover { border-color: var(--on-var); }
.primary {
  height: 52px; padding: 0 28px; border-radius: 26px; border: 0;
  background: var(--primary); color: var(--on-primary); font-size: 16px; font-weight: 500;
}
.primary:disabled { opacity: 0.6; cursor: progress; }

/* ---- sign in ---- */
.signin { max-width: 400px; margin: 8vh auto 0; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; color: var(--on-var); }
.field input {
  height: 52px; padding: 0 14px; border-radius: 4px; border: 1px solid var(--outline);
  background: var(--surface); color: var(--on-bg); font: inherit;
}
.field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.problem { color: var(--error); font-size: 15px; line-height: 22px; min-height: 22px; }

/* ---- garage ---- */
.freshness { margin-bottom: 20px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin: 28px 0 12px; }
.section-head:first-child { margin-top: 0; }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card {
  display: flex; align-items: stretch; border: 1px solid var(--outline); border-radius: 6px;
  background: var(--surface); color: var(--on-bg); overflow: hidden; min-width: 0;
}
a.card:hover { text-decoration: none; border-color: var(--on-var); }
.card .stripe { width: 4px; flex: none; background: var(--primary); }
.card.gone .stripe { background: var(--outline); }
.card .card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.empty {
  border: 1px dashed var(--outline); border-radius: 6px; padding: 28px 20px;
  display: flex; flex-direction: column; gap: 8px; max-width: 640px;
}

/* ---- one vehicle ---- */
.back { display: inline-block; margin-bottom: 16px; font-size: 15px; }
.vehicle-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; }
.vin { letter-spacing: 1.2px; font-size: 14px; }

.layout { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--outline);
  background: transparent; color: var(--on-bg); font-size: 14px; font-weight: 500;
}
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

.year { margin: 20px 0 8px; }
.year:first-child { margin-top: 0; }
.log { list-style: none; display: flex; flex-direction: column; }
.row { display: flex; align-items: stretch; padding: 10px 0; border-bottom: 1px solid var(--outline); }
.row:last-child { border-bottom: 0; }
.row .bar-mark { width: 3px; flex: none; border-radius: 2px; margin: 3px 0; background: var(--outline); }
.row.fuel .bar-mark { background: var(--primary); }
.row .row-body { flex: 1; padding-left: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row .row-top { display: flex; align-items: baseline; gap: 12px; }
.row .row-main { flex: 1; min-width: 0; }
.row .row-trail { flex: none; font-variant-numeric: tabular-nums; }
.row .notes { white-space: pre-wrap; overflow-wrap: anywhere; }

.side { display: flex; flex-direction: column; gap: 24px; }
.panel { border: 1px solid var(--outline); border-radius: 6px; background: var(--surface); padding: 16px; }
.panel h2 { margin-bottom: 10px; }
.facts { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.facts li { display: flex; flex-direction: column; gap: 1px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { border: 1px solid var(--outline); border-radius: 8px; padding: 4px 10px; font-size: 14px; }
