/* ---------- Design tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f7;   /* Apple's light gray */
  --ink: #1d1d1f;       /* near-black text */
  --ink-soft: #6e6e73;  /* muted text */
  --ink-faint: #86868b;
  --accent: #0071e3;    /* Apple blue */
  --accent-hover: #0077ed;
  --line: #d2d2d7;      /* hairline borders */
  --grid: #e8e8ed;      /* chart gridlines */

  /* Pothole status colors. Checked for color-blind separation; every
     color also comes with a text label, so color never works alone. */
  --open: #d93f3f;      /* red = still open */
  --fixed: #12a39a;     /* teal-green = repaired */
  --notfound: #8e8e93;  /* gray = inspector found no pothole */
  --dup: #c7c7cc;       /* light gray = duplicate report */

  --radius: 18px;
}

* { box-sizing: border-box; }

/* Anything with the `hidden` attribute stays hidden, even if a class below
   gives it display: flex */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: -apple-system, "SF Pro Display", "SF Pro Text", system-ui,
    "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Landing screen ---------- */
#hero {
  position: fixed;
  inset: 0;                 /* covers the whole window */
  z-index: 1000;
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

/* When we add this class in JS, the hero fades away */
#hero.hidden { opacity: 0; visibility: hidden; }

.hero-eyebrow {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(40px, 7vw, 88px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.03;
  margin: 0 0 20px;
  max-width: 14ch;
}

.hero-sub {
  font-size: clamp(17px, 2.4vw, 22px);
  color: var(--ink-soft);
  max-width: 48ch;
  line-height: 1.5;
  margin: 0 0 40px;
}

/* The live numbers pulled from the API */
.hero-count { color: var(--ink); font-weight: 600; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.btn {
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  color: white;
  background: var(--accent);
  border: none;
  border-radius: 980px;      /* full pill */
  padding: 14px 32px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(0.97); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: rgba(0, 113, 227, 0.08); }

/* ---------- App shell ---------- */
#app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }

/* Frosted top bar, very Apple */
nav {
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 22px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  z-index: 500;
}

.brand { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }

/* Apple-style segmented control */
.segmented {
  display: inline-flex;
  background: var(--bg-soft);
  border-radius: 9px;
  padding: 2px;
  flex-shrink: 0;
}
.segmented button {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  border: none;
  background: transparent;
  border-radius: 7px;
  padding: 6px 16px;
  cursor: pointer;
}
.segmented button.active {
  background: var(--bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.segmented.small button { font-size: 13px; padding: 5px 12px; }

/* ---------- Views ---------- */
.view { flex: 1; display: none; flex-direction: column; min-height: 0; }
.view.active { display: flex; }

/* ---------- Map controls ---------- */
.controls {
  display: flex;
  align-items: center;
  gap: 14px 20px;
  padding: 12px 22px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  position: relative;
  z-index: 20;
}

.control {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: var(--ink-soft);
}

select {
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
}

/* Search box + dropdown */
.search { position: relative; flex: 1 1 280px; max-width: 420px; }
.search input {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 12px 9px 36px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.search input:focus { background: var(--bg); border-color: var(--accent); }
.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--ink-faint);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}
#searchResults {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  max-height: 320px;
  overflow-y: auto;
}
#searchResults li {
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
#searchResults li small { display: block; color: var(--ink-soft); font-size: 12px; }
#searchResults li.active,
#searchResults li:hover { background: var(--bg-soft); }
#searchResults li.empty { color: var(--ink-soft); cursor: default; background: none; }

/* Status filter chips (tap to show/hide a category) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px 5px 9px;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.chip:hover { background: var(--bg-soft); }
.chip .n { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.chip.off { opacity: 0.45; }
.chip.off .dot { background: transparent !important; box-shadow: inset 0 0 0 1.5px var(--ink-faint); }

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ---------- Map ---------- */
.map-wrap { position: relative; flex: 1; min-height: 0; }
#map { position: absolute; inset: 0; }

.map-status {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;              /* don't wrap early just because it's centered */
  max-width: calc(100% - 32px);
  font-size: 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 999px;
  padding: 8px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}
.map-status .muted { color: var(--ink-soft); }

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
.spinner[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* "Near this address" panel */
.nearby {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 340px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 90px);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.14);
  padding: 18px;
  font-size: 14px;
}
.nearby h4 { margin: 0 0 2px; font-size: 17px; letter-spacing: -0.01em; padding-right: 28px; }
.nearby .sub { color: var(--ink-soft); font-size: 13px; margin: 0 0 14px; }
.nearby .close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.nearby .section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  margin: 16px 0 8px;
}
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat {
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 10px 12px;
}
.stat .v { font-size: 20px; font-weight: 600; }
.stat .l { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); }
.street-list { list-style: none; margin: 0; padding: 0; }
.street-list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid var(--grid);
  font-size: 13px;
}
.street-list li .dot { transform: translateY(1px); }
.street-list .meta { color: var(--ink-soft); }
.muted { color: var(--ink-soft); }

