/* CarPrint
 * styles.css
 * Cache-bust: index.php appends ?v=filemtime(styles.css) and sends no-cache headers.
 * Generated by Scott Osberg
 */

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg:      #0d0f12;
  --surface: #161a20;
  --border:  #2e3440;
  --text:    #f0f2f5;
  --muted:   #8a95a8;
  --accent:  #e8ff47;
  --accent2: #47c8ff;
  --green:   #4ade80;
  --red:     #FF0000;
  --accel:   #00ff00;
  --radius:  12px;
  --mono:    'DM Mono', monospace;
  --sans:    'DM Sans', sans-serif;
}
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 19px; min-height: 100vh; }
/* Hyperlinks: blue underline even when link text uses accent/yellow (excludes tab buttons + primary CTAs). */
a[href]:where(:not(.tab-btn):not(.logout-btn):not(.btn-primary):not(.landing-cta-signup)) {
  text-decoration: underline solid #3b82f6;
  text-underline-offset: 0.18em;
}
/* Kill Leaflet abbr dotted underlines leaking into trip cards */
abbr[title] { text-decoration: none !important; border-bottom: none !important; }
.tg-addr abbr, .tg-addr abbr[title] { text-decoration: none !important; border-bottom: none !important; }

/* ── Topbar ───────────────────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 10px 20px;
  min-height: 58px;
  box-sizing: border-box;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.topbar-logo { display: none; }
.topbar-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex-shrink: 0; }
.topbar-right {
  display: flex; align-items: center; flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 18px;
  flex-shrink: 0;
  margin-left: auto;
}
.tab-btn {
  background: none; border: none; cursor: pointer;
  padding: 7px 18px; border-radius: 8px;
  font-family: var(--sans); font-size: 19px; font-weight: 600;
  color: var(--muted); transition: all 0.15s;
}
.tab-btn:hover  { color: var(--text); background: var(--border); }
.tab-btn.active { color: var(--accent); background: rgba(232,255,71,0.10); }
a.tab-btn.tab-btn--link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
}
.logout-btn {
  background: none; border: 1px solid var(--border);
  color: var(--muted); font-size: 16px; padding: 6px 14px;
  border-radius: 6px; cursor: pointer; font-family: var(--sans);
  transition: all 0.15s;
}
.logout-btn:hover { color: var(--text); border-color: var(--muted); }
.topbar-link {
  color: var(--muted);
  font-size: 16px;
  font-family: var(--sans);
  font-weight: 600;
  white-space: nowrap;
  padding: 4px 2px;
}
.topbar-link:hover { color: var(--text); }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  background: #0a0c0f;
  border-bottom: 2px solid var(--accent);
  padding: 36px 24px 32px;
  text-align: center;
}
.hero-title {
  font-family: var(--mono); font-size: 55px; font-weight: 700;
  color: #fff; letter-spacing: -2px; line-height: 1; margin-bottom: 16px;
}
.hero-title span { color: var(--accent); }
.hero-tagline {
  font-family: var(--sans); font-size: 43px; font-weight: 600;
  color: #fff; max-width: 800px; margin: 0 auto 10px; line-height: 1.4;
}
.hero-desc {
  font-size: 21px; color: #fff; max-width: 960px;
  margin: 0 auto; line-height: 1.65;
}

@media (max-width: 600px) {
  .hero {
    padding: 22px 16px 18px;
  }
  .hero-title {
    font-size: 37px;
    letter-spacing: -1px;
    margin-bottom: 10px;
  }
  .hero-tagline {
    font-size: 25px;
    margin: 0 auto 0;
    line-height: 1.25;
  }
  .hero-desc {
    display: none;
  }
}

/* ── Tab panels ──────────────────────────────────────────────────────────── */
.tab-panel { display: none; padding: 24px; max-width: 1100px; margin: 0 auto; }
.tab-panel.active { display: block; }
/* Trip detail: let map (and header) use full viewport width; other tabs stay constrained */
#tab-detail.tab-panel { max-width: none; width: 100%; box-sizing: border-box; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card-title { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 16px; }

/* ── Privacy page ────────────────────────────────────────────────────────── */
.privacy-page {
  min-height: 100vh;
  padding: 32px 20px;
}
.privacy-card {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  line-height: 1.65;
}
.privacy-logo {
  font-family: var(--mono);
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -2px;
  line-height: 1;
  margin: 18px 0 14px;
}
.privacy-logo span { color: var(--accent); }
.privacy-card h1 {
  font-size: 36px;
  line-height: 1.15;
  margin-bottom: 8px;
}
.privacy-effective-date {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 15px;
  margin-bottom: 24px;
}
.privacy-card h2 {
  color: var(--accent);
  font-size: 22px;
  line-height: 1.25;
  margin: 28px 0 8px;
}
.privacy-card p,
.privacy-card li {
  color: #d9dee7;
  font-size: 18px;
}
.privacy-card p { margin-bottom: 14px; }
.privacy-card ul {
  margin: 8px 0 18px 24px;
  padding-left: 18px;
}
.privacy-card a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline solid #3b82f6;
  text-underline-offset: 0.18em;
}
.privacy-card a:hover {
  text-decoration-color: #60a5fa;
}
p.privacy-back-link {
  color: var(--muted);
  font-weight: 600;
}

