/* drivers.nyc */
:root {
  --ink: #212121;
  --muted: #5f6368;
  --line: #e0e0e0;
  --row: #f6f6f6;
  --bg: #ffffff;
  --hero: #1f1f1f;
  --hero-ink: #f1f1f1;
  --accent: #f5a623;   /* NY plate gold */
  --accent-ink: #1b2a4a; /* NY plate navy */
  --link: #1a5fb4;
  --warn-bg: #fff4d6;
  --radius: 8px;
  --wrap: 1100px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 Lato, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  /* Keeps the footer at the bottom of the window on short pages */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--link); }

.wrap {
  max-width: var(--wrap);
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Header + hero (replaces the Google Sites dark banner) */
.hero {
  color: var(--hero-ink);
  background:
    linear-gradient(115deg, transparent 0 55%, rgba(255,255,255,.035) 55% 70%, transparent 70%),
    linear-gradient(65deg, transparent 0 30%, rgba(255,255,255,.03) 30% 48%, transparent 48%),
    linear-gradient(160deg, #2b2b2b, var(--hero));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  color: #fff;
  text-decoration: none;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img { width: 40px; height: 20px; border-radius: 3px; }

.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a {
  color: #d6d6d6;
  text-decoration: none;
  font-size: .95rem;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--accent); }

.hero-body { padding-top: 40px; padding-bottom: 56px; }
.hero h1, .hero h2 { color: #fff; font-weight: 700; margin: 0 0 10px; line-height: 1.2; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.hero h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-top: 28px; }
.hero h2:first-child { margin-top: 0; }
.hero p { margin: 0; max-width: 760px; color: #d9d9d9; }

main { padding-top: 32px; padding-bottom: 48px; flex: 1 0 auto; width: 100%; }
main h2 { font-size: 1.5rem; margin: 32px 0 8px; }
main h3 { font-size: 1.15rem; margin: 24px 0 4px; }
main h2:first-child { margin-top: 0; }
main ul { padding-left: 1.3em; margin: 6px 0 12px; }
.prose { max-width: 780px; }

/* Recent searches (empty main page) */
.recent { margin: 4px 0 8px; }
.recent-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.recent-head b { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.recent-clear { font: inherit; font-size: .85rem; background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; cursor: pointer; }
.recent-list { display: flex; flex-wrap: wrap; gap: 8px; }
.recent-item {
  font: inherit;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafafa;
  color: var(--ink);
  cursor: pointer;
}
.recent-item b { letter-spacing: .08em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.recent-item span { color: var(--muted); font-size: .85rem; }
.recent-item:hover { border-color: var(--accent-ink); background: #fff; }
.recent-item:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }

/* Search form */
.search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.search input, .search select, .search button {
  font: inherit;
  padding: 11px 16px;
  border-radius: var(--radius);
  border: 1px solid #cfcfcf;
  background: #fff;
  color: var(--ink);
}
.search input {
  width: 11em;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
}
.search input::placeholder { text-transform: none; letter-spacing: normal; font-weight: 400; }
.search button {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  cursor: pointer;
  padding-left: 26px;
  padding-right: 26px;
}
.search button:hover { filter: brightness(1.05); }
.search input:focus, .search select:focus, .search button:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 1px;
}

.status { color: var(--muted); margin: 0 0 18px; }
.status.error { color: #b3261e; }

.note {
  background: var(--warn-bg);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin: 0 0 16px;
}

.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  align-items: baseline;
  margin: 0 0 14px;
}
.summary .label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  display: block;
}
.summary .value { font-size: 1.15rem; font-weight: 700; }
.summary .also { color: var(--muted); font-size: .9rem; }
.summary .also { display: block; }
.due-total { color: #b3261e; }
.plate-fines { display: block; font-weight: 400; font-size: .85rem; color: var(--muted); }
.due-inline { color: #b3261e; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .03em; }

.section-title { font-size: 1.1rem; margin: 26px 0 10px; }
.fine-print { color: var(--muted); font-size: .82rem; margin: 8px 0 0; }

/* Filters for partial-plate results */
.plate-filters {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 14px;
  margin: 0 0 16px;
  padding: 14px 16px;
  background: #fff6df;
  border: 1px solid #f0d49a;
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.filter-title { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.filter-title b { font-size: 1.05rem; color: var(--accent-ink); }
.filter-title span { color: var(--muted); font-size: .88rem; }
.plate-filters label { display: flex; flex-direction: column; gap: 4px; }
.plate-filters label span {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent-ink);
}
.plate-filters select, .filter-reset {
  font: inherit;
  font-size: 1rem;
  padding: 9px 12px;
  border: 1px solid #d9c38f;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-width: 9em;
  max-width: 14em;
  cursor: pointer;
}
.plate-filters select:focus, .filter-reset:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 1px; }
.plate-filters select.active {
  background: var(--accent);
  border-color: var(--accent-ink);
  color: var(--accent-ink);
  font-weight: 700;
}
.filter-reset { min-width: 0; background: transparent; border-color: transparent; color: var(--link); text-decoration: underline; padding-left: 4px; padding-right: 4px; }
.filter-reset[disabled] { color: var(--muted); text-decoration: none; cursor: default; opacity: .6; }
.filter-status { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-count {
  font-weight: 700;
  color: var(--accent-ink);
  background: #fff;
  border: 1px solid #f0d49a;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: .9rem;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip {
  font: inherit;
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px 3px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-ink);
  color: #fff;
  cursor: pointer;
}
.filter-chip span { font-size: 1rem; line-height: 1; opacity: .8; }
.filter-chip:hover span { opacity: 1; }
@media (max-width: 640px) {
  .plate-filters { position: static; }
  .plate-filters label { flex: 1 1 calc(50% - 14px); }
  .plate-filters select { max-width: none; width: 100%; min-width: 0; }
}

/* Wildcard results: one block per plate */
.plate-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 0 0 12px;
  background: #fcfcfc;
}
.plate-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  cursor: pointer;
  list-style: none;
}
.plate-head::-webkit-details-marker { display: none; }
/* Expand/collapse arrow */
.plate-head::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform .15s;
  margin-right: 2px;
}
.plate-group[open] > .plate-head::before { transform: rotate(45deg); }
.plate-group[open] > .plate-head { margin-bottom: 12px; }
.plate-head:hover .plate-chip { filter: brightness(1.05); }

/* License plate tag: generic white plate; NY gets the gold Excelsior look */
.plate-chip {
  --plate-bg: #fdfdfd;
  --plate-ink: #1b2a4a;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 128px;
  height: 64px;
  padding: 3px 6px 0;
  background: var(--plate-bg);
  color: var(--plate-ink);
  border: 1.5px solid #9aa3b5;
  border-radius: 7px;
  box-shadow: inset 0 0 0 2px var(--plate-bg), inset 0 0 0 3px rgba(27, 42, 74, .35), 0 1px 2px rgba(0,0,0,.18);
  overflow: hidden;
  font-family: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  line-height: 1;
  flex-shrink: 0;
}
.plate-top {
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .14em;
  padding-top: 2px;
}
/* NY: navy band across the top with light lettering */
.plate-chip.ny .plate-top {
  align-self: stretch;
  margin: -3px -6px 0;
  background: var(--plate-ink);
  color: var(--plate-bg);
  text-align: center;
  padding: 3px 0 2px;
}
.plate-num {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: .06em;
  transform: scaleY(1.12);
}
.plate-bottom {
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-align: center;
  padding: 0 0 4px;
}
.plate-chip:not(.ny) { justify-content: flex-start; gap: 7px; }
.plate-chip.ny {
  --plate-bg: #f4b63f;
  --plate-ink: #16264a;
  border-color: #16264a;
  background: linear-gradient(180deg, #f8c65a 0%, #f4b63f 45%, #eaa92f 100%);
}
/* Violation count, then the plate's vehicles as a vertical list beside it */
.plate-info { color: var(--ink); display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; }
.plate-info > b { white-space: nowrap; }
.plate-vehicles { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--line); }
.plate-vehicles li { line-height: 1.5; }
.muted { color: var(--muted); }
.plate-link { margin-left: auto; font-size: .9rem; white-space: nowrap; }
.plate-group .table-scroll { background: #fff; }

/* Violation map */
.map {
  height: 380px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  z-index: 0;
}
.map-count { color: var(--muted); font-size: .85rem; margin: 2px 0 4px; }
.map-list { margin: 0; padding-left: 1.1em; font-size: .85rem; max-height: 180px; overflow-y: auto; }
.leaflet-tooltip.map-badge {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #16264a;
  font-weight: 700;
  font-size: .75rem;
  padding: 0;
}
.leaflet-tooltip.map-badge::before { display: none; }
@media (max-width: 640px) { .map { height: 300px; } }

/* Results table */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table-scroll { container-type: inline-size; } /* lets the year label centre on the table width (cqw) */
table.results { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.results th, table.results td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.results th {
  background: #fafafa;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 400;
  color: #2b2b2b;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.results td[data-year] { position: relative; }
table.results td[data-year]::after {
  content: attr(data-year);
  position: absolute; top: 0; left: 50cqw; transform: translate(-50%, -50%);
  padding: 0 8px; background: #fff; border: 1px solid #b5b5b5; border-radius: 4px;
  font-size: .7rem; font-weight: 700; letter-spacing: .06em; line-height: 1.5; color: var(--muted);
}
table.results tbody tr:nth-child(even) { background: var(--row); }
table.results tbody tr:last-child td { border-bottom: 0; }
table.results .nowrap { white-space: nowrap; }
table.results .num { font-variant-numeric: tabular-nums; }
.due { color: #b3261e; display: block; }
.loc-simple { display: block; color: var(--muted); font-size: .82rem; }
.tag {
  display: inline-block;
  font-size: .75rem;
  padding: 1px 8px;
  border-radius: 999px;
  background: #ececec;
  color: var(--muted);
}

/* Tips page */
.tip-button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  padding: 12px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
}
.tip-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.tip-buttons { align-items: center; }
.kofi-image-button { display: inline-block; line-height: 0; border-radius: var(--radius); }
.kofi-image-button img { height: 54px; width: auto; border: 0; }
.kofi-image-button:hover img { filter: brightness(1.05); }
.kofi-image-button:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.tip-button:hover { filter: brightness(1.05); }
.tip-button:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* Contact form embed */
.embed { width: 100%; max-width: 760px; height: 860px; border: 0; }
/* Ko-fi's floating bubble: hidden, the page's own Ko-fi button opens its pop-up */
iframe.floatingchat-container, iframe.floatingchat-container-mobi { display: none !important; }

/* Footer: dark band matching the header */
.site-footer {
  background: linear-gradient(160deg, #2b2b2b, var(--hero));
  color: #a8a8a8;
  font-size: .9rem;
  padding-top: 24px;
  padding-bottom: 28px;
}
.site-footer .links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
.site-footer a { color: #e6e6e6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* Under construction */
.center {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
}
.center h1 { letter-spacing: .12em; }

/* Phones: each ticket becomes a stacked card */
@media (max-width: 640px) {
  .table-scroll { border: 0; border-radius: 0; overflow: visible; }
  table.results, table.results tbody, table.results tr, table.results td { display: block; width: 100%; }
  table.results thead { display: none; }
  table.results tbody tr {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px 12px;
    margin-bottom: 10px;
  }
  table.results tbody tr:last-child td { border-bottom: 0; }
  table.results td {
    border: 0;
    padding: 3px 0;
    display: grid;
    grid-template-columns: 5.5em 1fr;
    gap: 8px;
  }
  table.results td::before {
    content: attr(data-label);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    padding-top: 2px;
  }
  table.results td:empty { display: none; }
  table.results tbody tr { position: relative; }
  table.results td[data-year] { position: static; }
  table.results tbody tr { position: relative; }
  table.results .nowrap { white-space: normal; }
  table.results td > * { justify-self: start; }
  .due { display: inline; margin-left: 6px; }
}

/* Can I park here? */
.sign-icon { background: none; border: 0; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.sign-tip-note { color: #6b7280; font-style: italic; }
.sign-tip div + div { margin-top: 3px; padding-top: 3px; border-top: 1px solid #e5e5e5; }
.bus-icon { background: none; border: 0; filter: drop-shadow(0 1px 1px rgba(0,0,0,.45)); }
.hydrant-icon { background: none; border: 0; filter: drop-shadow(0 1px 1px rgba(0,0,0,.45)); }
.park-search .locate-button { background: #fff; color: var(--accent-ink); border-color: #cfcfcf; }
.park-search .locate-button::before { content: "\25CE  "; }
.park-search input { width: 24em; max-width: 100%; text-transform: none; letter-spacing: normal; font-weight: 400; }
.park-map { height: 520px; }
@media (max-width: 640px) { .park-search input { width: 100%; } .park-map { height: 420px; } }

/* Can I park here? legend: a white box in the dark header */
.legend {
  list-style: none;
  margin: 12px 0 14px;
  padding: 14px 18px;
  display: grid;
  gap: 10px;
  max-width: 560px;
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.legend li { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.legend b { color: var(--ink); }
.lg-swatch { flex: 0 0 40px; height: 28px; display: inline-flex; align-items: center; justify-content: center; background: #f3efe6; border-radius: 6px; }
.lg-line { width: 28px; height: 6px; background: #ff8c00; border-radius: 1px; }
.lg-line-dashed { height: 3px; background: repeating-linear-gradient(90deg, #ff8c00 0 4px, transparent 4px 6px); }
.lg-dot { width: 14px; height: 14px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.lg-dot-address { background: #1b9e3e; }
.lg-dot-you { background: #1a73e8; }
.lg-icon { display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.hero .legend-source { font-size: .9rem; color: #bdbdbd; }
.here-signs { margin-top: 8px; padding: 10px 14px; background: #fafafa; border: 1px solid var(--line); border-left: 4px solid #d62728; border-radius: var(--radius); color: var(--ink); }
.here-signs ul { margin: 4px 0 0; padding-left: 1.2em; }
.here-signs li { margin: 2px 0; }
.here-signs-other { border-left-color: #9ca3af; }
.verdict { margin: 0 0 10px; padding: 12px 16px; border-radius: var(--radius); color: var(--ink); border: 1px solid; }
.verdict b { display: block; font-size: 1.1rem; margin-bottom: 2px; }
.verdict-no { background: #fdecea; border-color: #f5c2bd; }
.verdict-no b { color: #b3261e; }
.verdict-ok { background: #e8f5ec; border-color: #b7dfc3; }
.verdict-ok b { color: #1b7a37; }
.verdict-meter { background: #e8f0fe; border-color: #bcd0fb; }
.verdict-meter b { color: #1d4ed8; }
.verdict-unsure { background: #fff6df; border-color: #f0d49a; }
.verdict-unsure b { color: #8a5a00; }
.verdict-note { margin-top: 4px; font-size: .82rem; color: var(--muted); }

/* Can I park here?: tickets on this block, hydrant risk and when tickets are written */
.ticket-risk { margin-top: 8px; padding: 10px 14px; background: #fafafa; border: 1px solid var(--line); border-left: 4px solid #8a8f98; border-radius: var(--radius); color: var(--ink); }
.ticket-risk p { margin: 4px 0; }
.ticket-risk.risk-medium { border-left-color: #f0c800; }
.ticket-risk.risk-medium > b { color: #8a6d00; }
.ticket-risk.risk-high { border-left-color: #d62728; }
.ticket-risk.risk-high > b { color: #b3261e; }
.ticket-risk.risk-low { border-left-color: #1b9e3e; }
.ticket-risk.risk-low > b { color: #1b7a34; }
.hour-chart { display: flex; align-items: flex-end; gap: 2px; height: 60px; margin-top: 18px; border-bottom: 1px solid var(--line); }
.hour-chart span { flex: 1; background: #c9ccd2; border-radius: 2px 2px 0 0; min-height: 1px; position: relative; }
.hour-chart span i { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 1px; font-style: normal; font-size: 9px; line-height: 1; color: var(--muted); white-space: nowrap; }
.hour-chart span.now { background: #d62728; }
.hour-axis { display: flex; justify-content: space-between; font-size: 0.75em; color: var(--muted); margin-top: 2px; }
.day-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 2px; }
.day-tabs button { font: inherit; font-size: .85rem; line-height: 1; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; }
.day-tabs button:hover { border-color: var(--accent-ink); }
.day-tabs button[aria-selected="true"] { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.day-tabs button.today { font-weight: 700; }
.day-tabs button.today::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 4px; vertical-align: middle; border-radius: 50%; background: #d62728; }
.day-tabs button:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.ticket-loading { margin: 8px 0 0; font-size: .9rem; color: var(--muted); }
.ticket-note { font-size: 0.85em; color: var(--muted); }
.bar-chart { margin-top: 10px; }
.chart-caption { font-size: .82rem; font-weight: 600; color: var(--muted); }
.hour-axis.even { justify-content: stretch; gap: 2px; }
.hour-axis.even span { flex: 1; text-align: center; }

/* Explanatory text and FAQ under the tools */
.info { max-width: 760px; margin-top: 40px; }
.info h2 { font-size: 1.5rem; margin: 32px 0 8px; }
.info h3 { font-size: 1.05rem; margin: 20px 0 4px; }
.info p, .info ul { margin: 0 0 10px; }
.info ul { padding-left: 22px; }
.info details { border-bottom: 1px solid #ddd; }
.info summary { cursor: pointer; padding: 12px 0; font-weight: 700; }
.info details p { margin: 0 0 14px; }