/* Map popups */
.maplibregl-popup-content {
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  min-width: 220px;
}
.maplibregl-popup-close-button { font-size: 18px; padding: 2px 8px; color: var(--ink-soft); }
.pop-status { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; }
.pop-addr { font-size: 15px; font-weight: 600; margin: 6px 0 4px; }
.pop-row { color: var(--ink-soft); }
.pop-note {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--bg-soft);
  border-radius: 8px;
  color: var(--ink);
}

/* ---------- Trends + About pages ---------- */
#trendsView, #aboutView { overflow-y: auto; }

.page { max-width: 980px; margin: 0 auto; padding: 48px 24px 64px; width: 100%; }
.page-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
}
.page-head p {
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.5;
  margin: 0 0 32px;
  max-width: 62ch;
}

/* Stat tiles */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.kpi {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 20px 22px;
  min-height: 170px;
}
.kpi .label { font-size: 15px; font-weight: 500; color: var(--ink-soft); }
.kpi .value { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.kpi .note { font-size: 13px; color: var(--ink-soft); line-height: 1.45; margin-top: auto; }

/* Small colored label, e.g. "▲ More than double last year" */
.pill {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.pill.bad { background: #fdecec; color: #b42318; }
.pill.good { background: #e3f5f2; color: #0b6b63; }
.pill.neutral { background: #e8e8ed; color: var(--ink); }
#seasonVerdict .pill { font-size: 15px; padding: 7px 14px; }
.skeleton { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }

.card {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.card h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 4px; }
.card-sub { color: var(--ink-soft); font-size: 14px; line-height: 1.5; margin: 0; max-width: 64ch; }
.card-sub strong { color: var(--ink); font-weight: 600; }
.card .segmented { background: #e8e8ed; }
.chart-box { position: relative; height: 320px; }
.status-msg { color: var(--ink-soft); font-size: 14px; margin: 8px 0 0; }
.status-msg:empty { display: none; }

/* Borough table */
.table-wrap { overflow-x: auto; }
.boro-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.boro-table th {
  text-align: right;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 6px 10px;
  white-space: nowrap;
}
.boro-table th:first-child,
.boro-table td:first-child { text-align: left; }
.boro-table td {
  text-align: right;
  padding: 11px 10px;
  border-top: 1px solid var(--grid);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.boro-table td:first-child { font-weight: 500; }
.bar-cell { width: 34%; min-width: 120px; }
.mini-bar { display: flex; height: 10px; border-radius: 3px; overflow: hidden; gap: 2px; }
.mini-bar span { display: block; height: 100%; }

.footnote { color: var(--ink-faint); font-size: 12px; line-height: 1.5; max-width: 80ch; }

/* About page text */
.prose h3 { font-size: 21px; letter-spacing: -0.015em; margin: 32px 0 10px; }
.prose p, .prose li { font-size: 16px; line-height: 1.6; color: var(--ink); max-width: 66ch; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.legend-list { list-style: none; padding: 0 !important; }
.legend-list li { display: flex; gap: 10px; align-items: baseline; }
.legend-list .dot { transform: translateY(1px); }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  nav { padding: 0 14px; }
  .brand { font-size: 15px; }
  .segmented button { padding: 6px 10px; }
  .controls { padding: 10px 14px; gap: 10px; }
  .search { max-width: none; flex-basis: 100%; }
  .chip { font-size: 12px; padding: 4px 9px 4px 8px; }
  .nearby { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-width: none;
            max-height: 55%; border-radius: 16px 16px 0 0; z-index: 5; }
  /* Status pill: sit bottom-left, clear of the zoom buttons */
  .map-status { left: 12px; right: 56px; bottom: 34px; transform: none; width: auto; max-width: none;
                border-radius: 14px; font-size: 12px; padding: 8px 12px; }
  .map-status .hint { display: none; }
  .page { padding: 32px 16px 48px; }
  .card { padding: 18px 16px; }
  .card-head { flex-direction: column; }
  .chart-box { height: 260px; }
  .kpi .value { font-size: 28px; }
}

/* =====================================================================
   Accounts and community photo checks
   ===================================================================== */

/* ---------- Top bar: tabs + account ---------- */
.nav-right { display: flex; align-items: center; gap: 12px; }
.brand-short { display: none; }
a.brand { color: var(--ink); text-decoration: none; }

.account { position: relative; display: flex; align-items: center; }
.account-signin {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: white;
  background: var(--accent);
  border: none;
  border-radius: 980px;
  padding: 7px 16px;
  cursor: pointer;
  white-space: nowrap;
}
.account-signin:hover { background: var(--accent-hover); }
.account-avatar {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #e1ecfb;
  color: var(--accent);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.avatar-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--open);
  box-shadow: 0 0 0 2px var(--bg);
}
.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  padding: 6px;
  z-index: 600;
}
.account-email {
  font-size: 12px;
  color: var(--ink-soft);
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--grid);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-menu button,
.account-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  text-align: left;
  background: none;
  border: none;
  border-radius: 8px;
  padding: 9px 10px;
  cursor: pointer;
  text-decoration: none;
}
.account-menu button:hover,
.account-menu a:hover { background: var(--bg-soft); text-decoration: none; }
.badge {
  font-size: 12px;
  font-weight: 600;
  color: white;
  background: var(--open);
  border-radius: 999px;
  padding: 1px 7px;
}

/* ---------- Pop-up windows (sign in, photo form, my photos) ---------- */
dialog.sheet {
  border: none;
  border-radius: 20px;
  padding: 0;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  color: var(--ink);
  background: var(--bg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
}
dialog.sheet::backdrop {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.sheet-body { position: relative; padding: 26px 24px 22px; }
.sheet-body h3 { font-size: 22px; letter-spacing: -0.02em; margin: 0 0 6px; padding-right: 32px; }
.sheet-sub { color: var(--ink-soft); font-size: 14px; line-height: 1.5; margin: 0 0 18px; }
.sheet-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.sheet-switch { text-align: center; font-size: 14px; color: var(--ink-soft); margin: 16px 0 0; }
.sheet-fine { font-size: 12px; color: var(--ink-faint); text-align: center; line-height: 1.5; margin: 10px 0 0; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink); }
.field input[type="email"],
.field input[type="password"],
.field textarea {
  font-family: inherit;
  font-size: 16px;            /* 16px+ stops iPhones from zooming in on tap */
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 12px;
  outline: none;
  resize: vertical;
}
.field input:focus,
.field textarea:focus { background: var(--bg); border-color: var(--accent); }
.field-hint { font-size: 12px; color: var(--ink-soft); line-height: 1.45; }
.form-error {
  font-size: 14px;
  color: #b42318;
  background: #fdecec;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 14px;
}

.btn-primary {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: white;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  padding: 13px 18px;
  cursor: pointer;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.btn-primary.wide { width: 100%; }
.btn-secondary {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  background: #e8e8ed;
  border: none;
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
}
.btn-secondary:hover { background: #dcdce1; }
button.link {
  font-family: inherit;
  font-size: inherit;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
button.link:hover { text-decoration: underline; }

/* "What did you see?" choices */
.choices { border: none; padding: 0; margin: 0 0 16px; }
.choices legend { font-size: 13px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  padding: 12px 6px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .dot { width: 14px; height: 14px; }
.choice:has(input:checked) { border-color: var(--accent); background: #f0f6ff; }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Photo picker */
.photo-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 12px;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--accent);
  cursor: pointer;
  text-align: center;
}
.photo-pick:hover { border-color: var(--accent); }
.photo-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.photo-pick svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.photo-pick strong { font-size: 15px; }
.photo-preview {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--bg-soft);
}
#checkRetake { align-self: flex-start; font-size: 13px; }
.photo-preview[hidden] + #checkRetake { display: none; }

.check-done { text-align: center; }
.check-done h3 { padding-right: 0; }
.done-icon {
  width: 56px;
  height: 56px;
  margin: 8px auto 14px;
  border-radius: 50%;
  background: #e3f5f2;
  color: #0b6b63;
  font-size: 28px;
  line-height: 56px;
}

/* My photos list */
.my-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--grid); font-size: 13px; }
.my-item:first-child { border-top: none; }
.my-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--bg-soft);
  display: block;
}
.my-item > div { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.my-verdict { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }

/* ---------- Map: photo-checked ring + popup section ---------- */
.ring {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}
.ring-legend {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink);
  padding: 5px 4px 5px 6px;
}
.ring-legend .n { color: var(--ink-soft); }
.legend-list .ring { transform: translateY(2px); }

.pop-verified {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: #e1ecfb;
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 4px;
}
.pop-community {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #f0f6ff;
}
.pop-community img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #e1ecfb;
  display: block;
  cursor: zoom-in;
}
.pop-community-title { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.pop-quote { font-style: italic; }
.pop-311 { margin-top: 6px; font-size: 12px; }
.pop-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin-top: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: white;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
}
.pop-btn:hover { background: var(--accent-hover); }
.pop-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* ---------- Review page ---------- */
.review-page { min-height: 100vh; background: var(--bg); }
.review-page nav { position: sticky; top: 0; }
.nav-link { font-size: 14px; }
.review-tabs { margin-bottom: 22px; }
.review-tabs .n { color: var(--ink-soft); font-weight: 400; margin-left: 2px; }
.review-card {
  display: grid;
  grid-template-columns: minmax(0, 360px) 1fr;
  gap: 22px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.review-card.leaving { opacity: 0; transform: scale(0.98); }
.review-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #e8e8ed;
  display: block;
}
.review-info { display: flex; flex-direction: column; gap: 8px; font-size: 14px; min-width: 0; }
.review-info h4 { font-size: 19px; letter-spacing: -0.01em; margin: 2px 0 0; }
.review-claim { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.review-box { background: var(--bg); border-radius: 10px; padding: 10px 12px; line-height: 1.5; }
.review-box .label { font-size: 12px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }
.review-links { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.review-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: 6px; }
.review-actions input {
  flex: 1 1 200px;
  font-family: inherit;
  font-size: 15px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  outline: none;
}
.review-actions input:focus { border-color: var(--accent); }
.btn-approve { background: var(--fixed); color: white; }
.btn-approve:hover { background: #0e8c84; }
.btn-reject { background: #fdecec; color: #b42318; }
.btn-reject:hover { background: #fbdcdc; }
.review-empty { text-align: center; color: var(--ink-soft); padding: 48px 16px; }

@media (max-width: 640px) {
  .brand-long { display: none; }
  .brand-short { display: inline; }
  .nav-right { gap: 8px; }
  .account-signin { padding: 6px 12px; font-size: 13px; }
  .review-card { grid-template-columns: 1fr; }
}

/* =====================================================================
   Community-reported potholes ("Report a pothole")
   ===================================================================== */
.report-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: white;
  background: var(--accent);
  border: none;
  border-radius: 980px;
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
}
.report-btn span { font-size: 18px; line-height: 1; font-weight: 500; }
.report-btn:hover { background: var(--accent-hover); }

/* Diamond marker, used in chips, legends and popups */
.diamond {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  transform: rotate(45deg);
  flex-shrink: 0;
  margin: 0 2px;
}
.legend-list .diamond { transform: translateY(1px) rotate(45deg); }

/* Step 1: a pin fixed in the middle of the map */
.placing { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.place-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  margin: -34px 0 0 -17px;         /* the pin's tip sits on the exact center */
  background: var(--open);
  border: 3px solid white;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.place-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: white;
}
.placing::after {                   /* small shadow dot marking the exact spot */
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 4px;
  margin: -2px 0 0 -4px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
}
.place-card {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(460px, calc(100% - 32px));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.16);
  padding: 16px 18px;
  pointer-events: auto;
  font-size: 14px;
}
.place-card p { margin: 6px 0 12px; color: var(--ink-soft); line-height: 1.45; }
.place-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.place-actions .btn-primary { margin-left: auto; font-size: 14px; padding: 9px 18px; border-radius: 10px; }
.map-wrap.is-placing .map-status,
.map-wrap.is-placing .nearby { display: none; }

/* Step 2 form bits */
.dupe-note {
  font-size: 13px;
  line-height: 1.5;
  background: #fff7e6;
  border-radius: 10px;
  padding: 10px 12px;
  margin: -6px 0 16px;
}
.dupe-note ul { margin: 6px 0; padding-left: 18px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; margin-bottom: 4px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); }
#reportForm .field-hint { display: block; margin: 0 0 16px; }
.photo-preview[hidden] + #reportRetake { display: none; }
#reportRetake { align-self: flex-start; font-size: 13px; }

/* Report popup: big photo at the top */
.pop-hero img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  margin: 10px 0 6px;
  background: var(--bg-soft);
  cursor: zoom-in;
}

@media (max-width: 640px) {
  .report-btn { margin-left: 0; }
  .place-card { top: 10px; padding: 14px; }
}
.review-warn { background: #fff7e6; }
.review-box ul { margin: 4px 0 0; padding-left: 18px; }
.pill .diamond { width: 8px; height: 8px; margin-right: 3px; }
.pop-approx { margin-top: 6px; font-size: 12px; }

/* ---------- Continue with Google / forgot password ---------- */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #1f1f1f;
  background: #ffffff;
  border: 1px solid #747775;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
}
.btn-google:hover { background: #f7f8f8; }
.btn-google:disabled { opacity: 0.6; cursor: progress; }
.btn-google svg { width: 18px; height: 18px; }
.or-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  font-size: 12px;
  color: var(--ink-faint);
}
.or-line::before,
.or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.link.forgot { align-self: flex-end; font-size: 13px; margin-top: 2px; }
.form-ok {
  font-size: 14px;
  color: #0b6b63;
  background: #e3f5f2;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 14px;
  line-height: 1.45;
}
#authGoogleArea { margin-top: 16px; }
.sheet-sub:not([hidden]) + #authGoogleArea { margin-top: 0; }

/* Review page: contact messages */
.message-card { background: var(--bg-soft); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 14px; font-size: 15px; }
.message-card.handled { opacity: 0.6; }
.message-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.message-card h4 { margin: 10px 0 0; font-size: 17px; }
.message-body { white-space: pre-wrap; line-height: 1.6; margin: 8px 0 12px; }