/* ── Tester feedback page ───────────────────────────────────────────────── */
.feedback-page {
  min-height: 100vh;
  padding: 44px 22px;
  color: #fff;
  background:
    radial-gradient(circle at top left, rgba(232, 255, 71, 0.12), transparent 34rem),
    linear-gradient(180deg, #080a0d 0%, #11151b 100%);
  font-size: 20px;
}
.feedback-page * {
  color: inherit;
}
.feedback-card {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 48px;
  background: linear-gradient(180deg, #1b2028 0%, var(--surface) 100%);
  border: 2px solid rgba(255,255,255,0.18);
  border-radius: 28px;
  box-shadow: 0 28px 90px rgba(0,0,0,0.48);
}
.feedback-card h1 {
  color: #fff;
  font-size: clamp(42px, 6vw, 64px);
  line-height: 1.02;
  margin-bottom: 18px;
}
/* Intake survey: title ~50% size of default feedback heading (feedback.php unchanged) */
.carprint-intake .feedback-card h1 {
  font-size: clamp(21px, 3vw, 32px);
  line-height: 1.08;
}
.feedback-intro {
  color: #fff;
  font-size: clamp(21px, 2.4vw, 27px);
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 34px;
}
.feedback-back-link {
  color: var(--accent);
  display: inline-block;
  font-size: 18px;
  margin-bottom: 6px;
  font-weight: 800;
  text-decoration: underline solid #3b82f6;
  text-underline-offset: 0.18em;
}
.feedback-back-link:hover {
  text-decoration-color: #60a5fa;
}
.feedback-back-link-alt {
  display: block;
  margin-bottom: 18px;
  font-size: 16px;
}
.feedback-back-link-alt a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: underline solid #3b82f6;
  text-underline-offset: 0.18em;
}
.feedback-back-link-alt a:hover {
  color: var(--accent);
  text-decoration-color: #60a5fa;
}
.feedback-success,
.feedback-error {
  border-radius: 14px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.45;
  margin-bottom: 24px;
  padding: 16px 18px;
}
.feedback-success {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: var(--green);
}
.feedback-error {
  background: rgba(255, 0, 0, 0.10);
  border: 1px solid rgba(255, 0, 0, 0.35);
  color: #ff7a7a;
}
.feedback-profile-card {
  background: rgba(9, 11, 15, 0.78);
  border: 2px solid rgba(232, 255, 71, 0.24);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0 0 30px;
  padding: 26px;
}
.feedback-profile-card h2 {
  color: var(--accent);
  font-size: 30px;
  line-height: 1.15;
  margin: 0 0 8px;
}
.feedback-profile-card p {
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
}
.feedback-profile-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.feedback-profile-item {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  padding: 15px 16px;
}
.feedback-profile-item span {
  color: #fff;
  display: block;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
  text-transform: uppercase;
}
.feedback-profile-item strong {
  color: #fff;
  display: block;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.feedback-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.feedback-form label,
.feedback-form fieldset {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feedback-form span,
.feedback-form legend {
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}
.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  width: 100%;
  background: #090b0f;
  border: 2px solid rgba(255,255,255,0.26);
  border-radius: 14px;
  color: #fff;
  font-family: var(--sans);
  font-size: 22px;
  outline: none;
  padding: 18px 20px;
}
.feedback-form input::placeholder,
.feedback-form textarea::placeholder { color: rgba(255,255,255,0.86); }
.feedback-form textarea {
  line-height: 1.55;
  min-height: 66px;
  resize: vertical;
}
.feedback-form .feedback-comment-box {
  min-height: 33px;
}
.feedback-form input:focus,
.feedback-form select:focus,
.feedback-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(232, 255, 71, 0.14);
}
.feedback-form fieldset {
  background: rgba(255,255,255,0.035);
  border: 2px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  padding: 24px;
}
.feedback-field-help {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 10px;
}
.feedback-checklist {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.feedback-page .feedback-checklist .feedback-choice {
  align-items: center;
  background: #090b0f;
  border: 2px solid rgba(255,255,255,0.22);
  border-radius: 16px;
  cursor: pointer;
  display: grid !important;
  flex-direction: unset !important;
  gap: 16px;
  grid-template-columns: 28px minmax(0, 1fr);
  justify-content: unset;
  padding: 18px;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.feedback-page .feedback-checklist .feedback-choice:hover {
  border-color: rgba(232, 255, 71, 0.55);
  transform: translateY(-1px);
}
.feedback-page .feedback-checklist .feedback-choice input {
  accent-color: var(--accent);
  flex: 0 0 auto;
  height: 22px;
  margin: 0;
  width: 22px;
}
.feedback-page .feedback-checklist .feedback-choice .feedback-choice-text {
  color: #fff !important;
  display: block;
  font-size: 22px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 1.35;
  text-transform: none !important;
}
.feedback-page .feedback-checklist .feedback-choice:has(input:checked) {
  border-color: var(--accent);
  background: rgba(232, 255, 71, 0.14);
}
.feedback-next-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.feedback-next-btn {
  background: var(--accent);
  border: none;
  border-radius: 999px;
  color: #0d0f12;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 900;
  padding: 16px 32px;
}
.feedback-next-btn:hover { opacity: 0.88; }
.feedback-next-error {
  color: #ff7a7a;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.feedback-survey-fields {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.feedback-survey-fields[hidden] { display: none; }
.feedback-issue-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.feedback-issue-card {
  background: linear-gradient(180deg, rgba(23, 28, 36, 0.98), rgba(10, 12, 16, 0.96));
  border: 2px solid rgba(255,255,255,0.18);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 30px;
  box-shadow: 0 16px 38px rgba(0,0,0,0.24);
}
.feedback-issue-card[hidden] { display: none; }
.feedback-issue-card h2 {
  color: var(--accent);
  font-size: 34px;
  line-height: 1.2;
  margin: 0;
}
.feedback-issue-info {
  background: rgba(232, 255, 71, 0.08);
  border: 2px solid rgba(232, 255, 71, 0.22);
  border-radius: 16px;
  padding: 16px 18px;
}
.feedback-issue-info p {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
}
.feedback-issue-blurb + .feedback-issue-blurb {
  margin-top: 12px;
}
.feedback-issue-info--phone {
  display: none;
}
.feedback-issue-info--desktop {
  display: block;
}
.feedback-issue-info ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: disc;
  margin: 0;
  padding-left: 24px;
}
.feedback-issue-info li {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
}
.feedback-rating {
  display: flex;
  gap: 12px;
}
.feedback-rating label {
  align-items: center;
  flex: 1;
  gap: 6px;
}
.feedback-rating input { width: auto; }
.feedback-rating label span {
  align-items: center;
  background: #090b0f;
  border: 2px solid rgba(255,255,255,0.24);
  border-radius: 12px;
  color: #fff;
  display: flex;
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 900;
  justify-content: center;
  padding: 14px 0;
  width: 100%;
}
.feedback-rating input:checked + span {
  border-color: var(--accent);
  color: var(--accent);
}
.feedback-rating-help {
  display: flex;
  justify-content: space-between;
}
.feedback-rating-help span {
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.feedback-page .feedback-card p,
.feedback-page .feedback-card label,
.feedback-page .feedback-card legend,
.feedback-page .feedback-card span,
.feedback-page .feedback-card input,
.feedback-page .feedback-card textarea {
  color: #fff;
}
.feedback-page .feedback-card .feedback-back-link,
.feedback-page .feedback-card .privacy-logo span,
.feedback-page .feedback-card h2 {
  color: var(--accent);
}
.feedback-submit {
  align-self: flex-start;
  background: var(--accent);
  border: none;
  border-radius: 999px;
  color: #0d0f12;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 900;
  padding: 16px 32px;
}
.feedback-submit:hover { opacity: 0.88; }

@media (max-width: 600px) {
  .privacy-page { padding: 18px 12px; }
  .privacy-card { padding: 24px 18px; }
  .privacy-logo { font-size: 36px; }
  .privacy-card h1 { font-size: 30px; }
  .privacy-card h2 { font-size: 20px; }
  .privacy-card p,
  .privacy-card li { font-size: 16px; }
  .feedback-page { padding: 18px 12px; }
  .feedback-card { padding: 26px 18px; }
  .feedback-card h1 { font-size: 34px; }
  .carprint-intake .feedback-card h1 { font-size: 17px; }
  .feedback-intro { font-size: 18px; }
  .feedback-profile-card { padding: 18px; }
  .feedback-profile-card h2 { font-size: 24px; }
  .feedback-profile-card p { font-size: 16px; }
  .feedback-profile-grid { grid-template-columns: 1fr; }
  .feedback-profile-item strong { font-size: 18px; }
  .feedback-grid { grid-template-columns: 1fr; }
  .feedback-checklist { grid-template-columns: 1fr; }
  .feedback-checklist label span { font-size: 19px; }
  .feedback-form input,
  .feedback-form select,
  .feedback-form textarea { font-size: 18px; }
  .feedback-form textarea { min-height: 132px; }
  .feedback-form .feedback-comment-box { min-height: 132px; }
  .feedback-issue-card { padding: 18px; }
  .feedback-issue-card h2 { font-size: 23px; }
  .feedback-issue-info--phone { display: block; }
  .feedback-issue-info--phone p { font-size: 18px; }
  .feedback-issue-info--desktop { display: none; }
  .feedback-rating { gap: 6px; }
}

/* ── Stat grid (Summary) ─────────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-cell { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat-label { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 8px; }
.stat-value { font-family: var(--mono); font-size: 31px; color: var(--text); }
.stat-value.accent { color: var(--accent); }
.stat-value.green  { color: var(--green); }
.stat-value.red    { color: var(--red); }

/* ── Trips list ──────────────────────────────────────────────────────────── */
.trips-search-wrap {
  margin: 0 0 14px;
  max-width: 460px;
}
.trips-search-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.trips-search-input {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.35;
}
.trips-search-input::placeholder { color: var(--muted); }
.trips-search-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.trips-search-count {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 3.75rem;
  min-width: 3.75rem;
  padding: 12px 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.trips-search-empty { margin-bottom: 8px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.trips-list { display: flex; flex-direction: column; gap: 10px; }
.trip-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  display: flex; align-items: flex-start; gap: 12px;
  transition: border-color 0.15s, background 0.15s;
}
.trip-row-inner { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
/* No flex-grow here: as a column item beside .trip-note-wrap, flex:1 + basis 0
   can collapse the card’s box in WebKit and stack the note on top — clicks then
   hit the note and open-detail is skipped. */
.trip-row-card-hit {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: min-content;
  cursor: pointer;
}
.trip-row-card-hit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.trip-row:hover { border-color: var(--accent); background: rgba(232,255,71,0.03); }

.delete-btn {
  background: none; border: 1px solid transparent; color: var(--muted);
  border-radius: 6px; padding: 6px 10px; cursor: pointer; font-size: 19px;
  transition: all 0.15s; flex-shrink: 0; align-self: flex-start; margin-top: 2px;
}
.delete-btn:hover { color: var(--red); border-color: var(--red); background: rgba(255,0,0,0.08); }
.delete-btn-placeholder { flex-shrink: 0; width: 38px; min-width: 38px; height: 30px; box-sizing: border-box; }

/* Trip notes (web-only; list + detail) */
.trip-note-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}
.trip-note-wrap--detail { margin-top: 8px; }
.trip-note-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.trip-note-edit-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
.trip-note-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 56px;
  resize: vertical;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.35;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}
.trip-note-input:focus {
  outline: none;
  border-color: var(--accent2);
  box-shadow: 0 0 0 1px var(--accent2);
}
.trip-note-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.trip-note-save-btn {
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--accent2);
  background: transparent;
  color: var(--accent2);
  cursor: pointer;
}
.trip-note-save-btn:hover { background: rgba(71, 200, 255, 0.12); }
.trip-note-save-status { font-size: 13px; color: var(--muted); min-height: 1.2em; }
.trip-note-wrap--readonly .trip-note-display {
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Tablet/desktop: Save + status beside textarea (narrower vertical block) */
@media (min-width: 601px) {
  .trip-note-edit-row {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }
  .trip-note-edit-row .trip-note-input {
    flex: 1;
    min-width: 0;
    width: auto;
    min-height: 44px;
  }
  .trip-note-actions {
    flex-direction: column;
    align-items: flex-start;
    flex-shrink: 0;
    margin-top: 0;
    gap: 8px;
    max-width: 11rem;
  }
  .trip-note-save-btn { white-space: nowrap; }
}

/* ── Trip card wrapper ───────────────────────────────────────────────────── */
.trip-card-wrap { display: contents; }

/* ── Shared text styles ──────────────────────────────────────────────────── */
/* Driver name (trips list + detail): left of car emoji, same line */
.tg-trip-driver {
  font-weight: 600;
  font-size: 0.95em;
  color: var(--text);
  margin-right: 6px;
  white-space: nowrap;
}
.tg-vehicle-icon { display: flex; align-items: center; }
.tg-vehicle-name { display: flex; align-items: center; }

/* Per-driver Trip # (web only, computed when listing) */
.tcp-p-vehicle { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.tcp-d-vehicle-with-trip {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px;
  min-width: 0;
}
.tcp-list-trip-num-inline {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  margin-left: 4px;
}
.tcp-list-trip-num-k { font-weight: 500; }
.tcp-list-trip-num-n {
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin-left: 2px;
}
/* Trips list: four metrics (Miles, Time, Gallons, MPG) below addresses */
.trip-list-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.trip-list-metric-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  min-width: 0;
  padding: 6px 2px;
  background: transparent;
}
.trip-list-metric-val {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.trip-list-metric-lbl {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
}
.tcp-d-metrics-full {
  grid-column: 1 / -1;
}

/* Trips list: pull start/end address rows together */
.trip-row .tcp-trip-list-addr-card.detail-card {
  padding: 5px 10px;
}
.tcp-phone .tg-addr {
  line-height: 1.2;
}
.tcp-phone .tg-addr + .tg-addr {
  margin-top: 1px;
}

.tcp-trip-num-label {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
}
.tcp-trip-num-val {
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.tg-date {
  font-family: var(--mono); font-size: 17px;
  color: var(--accent2); font-weight: 500; line-height: 1.3;
  white-space: nowrap;
}
.tg-addr {
  font-size: 17px; color: var(--text); line-height: 1.4;
  word-break: break-word; overflow-wrap: anywhere;
  text-decoration: none !important; border-bottom: none !important;
}
.tg-val {
  font-family: var(--mono); font-size: 20px; font-weight: 600;
  color: var(--text); line-height: 1.2; white-space: nowrap;
}
.tg-lbl {
  font-size: 14px; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.07em; line-height: 1.2;
}
.tcp-spacer { height: 8px; }

/* ── DESKTOP card (>1023px) ──────────────────────────────────────────────── */
.tcp-desktop {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  column-gap: 14px;
  row-gap: 1px;
  align-items: start;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}
.tcp-d-row { display: contents; }
.tcp-d-c1 { grid-column: 1; }
.tcp-d-c2 { grid-column: 2; }
.tcp-d-c3 { grid-column: 3; }
.tcp-d-c4 { grid-column: 4; }
.tcp-d-c5 { grid-column: 5; }
.tcp-d-c6 { grid-column: 6; }
/* Trip list desktop (>1023px): address + datetime pair (matches trip detail wide header) */
.tcp-d-addr-time {
  grid-column: 2 / span 5;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}
.tcp-d-addr-time .tcp-trip-list-addr-card {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(48rem, 100%);
}
.tcp-d-addr-time .detail-pin-row { min-width: 0; }
.tcp-d-addr-time .detail-trip-datetime {
  flex: 0 0 auto;
  align-self: center;
  white-space: nowrap;
}
.tcp-spacer { grid-column: 1 / -1; height: 8px; }

/* Trip list tablet (601–1023px): full-width addr + time rows */
.tcp-land-addr-time {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.tcp-land-addr-time .tcp-trip-list-addr-card {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(48rem, calc(100% - 14rem));
}
.tcp-land-addr-time .detail-pin-row { min-width: 0; }
.tcp-land-addr-time .detail-trip-datetime {
  flex: 0 0 auto;
  align-self: center;
  white-space: nowrap;
}

/* Phone hidden on desktop */
.tcp-phone { display: none; flex: 1; min-width: 0; }

/* ── PHONE card (≤600px) ─────────────────────────────────────────────────── */
/* ── Phone / summary ovals — 3 lines: l1 + l2 + value (pill) ───────────── */
.tcp-circles {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 2px 0;
  margin-left: -16px; /* counteract parent padding so row stays full width */
}
.tcp-circle {
  width: 108px;
  min-height: 58px;
  height: auto;
  border-radius: 999px;
  border: 2px solid;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 5px 6px 6px;
  flex-shrink: 0;
}
.tcp-circle-gal {
  padding: 5px 6px 6px;
  border-color: #a78bfa;
  background: rgba(167, 139, 250, 0.1);
  color: #a78bfa;
}
.tcp-circle-l1,
.tcp-circle-l2 {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.05;
  text-align: center;
  max-width: 100%;
}
/* Same type metrics as other ovals; keep brand words mixed case */
.tcp-circle-score .tcp-circle-l1,
.tcp-circle-score .tcp-circle-l2 {
  text-transform: none;
  letter-spacing: 0.05em;
}
.tcp-circle-val {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 1px;
}
.tcp-circle-cost  { border-color: #4ade80; background: rgba(74,222,128,0.10);  color: #4ade80; }
.tcp-circle-score {
  padding: 5px 6px 6px;
  border-color: #e8ff47;
  background: rgba(232, 255, 71, 0.1);
  color: #e8ff47;
}

/* ── LANDSCAPE/TABLET card (601-1023px) ──────────────────────────────────── */
.tcp-landscape { display: none; flex: 1; min-width: 0; }

/* ── Phone layout helpers ─────────────────────────────────────────────────── */
.tcp-p-full { width: 100%; }
.tcp-p-row  { display: flex; align-items: center; gap: 8px; }
.tcp-p-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 12px;
}

/* Phone trips metrics: portrait = 2×2 (Duration | Miles / Total Gas | MPG); landscape = one row ×4 */
.tcp-p-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  width: 100%;
}

/* ── Trip detail ─────────────────────────────────────────────────────────── */
.detail-back {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  color: var(--accent); font-size: 23px; font-weight: 700;
  margin-bottom: 24px; transition: all 0.15s;
  background: rgba(232,255,71,0.10); border: 1px solid rgba(232,255,71,0.30);
  padding: 10px 20px; border-radius: 10px;
}
.detail-back:hover { background: rgba(232,255,71,0.18); border-color: var(--accent); }
/* Match .detail-app-layout inset on tablet/desktop; phones stay aligned with tab padding */
@media (min-width: 601px) {
  #tab-detail.tab-panel > .detail-back {
    margin-left: 15%;
  }
}

/* Trip detail tab — layout aligned with iOS TripDetailView (v132) */
.detail-app-layout {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px;
  box-sizing: border-box;
  width: 100%;
  padding-left: 15%;
}
/* Phones only: tighter left inset (wide layouts keep 15% above) */
@media (max-width: 600px),
  (orientation: landscape) and (max-height: 480px) and (max-width: 932px) {
  .detail-app-layout {
    padding-left: 5%;
  }
}
/* Wide trip header: each row is flex — address card + datetime hug (no 1fr stretching times away). */
.detail-trip-datetime {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text);
  text-align: left;
}
.detail-vehicle-inline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; row-gap: 4px; }
.detail-card {
  background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px; padding: 10px;
}
.detail-addr-card { display: flex; flex-direction: column; gap: 8px; }
.detail-pin-row { display: flex; align-items: flex-start; gap: 10px; font-size: 17px; line-height: 1.4; }
.detail-pin-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex-shrink: 0; margin-top: 5px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.detail-pin-dot-end { background: var(--red); }
.detail-pin-text {
  color: var(--text); word-break: break-word; overflow-wrap: anywhere;
  flex: 1; min-width: 0;
}
/* Phone trip header: each address one full row (ellipsis); start/end times one line below */
.detail-trip-header-phone-v138 {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-trip-header-phone-v138 .detail-pin-row {
  min-width: 0;
}
.detail-trip-header-phone-v138 .detail-pin-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  overflow-wrap: normal;
}
.detail-trip-header-phone-v138 .detail-trip-range-datetimes {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Align with address text (dot + gap) */
  padding-left: 20px;
}
.detail-stats-card { display: flex; flex-direction: column; gap: 8px; }

/* Trip detail: smoothOP explainer on hover / focus (replacing inline blurb). */
.summary-metric-cell--smoothop-tip,
.trip-metric-cell--smoothop-tip {
  position: relative;
  cursor: help;
  overflow: visible;
}
.smoothop-hover-tip {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 10px);
  width: min(360px, 85vw);
  padding: 14px 16px;
  font-size: 17px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  z-index: 100;
  pointer-events: none;
  text-align: left;
}
.summary-metric-cell--smoothop-tip:hover .smoothop-hover-tip,
.summary-metric-cell--smoothop-tip:focus .smoothop-hover-tip,
.summary-metric-cell--smoothop-tip:focus-within .smoothop-hover-tip,
.trip-metric-cell--smoothop-tip:hover .smoothop-hover-tip,
.trip-metric-cell--smoothop-tip:focus .smoothop-hover-tip,
.trip-metric-cell--smoothop-tip:focus-within .smoothop-hover-tip {
  display: block;
}

#tab-detail .detail-trip-metrics-track,
#tab-detail .detail-trip-summary-metrics.summary-metrics-grid-desktop {
  overflow: visible;
}
#tab-detail .detail-trip-summary-metrics .summary-metric-cell {
  overflow: visible;
}
.detail-circles-wrap { padding-top: 4px; }
/* Empty cells: wide trip detail aligns 3 ovals with metrics cols 2–4 (Miles, Time, AvgRPM) */
.detail-oval-row-spacer { display: none; }
.detail-circles.tcp-circles {
  margin-left: 0; justify-content: space-between; width: 100%; max-width: 100%; gap: 6px; flex-wrap: nowrap;
}
.detail-circles .tcp-circle {
  min-height: 72px; width: min(108px, 31vw); flex: 1 1 0; max-width: 112px;
}
/* Trip detail tab only: tighter ovals; list/summary unchanged */
#tab-detail .detail-circles-wrap { padding-top: 0; }
#tab-detail .detail-circles.tcp-circles {
  gap: 4px;
}
#tab-detail .detail-circles.tcp-circles .tcp-circle {
  padding: 3px 5px 4px;
  min-height: 56px;
  gap: 0;
}
#tab-detail .detail-circles.tcp-circles .tcp-circle-gal,
#tab-detail .detail-circles.tcp-circles .tcp-circle-score {
  padding: 3px 5px 4px;
}
#tab-detail .detail-circles .tcp-circle-l1,
#tab-detail .detail-circles .tcp-circle-l2 {
  font-size: 10px;
  letter-spacing: 0.04em;
}
#tab-detail .detail-circles .tcp-circle-val {
  font-size: 15px;
  margin-top: 0;
  line-height: 1.05;
}
/* Gas Cost + MPG oval captions (trip detail + summary); title case Gas/Cost — not ALL CAPS */
.tcp-oval-caption-gas-cost .tcp-circle-l1,
.tcp-oval-caption-gas-cost .tcp-circle-l2 {
  text-transform: none;
}
.detail-circles .tcp-circle-l1,
.detail-circles .tcp-circle-l2,
.detail-oval-cell .tcp-circle-l1,
.detail-oval-cell .tcp-circle-l2 { font-size: 11px; }
.detail-circles .tcp-circle-val,
.detail-oval-cell .tcp-circle-val {
  font-family: var(--mono); font-size: 16px; font-weight: 700; line-height: 1.1; margin-top: 1px;
}
.detail-oval-black.tcp-circle-cost { background: #000 !important; color: #4ade80; border-color: #4ade80; }
.detail-oval-black.tcp-circle-gal { background: #000 !important; color: #a78bfa; border-color: #a78bfa; }
.detail-oval-black.tcp-circle-score { background: #000 !important; color: #e8ff47; border-color: #e8ff47; }
.detail-metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* Trip detail: 5 columns × 2 rows (¢/mi first); ovals always above this grid */
#tab-detail .detail-metrics-grid--trip-5x2 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 600px) {
  /* Portrait phones: 2 cols × 5 rows (same metric order as HTML) */
  #tab-detail .detail-metrics-grid--trip-5x2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
  }
  #tab-detail .detail-metrics-grid--trip-5x2 .detail-metric {
    padding: 8px 2px;
  }
  #tab-detail .detail-metrics-grid--trip-5x2 .detail-metric-val {
    font-size: 15px;
  }
  #tab-detail .detail-metrics-grid--trip-5x2 .detail-metric-lbl {
    font-size: 11px;
  }
}
@media (max-width: 600px) and (orientation: landscape) {
  /* Same narrow width but landscape: 5×2 like tablet/desktop */
  #tab-detail .detail-metrics-grid--trip-5x2 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Legacy wide mosaic (ovals embedded in grid) — no longer emitted in trip detail HTML */
.detail-detail-wide-only { display: none; }
.detail-metrics-wide-grid {
  display: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  align-items: stretch;
}
.detail-oval-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 2px 0;
}
.detail-oval-cell .tcp-circle.detail-oval-embedded {
  width: 108px;
  max-width: 100%;
  min-height: 72px;
  padding: 5px 6px 6px;
  flex: 0 0 auto;
  margin: 0 auto;
}
@media (min-width: 601px) {
  /* Trip detail tab only — wide layout (≥601px); phones use overrides below */
  #tab-detail .detail-detail-phone-only { display: none !important; }
  /* Same 5 tracks as ovals + metrics: col 1 empty, content from col 2 = left edge of first oval.
     Inset matches .detail-card padding so columns line up with .detail-stats-card innards. */
  #tab-detail .detail-trip-header-grid.detail-detail-wide-only {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap: 8px;
    row-gap: 12px;
    align-items: start;
    width: calc(100% - 20px);
    margin-left: 10px;
    margin-right: 10px;
    box-sizing: border-box;
  }
  #tab-detail .detail-trip-header-wide-vehicle {
    grid-column: 2 / -1;
    justify-self: start;
    min-width: 0;
  }
  #tab-detail .detail-trip-header-wide-pair {
    grid-column: 2 / -1;
    justify-self: start;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    width: fit-content;
    max-width: 100%;
    min-width: 0;
  }
  #tab-detail .detail-trip-header-wide-pair .detail-trip-header-wide-line {
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(48rem, 100%);
  }
  #tab-detail .detail-trip-datetime--wide {
    flex: 0 0 auto;
    align-self: center;
    white-space: nowrap;
  }

  /* Trip detail: one 5-col row — empty | oval | oval | oval | empty — matches metrics grid below */
  #tab-detail .detail-circles-wrap {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    align-items: start;
  }
  #tab-detail .detail-circles-wrap .detail-oval-row-spacer {
    display: block;
    min-height: 1px;
  }
  #tab-detail .detail-circles-wrap .tcp-circles {
    grid-column: 2 / span 3;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }
  #tab-detail .detail-circles-wrap .tcp-circles .tcp-circle {
    width: auto;
    max-width: none;
    min-width: 0;
    flex: 1 1 0;
  }

  /* Trip detail: 12-metric grid uses same 5 tracks as ovals (metrics in cols 2–4) */
  #tab-detail .detail-trip-metrics-track {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }
  #tab-detail .detail-trip-metrics-track > .detail-trip-summary-metrics.summary-metrics-grid-desktop {
    grid-column: 2 / span 3;
    min-width: 0;
  }
}

@media (max-width: 600px) {
  #tab-detail .detail-circles-wrap {
    display: block;
  }
  #tab-detail .detail-circles-wrap .detail-oval-row-spacer {
    display: none !important;
  }
  #tab-detail .detail-circles-wrap .tcp-circles {
    grid-column: unset;
    width: 100%;
  }
  #tab-detail .detail-trip-metrics-track {
    display: block;
  }
  #tab-detail .detail-trip-metrics-track > .detail-oval-row-spacer {
    display: none !important;
  }
}

/* Large screens: larger type for trip detail wide header (addr + date/time rows only) */
@media (min-width: 1024px) {
  #tab-detail .detail-trip-header-grid .detail-pin-row {
    font-size: 22px;
    line-height: 1.35;
  }
  #tab-detail .detail-trip-header-grid .detail-trip-datetime {
    font-size: 22px;
    line-height: 1.35;
  }

  /* Trip detail: compact ovals (same 3 tracks as metrics); typography unchanged */
  #tab-detail .detail-circles-wrap .tcp-circles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    justify-items: center;
    box-sizing: border-box;
  }
  #tab-detail .detail-circles-wrap .tcp-circles .tcp-circle {
    flex: none;
    width: 96px;
    max-width: 96px;
    min-width: 0;
  }

  /* Trip detail: page-black chrome; keep gray only on the 12 metric cells */
  #tab-detail .detail-card.detail-addr-card {
    background: var(--bg);
    border-color: rgba(255, 255, 255, 0.1);
  }
  #tab-detail .detail-card.detail-stats-card {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
  }

  /* Wide trip header: same width as ovals/metrics grid; indent car + addresses to first oval center (left-aligned from there). */
  #tab-detail .detail-trip-header-grid.detail-detail-wide-only {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  /* Span is cols 2–5 → 4 tracks + 3×8px gaps; half of one 5-col track = (100% − 24px) / 8 */
  #tab-detail .detail-trip-header-wide-vehicle,
  #tab-detail .detail-trip-header-wide-pair {
    padding-left: calc((100% - 24px) / 8);
    box-sizing: border-box;
  }
}

/* Landscape phones are often >600px wide — keep phone trip layout (times under addresses), not wide header */
@media (min-width: 601px) and (orientation: landscape) and (max-height: 480px) and (max-width: 932px) {
  #tab-detail .detail-detail-wide-only {
    display: none !important;
  }
  #tab-detail .detail-trip-header-phone-v138.detail-detail-phone-only {
    display: flex !important;
    flex-direction: column;
  }
  #tab-detail .detail-circles-wrap {
    display: block !important;
  }
  #tab-detail .detail-circles-wrap .detail-oval-row-spacer {
    display: none !important;
  }
  #tab-detail .detail-circles-wrap .tcp-circles {
    grid-column: unset !important;
    width: 100% !important;
  }
  #tab-detail .detail-trip-metrics-track {
    display: block !important;
  }
  #tab-detail .detail-trip-metrics-track > .detail-oval-row-spacer {
    display: none !important;
  }
  #tab-detail .detail-metrics-grid--trip-5x2 {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    grid-auto-flow: row;
  }
}

.detail-metric {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; text-align: center; padding: 10px 4px; min-width: 0;
  background: rgba(255, 255, 255, 0.06); border-radius: 8px;
}
.detail-metric-val {
  font-size: 20px; font-weight: 700; line-height: 1.15; color: var(--text); font-variant-numeric: tabular-nums;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.detail-metric-lbl { font-size: 14px; font-weight: 500; color: var(--muted); line-height: 1.2; }
#detail-map.detail-map-host {
  width: 100%;
  max-width: none;
  height: 380px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-top: 10px;
  margin-bottom: 12px;
  box-sizing: border-box;
}
@media (max-width: 380px) {
  .detail-circles.tcp-circles { flex-wrap: wrap; justify-content: center; }
}

/* Summary circles: use same size/font as trip cards (no overrides) */

/* ── Summary stats row ───────────────────────────────────────────────────── */
.trip-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.trip-stat  { text-align: left; min-width: 52px; }
.trip-stat-val { font-family: var(--mono); font-size: 21px; color: var(--text); font-weight: 500; }
.trip-stat-val.accent { color: var(--accent); }
.trip-stat-lbl { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

/* Black bar + ovals — full iOS strip on phone; transparent wrapper on desktop */
.summary-circles-strip {
  margin-bottom: 20px;
}
.summary-circles-strip--desktop-detail .detail-circles-wrap { padding-top: 0; }
.summary-circles-strip--desktop-detail .detail-oval-row-spacer { display: none; }
.summary-circles-strip--desktop-detail .tcp-circles.detail-circles { justify-content: flex-start; }
.summary-metrics-grid-desktop { margin-bottom: 24px; }
.summary-circles-strip .tcp-circles {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  flex-wrap: nowrap;
}

/* Summary metrics grid card */
.summary-heading-phone {
  display: none;
}
.summary-metrics-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 24px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.summary-metric-lbl {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.2;
}
.summary-metric-val {
  font-family: var(--mono);
  font-size: 21px;
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.summary-metric-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 74px;
  padding: 10px 8px;
  text-align: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
}
.summary-metric-val--accel {
  color: var(--accel);
  font-weight: 600;
}
.summary-metric-val--brake {
  color: var(--red);
  font-weight: 600;
}
.summary-metric-val--smoothop-very-calm {
  color: #59f28a;
  font-weight: 600;
}
.summary-metric-val--smoothop-calm {
  color: var(--accel);
  font-weight: 600;
}
.summary-metric-val--smoothop-steady {
  color: #e6d84a;
  font-weight: 600;
}
.summary-metric-val--smoothop-active {
  color: #f2a726;
  font-weight: 600;
}
.summary-metric-val--smoothop-variable {
  color: #e58a31;
  font-weight: 600;
}
.smoothop-metric-num {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.2;
  margin-top: 2px;
}
.trip-metric-val {
  display: block;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.15;
}
.trip-metric-val--smoothop-very-calm { color: #59f28a; }
.trip-metric-val--smoothop-calm { color: var(--accel); }
.trip-metric-val--smoothop-steady { color: #e6d84a; }
.trip-metric-val--smoothop-active { color: #f2a726; }
.trip-metric-val--smoothop-variable { color: #e58a31; }
.trip-metric-val--accel { color: var(--accel); }
.trip-metric-val--brake { color: var(--red); }
/* Admin: per-vehicle sections below charts — same ovals + stat rows as aggregate */
#summary-content .summary-per-vehicle-aggregate-stack {
  margin-top: 8px;
}
.summary-per-vehicle-aggregate-card {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
#summary-content .summary-per-vehicle-aggregate-stack .summary-per-vehicle-aggregate-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}
.summary-per-vehicle-aggregate-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 20px;
  font-weight: 600;
}

/* ── Charts ──────────────────────────────────────────────────────────────── */
.chart-wrap { position: relative; height: 220px; }

.summary-charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

/* ── Vehicle table ───────────────────────────────────────────────────────── */
.vehicle-table { width: 100%; border-collapse: collapse; font-size: 18px; }
.vehicle-table th { text-align: left; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 0 14px 12px; }
.vehicle-table td { padding: 12px 14px; border-top: 1px solid var(--border); font-family: var(--mono); color: var(--text); }
.vehicle-table td:first-child { font-family: var(--sans); font-size: 18px; }
.vehicle-table tr:hover td { background: rgba(255,255,255,0.03); }

/* ── Empty & loading ─────────────────────────────────────────────────────── */
.empty { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty-icon { font-size: 55px; margin-bottom: 16px; }
.empty-text { font-size: 19px; }
.loading { text-align: center; padding: 60px; color: var(--muted); font-family: var(--mono); font-size: 18px; }

.cp-sync-hint {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  margin: 0 0 14px; padding: 12px 14px;
  background: rgba(232, 255, 71, 0.08); border: 1px solid rgba(232, 255, 71, 0.25);
  border-radius: 10px; font-size: 15px; color: var(--text);
}
.cp-sync-hint a { color: var(--accent); font-weight: 600; }
.cp-sync-hint-dismiss {
  margin-left: auto; padding: 4px 10px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 13px; cursor: pointer; font-family: var(--sans);
}
.cp-sync-hint-dismiss:hover { color: var(--text); }

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — 3 breakpoints
   1. Phone portrait  : ≤600px    — portrait phone stacked layout
   2. Tablet/desktop : >600px    — 4-col grid with circles on right
══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Phone portrait (≤600px) ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .topbar {
    justify-content: flex-start;
    padding: 0 10px 0 8px;
    gap: 6px;
  }
  .topbar-tabs {
    flex-shrink: 0;
  }
  .topbar-tabs .tab-btn { padding: 6px 10px; font-size: 16px; }
  .topbar-right {
    position: static;
    margin-left: auto;
    flex-shrink: 0;
    gap: 6px;
    right: auto;
  }
  .topbar-right span:first-child { display: none; }
  #build-marker { margin-left: 0 !important; font-size: 13px; }
  .logout-btn { padding: 6px 10px; font-size: 15px; }
  .trip-row { padding: 12px 14px; }
  .tcp-desktop   { display: none !important; }
  .tcp-landscape { display: none !important; }
  .tcp-phone {
    display: flex; flex-direction: column; gap: 4px;
    flex: 1; cursor: pointer; padding-left: 16px;
  }
  .tg-val  { font-size: 21px; }
  .tg-lbl  { font-size: 14px; letter-spacing: 0.06em; }
  .tg-date { font-size: 18px; }
  .tg-addr { font-size: 16px; }
  .tcp-p-3col { gap: 4px 18px; }
  .tcp-p-metrics { gap: 10px 18px; }
  .tcp-phone-score-inline {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .tcp-phone-score-inline .tg-val { font-size: 21px; }
  .tcp-phone-score-inline .tg-lbl { font-size: 14px; letter-spacing: 0.06em; }
  .summary-charts-grid { grid-template-columns: 1fr; }
  .summary-heading-phone {
    display: block;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 14px;
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.2;
  }
  /* Black rounded bar + Summary-sized ovals (CarPrintTripCirclesStrip webSummaryStyle) */
  #summary-content .summary-circles-strip {
    background: #000;
    border-radius: 12px;
    padding: 14px 12px;
    margin-bottom: 14px;
    box-sizing: border-box;
  }
  #summary-content .summary-circles-strip .tcp-circles {
    margin-left: 0 !important;
    justify-content: space-between !important;
    width: 100%;
    max-width: 100%;
    gap: 4px !important;
    box-sizing: border-box;
  }
  #summary-content .summary-circles-strip .tcp-circle,
  #summary-content .summary-circles-strip .tcp-circle-gal,
  #summary-content .summary-circles-strip .tcp-circle-score {
    width: auto;
    min-width: 0;
    flex: 1 1 0;
    max-width: 112px;
    min-height: 56px;
    height: auto;
    padding: 3px 5px 4px;
    gap: 0;
    border-radius: 999px;
    box-sizing: border-box;
  }
  #summary-content .summary-circles-strip .tcp-circle-l1,
  #summary-content .summary-circles-strip .tcp-circle-l2 {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
  }
  #summary-content .summary-circles-strip .tcp-circle-val {
    font-size: 15px;
    font-weight: 700;
    margin-top: 0;
    line-height: 1.05;
  }
  #summary-content .summary-metrics-grid-desktop {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 24px;
  }
  #summary-content .summary-metrics-grid-desktop .summary-metric-cell {
    min-height: 72px;
    padding: 8px 6px;
  }
  #summary-content .summary-metrics-grid-desktop .summary-metric-val {
    font-size: 18px;
  }
  #summary-content .summary-metrics-grid-desktop .summary-metric-lbl {
    font-size: 12px;
  }

  /* Trip detail tab: same 3×4 metrics grid as Summary (Summary rules are #summary-content–scoped) */
  #tab-detail .detail-trip-summary-metrics.summary-metrics-grid-desktop {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 0;
  }
  #tab-detail .detail-trip-summary-metrics .summary-metric-cell {
    min-height: 72px;
    padding: 8px 6px;
  }
  #tab-detail .detail-trip-summary-metrics .summary-metric-val {
    font-size: 18px;
  }
  #tab-detail .detail-trip-summary-metrics .summary-metric-lbl {
    font-size: 12px;
  }
}

/* Phone landscape (still ≤600px wide): single row — Duration, Miles, Total Gas, MPG */
@media (max-width: 600px) and (orientation: landscape) {
  .tcp-p-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px 12px;
  }
}

@media (max-width: 600px) {
  /* Ovals: narrower on phone; padding even on all sides (trip list — not #summary-content strip) */
  .tcp-circles {
    gap: 3px;
  }
  .tcp-circle {
    width: 86px;
    min-height: auto;
    padding: 6px;
    gap: 2px;
  }
  .tcp-circle-gal,
  .tcp-circle-score {
    padding: 6px;
  }
  .tcp-circle-l1,
  .tcp-circle-l2 {
    font-size: 10px;
    letter-spacing: 0.04em;
  }
  .tcp-circle-score .tcp-circle-l1,
  .tcp-circle-score .tcp-circle-l2 {
    letter-spacing: 0.04em;
  }
  .tcp-circle-val {
    font-size: 14px;
    margin-top: 0;
  }
}

/* ── 2. Landscape / tablet (601px–1023px) ────────────────────────────────── */
@media (min-width: 601px) and (max-width: 1023px) {
  .topbar {
    padding: 10px 16px;
    gap: 12px 16px;
  }
  .topbar-tabs { gap: 12px; }
  .topbar-tabs .tab-btn { padding: 8px 14px; font-size: 17px; }
  .topbar-right { gap: 12px 16px; }
  .topbar-link { font-size: 15px; padding: 6px 4px; }
  .logout-btn { padding: 6px 12px; }
}

@media (min-width: 601px) {
  .trip-row { padding: 14px 16px; display: flex; align-items: flex-start; gap: 12px; }
  .tab-panel { padding: 16px; max-width: 900px; } /* 1. constrain page width */
  #tab-detail.tab-panel { max-width: none; } /* detail: full width for map */
  .tcp-desktop { display: none !important; }
  .tcp-phone   { display: none !important; }
  .tcp-landscape {
    display: grid;
    grid-template-columns: 160px 1fr 1fr 116px;
    gap: 1px 8px;
    align-items: start;
    cursor: pointer;
    flex: 1;
    min-width: 0;
  }
  .tcp-landscape--list {
    grid-template-columns: 160px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    row-gap: 0;
    column-gap: 8px;
  }
  .tcp-landscape--list .tcp-landscape-list-mpg {
    min-width: 0;
  }
  .tcp-landscape-list-score {
    grid-column: 1 / -1;
    padding-top: 4px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .tpl-c1   { grid-column: 1; }
  .tpl-c2   { grid-column: 2; padding-left: 6px; } /* 3. 6px left padding on col 2 */
  .tpl-c3   { grid-column: 3; }
  .tpl-c4   { grid-column: 4; }
  .tpl-c2-3 { grid-column: 2 / span 2; padding-left: 6px; } /* 3. also on spanning cells */
  .tpl-c1-4 { grid-column: 1 / -1; }
  .tpl-spacer { height: 14px; }
  .tpl-vehicle-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
  .tpl-circle-cell {
    display: flex; align-items: center; justify-content: center;
    grid-row: span 2;
  }
  .tpl-circle {
    width: 102px;
    min-height: 52px;
    height: auto;
    border-radius: 999px;
    padding: 4px 5px 5px;
    gap: 0;
  }
  .tcp-circle-gal.tpl-circle {
    width: 102px;
    padding: 4px 5px 5px;
  }
  .tcp-circle-score.tpl-circle {
    width: 102px;
    padding: 4px 5px 5px;
  }
  #summary-content .summary-circles-strip .tcp-circles .tcp-circle {
    width: auto;
    min-width: 0;
    max-width: none;
    min-height: 56px;
    height: auto;
    border-radius: 999px;
    padding: 3px 5px 4px;
    gap: 0;
  }
  #summary-content .summary-circles-strip .tcp-circles .tcp-circle-gal {
    width: auto;
    max-width: none;
    padding: 3px 5px 4px;
  }
  #summary-content .summary-circles-strip .tcp-circles .tcp-circle-score {
    width: auto;
    max-width: none;
    padding: 3px 5px 4px;
  }
  #summary-content .summary-circles-strip .tcp-circle-l1,
  #summary-content .summary-circles-strip .tcp-circle-l2 {
    font-size: 10px;
    letter-spacing: 0.04em;
  }
  #summary-content .summary-circles-strip .tcp-circle-val {
    font-size: 15px;
    margin-top: 0;
    line-height: 1.05;
  }
  @media (max-width: 1023px) {
    /* Summary ovals: tablet — side spacers + shrink-wrapped row */
    #summary-content .summary-circles-strip--desktop-detail .detail-circles-wrap {
      display: grid;
      grid-template-columns: 1fr auto auto auto 1fr;
      align-items: center;
      gap: 8px;
    }
    #summary-content .summary-circles-strip--desktop-detail .detail-oval-row-spacer {
      display: block;
      min-width: 0;
    }
    #summary-content .summary-circles-strip--desktop-detail .tcp-circles.detail-circles {
      display: contents;
    }
    #summary-content .summary-circles-strip--desktop-detail .tcp-circles.detail-circles .tcp-circle {
      width: auto;
      max-width: none;
      min-width: 0;
      min-height: 56px;
      height: auto;
      padding: 3px 5px 4px;
      gap: 0;
    }
  }
  #summary-content .summary-metrics-grid-desktop {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 24px;
  }
  #summary-content .summary-metrics-grid-desktop .summary-metric-cell {
    min-height: 92px;
    padding: 12px 10px;
  }
  #summary-content .summary-metrics-grid-desktop .summary-metric-val {
    font-size: 24px;
  }
  #summary-content .summary-metrics-grid-desktop .summary-metric-lbl {
    font-size: 14px;
  }

  #tab-detail .detail-trip-summary-metrics.summary-metrics-grid-desktop {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 0;
  }
  #tab-detail .detail-trip-summary-metrics .summary-metric-cell {
    min-height: 92px;
    padding: 12px 10px;
  }
  #tab-detail .detail-trip-summary-metrics .summary-metric-val {
    font-size: 24px;
  }
  #tab-detail .detail-trip-summary-metrics .summary-metric-lbl {
    font-size: 14px;
  }
  .tcp-circle-l1,
  .tcp-circle-l2 {
    font-size: 10px;
    letter-spacing: 0.04em;
  }
  .tcp-circle-score .tcp-circle-l1,
  .tcp-circle-score .tcp-circle-l2 {
    letter-spacing: 0.04em;
  }
  .tcp-circle-val { font-size: 14px; }
  .tg-val  { font-size: 19px; }
  .tg-lbl  { font-size: 13px; }
  .tg-date { font-size: 16px; white-space: nowrap; } /* 2. same size as addr */
  .tg-addr { font-size: 16px; } /* 2. same size as date */
}

@media (min-width: 1024px) {
  /*
   * Summary ≥1024: same 3-column track + 8px gap as .summary-metrics-grid-desktop;
   * equal-width pills, centered in each column, extra horizontal padding inside ovals.
   */
  #summary-content .summary-circles-strip--desktop-detail .detail-oval-row-spacer {
    display: none !important;
  }
  #summary-content .summary-circles-strip--desktop-detail .detail-circles-wrap {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  #summary-content .summary-circles-strip--desktop-detail .tcp-circles.detail-circles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    justify-items: center;
    align-items: start;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
  }
  #summary-content .summary-circles-strip--desktop-detail .tcp-circles.detail-circles .tcp-circle,
  #summary-content .summary-circles-strip--desktop-detail .tcp-circles.detail-circles .tcp-circle-gal,
  #summary-content .summary-circles-strip--desktop-detail .tcp-circles.detail-circles .tcp-circle-score {
    width: 100%;
    max-width: 136px;
    min-width: 0;
    min-height: 56px;
    height: auto;
    padding: 4px 14px 5px;
    gap: 0;
    box-sizing: border-box;
  }
}

/* ── 3. Desktop (≥1024px) — base styles apply ────────────────────────────── */

/* Map heights (trip detail) */
@media (max-width: 600px) {
  #detail-map.detail-map-host,
  #detail-map { height: 350px !important; }
}
@media (min-width: 601px) and (max-width: 1023px) {
  /* Tablet / small window — not “big screen”; avoids huge map on landscape phones >600px wide */
  #detail-map.detail-map-host,
  #detail-map { height: 600px !important; }
}
@media (min-width: 1024px) {
  /* Big screens: was 600px, +70% → 1020px (phones ≤600px stay 350px above) */
  #detail-map.detail-map-host,
  #detail-map { height: 1020px !important; }
}

/* BUILD: 2026041033 — trip detail ≥1024px: wider header addr/datetime type */

.tcp-circle-score.cp-score-tip-host {
  position: relative;
  z-index: 1;
  cursor: help;
}
.tcp-circle-score.cp-score-tip-host:focus {
  outline: none;
}
.tcp-circle-score.cp-score-tip-host:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cp-score-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: min(288px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
  z-index: 20;
}

.cp-score-tip-inline {
  display: none;
  margin: 10px 0 0;
  padding: 0 4px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--muted);
  text-align: left;
}

#summary-content .summary-circles-strip .cp-score-tip-inline {
  display: block;
  margin: 12px 6px 2px;
  color: #9aa4b2;
  font-size: 14px;
}

@media (hover: hover) and (pointer: fine) {
  .cp-score-tip-host:hover {
    z-index: 40;
  }
  .cp-score-tip-host:hover .cp-score-tip {
    opacity: 1;
    visibility: visible;
  }
}

/* Keyboard: show tip when oval is focused via Tab */
.cp-score-tip-host:focus-visible .cp-score-tip {
  opacity: 1;
  visibility: visible;
}

/* Touch: inline score help under ovals; no floating tooltip that overlaps the page */
@media (hover: none) {
  .cp-score-tip-host .cp-score-tip {
    display: none !important;
  }
  .detail-stats-card .cp-score-tip-inline {
    display: block;
    margin: 10px 8px 4px;
    font-size: 13px;
  }
  .summary-metric-cell--smoothop-tip .smoothop-hover-tip,
  .trip-metric-cell--smoothop-tip .smoothop-hover-tip {
    display: none !important;
  }
}

/* ── Gas price widget ────────────────────────────────────────────────────── */
.gas-widget {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 16px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.gas-widget-label {
  font-size: 18px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text);
}
.gas-widget-val {
  font-family: var(--mono); font-size: 29px; font-weight: 700; color: var(--accent);
}
.gas-widget-src { font-size: 19px; color: var(--text); }
.gas-widget-btn {
  background: none; border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 6px 16px; font-size: 18px; cursor: pointer;
  font-family: var(--sans);
}
.gas-widget-btn:hover { border-color: var(--accent2); color: var(--accent2); }
.gas-widget-eia-info {
  font-size: 17px; color: var(--accent2); cursor: pointer;
  border: 1px solid var(--accent2); border-radius: 4px;
  padding: 3px 8px; opacity: 0.8;
}
.gas-widget-eia-info:hover { opacity: 1; }
.gas-widget-row2 {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Trips tab: smaller gas price row on phones (portrait ≤600px, or landscape with short height) */
@media (max-width: 600px),
  (orientation: landscape) and (max-height: 480px) and (max-width: 932px) {
  .gas-widget-val {
    font-size: 23px;
  }
  .gas-widget-label {
    font-size: 16px;
  }
  .gas-widget-src {
    font-size: 17px;
  }
  .gas-widget-eia-info {
    font-size: 15px;
    padding: 2px 6px;
  }
  .gas-widget-btn {
    font-size: 16px;
    padding: 5px 12px;
  }
}

.carprint-site-footer {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  padding: 24px 16px 32px;
  border-top: 1px solid var(--border);
  font-family: var(--sans);
  line-height: 1.5;
}

.carprint-site-footer--fixed {
  position: fixed;
  bottom: 16px;
  left: 0;
  right: 0;
  border-top: none;
  padding: 0 16px;
  margin: 0;
}

.carprint-footer-brand {
  font-weight: 600;
  color: var(--text);
}

.carprint-footer-brand-car {
  color: var(--accent);
}

.carprint-footer-link {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.carprint-footer-link:hover {
  color: var(--text);
}

/* Footer © line: hide on phones to reclaim scroll space (still on tablet/desktop). */
@media (max-width: 600px) {
  .carprint-site-footer {
    display: none;
  }
}