/* Street24 — night-shift high-vis.
   Navy for the dark streets, hi-vis yellow for anything you act on, red only for 999. */

@font-face { font-family: "Shoulders"; font-weight: 800; font-display: swap;
  src: url("fonts/big-shoulders-display-latin-800-normal.2f9aec33f07c.woff2") format("woff2"); }
@font-face { font-family: "Shoulders"; font-weight: 900; font-display: swap;
  src: url("fonts/big-shoulders-display-latin-900-normal.9ec6b61a9765.woff2") format("woff2"); }
@font-face { font-family: "Atkinson"; font-weight: 400; font-display: swap;
  src: url("fonts/atkinson-hyperlegible-latin-400-normal.f1f8a8210104.woff2") format("woff2"); }
@font-face { font-family: "Atkinson"; font-weight: 700; font-display: swap;
  src: url("fonts/atkinson-hyperlegible-latin-700-normal.13a58e05dfd2.woff2") format("woff2"); }

:root {
  --night: #0a1a33;      /* page */
  --steel: #12284a;      /* raised surfaces */
  --line: #24406b;       /* borders on dark */
  --hivis: #ffd400;      /* actions, focus, brand */
  --hivis-ink: #1a1400;  /* text on yellow */
  --mist: #e8edf5;       /* body text */
  --fog: #9fb0c8;        /* secondary text */
  --siren: #ff3b3b;      /* 999 only */
  --display: "Shoulders", "Arial Narrow", Impact, sans-serif;
  --body: "Atkinson", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 68rem;
  --r-sm: 6px; --r-lg: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--night); color: var(--mist);
  font: 400 1.0625rem/1.6 var(--body); }
img, svg { display: block; }
a { color: var(--hivis); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--hivis); outline-offset: 3px; border-radius: 4px; }
.icon { width: 1.5rem; height: 1.5rem; flex: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 38rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--hivis); color: var(--hivis-ink); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

/* ---- Header & the hi-vis band (the one loud element) ---------------- */
.band { height: 10px; background: repeating-linear-gradient(
  -45deg, var(--hivis) 0 14px, var(--night) 14px 28px); }
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--mist); text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; background: var(--hivis); color: var(--hivis-ink);
  display: grid; place-items: center; }
.brand-mark .icon { width: 1.35rem; height: 1.35rem; }
.brand-name { font: 900 1.6rem/1 var(--display); letter-spacing: .01em; }
.head-cta { font-weight: 700; color: var(--hivis); text-decoration: none; white-space: nowrap; }
.head-cta:hover { text-decoration: underline; }

/* ---- Buttons --------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3.5rem; padding: .9rem 1.6rem; border: 0; border-radius: var(--r-sm);
  font: 700 1.125rem/1 var(--body); text-decoration: none; cursor: pointer; }
.btn-go { background: var(--hivis); color: var(--hivis-ink); box-shadow: 0 6px 0 #b39500; }
.btn-go:hover { background: #ffe03d; }
.btn-go:active { transform: translateY(3px); box-shadow: 0 3px 0 #b39500; }
.btn-go:disabled { opacity: .55; cursor: progress; transform: none; }
.btn-quiet { background: transparent; color: var(--mist); border: 2px solid var(--line); }
.btn-quiet:hover { border-color: var(--fog); }
.btn-block { width: 100%; }

/* ---- Home ------------------------------------------------------------ */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero h1 { font: 900 clamp(3.4rem, 11vw, 7.5rem)/.88 var(--display); margin: 0 0 1.25rem;
  letter-spacing: -.01em; max-width: 11ch; }
.hero p.lede { font-size: clamp(1.15rem, 2.4vw, 1.35rem); color: var(--mist); max-width: 34rem; margin: 0 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; }
.call999 { display: flex; align-items: center; gap: .5rem; color: var(--fog); font-size: .95rem; }
.call999 strong { color: var(--siren); }

.section { padding: clamp(2.5rem, 6vw, 4rem) 0; border-top: 1px solid var(--line); }
.section h2 { font: 900 clamp(2.2rem, 5.5vw, 3.25rem)/.95 var(--display); margin: 0 0 1rem; }
.section .intro { color: var(--fog); max-width: 36rem; margin: 0 0 2rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); counter-reset: step; }
.steps li { counter-increment: step; padding-top: .25rem; }
.steps li::before { content: counter(step); display: block; font: 900 3.5rem/1 var(--display); color: var(--hivis); margin-bottom: .4rem; }
.steps h3, .rooms h3 { font: 800 1.6rem/1.05 var(--display); margin: 0 0 .4rem; }
.steps p, .rooms p { margin: 0; color: var(--fog); }

.rooms { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.room { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1.4rem 1.5rem; background: var(--steel); }
.room + .room { border-top: 1px solid var(--line); }
.room .icon { width: 2rem; height: 2rem; color: var(--fog); margin-top: .15rem; }
.room-alarm { background: var(--hivis); color: var(--hivis-ink); }
.room-alarm .icon, .room-alarm p { color: var(--hivis-ink); }

.rules { margin: 0; padding: 0; list-style: none; display: grid; gap: .9rem; max-width: 40rem; }
.rules li { display: grid; grid-template-columns: 1.5rem 1fr; gap: .75rem; }
.rules .icon { color: var(--hivis); width: 1.25rem; height: 1.25rem; margin-top: .25rem; }

.postcodes { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.postcodes li { font: 800 1.25rem/1 var(--display); padding: .55rem .75rem; border: 1px solid var(--line);
  border-radius: var(--r-sm); color: var(--mist); min-width: 3.6rem; text-align: center; }

/* ---- Report form ----------------------------------------------------- */
.page-head { padding: 2rem 0 1.25rem; }
.page-head h1 { font: 900 clamp(2.6rem, 8vw, 4rem)/.9 var(--display); margin: 0 0 .6rem; }
.page-head p { color: var(--fog); margin: 0; }
.alert999 { display: flex; gap: .75rem; align-items: flex-start; background: rgba(255,59,59,.12);
  border: 1px solid rgba(255,59,59,.5); border-radius: var(--r-sm); padding: .9rem 1rem; margin: 0 0 1.5rem; }
.alert999 .icon { color: var(--siren); }
.alert999 strong { color: #ffd1d1; }

.form { padding-bottom: 3rem; }
.field { margin: 0 0 1.6rem; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 700; margin: 0 0 .5rem; padding: 0; font-size: 1.05rem; }
.hint { color: var(--fog); font-size: .92rem; margin: .45rem 0 0; }
input[type=text], input[type=password], input[type=email], input[type=tel], textarea { width: 100%; padding: .85rem 1rem; font: inherit; color: var(--mist);
  background: var(--steel); border: 2px solid var(--line); border-radius: var(--r-sm); }
input[type=text]::placeholder, input[type=email]::placeholder, input[type=tel]::placeholder, textarea::placeholder { color: #6f84a3; }
input[type=text]:focus, input[type=password]:focus, input[type=email]:focus, input[type=tel]:focus, textarea:focus { outline: none; border-color: var(--hivis); }
textarea { resize: vertical; min-height: 7.5rem; }
.errorlist { list-style: none; padding: 0; margin: .45rem 0 0; color: #ff9b9b; font-size: .95rem; }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (min-width: 40rem) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile span { display: flex; flex-direction: column; gap: .55rem; height: 100%; padding: .9rem .85rem;
  background: var(--steel); border: 2px solid var(--line); border-radius: var(--r-sm);
  font-weight: 700; line-height: 1.2; cursor: pointer; }
.tile span .icon { color: var(--fog); }
.tile span:hover { border-color: var(--fog); }
.tile input:checked + span { background: var(--hivis); border-color: var(--hivis); color: var(--hivis-ink); }
.tile input:checked + span .icon { color: var(--hivis-ink); }
.tile input:focus-visible + span { outline: 3px solid var(--hivis); outline-offset: 3px; }

.upload { position: relative; display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1rem;
  border: 2px dashed var(--line); border-radius: var(--r-sm); cursor: pointer; }
.upload:hover { border-color: var(--fog); }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload .icon { color: var(--hivis); width: 2rem; height: 2rem; }
.upload b { display: block; }
.upload small { color: var(--fog); }
.upload:has(input:focus-visible) { outline: 3px solid var(--hivis); outline-offset: 3px; }

.choice { display: flex; gap: .6rem; flex-wrap: wrap; }
.choice label { flex: 1 1 12rem; display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem;
  background: var(--steel); border: 2px solid var(--line); border-radius: var(--r-sm); cursor: pointer; font-weight: 700; }
.choice input { accent-color: var(--hivis); width: 1.2rem; height: 1.2rem; }
.choice label:has(input:checked) { border-color: var(--hivis); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
progress { width: 100%; height: 10px; margin-top: 1rem; display: none; accent-color: var(--hivis); }
.status { margin-top: .75rem; min-height: 1.5rem; font-weight: 700; }
.status.bad { color: #ff9b9b; }

/* ---- Messages, thanks, prose pages ------------------------------------ */
.msg { padding: .9rem 1rem; border-radius: var(--r-sm); margin: 1rem 0; border: 1px solid var(--line); background: var(--steel); }
.msg.error { border-color: rgba(255,59,59,.6); }
.msg.success { border-color: var(--hivis); }
.done { padding: 3rem 0 4rem; }
.done .tick { width: 4rem; height: 4rem; border-radius: 50%; background: var(--hivis); color: var(--hivis-ink);
  display: grid; place-items: center; margin-bottom: 1.25rem; }
.done .tick svg { width: 2.2rem; height: 2.2rem; }
.done h1 { font: 900 clamp(2.8rem, 9vw, 4.25rem)/.9 var(--display); margin: 0 0 1rem; }
.done p { max-width: 32rem; }
.prose { padding: 2rem 0 4rem; max-width: 42rem; }
.prose h1 { font: 900 clamp(2.6rem, 8vw, 4rem)/.9 var(--display); margin: 0 0 1.25rem; }
.prose h2 { font: 800 1.75rem/1.05 var(--display); margin: 2rem 0 .5rem; }
.prose p, .prose li { color: var(--mist); }
.prose .muted { color: var(--fog); }

/* ---- Footer ------------------------------------------------------------ */
.site-foot { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; color: var(--fog); font-size: .95rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.site-foot nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-foot a { color: var(--mist); }

/* ---- Admin queue (staff only, kept plain) ----------------------------- */
.queue-item { background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.25rem; margin: 0 0 1rem; }
.queue-item pre { white-space: pre-wrap; font: 1rem/1.5 var(--body); background: var(--night); border-radius: var(--r-sm); padding: 1rem; margin: .75rem 0; }
.queue-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .75rem; }
.queue-actions .btn { min-height: 3rem; font-size: 1rem; }
.recent { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.recent div { padding: .75rem 1rem; border-top: 1px solid var(--line); font-size: .95rem; }
.recent div:first-child { border-top: 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* The upload box is a label inside .field; keep it a row, not a block label. */
.field > .upload { display: flex; font-weight: 400; margin: 0; padding: 1.1rem 1rem; }
.upload small { display: block; }
.field > .upload b { font-weight: 700; }

/* Hero badge: the logo sits beside the headline on wide screens only. */
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero-logo { display: none; width: 100%; max-width: 22rem; height: auto; justify-self: end;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,.45)); }
@media (min-width: 60rem) { .hero-grid { grid-template-columns: minmax(0,1fr) 18rem; gap: 3rem; } .hero-logo { display: block; max-width: 18rem; } .hero h1 { font-size: clamp(3.4rem, 7vw, 6.25rem); } }

/* Header navigation */
.head-nav { display: flex; align-items: center; gap: 1.1rem; }
.head-nav a { color: var(--mist); text-decoration: none; font-weight: 700; }
.head-nav a:hover { color: var(--hivis); }
.head-nav a.head-report { background: var(--hivis); color: var(--hivis-ink); padding: .5rem .9rem; border-radius: var(--r-sm); }
.head-nav a.head-report:hover { background: #ffe03d; color: var(--hivis-ink); }
@media (max-width: 30rem) {
  .brand-name { font-size: 1.3rem; }
  .brand img, .brand-mark { width: 34px; height: 34px; }
  .head-nav { gap: .75rem; font-size: .95rem; }
  .head-nav a.head-report { padding: .45rem .7rem; }
}

/* WhatsApp join buttons */
.join { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Chosen files list on the report form */
.files { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .5rem; }
.files li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem;
  padding: .7rem .8rem; background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-sm); }
.files .icon { color: var(--hivis); }
.files .meta { min-width: 0; }
.files .meta b { display: block; }
.files .meta small { display: block; color: var(--fog); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files button { background: transparent; color: var(--mist); border: 2px solid var(--line); border-radius: var(--r-sm);
  padding: .45rem .75rem; font: 700 .95rem var(--body); cursor: pointer; }
.files button:hover { border-color: #ff9b9b; color: #ff9b9b; }

/* Join rows: badge, text, button */
.room { grid-template-columns: 64px 1fr; align-items: center; }
.room img { width: 64px; height: 64px; border-radius: 50%; }
.room-join { grid-column: 1 / -1; min-height: 3rem; }
@media (min-width: 40rem) { .room { grid-template-columns: 64px 1fr auto; } .room-join { grid-column: auto; } }
.room-alarm .room-join-alarm { background: var(--night); color: var(--hivis); }
.room-alarm .room-join-alarm:hover { background: var(--steel); }
.room-community { background: var(--night); }

/* Verify page */
.verify-steps { margin: 0 0 1.5rem; padding-left: 1.4rem; display: grid; gap: .5rem; }
.verify-steps li::marker { color: var(--hivis); font-weight: 700; }

.room-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--night); border: 3px solid var(--hivis);
  display: grid; place-items: center; color: var(--hivis); }
.room-icon .icon { width: 1.9rem; height: 1.9rem; margin: 0; color: var(--hivis); }

/* Community row: first step, outlined in yellow (The Alarm stays the only solid yellow row) */
.rooms { overflow: visible; }
.room-community { box-shadow: inset 0 0 0 3px var(--hivis); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.start-here { display: inline-block; background: var(--hivis); color: var(--hivis-ink); font-weight: 700;
  font-size: .8rem; padding: .15rem .55rem; border-radius: 999px; margin-bottom: .35rem; }
.room-community .room-join { min-height: 3rem; box-shadow: 0 4px 0 #b39500; }

/* Login page */
.captcha-field img.captcha { display: block; border-radius: var(--r-sm); margin: 0 0 .6rem; background: #fff; }
.captcha-field input[type=text] { text-transform: uppercase; }

/* Admin alerts page */
.btn-sm { min-height: 0; padding: .45rem .9rem; font-size: .92rem; }
.push-box { background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.25rem; margin: 0 0 2rem; }
.push-box h2, .alerts-head h2, .alerts-sub { font: 800 1.6rem/1.05 var(--display); margin: 0 0 .5rem; }
.push-devices { margin: 1rem 0; border-top: 1px solid var(--line); }
.push-devices form { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.alerts-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0 0 .75rem; }
.alerts-sub { margin-top: 2rem; }
.alert-card { background: var(--steel); border: 1px solid var(--line); border-left: 5px solid var(--hivis);
  border-radius: var(--r-lg); padding: 1rem 1.15rem; margin: 0 0 .8rem; }
.alert-card.level-urgent { border-left-color: var(--siren); }
.alert-card.level-info { border-left-color: var(--line); }
.alert-card h3 { margin: .2rem 0 .35rem; font-size: 1.12rem; }
.alert-card p { margin: 0 0 .8rem; color: var(--fog); }
.alert-meta { font-size: .85rem; color: var(--fog); }
.alert-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.alert-actions form { margin: 0; }
[hidden] { display: none !important; }
.brand-admin { color: var(--hivis); }
.count-badge { display: inline-block; min-width: 1.4em; padding: 0 .35em; border-radius: 999px; background: var(--siren);
  color: #fff; font-size: .78rem; line-height: 1.5; text-align: center; }
.head-nav a[aria-current="page"]:not(.head-report) { color: var(--hivis); }
@media (max-width: 420px) {
  .site-head .wrap { gap: .5rem; }
  .brand { gap: .45rem; }
  .brand img { width: 32px; height: 32px; }
  .brand-name { font-size: 1.12rem; line-height: 1; }
  .head-nav { gap: .6rem; font-size: .88rem; }
  .head-nav a.head-report { padding: .4rem .6rem; }
}
@media (max-width: 345px) {
  .brand-name { display: none; }
  .site-head .wrap { padding-left: .75rem; padding-right: .75rem; }
  .head-nav { gap: .5rem; font-size: .85rem; }
}
@media (max-width: 59.99rem) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 380px) { .hero h1 { font-size: 2.85rem; } }
.about .about-text { font-size: clamp(1.1rem, 2.2vw, 1.3rem); max-width: 40rem; margin: 0 0 1rem; }
.about .about-note { max-width: 40rem; margin: 0; padding-left: .9rem; border-left: 3px solid var(--hivis); color: var(--fog); }
.foot-small { font-size: .85rem; color: var(--fog); }

/* Bradford today */
.today-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1.25rem; }
.today-head h1 { font: 900 clamp(2.8rem, 8vw, 5rem)/.9 var(--display); margin: .35rem 0 .9rem; }
.today-head .lede { color: var(--fog); max-width: 40rem; margin: 0; }
.today-date { display: inline-flex; align-items: center; gap: .45rem; margin: 0; color: var(--hivis); font-weight: 700; }
.today-date .icon { width: 1.1rem; height: 1.1rem; }
.today-grid { display: grid; gap: 2rem; padding-bottom: 3.5rem; }
@media (min-width: 60rem) { .today-grid { grid-template-columns: minmax(0, 1fr) 19rem; align-items: start; }
  .today-side { position: sticky; top: 1.25rem; } }
.chips { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem 0 1rem; margin: 0 0 .5rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 999px; color: var(--mist);
  text-decoration: none; font-weight: 700; font-size: .92rem; white-space: nowrap; }
.chip:hover { border-color: var(--fog); }
.chip-on { background: var(--hivis); border-color: var(--hivis); color: var(--hivis-ink); }
.upd { --c: var(--hivis); background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-lg);
  margin: 0 0 1rem; overflow: hidden; }
.upd-title { font-size: 1.2rem; line-height: 1.3; margin: .5rem 0 .4rem; }
.upd-title a { color: var(--mist); text-decoration: none; }
.upd-title a:hover { color: var(--hivis); }
.upd-follow { margin: 0 0 .4rem; font-size: .9rem; color: var(--fog); }
.upd-follow a { color: var(--fog); }
.upd-body { color: #c9d4e4; overflow-wrap: anywhere; }
.upd-img { display: block; width: 100%; height: auto; margin: .8rem 0 0; border-radius: var(--r-sm); }
.upd-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem;
  margin-top: .9rem; padding-top: .75rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--fog); }
.upd-source a { color: var(--fog); }
.upd-share { display: inline-flex; align-items: center; gap: .4rem; color: var(--hivis); font-weight: 700; text-decoration: none; }
.upd-share .icon { width: 1rem; height: 1rem; }
.upd-empty p { margin: 0 0 .5rem; } .upd-empty p:last-child { margin: 0; }
.join-card, .days-card { background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.2rem; margin: 0 0 1rem; }
.join-card { border-color: var(--hivis); }
.join-card img { display: block; margin: 0 0 .6rem; }
.join-card h2, .days-card h2, .today-sub { font: 800 1.55rem/1.05 var(--display); margin: 0 0 .5rem; }
.join-card p { color: var(--fog); margin: 0 0 1rem; }
.join-more { display: block; margin-top: .8rem; font-size: .92rem; color: var(--fog); }
.days-card ul, .more-list { list-style: none; margin: 0; padding: 0; }
.days-card li, .more-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.days-card li:first-child, .more-list li:first-child { border-top: 0; }
.days-card li span, .more-list li span { color: var(--fog); font-size: .88rem; white-space: nowrap; }
.days-card a, .more-list a { color: var(--mist); }
.today-note { font-size: .85rem; color: var(--fog); margin: 0; }
.today-back { margin: 0 0 1rem; }
.today-back a { display: inline-flex; align-items: center; gap: .4rem; color: var(--fog); }
.today-back .icon { width: 1rem; height: 1rem; }
.today-sub { margin-top: 2rem; }
.single { padding-top: 2rem; }
.today-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 60rem) { .today-grid { grid-template-columns: minmax(0, 1fr) 19rem; } }
.today-main, .today-side { min-width: 0; }
@media (max-width: 560px) { .head-nav .nav-wide { display: none; } }
@media (max-width: 345px) { .brand-name { display: none; } }
@media (min-width: 346px) and (max-width: 420px) { .brand-name { display: inline; } }
.join-strip { margin-top: 1.1rem; }
@media (min-width: 60rem) { .join-strip { display: none; } }

/* Day picker and scrollable filter chips */
.day-pick { display: flex; align-items: center; gap: .6rem; margin: 0 0 1rem; }
.day-pick label { font-weight: 700; color: var(--fog); }
.day-pick select { font: inherit; font-weight: 700; color: var(--mist); background: var(--steel);
  border: 2px solid var(--line); border-radius: var(--r-sm); padding: .55rem 2.2rem .55rem .8rem; max-width: 100%;
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--hivis) 50%), linear-gradient(135deg, var(--hivis) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.day-pick select:focus { outline: none; border-color: var(--hivis); }
/* Filter row: arrows sit beside the row (never on top of a filter); the row fades at the edges */
.chips-wrap { display: flex; align-items: center; gap: .5rem; margin: 0 0 2.75rem; }
.chips-wrap .chips { flex: 1; min-width: 0; margin: 0; padding: .25rem 0; scroll-behavior: smooth; }
.chips-wrap.fade-right .chips { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 2.5rem), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 2.5rem), transparent); }
.chips-wrap.fade-left .chips { -webkit-mask-image: linear-gradient(90deg, transparent, #000 2.5rem);
  mask-image: linear-gradient(90deg, transparent, #000 2.5rem); }
.chips-wrap.fade-left.fade-right .chips {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent); }
.chips-arrow { flex: none; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; padding: 0;
  border-radius: 50%; border: 2px solid var(--hivis); background: transparent; color: var(--hivis); cursor: pointer;
  transition: background .15s, color .15s, opacity .15s; }
.chips-arrow:hover:not(:disabled) { background: var(--hivis); color: var(--hivis-ink); }
.chips-arrow:focus-visible { outline: 3px solid var(--mist); outline-offset: 2px; }
.chips-arrow:disabled { opacity: .3; cursor: default; }
.chips-arrow .icon { width: 1.25rem; height: 1.25rem; stroke-width: 2.75; }


/* Update cards: each kind of update has its own colour, a header strip and a big emoji tile */
.upd-police, .upd-court { --c: #5aa9ff; }
.upd-missing { --c: #ff4d5e; }
.upd-scam { --c: #ff9f1c; }
.upd-fire { --c: #ff6a2b; }
.upd-roads, .upd-trains { --c: #ffd400; }
.upd-power, .upd-gas { --c: #3ad0ff; }
.upd-water, .upd-flood { --c: #22c7d6; }
.upd-weather { --c: #8fb4ff; }
.upd-health { --c: #ff6fb1; }
.upd-school { --c: #3ddc97; }
.upd-recall, .upd-hygiene { --c: #b78cff; }
.upd-morning, .upd-evening, .upd-weekly, .upd-monthly, .upd-seasonal, .upd-notice { --c: #ffd400; }
.upd { border-top: 3px solid var(--c); }
.upd-head { display: flex; align-items: center; gap: .8rem; padding: .8rem 1.2rem;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 18%, transparent), color-mix(in srgb, var(--c) 4%, transparent));
  border-bottom: 1px solid color-mix(in srgb, var(--c) 25%, var(--line)); }
.upd-icon { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 12px;
  font-size: 1.55rem; line-height: 1; background: color-mix(in srgb, var(--c) 22%, var(--night));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent); }
.upd-kind { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; min-width: 0; }
.upd-tag { font: 800 1.2rem/1 var(--display); letter-spacing: .02em; color: var(--c); }
.upd-area { padding: .1rem .55rem; border-radius: 999px; font-size: .82rem; font-weight: 700; color: var(--mist);
  background: color-mix(in srgb, var(--c) 14%, var(--night)); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.upd-when { margin-left: auto; display: flex; align-items: center; gap: .6rem; font-size: .88rem; color: var(--fog);
  white-space: nowrap; }
.upd-new { display: inline-flex; align-items: center; gap: .35rem; padding: .12rem .5rem; border-radius: 999px;
  background: var(--siren); color: #fff; font-size: .75rem; font-weight: 800; letter-spacing: .03em; }
.upd-pulse { width: .45rem; height: .45rem; border-radius: 50%; background: #fff; animation: upd-pulse 1.6s ease-out infinite; }
@keyframes upd-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.8); } 100% { box-shadow: 0 0 0 .5rem rgba(255,255,255,0); } }
@media (prefers-reduced-motion: reduce) { .upd-pulse { animation: none; } }
.upd-main { padding: 1rem 1.2rem 1.1rem; }
.upd-main .upd-title { margin-top: 0; }
@media (max-width: 420px) {
  .upd-head { padding: .7rem .9rem; gap: .65rem; }
  .upd-icon { width: 2.4rem; height: 2.4rem; font-size: 1.35rem; }
  .upd-tag { font-size: 1.08rem; }
  .upd-main { padding: .9rem .95rem 1rem; }
}

.earlier-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 2.75rem 0 1rem;
  padding-top: 1.5rem; border-top: 1px solid var(--line); }
.earlier-head h2 { font: 800 1.75rem/1 var(--display); margin: 0; }
.earlier-head p { margin: 0; color: var(--fog); font-size: .92rem; }

/* ---- Area and topic pages ---------------------------------------------- */
.today-date a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; }
.area-stat { margin: 1rem 0 0; color: var(--fog); }
.area-stat strong { font: 900 1.6rem/1 var(--display); color: var(--hivis); margin-right: .2rem; }
.area-stat a { margin-left: .4rem; white-space: nowrap; }
.area-pager { display: flex; justify-content: space-between; margin: 2rem 0 1rem; }
.area-pager a { display: inline-flex; align-items: center; gap: .4rem; font-weight: 800; text-decoration: none;
  padding: .55rem .9rem; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--mist); }
.area-pager .icon { width: 1.1rem; height: 1.1rem; }
.area-all-head { margin: 2rem 0 .9rem; font-size: 1.15rem; }
.postcodes a { color: inherit; text-decoration: none; display: block; }
.postcodes li:has(a:hover), .postcodes li:has(a[aria-current]) { border-color: var(--hivis); color: #fff; }
.postcodes li:has(a) { padding: 0; }
.postcodes li a { padding: .55rem .75rem; }
.topic-chips { flex-wrap: wrap; overflow: visible; margin-bottom: 1.75rem; }
.browse-card { margin-top: 1.25rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r-sm); }
.browse-card h2 { font-size: 1rem; margin: 0 0 .6rem; }
.browse-card h2 + ul { margin-bottom: 1.1rem; }
.browse-card ul { list-style: none; padding: 0; margin: 0; }
.browse-topics li a { display: block; padding: .35rem 0; color: var(--mist); text-decoration: none; }
.browse-topics li a:hover, .browse-topics a[aria-current] { color: #fff; text-decoration: underline; }
.browse-areas { display: flex; flex-wrap: wrap; gap: .35rem; }
.browse-areas a { display: block; min-width: 3rem; text-align: center; padding: .3rem .4rem; font-weight: 800; font-size: .85rem;
  border: 1px solid var(--line); border-radius: 6px; color: var(--mist); text-decoration: none; }
.browse-areas a:hover, .browse-areas a[aria-current] { border-color: var(--hivis); color: #fff; }
@media (min-width: 60rem) { .area-all { display: none; } }
.crime-card { border: 1px solid var(--line); background: var(--steel); border-radius: var(--r-lg); padding: 1.1rem 1.25rem; margin-bottom: 1.75rem; }
.crime-card h2 { font-size: 1.15rem; margin: 0 0 .4rem; }
.crime-total { margin: 0 0 .9rem; color: var(--fog); }
.crime-total strong { font: 900 1.9rem/1 var(--display); color: var(--hivis); margin-right: .15rem; }
.crime-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: .5rem; margin: 0; }
.crime-rows div { border-top: 1px solid var(--line); padding-top: .45rem; }
.crime-rows dt { color: var(--fog); font-size: .85rem; }
.crime-rows dd { margin: .1rem 0 0; font: 800 1.35rem/1.1 var(--display); color: #fff; }
.crime-rows dd span { font: 600 .78rem var(--body); margin-left: .25rem; }
.crime-rows .up { color: #ff8a8a; } .crime-rows .down { color: #7be0a5; }
.crime-note { margin: .9rem 0 0; color: var(--fog); font-size: .8rem; }
.upd-more { margin: .5rem 0 0; font-weight: 700; }

/* ---- Briefing card (7am / 8pm) at the top of Today ---------------------- */
.brief { position: relative; border-radius: var(--r-lg); padding: 1.35rem 1.4rem 1.1rem; margin: 0 0 2rem;
  background: linear-gradient(160deg, #1b2f63 0%, #12284a 55%, #0f2140 100%); border: 1px solid #3a5a9a;
  box-shadow: 0 0 0 1px rgba(0,0,0,.2), 0 18px 40px -24px rgba(0,0,0,.8); }
.brief-morning { background: linear-gradient(160deg, #3a2c12 0%, #1d2a44 50%, #12284a 100%); border-color: #8a6a22; }
.brief::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: linear-gradient(90deg, #8fb3ff, #c9a7ff); }
.brief-morning::before { background: linear-gradient(90deg, var(--hivis), #ff9f1c); }
.brief-head { display: flex; gap: .9rem; align-items: center; margin-bottom: .9rem; }
.brief-icon { font-size: 2.4rem; line-height: 1; flex: none; }
.brief-kind { margin: 0 0 .15rem; color: var(--fog); font-size: .85rem; font-weight: 700; }
.brief-title { margin: 0; font: 900 clamp(1.5rem, 4.5vw, 2rem)/1 var(--display); }
.brief-title a { color: #fff; text-decoration: none; }
.brief-title a:hover { text-decoration: underline; }
.brief-body p { margin: 0 0 .55rem; line-height: 1.5; }
.brief-body p:last-child { color: var(--fog); font-size: .9rem; }
.brief-map img { display: block; width: 100%; height: auto; border-radius: var(--r-sm); margin: .9rem 0 .2rem; border: 1px solid var(--line); }
.brief-foot { display: flex; justify-content: flex-end; margin-top: .6rem; }

/* ---- Crime figures in the sidebar --------------------------------------- */
.crime-side { margin-top: 1.25rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--steel); }
.crime-side-kicker { margin: 0 0 .2rem; color: var(--fog); font-size: .85rem; font-weight: 700; }
.crime-side h2 { margin: 0 0 .5rem; font: 900 1.45rem/1 var(--display); }
.crime-side-total { margin: 0 0 .7rem; color: var(--fog); }
.crime-side-total strong { font: 900 1.8rem/1 var(--display); color: var(--hivis); margin-right: .15rem; }
.crime-side-total span { font-size: .8rem; font-weight: 700; margin-left: .2rem; }
.crime-side .up { color: #ff8a8a; } .crime-side .down { color: #7be0a5; }
.crime-side ul { list-style: none; padding: 0; margin: 0 0 .8rem; }
.crime-side li { display: flex; justify-content: space-between; padding: .35rem 0; border-top: 1px solid var(--line); font-size: .92rem; }
.crime-side li b { color: #fff; }
.crime-side-link { font-weight: 700; }
.crime-side-note { margin: .6rem 0 0; color: var(--fog); font-size: .75rem; }
.crime-side-total { margin-bottom: .3rem; }
.crime-side-change { margin: 0 0 .75rem; font-size: .85rem; font-weight: 700; color: var(--fog); }
/* Crime figures: under the briefing on phones, in the sidebar on wide screens. */
.crime-inline { margin: 0 0 2rem; }
@media (min-width: 60rem) { .crime-inline { display: none; } }
@media (max-width: 59.99rem) { .today-main:has(.crime-inline) ~ .today-side .crime-side { display: none; } }

/* ---- Today: controls under the briefing, day bands, and a clearly separate "Earlier this week" ---- */
.today-controls { margin: 0 0 1.5rem; }
.day-band { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; margin: 2rem 0 1rem; padding: 0 0 .55rem;
  border-bottom: 2px solid var(--line); font-size: 1rem; }
.day-band-day { font: 900 1.5rem/1 var(--display); color: #fff; }
.day-band-date { font: 700 1rem var(--body); color: var(--fog); }
.day-band-n { margin-left: auto; font: 700 .8rem var(--body); color: var(--fog); background: var(--steel);
  border: 1px solid var(--line); border-radius: 999px; padding: .15rem .6rem; }
.today-controls + .day-band { margin-top: .5rem; }

.earlier { margin: 3.5rem 0 0; position: relative; }
.earlier::before { content: ""; display: block; height: 10px; margin: 0 0 2rem; border-radius: 3px;
  background: repeating-linear-gradient(-45deg, var(--hivis) 0 14px, var(--night) 14px 28px); opacity: .9; }
.earlier-band { background: var(--steel); border: 1px solid var(--line); border-left: 6px solid var(--hivis);
  border-radius: var(--r-lg); padding: 1.2rem 1.3rem; margin: 0 0 .5rem; }
.earlier-kicker { margin: 0 0 .25rem; color: var(--hivis); font-weight: 800; font-size: .85rem; }
.earlier-band h2 { margin: 0 0 .35rem; font: 900 clamp(1.9rem, 6vw, 2.5rem)/.95 var(--display); color: #fff; }
.earlier-band p { margin: 0; color: var(--fog); }
.earlier-all { display: inline-block; margin-top: .8rem; font-weight: 800; }
.earlier .upd { opacity: .96; }
.today-more { text-align: center; margin: 2rem 0; }

/* ---- Monthly crime post: pick your BD -------------------------------------- */
.bd-pick { margin: 2rem 0; }
.bd-pick h2 { font: 900 1.9rem/1 var(--display); margin: 0 0 .4rem; scroll-margin-top: 1rem; }
.bd-pick > p { color: var(--fog); margin: 0 0 1rem; }
.bd-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .6rem; }
.bd-grid a { display: grid; gap: .15rem; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--steel); color: var(--mist); text-decoration: none; height: 100%; }
.bd-grid a:hover, .bd-grid a:focus-visible { border-color: var(--hivis); }
.bd-code { font: 900 1.6rem/1 var(--display); color: #fff; }
.bd-place { font-size: .82rem; color: var(--fog); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-total { font-weight: 800; margin-top: .3rem; }
.bd-total small { font-weight: 600; color: var(--fog); }
.bd-change { font-size: .78rem; font-weight: 800; }
.bd-change.up { color: #ff8a8a; } .bd-change.down { color: #7be0a5; } .bd-change.same { color: var(--fog); }
.bd-note { color: var(--fog); font-size: .78rem; margin: .8rem 0 0; }
.crime-card { scroll-margin-top: 1rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- "What's happening in your area?" hub on the home page ---------------------- */
.areas-hub { position: relative; background:
  radial-gradient(120% 80% at 100% 0%, rgba(255,212,0,.10), transparent 55%),
  linear-gradient(180deg, #0d2244 0%, var(--night) 100%);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.areas-hub::before { content: ""; position: absolute; inset: 0 0 auto; height: 8px;
  background: repeating-linear-gradient(-45deg, var(--hivis) 0 14px, var(--night) 14px 28px); }
.areas-head { max-width: 46rem; margin-bottom: 1.75rem; }
.areas-hub h2 { font: 900 clamp(2.6rem, 9vw, 4.6rem)/.88 var(--display); margin: .5rem 0 .8rem; color: #fff; letter-spacing: -.01em; }
.areas-hub .intro { font-size: 1.08rem; color: var(--fog); margin: 0 0 1.4rem; }
.pc-form { display: flex; gap: .6rem; flex-wrap: wrap; }
.pc-form input { flex: 1 1 14rem; min-width: 0; font: 800 1.25rem var(--body); text-transform: uppercase; letter-spacing: .04em;
  color: #fff; background: var(--night); border: 2px solid var(--line); border-radius: var(--r-sm); padding: .85rem 1rem; }
.pc-form input::placeholder { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--fog); }
.pc-form input:focus { outline: none; border-color: var(--hivis); box-shadow: 0 0 0 3px rgba(255,212,0,.25); }
.pc-form .btn { flex: 0 0 auto; font-size: 1.1rem; padding-inline: 1.4rem; }
.pc-error { margin: .8rem 0 0; color: #ffb3b3; font-weight: 700; }

.area-tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); }
.area-tile { position: relative; display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: 1rem 1rem .9rem;
  background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--mist); text-decoration: none;
  transition: border-color .15s, transform .15s; }
.area-tile:hover, .area-tile:focus-visible { border-color: var(--hivis); transform: translateY(-2px); outline: none; }
.area-tile.has-news { border-top: 3px solid var(--hivis); }
.at-code { font: 900 2.4rem/.9 var(--display); color: #fff; }
.at-place { font-weight: 700; font-size: .9rem; color: var(--fog); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-stats { display: flex; flex-direction: column; gap: .25rem; margin-top: auto; padding-top: .7rem; font-size: .8rem; font-weight: 700; }
.at-live { display: inline-flex; align-items: center; gap: .35rem; color: var(--hivis); }
.at-live .upd-pulse { position: static; }
.at-quiet { color: var(--fog); font-weight: 600; }
.at-crime { color: var(--mist); }
.at-crime .up { color: #ff8a8a; } .at-crime .down { color: #7be0a5; }
@media (prefers-reduced-motion: reduce) { .area-tile { transition: none; } .area-tile:hover { transform: none; } }

/* ---- Area page: live numbers ---------------------------------------------------- */
.area-live { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .5rem;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.area-live li > *, .area-live li { min-width: 0; }
.area-live li { background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-sm); }
.area-live li > a, .area-live li { color: inherit; text-decoration: none; }
.area-live strong { display: block; padding: .7rem .8rem 0; font: 900 2rem/1 var(--display); color: var(--hivis); }
.area-live span { display: block; padding: .2rem .8rem .7rem; font-size: .8rem; font-weight: 700; color: var(--fog); }
.area-live a { display: block; height: 100%; }
.area-live a:hover { outline: 2px solid var(--hivis); border-radius: var(--r-sm); }
.area-report { margin: 1rem 0 0; font-weight: 700; }
.at-live .upd-pulse { background: var(--hivis); }
.stars { display: inline-flex; gap: 1px; margin-right: .35rem; font-size: .85em; letter-spacing: 0; vertical-align: 1px; }
.stars i { font-style: normal; color: rgba(255,255,255,.22); }
.stars i.on { color: var(--hivis); }
/* Phones: 3 compact tiles per row so all 19 districts fit on a couple of screens. */
.at-short { display: none; }
@media (max-width: 40rem) {
  .area-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
  .area-tile { padding: .65rem .6rem .6rem; }
  .area-tile.has-news { border-top-width: 3px; }
  .at-code { font-size: 1.75rem; }
  .at-place { font-size: .72rem; }
  .at-stats { padding-top: .45rem; font-size: .72rem; gap: .15rem; }
  .at-long { display: none; }
  .at-short { display: inline; }
}

/* ---- End of the home page: see-all, report panel, footer ----------------------- */
.see-all { display: flex; width: 100%; gap: .5rem; margin-top: 1.25rem; padding: .9rem 1rem; font-size: 1rem; }
.see-all .icon { width: 1.1rem; height: 1.1rem; }
.cta-end { padding-top: 1rem; }
.cta-panel { position: relative; overflow: hidden; text-align: center; padding: 2rem 1.25rem 1.6rem;
  background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.cta-panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px;
  background: repeating-linear-gradient(-45deg, var(--hivis) 0 12px, var(--night) 12px 24px); }
.cta-panel h2 { margin: .4rem 0 .5rem; font: 900 clamp(2.2rem, 8vw, 3.2rem)/.95 var(--display); }
.cta-panel > p { margin: 0 auto 1.2rem; max-width: 30rem; color: var(--fog); }
.cta-btn { width: 100%; max-width: 24rem; font-size: 1.15rem; padding-block: .95rem; }
.cta-panel .cta-999 { margin: 1rem 0 0; font-size: .92rem; }
.cta-999 strong { color: #ffb3b3; }

.site-foot { padding: 2rem 0 2.25rem; }
.site-foot .wrap { display: grid; gap: 1.25rem; justify-content: stretch; }
.foot-name { margin: 0 0 .35rem; font: 900 1.4rem/1 var(--display); color: #fff; }
.foot-brand .foot-small { margin: 0; max-width: 34rem; font-size: .85rem; line-height: 1.5; }
.foot-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.foot-nav a { font-weight: 700; text-decoration: none; padding: .2rem 0; border-bottom: 1px solid var(--line); }
.foot-nav a:hover { border-color: var(--hivis); }
@media (min-width: 48rem) { .site-foot .wrap { grid-template-columns: 1fr auto; align-items: end; } }
/* Every tile has the same top edge: yellow when there's news this week, plain when quiet, so they line up. */
.area-tile { border-top: 3px solid var(--line); }
.area-tile.has-news { border-top-color: var(--hivis); }
/* Footer centred */
.site-foot .wrap { grid-template-columns: 1fr !important; justify-items: center; text-align: center; }
.foot-brand .foot-small { margin-inline: auto; }
.foot-nav { justify-content: center; }

/* ---- 12-month trend on area pages ------------------------------------------------ */
.trend { margin: 0 0 2rem; padding: 1.2rem 1.25rem; background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.trend h2 { margin: 0 0 .35rem; font: 900 1.6rem/1 var(--display); scroll-margin-top: 1rem; }
.trend-intro { margin: 0 0 1.1rem; color: var(--fog); font-size: .9rem; }
.trend-chart { margin: 0 0 1.4rem; }
.trend-chart figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; margin-bottom: .55rem; }
.trend-title { font-weight: 800; color: #fff; }
.trend-latest { color: var(--fog); font-size: .88rem; }
.trend-latest b { color: #fff; font: 900 1.15rem var(--display); }
.trend-change { font-size: .8rem; font-weight: 800; color: var(--fog); }
.trend-change.up { color: #ff8a8a; } .trend-change.down { color: #7be0a5; }
.bars { list-style: none; margin: 0; padding: 0 0 1.2rem; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  gap: 2px; height: 7.5rem; align-items: end; border-bottom: 1px solid var(--line); position: relative; }
.bars li { position: relative; height: 100%; display: flex; align-items: flex-end; outline: none; cursor: default; }
.bars .bar { display: block; width: 100%; height: var(--h); background: #5d7aa8; border-radius: 4px 4px 0 0; }
.bars li.latest .bar { background: var(--hivis); }
.bars li:hover .bar, .bars li:focus .bar { background: #fff; }
.bars .m { position: absolute; bottom: -1.2rem; left: 0; right: 0; text-align: center; font-size: .68rem; color: var(--fog); }
.bars .tip { position: absolute; bottom: calc(var(--h) + .35rem); left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--night); color: #fff; border: 1px solid var(--line); border-radius: 6px; padding: .2rem .45rem;
  font-size: .75rem; font-weight: 700; pointer-events: none; opacity: 0; z-index: 2; }
.bars li:first-child .tip { left: 0; transform: none; } .bars li:last-child .tip { left: auto; right: 0; transform: none; }
.bars li:hover .tip, .bars li:focus .tip { opacity: 1; }
.trend-table summary { cursor: pointer; font-weight: 700; color: var(--fog); font-size: .88rem; }
.trend-table table { width: 100%; border-collapse: collapse; margin-top: .6rem; font-size: .85rem; }
.trend-table th, .trend-table td { text-align: left; padding: .35rem .4rem; border-bottom: 1px solid var(--line); }
.trend-table td { font-variant-numeric: tabular-nums; }

/* ---- Biggest changes under the district tiles ------------------------------------ */
.changes { margin-top: 2rem; }
.changes h3 { margin: 0 0 .3rem; font: 900 clamp(1.7rem, 6vw, 2.3rem)/1 var(--display); color: #fff; }
.changes-intro { margin: 0 0 1rem; color: var(--fog); font-size: .92rem; }
.changes-cols { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.changes-col { background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .9rem 1rem; }
.changes-col.down { border-top: 3px solid #7be0a5; } .changes-col.up { border-top: 3px solid #ff8a8a; }
.changes-col h4 { margin: 0 0 .5rem; font-size: .95rem; }
.changes-col.down h4 { color: #7be0a5; } .changes-col.up h4 { color: #ff8a8a; }
.changes-col ol { list-style: none; margin: 0; padding: 0; }
.changes-col li a { display: grid; grid-template-columns: 3.4rem 1fr auto; align-items: baseline; gap: .5rem; padding: .5rem 0;
  border-top: 1px solid var(--line); color: var(--mist); text-decoration: none; }
.changes-col li:first-child a { border-top: 0; }
.ch-code { font: 900 1.35rem/1 var(--display); color: #fff; }
.ch-place { color: var(--fog); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-pct { font-weight: 800; }
.down .ch-pct { color: #7be0a5; } .up .ch-pct { color: #ff8a8a; }
.ch-none { color: var(--fog); font-size: .9rem; }
.changes-note { margin: .7rem 0 0; color: var(--fog); font-size: .78rem; }
.bars { gap: 1px; }
.bars .m.yr { left: 0; right: auto; text-align: left; white-space: nowrap; font-weight: 700; }
.bars .m.yr::before { content: ""; position: absolute; left: 0; bottom: 1.05rem; height: .4rem; border-left: 1px solid var(--fog); }
/* Six trend charts: all crime full width, the other five in a grid on wide screens. */
.trend-charts { display: grid; gap: 0 1.5rem; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }
.trend-charts .trend-wide { grid-column: 1 / -1; }
.trend-charts .trend-chart:not(.trend-wide) .bars { height: 5.5rem; }
.upd.upd-empty { padding: 1rem 1.2rem; color: var(--fog); } .upd.upd-empty p { margin: 0; }
/* Comparison line under each chart heading */
.cmp { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; margin: -.15rem 0 .6rem; font-size: .8rem; color: var(--fog); }
.cmp-label { flex-basis: 100%; }
.cmp b { font-weight: 800; color: var(--mist); }
.cmp-you b { color: var(--hivis); }
.cmp-note { margin: .2rem 0 1rem; font-size: .78rem; color: var(--fog); line-height: 1.5; }
.cmp-list { margin: 0 0 .7rem; font-size: .82rem; }
.cmp-list summary { cursor: pointer; color: var(--fog); font-weight: 700; }
.cmp-list ol { list-style: none; margin: .4rem 0 0; padding: 0; max-width: 22rem; }
.cmp-list li { display: flex; justify-content: space-between; padding: .25rem 0; border-bottom: 1px solid var(--line); }
.cmp-list li.you { color: var(--hivis); font-weight: 800; }

/* ---- Header stays visible while scrolling; Today stands out ---------------------- */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(10, 26, 51, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .site-head { background: var(--night); } }
:target, h2[id], section[id] { scroll-margin-top: 5rem; }
.head-today { display: inline-flex; align-items: center; gap: .45rem; padding: .42rem .8rem !important;
  border: 2px solid var(--hivis); border-radius: 999px; color: #fff !important; font-weight: 800; text-decoration: none; white-space: nowrap; }
.head-today:hover { background: rgba(255,212,0,.12); }
.head-today[aria-current="page"] { background: rgba(255,212,0,.16); }
.live-dot { position: relative; width: .55rem; height: .55rem; border-radius: 50%; background: #ff4d4d; flex: none; }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #ff4d4d; opacity: 0;
  animation: live-ping 2s ease-out infinite; }
@keyframes live-ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .live-dot::after { animation: none; } }
.today-long { display: none; }
@media (min-width: 900px) { .today-long { display: inline; } }
@media (max-width: 420px) {
  .site-head .wrap { min-height: 3.6rem; }
  .brand img { width: 34px; height: 34px; }
  .brand-name { font-size: 1.05rem; }
  .head-nav { gap: .55rem; }
  .head-today { padding: .36rem .65rem !important; font-size: .92rem; }
}

/* ---- Update page: back bar fixed under the header, and the full story ------------ */
.back-bar { position: sticky; top: calc(4.25rem + 1px); z-index: 40; background: rgba(10, 26, 51, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
@media (max-width: 420px) { .back-bar { top: calc(3.6rem + 1px); } }
.back-bar a { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 0; color: #fff; font-weight: 800; text-decoration: none; }
.back-bar a .icon { width: 1.15rem; height: 1.15rem; color: var(--hivis); }
.back-bar a small { color: var(--fog); font-weight: 600; font-size: .85rem; }
.back-bar a:hover span { text-decoration: underline; }
.back-bar + .today-grid { padding-top: 1.5rem; }
.story { margin: 1.5rem 0 2rem; padding: 1.4rem 1.4rem 1.2rem; background: var(--steel); border: 1px solid var(--line);
  border-left: 5px solid var(--hivis); border-radius: var(--r-lg); }
.story h2 { margin: 0 0 .9rem; font: 900 1.7rem/1 var(--display); color: #fff; }
.story-body { font-size: 1.04rem; line-height: 1.7; max-width: 42rem; }
.story-body p { margin: 0 0 1rem; }
.story-source { margin: 1rem 0 0; padding-top: .9rem; border-top: 1px solid var(--line); color: var(--fog); font-size: .9rem; }
.story-out { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.25rem 0 2rem;
  padding: 1.05rem 1.25rem; border: 2px solid var(--hivis); border-radius: var(--r-lg); background: rgba(255,212,0,.08);
  color: #fff; font-weight: 800; font-size: 1.05rem; text-decoration: none; }
.story-out:hover { background: rgba(255,212,0,.16); }
.story-out .icon { width: 1.3rem; height: 1.3rem; color: var(--hivis); flex: none; }

/* ---- Admin: site traffic ------------------------------------------------------- */
.tr-stats { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.tr-stats li { background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .9rem 1rem; display: grid; gap: .2rem; }
.tr-bots { margin: -.6rem 0 1.25rem; color: var(--muted, #9fb0c8); font-size: .85rem; }
.tr-stats strong { font: 900 2.2rem/1 var(--display); color: #fff; }
.tr-stats span { color: var(--fog); font-weight: 700; font-size: .88rem; line-height: 1.35; }
.tr-stats small { font-weight: 500; font-size: .78rem; }
.tr-live { border-color: #ff4d4d !important; position: relative; }
.tr-live .live-dot { position: absolute; top: 1rem; right: 1rem; }
.tr-live strong { color: #ff8a8a; }
.tr-card { background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.tr-card h2 { margin: 0 0 .8rem; font-size: 1.1rem; }
.tr-bars { height: 9rem; }
.tr-grid { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }
.tr-list { list-style: none; margin: 0; padding: 0; }
.tr-list li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .6rem; padding: .45rem 0; border-top: 1px solid var(--line); font-size: .92rem; }
.tr-list li:first-child { border-top: 0; }
.tr-list li:has(.tr-meter) { grid-template-columns: 7rem 1fr 3rem; }
.tr-list a { color: var(--mist); }
.tr-list b { color: #fff; text-align: right; font-variant-numeric: tabular-nums; }
.tr-meter { display: block; height: .5rem; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; }
.tr-meter i { display: block; height: 100%; background: var(--hivis); border-radius: 999px; }
.tr-note { max-width: 46rem; margin-top: 1rem; }
.count-me { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: .5rem 0 1.5rem; } .count-me p { margin: 0; flex-basis: 100%; }
.count-me-small { margin: 2.5rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .78rem; color: var(--fog); }
.count-me-small button { background: none; border: 0; padding: 0; color: var(--fog); font: inherit; text-decoration: underline; cursor: pointer; }
.count-me-small button:hover { color: #fff; }
.tr-live-list { display: grid; }
.tr-live-row { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: .8rem; padding: .55rem 0; border-top: 1px solid var(--line); font-size: .9rem; }
.tr-live-row:first-child { border-top: 0; }
.tr-live-row small { display: block; color: var(--fog); font-size: .78rem; margin-top: .1rem; }
.tr-who { font-weight: 800; color: #fff; }
.tr-what a { color: var(--mist); }
@media (max-width: 560px) { .tr-live-row { grid-template-columns: 1fr; gap: .2rem; } }

/* ---- Home: Bradford Today teaser (one big tap target to the live page) --------- */
.today-teaser { padding-top: 1rem; }
.tt-panel { position: relative; display: block; overflow: hidden; color: var(--mist); text-decoration: none;
  background: linear-gradient(165deg, #172f5c 0%, #10264a 60%, #0d2042 100%); border: 2px solid var(--hivis);
  border-radius: var(--r-lg); padding: 1.4rem 1.3rem 1.25rem; box-shadow: 0 18px 40px -26px rgba(0,0,0,.9); }
.tt-panel:hover, .tt-panel:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(255,212,0,.25), 0 18px 40px -26px rgba(0,0,0,.9); }
.tt-live { display: inline-flex; align-items: center; gap: .45rem; padding: .25rem .65rem; border-radius: 999px;
  background: rgba(255,77,77,.14); color: #ffb3b3; font-weight: 800; font-size: .82rem; }
.tt-head h2 { margin: .55rem 0 .45rem; font: 900 clamp(2.4rem, 9vw, 3.6rem)/.9 var(--display); color: #fff; }
.tt-head p { margin: 0 0 1.1rem; color: var(--fog); max-width: 40rem; }
.tt-head strong { color: #fff; }
.tt-list { list-style: none; margin: 0 0 1.2rem; padding: 0; border-top: 1px solid var(--line); }
.tt-list li { display: grid; grid-template-columns: 1.8rem 1fr; grid-template-areas: "e t" "e w"; column-gap: .55rem;
  padding: .7rem 0; border-bottom: 1px solid var(--line); }
.tt-emoji { grid-area: e; font-size: 1.3rem; line-height: 1.2; }
.tt-title { grid-area: t; color: #fff; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.tt-when { grid-area: w; color: var(--fog); font-size: .8rem; margin-top: .15rem; }
.tt-cta { display: flex; align-items: center; justify-content: center; gap: .55rem; padding: .95rem 1rem;
  background: var(--hivis); color: #0a1a33; border-radius: var(--r-sm); font-weight: 900; font-size: 1.1rem; }
.tt-cta .icon { width: 1.3rem; height: 1.3rem; transition: transform .2s; }
.tt-panel:hover .tt-cta .icon { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) { .tt-cta .icon { transition: none; } }
@media (min-width: 900px) { .tt-panel { padding: 2rem 2rem 1.6rem; } .tt-cta { max-width: 22rem; } }

/* ---- A story's posts (problem -> update -> fixed) on the update page ----------- */
.story-newer { display: flex; align-items: center; gap: .7rem; margin: 0 0 1rem; padding: .8rem 1rem; border-radius: var(--r-sm);
  background: rgba(255,212,0,.1); border: 1px solid var(--hivis); color: var(--mist); text-decoration: none; }
.story-newer strong { color: #fff; }
.story-newer small { color: var(--fog); margin-left: .3rem; white-space: nowrap; }
.story-newer .icon { width: 1.2rem; height: 1.2rem; color: var(--hivis); margin-left: auto; flex: none; }
.story-line { list-style: none; margin: 1.25rem 0 1.5rem; padding: 0 0 0 1.4rem; position: relative; }
.story-line::before { content: ""; position: absolute; left: .4rem; top: .5rem; bottom: .5rem; width: 2px; background: var(--line); }
.story-line li { position: relative; padding: 0 0 1rem; }
.story-line li::before { content: ""; position: absolute; left: -1.2rem; top: .35rem; width: .7rem; height: .7rem; border-radius: 50%;
  background: var(--steel); border: 2px solid var(--fog); }
.story-line li.here::before { background: var(--hivis); border-color: var(--hivis); }
.story-line time { display: block; font-size: .8rem; color: var(--fog); font-weight: 700; }
.story-line a, .story-line span { color: var(--mist); font-weight: 700; }
.story-line li.here span { color: #fff; }
.story-line small { display: block; color: var(--fog); font-size: .78rem; }

/* Community accounts: join, verify, log in */
.cm-page { padding-bottom: 3rem; }
.cm-center { text-align: center; }
.field > label.check { display: flex; gap: .6rem; align-items: center; font-weight: 400; }
.check input { width: 1.25rem; height: 1.25rem; accent-color: var(--hivis); }
.linkish { background: none; border: 0; padding: .5rem 0; color: var(--mist); text-decoration: underline; font: inherit; cursor: pointer; }
.cm-steps { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .9rem; counter-reset: cm; }
.cm-steps li { counter-increment: cm; background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem 1.2rem 1.2rem 3.6rem; position: relative; opacity: .6; }
.cm-steps li::before { content: counter(cm); position: absolute; left: 1.1rem; top: 1rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--line); color: var(--mist); }
.cm-steps li.now { opacity: 1; border-color: var(--hivis); }
.cm-steps li.now::before { background: var(--hivis); color: var(--hivis-ink); }
.cm-steps li.done { opacity: 1; }
.cm-steps li.done::before { content: "✓"; background: #1f8a4c; color: #fff; }
.cm-steps h2 { margin: 0 0 .35rem; font-size: 1.15rem; }
.cm-steps p { margin: .2rem 0 .7rem; }
.cm-code { display: flex; gap: .5rem; margin: .4rem 0 .2rem; }
.cm-code input { flex: 1; min-width: 0; font-size: 1.4rem; letter-spacing: .25em; text-align: center; }
.cm-details { display: grid; grid-template-columns: auto 1fr; gap: .6rem 1.2rem; background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem 1.2rem; margin: 0 0 1rem; }
.cm-details dt { color: var(--fog); }
.cm-details dd { margin: 0; font-weight: 700; word-break: break-word; }
.cm-ok { color: #4cd38a; }

/* Community: feed */
.cm-feed-wrap { padding-top: 1.5rem; padding-bottom: 3rem; max-width: 46rem; }
.cm-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
.cm-h1 { font: 900 clamp(2.4rem, 7vw, 3.4rem)/.95 var(--display); margin: 0 0 .4rem; color: #fff; }
.cm-sub { margin: 0; color: var(--fog); }
.cm-new { flex: none; min-height: 3rem; padding: .7rem 1.1rem; font-size: 1rem; }
.cm-cases { margin: 0 0 1.2rem; }
.cm-cases-h { display: flex; align-items: center; gap: .45rem; font-size: .95rem; color: var(--hivis); margin: 0 0 .5rem; }
.cm-cases-h .icon { width: 1.05rem; height: 1.05rem; }
.cm-case-row { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .3rem; scroll-snap-type: x mandatory; }
.cm-case { flex: 0 0 min(78%, 17rem); scroll-snap-align: start; display: grid; gap: .3rem; padding: .9rem 1rem; border-radius: var(--r-lg);
  background: linear-gradient(135deg, #2a2200, #12284a 70%); border: 2px solid var(--hivis); color: #fff; text-decoration: none; }
.cm-case strong { font-size: 1.05rem; }
.cm-case span { color: var(--fog); font-size: .88rem; }
.cm-filters { display: flex; gap: .6rem; align-items: center; margin: 0 0 1rem; flex-wrap: wrap; }
.cm-chips { display: flex; gap: .4rem; overflow-x: auto; flex: 1 1 auto; padding-bottom: .2rem; }
.cm-chip { flex: none; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); color: var(--mist); text-decoration: none; font-weight: 700; font-size: .92rem; }
.cm-chip.on { background: var(--mist); color: var(--night); border-color: var(--mist); }
.cm-area select, .field select { font: inherit; color: var(--mist); background: var(--steel); border: 2px solid var(--line); border-radius: var(--r-sm); padding: .55rem .7rem; }
.field select { width: 100%; padding: .85rem 1rem; }
.cm-list { display: grid; gap: .7rem; }
.cm-card { display: flex; gap: .9rem; padding: 1rem 1.1rem; background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--mist); text-decoration: none; }
.cm-card:hover { border-color: var(--fog); }
.cm-card.is-pinned { border-color: var(--hivis); }
.cm-card.is-hidden, .cm-post.is-hidden, .cm-msg.is-hidden { opacity: .55; }
.cm-card-main { flex: 1; min-width: 0; }
.cm-meta { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; margin: 0 0 .4rem; font-size: .9rem; color: var(--fog); }
.cm-cat { display: inline-flex; align-items: center; gap: .35rem; color: #fff; font-weight: 800; }
.cm-cat .icon { width: 1.05rem; height: 1.05rem; color: var(--hivis); }
.cm-body { margin: 0 0 .55rem; line-height: 1.45; overflow-wrap: anywhere; }
.cm-foot { display: flex; justify-content: space-between; gap: .8rem; margin: 0; color: var(--fog); font-size: .86rem; align-items: center; }
.cm-count { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; color: var(--mist); }
.cm-count .icon { width: 1rem; height: 1rem; }
.cm-linked { margin: .55rem 0 0; font-size: .86rem; color: var(--hivis); font-weight: 700; }
.cm-linked.big { display: block; padding: .7rem .9rem; border: 1px solid var(--hivis); border-radius: var(--r-sm); text-decoration: none; margin-top: .9rem; }
.cm-flagnote { margin: .5rem 0 0; color: #ff9b9b; font-size: .85rem; font-weight: 700; }
.cm-thumb { flex: none; width: 5.5rem; height: 5.5rem; object-fit: cover; border-radius: var(--r-sm); background: #0d1f3b; }
.cm-thumb-vid { display: grid; place-items: center; color: var(--fog); }
.cm-empty { padding: 2rem 1.2rem; text-align: center; background: var(--steel); border: 1px dashed var(--line); border-radius: var(--r-lg); }
.cm-pages { display: flex; justify-content: space-between; margin: 1.2rem 0; font-weight: 700; }
.cm-me { margin: 2rem 0 0; color: var(--fog); font-size: .9rem; text-align: center; }

/* Community: a post and its chat */
.cm-post-wrap { padding-top: 1.2rem; padding-bottom: 8rem; }
.cm-post { background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem 1.2rem; }
.cm-post-body { font-size: 1.08rem; line-height: 1.5; margin: .2rem 0 .9rem; overflow-wrap: anywhere; }
.cm-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .45rem; margin: 0 0 .9rem; }
.cm-gallery img, .cm-gallery video, .cm-msg-media img, .cm-msg-media video { width: 100%; border-radius: var(--r-sm); display: block; background: #000; }
.cm-gallery img { aspect-ratio: 1; object-fit: cover; }
.cm-gallery video { grid-column: 1 / -1; max-height: 70vh; }
.cm-processing { display: flex; align-items: center; gap: .5rem; padding: .9rem; border-radius: var(--r-sm); background: #0d1f3b; color: var(--fog); font-size: .9rem; grid-column: 1 / -1; }
.cm-badge { display: inline-block; padding: .1rem .45rem; border-radius: 4px; background: var(--hivis); color: var(--hivis-ink); font-size: .72rem; font-weight: 800; vertical-align: middle; }
.cm-admin { margin: .8rem 0 0; border: 1px dashed var(--hivis); border-radius: var(--r-lg); padding: .7rem 1rem; }
.cm-admin summary { cursor: pointer; font-weight: 800; color: var(--hivis); }
.cm-admin-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0; }
.cm-admin .btn { min-height: 2.6rem; padding: .5rem .9rem; font-size: .95rem; }
.cm-admin-case label { display: block; font-weight: 700; margin-bottom: .4rem; }
.cm-inline { display: flex; gap: .5rem; }
.cm-inline select { flex: 1; min-width: 0; font: inherit; color: var(--mist); background: var(--steel); border: 2px solid var(--line); border-radius: var(--r-sm); padding: .5rem; }
.cm-chat { margin-top: 1.4rem; }
.cm-chat-h { font-size: 1.1rem; margin: 0 0 .7rem; display: flex; gap: .5rem; align-items: center; }
.cm-chat-h span { color: var(--fog); font-weight: 600; }
.cm-msgs { display: grid; gap: .55rem; }
.cm-msg { background: #0f2241; border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; padding: .6rem .8rem; max-width: 92%; }
.cm-msg.mine { justify-self: end; background: #1b3762; border-radius: 12px 12px 4px 12px; }
.cm-msg.admin { border-color: var(--hivis); }
.cm-msg-head { display: flex; align-items: center; gap: .45rem; font-size: .85rem; margin-bottom: .2rem; }
.cm-msg-head strong { color: #fff; }
.cm-msg-head time { color: var(--fog); }
.cm-more { margin-left: auto; background: none; border: 0; color: var(--fog); font-size: 1.2rem; line-height: 1; padding: 0 .2rem; cursor: pointer; }
.cm-msg-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.cm-msg-media { display: grid; gap: .35rem; margin-top: .45rem; }
.cm-msg-media img { max-height: 22rem; object-fit: contain; }
.cm-chat-empty { color: var(--fog); }
.cm-composer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: rgba(10, 26, 51, .97); border-top: 1px solid var(--line);
  padding: .6rem 0 calc(.6rem + env(safe-area-inset-bottom)); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.cm-send { display: flex; gap: .5rem; align-items: flex-end; }
.cm-send textarea { flex: 1; min-height: 2.9rem; max-height: 10rem; resize: none; padding: .7rem .9rem; }
.cm-send .btn { min-height: 2.9rem; padding: .6rem 1rem; font-size: 1rem; }
.cm-attach { flex: none; width: 2.9rem; height: 2.9rem; display: grid; place-items: center; border: 2px solid var(--line); border-radius: var(--r-sm); cursor: pointer; color: var(--mist); }
.cm-attach input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cm-err { color: #ff9b9b; font-weight: 700; margin: 0 0 .45rem; font-size: .92rem; }
.cm-files { color: var(--hivis); font-size: .9rem; margin: 0 0 .45rem; }
.cm-locked { color: var(--fog); text-align: center; padding-bottom: 2rem; }
.cm-menu { position: absolute; z-index: 60; width: 220px; background: #0f2241; border: 1px solid var(--fog); border-radius: var(--r-sm); box-shadow: 0 10px 30px rgba(0,0,0,.5); overflow: hidden; }
.cm-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--mist); padding: .7rem .9rem; font: inherit; cursor: pointer; }
.cm-menu button:hover { background: var(--steel); }

/* Community: suspect case */
.cm-case-head { background: linear-gradient(160deg, #2a2200, #12284a 60%); border: 2px solid var(--hivis); border-radius: var(--r-lg); padding: 1.2rem 1.2rem 1rem; margin: 1.2rem 0; }
.cm-case-tag { display: inline-flex; align-items: center; gap: .4rem; margin: 0 0 .4rem; color: var(--hivis); font-weight: 800; font-size: .9rem; }
.cm-case-tag .icon { width: 1rem; height: 1rem; }
.cm-case-head h1 { font: 900 clamp(2rem, 6vw, 2.8rem)/1 var(--display); margin: 0 0 .6rem; color: #fff; }
.cm-case-sum { margin: 0 0 1rem; line-height: 1.5; }
.cm-case-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 0 0 .9rem; }
.cm-case-stats div { background: rgba(0,0,0,.25); border-radius: var(--r-sm); padding: .6rem .7rem; }
.cm-case-stats dt { color: var(--fog); font-size: .8rem; }
.cm-case-stats dd { margin: .15rem 0 0; font-weight: 800; color: #fff; }
.cm-case-note { margin: 0; font-size: .86rem; color: var(--fog); }
.cm-case-cta { margin: 0 0 1.6rem; }
.cm-timeline { list-style: none; margin: 0 0 1.6rem; padding: 0 0 0 1rem; border-left: 2px solid var(--hivis); display: grid; gap: .7rem; }
.cm-timeline a { display: grid; gap: .2rem; padding: .8rem 1rem; background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--mist); text-decoration: none; position: relative; }
.cm-timeline a::before { content: ""; position: absolute; left: calc(-1rem - 7px); top: 1.1rem; width: 12px; height: 12px; border-radius: 50%; background: var(--hivis); }
.cm-timeline time { color: var(--hivis); font-size: .85rem; font-weight: 700; }
.cm-timeline small { color: var(--fog); }

/* ===== Community v2: app layout, cards with big media, WhatsApp-style chat, profiles, alerts ===== */
body:has(.cm-tabs) { padding-bottom: 4.6rem; }
body:has(.cm-tabs) .cm-page, body:has(.cm-tabs) .cm-feed-wrap { padding-bottom: 2rem; }
.cm-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(10, 26, 51, .97); border-top: 1px solid var(--line); padding: .35rem 0 calc(.35rem + env(safe-area-inset-bottom));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.cm-tabs a { position: relative; display: grid; justify-items: center; gap: .15rem; color: var(--fog); text-decoration: none; font-size: .75rem; font-weight: 700; padding: .2rem 0; }
.cm-tabs a .icon { width: 1.45rem; height: 1.45rem; }
.cm-tabs a[aria-current="page"] { color: var(--mist); }
.cm-tabs a[aria-current="page"] .icon { color: var(--hivis); }
.cm-tab-new b { display: grid; place-items: center; width: 2.4rem; height: 1.6rem; border-radius: 8px; background: var(--hivis); color: var(--hivis-ink); font-size: 1.3rem; line-height: 1; }
.cm-tab-av { width: 1.55rem; height: 1.55rem; border-radius: 50%; object-fit: cover; }
.cm-tab-initial { display: grid; place-items: center; background: var(--line); color: var(--mist); font-size: .8rem; font-weight: 800; }
.cm-dot { position: absolute; top: -.1rem; left: calc(50% + .35rem); min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: 999px;
  background: var(--siren); color: #fff; font: 800 .7rem/1.15rem var(--body); text-align: center; font-style: normal; }

.cm-av { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; display: grid; place-items: center;
  background: #2a4a7a; color: #fff; font-weight: 800; font-size: 1.05rem; }
.cm-av.admin { background: var(--hivis); color: var(--hivis-ink); }
.cm-av.big { width: 5.5rem; height: 5.5rem; font-size: 2.2rem; }

.cm-theme { flex: none; width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line); background: none; color: var(--mist); cursor: pointer; }
.cm-theme .icon { width: 1.3rem; height: 1.3rem; }
.cm-moon { display: none; }
[data-theme="light"] .cm-sun { display: none; }
[data-theme="light"] .cm-moon { display: inline; }

.cm-newbar { position: sticky; top: calc(4.25rem + .6rem); z-index: 30; display: block; margin: 0 auto .8rem; padding: .6rem 1.1rem; border: 0; border-radius: 999px;
  background: var(--hivis); color: var(--hivis-ink); font: 800 .95rem var(--body); box-shadow: 0 6px 20px rgba(0,0,0,.35); cursor: pointer; }

/* Feed cards */
.cm-card { display: block; padding: 0; overflow: hidden; cursor: pointer; }
.cm-card-head { display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem .4rem; }
.cm-post .cm-card-head { padding: 0 0 .5rem; }
.cm-card-who { flex: 1; min-width: 0; display: grid; }
.cm-card-who strong { color: var(--mist); font-size: .98rem; }
.cm-card-who strong a { color: inherit; text-decoration: none; }
.cm-card-who span { color: var(--fog); font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-status { flex: none; padding: .2rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 800; background: #1f8a4c; color: #fff; }
.cm-status.s-police { background: #2563eb; }
.cm-card-link { display: block; padding: 0 1rem .7rem; color: var(--mist); text-decoration: none; }
.cm-card .cm-cat, .cm-post .cm-cat { display: flex; margin: 0 0 .3rem; font-size: .92rem; }
.cm-card .cm-body { margin: 0; }
.cm-cover { position: relative; background: #000; }
.cm-cover img, .cm-cover video { display: block; width: 100%; max-height: 26rem; object-fit: cover; }
.cm-play { position: absolute; inset: 0; margin: auto; width: 3.6rem; height: 3.6rem; border-radius: 50%; background: rgba(0,0,0,.55); pointer-events: none; transition: opacity .3s; }
.cm-play::after { content: ""; position: absolute; left: 1.45rem; top: 1.05rem; border-style: solid; border-width: .75rem 0 .75rem 1.2rem; border-color: transparent transparent transparent #fff; }
.cm-cover.playing .cm-play { opacity: 0; }
.cm-card > .cm-linked { display: block; padding: .6rem 1rem 0; margin: 0; text-decoration: none; }
.cm-card > .cm-flagnote { padding: 0 1rem; }
.cm-card-foot { display: flex; gap: .4rem; padding: .5rem .6rem; border-top: 1px solid var(--line); margin-top: .7rem; flex-wrap: wrap; }
.cm-post .cm-card-foot { margin: .9rem -1.2rem -1.1rem; padding: .5rem .8rem; }
.cm-card-foot form { margin: 0; }
.cm-act { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .7rem; border-radius: 999px; border: 0; background: none; color: var(--mist);
  font: 700 .95rem var(--body); text-decoration: none; cursor: pointer; }
.cm-act .icon { width: 1.1rem; height: 1.1rem; }
.cm-act small { color: var(--fog); font-weight: 600; }
.cm-act:hover { background: rgba(255,255,255,.06); }
.cm-act.on { background: rgba(255,212,0,.16); color: var(--hivis); }

/* Post page */
.cm-backrow { display: flex; justify-content: space-between; align-items: center; }
.cm-follow { display: inline-flex; align-items: center; gap: .35rem; border: 2px solid var(--line); background: none; color: var(--mist); border-radius: 999px; padding: .35rem .8rem; font: 700 .9rem var(--body); cursor: pointer; }
.cm-follow .icon { width: 1rem; height: 1rem; }
.cm-follow.on { border-color: var(--hivis); color: var(--hivis); }
.cm-original { margin: .2rem 0 .7rem; padding: .5rem .7rem; border-left: 3px solid var(--fog); color: var(--fog); font-size: .88rem; white-space: pre-wrap; }
.cm-edit-post textarea { margin-bottom: .5rem; }
.cm-edit-post .btn { min-height: 2.6rem; padding: .5rem 1rem; font-size: .95rem; }
.cm-status-form { display: flex; align-items: center; gap: .6rem; margin: 1.2rem 0 0; color: var(--fog); font-size: .9rem; }
.cm-status-form select { font: inherit; color: var(--mist); background: var(--steel); border: 2px solid var(--line); border-radius: var(--r-sm); padding: .35rem .5rem; }

/* Chat */
.cm-msgs { gap: .5rem; }
.cm-row { display: flex; gap: .5rem; align-items: flex-end; }
.cm-row .cm-av { width: 2rem; height: 2rem; font-size: .85rem; }
.cm-row.mine { justify-content: flex-end; }
.cm-row .cm-msg { max-width: min(82%, 30rem); justify-self: auto; }
.cm-row.flash .cm-msg { box-shadow: 0 0 0 3px var(--hivis); }
.cm-msg { padding: .5rem .75rem .35rem; }
.cm-name { color: #7cc4ff; font-weight: 800; text-decoration: none; }
.cm-msg.admin .cm-name { color: var(--hivis); }
.cm-quote { display: grid; width: 100%; text-align: left; margin: .1rem 0 .35rem; padding: .35rem .6rem; border: 0; border-left: 3px solid var(--hivis);
  border-radius: 6px; background: rgba(0,0,0,.25); color: var(--mist); font: inherit; font-size: .85rem; cursor: pointer; }
.cm-quote strong { color: var(--hivis); font-size: .8rem; }
.cm-quote span { color: var(--fog); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-gone { font-style: italic; color: var(--fog); }
.cm-mention { color: #7cc4ff; font-weight: 700; text-decoration: none; }
.cm-msg-foot { display: flex; justify-content: flex-end; gap: .4rem; margin-top: .15rem; font-size: .72rem; color: var(--fog); }
.cm-msg-head:empty { display: none; }
.cm-row.mine .cm-msg-head { justify-content: flex-end; margin: 0; height: 0; }
.cm-row.mine .cm-more { position: relative; top: -.15rem; }
.cm-people { display: flex; gap: .4rem; overflow-x: auto; margin: 0 0 .45rem; }
.cm-people button { display: inline-flex; align-items: center; gap: .4rem; flex: none; padding: .3rem .7rem .3rem .3rem; border-radius: 999px; border: 1px solid var(--line); background: var(--steel); color: var(--mist); font: 700 .9rem var(--body); cursor: pointer; }
.cm-people .cm-av { width: 1.6rem; height: 1.6rem; font-size: .75rem; }
.cm-replybar { display: flex; align-items: center; gap: .6rem; margin: 0 0 .45rem; padding: .45rem .7rem; border-left: 3px solid var(--hivis); border-radius: 6px; background: var(--steel); }
.cm-replybar.editing { border-left-color: #7cc4ff; }
.cm-replybar div { flex: 1; min-width: 0; display: grid; font-size: .85rem; }
.cm-replybar strong { color: var(--hivis); }
.cm-replybar span { color: var(--fog); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-replybar button { background: none; border: 0; color: var(--fog); font-size: 1.1rem; cursor: pointer; }
.cm-menu button.danger { color: #ff9b9b; }

/* Alerts */
.cm-notes { display: grid; gap: .5rem; }
.cm-note { display: flex; gap: .75rem; padding: .8rem .9rem; background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--mist); text-decoration: none; }
.cm-note.unread { border-color: var(--hivis); }
.cm-note p { margin: 0 0 .2rem; }
.cm-note-where { color: var(--fog); }
.cm-note-text { color: var(--fog); font-size: .92rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cm-note time { color: var(--fog); font-size: .8rem; }

/* Profiles */
.cm-profile { text-align: center; padding: 1.5rem 0 1rem; display: grid; justify-items: center; }
.cm-profile h1 { font: 900 2.2rem/1 var(--display); margin: .7rem 0 .3rem; color: var(--mist); }
.cm-profile-meta { margin: 0; color: var(--fog); }
.cm-profile-about { margin: .7rem 0 0; max-width: 28rem; }
.cm-profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; width: 100%; margin: 1.2rem 0 .5rem; }
.cm-profile-stats div { background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem; }
.cm-profile-stats dt { color: var(--fog); font-size: .8rem; }
.cm-profile-stats dd { margin: .1rem 0 0; font-weight: 800; font-size: 1.3rem; }
.cm-mini { display: grid; gap: .2rem; padding: .8rem 1rem; background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--mist); text-decoration: none; }
.cm-mini small { color: var(--fog); }
.cm-avatar-pick { display: flex; align-items: center; gap: 1rem; margin: .5rem 0 .4rem; }
.cm-me-name { font-weight: 800; font-size: 1.2rem; margin: 0 0 .5rem; }
.cm-pick-btn { min-height: 2.6rem; padding: .5rem 1rem; font-size: .95rem; }
.cm-remove { margin-top: .5rem; font-size: .9rem; }
.cm-profile-form { margin-bottom: 1.5rem; }

/* ===== Light mode (community pages) ===== */
[data-theme="light"] { --night: #eef2f7; --steel: #ffffff; --line: #d4dce8; --mist: #15233b; --fog: #5b6b84; color-scheme: light; }
[data-theme="light"] a, [data-theme="light"] .cm-linked, [data-theme="light"] .cm-cases-h, [data-theme="light"] .cm-case-tag,
[data-theme="light"] .cm-timeline time, [data-theme="light"] .cm-admin summary, [data-theme="light"] .cm-quote strong,
[data-theme="light"] .cm-replybar strong, [data-theme="light"] .cm-msg.admin .cm-name, [data-theme="light"] .cm-act.on,
[data-theme="light"] .cm-follow.on, [data-theme="light"] .head-nav a[aria-current="page"]:not(.head-report) { color: #7a5b00; }
[data-theme="light"] .cm-cat .icon, [data-theme="light"] .back-bar a .icon, [data-theme="light"] .cm-tabs a[aria-current="page"] .icon { color: #b38600; }
[data-theme="light"] .site-head, [data-theme="light"] .back-bar, [data-theme="light"] .cm-composer, [data-theme="light"] .cm-tabs { background: rgba(255,255,255,.95); }
[data-theme="light"] .back-bar a { color: var(--mist); }
[data-theme="light"] .cm-case, [data-theme="light"] .cm-case-head { background: linear-gradient(135deg, #fff6cc, #fff 70%); color: var(--mist); }
[data-theme="light"] .cm-case strong, [data-theme="light"] .cm-case-head h1, [data-theme="light"] .cm-case-stats dd, [data-theme="light"] .cm-h1,
[data-theme="light"] .cm-chat-h, [data-theme="light"] .cm-msg-head strong { color: var(--mist); }
[data-theme="light"] .cm-case-stats div { background: rgba(0,0,0,.05); }
[data-theme="light"] .cm-msg { background: #fff; }
[data-theme="light"] .cm-row.mine .cm-msg { background: #fff4c2; border-color: #f0d870; }
[data-theme="light"] .cm-name, [data-theme="light"] .cm-mention { color: #1d5fbf; }
[data-theme="light"] .cm-quote { background: rgba(0,0,0,.05); }
[data-theme="light"] .cm-menu { background: #fff; }
[data-theme="light"] .cm-menu button:hover { background: #f1f4f9; }
[data-theme="light"] .cm-processing { background: #e7ecf4; }
[data-theme="light"] .cm-av { background: #c8d6ea; color: #15233b; }
[data-theme="light"] .cm-av.admin { background: var(--hivis); }
[data-theme="light"] .cm-chip.on { background: var(--mist); color: #fff; }
[data-theme="light"] .cm-act:hover { background: rgba(0,0,0,.05); }
[data-theme="light"] .cm-tab-initial { background: #c8d6ea; }
[data-theme="light"] .cm-err, [data-theme="light"] .cm-flagnote, [data-theme="light"] .errorlist { color: #c62828; }
[data-theme="light"] .site-foot { background: #e4e9f1; }
.cm-row a, .cm-card-head a { text-decoration: none; }
.cm-page > .cm-top { padding-top: 1.5rem; }
[data-theme="light"] .brand, [data-theme="light"] .cm-card-link, [data-theme="light"] .cm-chip:not(.on), [data-theme="light"] .cm-act,
[data-theme="light"] .head-nav a:not(.head-report):not([aria-current="page"]), [data-theme="light"] .cm-note, [data-theme="light"] .cm-mini,
[data-theme="light"] .cm-timeline a, [data-theme="light"] .cm-tabs a { color: var(--mist); }
[data-theme="light"] .cm-tabs a:not([aria-current="page"]) { color: var(--fog); }
[data-theme="light"] .cm-act.on { color: #7a5b00; }
[data-theme="light"] .head-today, [data-theme="light"] .head-today * { color: var(--mist) !important; }
[data-theme="light"] .cm-cat { color: var(--mist); }

/* ===== Intelligence: pin maps, sightings, maps, reactions ===== */
input[type=date], input[type=time] { font: inherit; color: var(--mist); background: var(--steel); border: 2px solid var(--line); border-radius: var(--r-sm); padding: .75rem .8rem; color-scheme: dark; }
[data-theme="light"] input[type=date], [data-theme="light"] input[type=time] { color-scheme: light; }
.cm-when { display: grid; grid-template-columns: 1.4fr 1fr; gap: .5rem; }
.cm-seg { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.cm-seg label { position: relative; }
.cm-seg input { position: absolute; opacity: 0; pointer-events: none; }
.cm-seg span { display: inline-block; padding: .5rem .85rem; border-radius: 999px; border: 2px solid var(--line); font-weight: 700; font-size: .92rem; cursor: pointer; }
.cm-seg input:checked + span { background: var(--hivis); border-color: var(--hivis); color: var(--hivis-ink); }
.cm-seg input:focus-visible + span { outline: 3px solid var(--hivis); outline-offset: 2px; }
.cm-seg-wrap { margin: 0 0 .7rem; }
.cm-two { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.cm-place-row { margin-top: .6rem; }
.cm-place-row select { flex: 0 0 6rem; }
.cm-place-row input { flex: 1; min-width: 0; }
.cm-source { margin: 0 0 1.2rem; padding: .6rem .8rem; border-left: 3px solid var(--hivis); background: var(--steel); border-radius: 6px; white-space: pre-wrap; }
.pm-search { display: flex; gap: .5rem; }
.pm-search input { flex: 1; min-width: 0; }
.pm-search .btn { flex: none; min-height: auto; padding: .5rem .8rem; font-size: .9rem; }
.pm-results { display: grid; margin-top: .3rem; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.pm-results button { text-align: left; padding: .65rem .8rem; border: 0; border-bottom: 1px solid var(--line); background: var(--steel); color: var(--mist); font: inherit; cursor: pointer; }
.pm-map { height: 18rem; margin-top: .6rem; border-radius: var(--r-sm); border: 2px solid var(--line); z-index: 0; }
.pm-map.has-pin { border-color: var(--hivis); }
.leaflet-container { font: inherit; background: #d9dee6; }
.leaflet-popup-content { color: #15233b; margin: .6rem .8rem; line-height: 1.35; }
.leaflet-popup-content strong { display: block; margin-bottom: .2rem; }
.leaflet-popup-content a { color: #1d5fbf; font-weight: 700; }
.im-num { display: grid !important; place-items: center; border-radius: 50%; background: var(--hivis); color: var(--hivis-ink); font: 800 .85rem/1 var(--body);
  border: 2px solid #1a1400; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.im-num.other { background: #3b82f6; color: #fff; border-color: #0b2a66; }
.im-num.checked { box-shadow: 0 0 0 3px #1f8a4c, 0 2px 6px rgba(0,0,0,.4); }
.im-crime { border-radius: 50%; background: #ff3b3b; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.45); }
.im-crime.this { background: #d10000; box-shadow: 0 0 0 4px rgba(255,59,59,.35), 0 2px 6px rgba(0,0,0,.45); }
.cm-intel-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin: 0 0 1.4rem; }
.cm-intel-actions .btn { min-height: 2.9rem; padding: .6rem 1.1rem; font-size: 1rem; }
.im-sec { margin: 0 0 1.8rem; }
.im-sec h2 { font-size: 1.2rem; margin: 0 0 .3rem; display: flex; gap: .5rem; align-items: baseline; }
.im-sec h2 span { color: var(--fog); font-weight: 600; font-size: 1rem; }
.im-sec .hint { margin: 0 0 .6rem; }
.im-map { height: 20rem; border-radius: var(--r-lg); border: 1px solid var(--line); z-index: 0; }
.im-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.im-timeline li { display: flex; gap: .7rem; padding: .75rem .9rem; background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-sm); }
.im-timeline li > div { min-width: 0; }
.im-n { flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--hivis); color: var(--hivis-ink); font-weight: 800; font-size: .85rem; }
.im-timeline li.other .im-n { background: #3b82f6; color: #fff; }
.im-timeline time { color: var(--hivis); font-weight: 700; font-size: .85rem; }
.im-timeline strong { display: block; }
.im-timeline p { margin: .2rem 0; overflow-wrap: anywhere; }
.im-timeline small { color: var(--fog); }
.im-check { margin: .2rem 0 0; }
.im-check .linkish { padding: 0; font-size: .85rem; }
.im-plates { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.im-plate { display: inline-block; padding: .15rem .5rem; border-radius: 4px; background: #ffd400; color: #111; font: 800 .95rem/1.3 "Arial Narrow", Arial, sans-serif; letter-spacing: .06em; border: 1px solid #111; }
.im-hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; align-items: end; height: 7rem; padding-bottom: 1.2rem; position: relative; }
.im-hour { height: 100%; display: flex; align-items: flex-end; position: relative; }
.im-hour i { display: block; width: 100%; min-height: 2px; background: var(--hivis); border-radius: 3px 3px 0 0; }
.im-hour span { position: absolute; bottom: -1.2rem; left: 0; font-size: .7rem; color: var(--fog); white-space: nowrap; }
.cm-allmedia { display: grid; gap: 1rem; }
.cm-allmedia figure { margin: 0; }
.cm-allmedia img, .cm-allmedia video { width: 100%; border-radius: var(--r-sm); background: #000; display: block; max-height: 75vh; object-fit: contain; }
.cm-allmedia figcaption { color: var(--fog); font-size: .85rem; margin-top: .35rem; }
.cm-backtools { display: flex; gap: .5rem; align-items: center; }
.cm-kebab { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 2px solid var(--line); background: none; color: var(--mist); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.cm-post-menu { width: 260px; }
.cm-post-menu a, .cm-post-menu button { display: block; width: 100%; text-align: left; padding: .8rem 1rem; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--mist); font: inherit; text-decoration: none; cursor: pointer; }
.cm-addmedia { margin: 0 0 .5rem; }
.cm-addmedia label { cursor: pointer; padding-left: 0; }
.cm-mitem { position: relative; }
.cm-mitem.is-hidden { opacity: .5; }
.cm-mremove { position: absolute; top: .4rem; right: .4rem; padding: .3rem .6rem; border-radius: 999px; border: 0; background: rgba(0,0,0,.7); color: #fff; font: 700 .8rem var(--body); cursor: pointer; }
.cm-mnote { display: block; font-size: .78rem; color: #ff9b9b; margin-top: .2rem; }
.cm-gallery .cm-mitem:has(video) { grid-column: 1 / -1; }
.cm-gif { max-width: 14rem; border-radius: var(--r-sm); }
.cm-attach { text-decoration: none; font-size: 1.2rem; }
.cm-sight { display: grid; gap: .15rem; margin: .1rem 0 .35rem; padding: .6rem .7rem; border-radius: 8px; border: 1px solid var(--hivis); background: rgba(255,212,0,.08); color: var(--mist); text-decoration: none; }
.cm-sight.checked { border-color: #1f8a4c; }
.cm-sight-tag { color: var(--hivis); font-weight: 800; font-size: .8rem; }
.cm-sight-when { color: var(--hivis); font-weight: 700; font-size: .88rem; }
.cm-sight small { color: var(--fog); }
.cm-sight .im-plate { justify-self: start; margin: .15rem 0; }
.cm-sight-link { text-decoration: underline; }
.cm-reacts { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.cm-react { padding: .1rem .5rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,.2); color: var(--mist); font: 600 .85rem var(--body); cursor: pointer; }
.cm-react.on { border-color: var(--hivis); }
.cm-react:disabled { cursor: default; }
.cm-menu-emoji { display: flex; justify-content: space-around; padding: .4rem; border-bottom: 1px solid var(--line); }
.cm-menu .cm-menu-emoji button { width: auto; border: 0; padding: .3rem .4rem; font-size: 1.45rem; border-radius: 8px; }
.cm-menu .cm-menu-emoji button.on { background: rgba(255,212,0,.2); }
[data-theme="light"] .cm-sight { background: #fffbe6; }
[data-theme="light"] .cm-sight-tag, [data-theme="light"] .cm-sight-when, [data-theme="light"] .im-timeline time { color: #7a5b00; }
[data-theme="light"] .cm-react { background: #f1f4f9; }
[data-theme="light"] .cm-post-menu a, [data-theme="light"] .cm-post-menu button { color: var(--mist); }
.pm-pin { background: none; border: 0; }
.pm-pin span { position: absolute; left: 4px; top: 0; width: 36px; height: 36px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--hivis); border: 3px solid #1a1400; box-shadow: 0 4px 10px rgba(0,0,0,.45); }
.pm-pin span::after { content: ""; position: absolute; left: 10px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: #1a1400; }
.pm-pin::after { content: ""; position: absolute; left: 16px; bottom: 0; width: 12px; height: 5px; border-radius: 50%; background: rgba(0,0,0,.35); }
.leaflet-dragging .pm-pin span { transform: rotate(-45deg) scale(1.1); }
.pm-pin, .pm-head { background: none; border: 0; }
.pm-pin svg { width: 40px; height: 52px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.45)); }
.pm-head svg { width: 32px; height: 32px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.pm-arrow { background: none; border: 0; }
.pm-arrow span { display: block; width: 22px; height: 22px; line-height: 22px; text-align: center; color: #2563eb; font-size: 18px; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.pm-map { height: 20rem; }
.pm-map.setting-head { cursor: crosshair; outline: 3px solid #2563eb; }
.pm-headrow { margin-top: .9rem; }
.pm-headrow > label { display: block; font-weight: 700; margin-bottom: .4rem; }
.pm-headrow .linkish { font-size: .9rem; padding: .3rem 0; }
.im-heading { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.im-heading li { display: flex; justify-content: space-between; padding: .55rem .8rem; background: var(--steel); border: 1px solid var(--line); border-left: 4px solid #2563eb; border-radius: var(--r-sm); }
.im-heading span { color: var(--fog); }
.cm-mediatools { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 .2rem; }
.cm-mediatools form { margin: 0; }
.cm-mediatools label { cursor: pointer; }
.cm-mediatime { margin: 0 0 .6rem; }
.cm-editmedia { margin: .2rem 0 .8rem; padding: .8rem; border: 1px dashed var(--line); border-radius: var(--r-sm); display: grid; gap: .6rem; }
.cm-editmedia-h { margin: 0; font-weight: 800; }
.cm-editrow { display: flex; align-items: center; gap: .6rem; }
.cm-editrow img, .cm-editthumb { width: 3.4rem; height: 3.4rem; object-fit: cover; border-radius: 6px; flex: none; background: #000; display: grid; place-items: center; color: var(--fog); }
.cm-editlabel { flex: 1; min-width: 0; font-weight: 700; }
.cm-editrow form { margin: 0; }
.cm-editrow .btn { min-height: 2.4rem; padding: .4rem .75rem; font-size: .9rem; cursor: pointer; }
.cm-del { color: #ff9b9b; }
[data-theme="light"] .cm-del { color: #c62828; }
/* Photo/video slider */
.cm-carousel { position: relative; }
.cm-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cm-track::-webkit-scrollbar { display: none; }
.cm-slide { position: relative; flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; background: #000; }
.cm-cover .cm-slide img, .cm-cover .cm-slide video { width: 100%; max-height: 26rem; object-fit: cover; display: block; }
.cm-postcar { border-radius: var(--r-sm); overflow: hidden; margin: 0 0 .9rem; grid-column: 1 / -1; }
.cm-postcar .cm-slide img, .cm-postcar .cm-slide video { width: 100%; max-height: 70vh; object-fit: contain; display: block; border-radius: 0; }
.cm-postcar .cm-slide > a { display: block; width: 100%; }
.cm-postcar .cm-slide .cm-processing { width: 100%; margin: 0; min-height: 8rem; justify-content: center; }
#post-media { display: block; }
.cm-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 2px solid rgba(255,255,255,.85);
  background: rgba(0,0,0,.6); color: #fff; font: 700 1.7rem/1 var(--body); display: grid; place-items: center; cursor: pointer; z-index: 2; padding: 0 0 .2rem; }
.cm-arrow.prev { left: .5rem; }
.cm-arrow.next { right: .5rem; }
.cm-count-badge { position: absolute; top: .55rem; right: .55rem; padding: .2rem .55rem; border-radius: 999px; background: rgba(0,0,0,.7); color: #fff; font: 800 .85rem var(--body); z-index: 2; }
.cm-dots { position: absolute; bottom: .55rem; left: 0; right: 0; display: flex; justify-content: center; gap: .35rem; z-index: 2; pointer-events: none; }
.cm-dots i { width: .5rem; height: .5rem; border-radius: 50%; background: rgba(255,255,255,.5); box-shadow: 0 0 2px rgba(0,0,0,.6); }
.cm-dots i.on { background: #fff; width: 1.1rem; border-radius: 999px; }
.cm-newmedia { position: absolute; top: .55rem; left: .55rem; padding: .25rem .6rem; border-radius: 999px; background: var(--hivis); color: var(--hivis-ink); font: 800 .8rem var(--body); z-index: 2; }
.cm-cover .cm-play { z-index: 1; }
.cm-slide.playing > .cm-play { opacity: 0; }
.cm-sight-by { color: var(--mist) !important; font-weight: 700; }
.im-edit { display: inline-block; margin-top: .25rem; font-size: .85rem; font-weight: 700; }
/* Feed media: show the whole photo or video (no zoom/crop), letterboxed on black */
.cm-cover .cm-slide { height: min(28rem, 80vw); }
.cm-cover .cm-slide img, .cm-cover .cm-slide video { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.cm-badge { color: var(--hivis-ink) !important; }
/* Message options button: bigger, visible, with room around it */
.cm-more { display: grid; place-items: center; width: 1.9rem; height: 1.6rem; padding: 0; margin-left: auto; border-radius: 999px;
  background: rgba(255,255,255,.1); color: var(--mist); font-size: 1.15rem; font-weight: 800; line-height: 1; letter-spacing: .05em; }
.cm-more:hover { background: rgba(255,255,255,.2); }
.cm-row.mine .cm-msg-head { height: auto; margin: 0 0 .35rem; justify-content: flex-end; }
.cm-row.mine .cm-more { position: static; }
.cm-msg-head { margin-bottom: .3rem; }
.cm-msg { padding: .55rem .8rem .45rem; }
[data-theme="light"] .cm-more { background: rgba(0,0,0,.07); }
[data-theme="light"] .cm-more:hover { background: rgba(0,0,0,.14); }
.cm-emoji { font-size: 1.8em; line-height: 1; vertical-align: -0.2em; }
.cm-emoji-only { font-size: 2.8rem; line-height: 1.15; }
.cm-react { font-size: 1.05rem; padding: .15rem .6rem; }
.cm-msg { -webkit-touch-callout: none; }
.cm-menu.wide { width: min(22rem, calc(100vw - 16px)); }
.cm-emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.6rem, 1fr)); gap: .15rem; padding: .5rem; max-height: 18rem; overflow-y: auto; }
.cm-menu .cm-emoji-grid button { width: auto; border: 0; padding: .3rem 0; font-size: 1.55rem; text-align: center; border-radius: 8px; }
.cm-menu .cm-emoji-grid button.on { background: rgba(255,212,0,.2); }
.cm-menu .cm-menu-emoji .cm-emoji-more { font-size: 1.3rem; font-weight: 800; color: var(--mist); width: 2.2rem; height: 2.2rem; border-radius: 50%; background: rgba(255,255,255,.12); padding: 0; }
[data-theme="light"] .cm-menu .cm-menu-emoji .cm-emoji-more { background: rgba(0,0,0,.08); }
.cm-menu { width: 268px; }
.cm-menu-emoji { flex-wrap: wrap; gap: .1rem; justify-content: space-between; }
.cm-menu .cm-menu-emoji button { font-size: 1.35rem; padding: .25rem .2rem; }
.cm-menu .cm-menu-emoji button.cm-emoji-more { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; padding: 0; text-align: center; line-height: 1; font-size: 1.4rem; align-self: center; }
/* Reactions sit on the bottom edge of the bubble, like WhatsApp */
.cm-msg { position: relative; }
.cm-row.has-reacts { margin-bottom: 1rem; }
.cm-reacts { position: absolute; bottom: -1rem; left: .7rem; margin: 0; gap: .25rem; z-index: 1; }
.cm-row.mine .cm-reacts { left: auto; right: .7rem; }
.cm-react { padding: .1rem .5rem; background: var(--steel); border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(0,0,0,.25); font-size: 1rem; }
.cm-react.on { border-color: var(--hivis); }
.cm-row.has-reacts .cm-msg-foot { margin-bottom: .45rem; }
[data-theme="light"] .cm-react { background: #fff; }
/* Watchful eye: red, flashing like the live dot */
.watch-eye { position: relative; display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; color: #ff3b3b; flex: none; }
.watch-eye svg { width: 100%; height: 100%; animation: eye-blink 1.6s ease-in-out infinite; }
.watch-eye::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid #ff3b3b; opacity: 0; animation: live-ping 1.6s ease-out infinite; }
@keyframes eye-blink { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .watch-eye svg, .watch-eye::after { animation: none; } }
.cm-post-menu a.cm-intel-link { display: flex; align-items: center; gap: .6rem; }
.cm-intel-h1 { display: flex; align-items: center; gap: .6rem; }
.cm-intel-h1 .watch-eye { width: 2.6rem; height: 2.6rem; }
.cm-newcase { margin-top: 1rem; }
.cm-newcase summary { cursor: pointer; font-weight: 800; color: var(--hivis); }
[data-theme="light"] .cm-newcase summary { color: #7a5b00; }
.cm-newcase form { display: grid; gap: .5rem; margin-top: .7rem; }
.cm-newcase label { font-weight: 700; }
.cm-newcase .btn { min-height: 2.8rem; font-size: 1rem; }
.cm-num { color: var(--hivis); font-weight: 800; margin-right: .2rem; }
[data-theme="light"] .cm-num { color: #7a5b00; }
.cm-appeal { margin: 1rem 0 0; padding: 1rem 1.1rem; border-radius: var(--r-lg); border: 2px solid #ff3b3b; background: rgba(255,59,59,.08); }
.cm-appeal-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; font-size: 1.08rem; color: var(--mist); }
.cm-siren { font-size: 1.6rem; line-height: 1; animation: siren-flash 1s steps(2, start) infinite; }
@keyframes siren-flash { 0% { opacity: 1; transform: scale(1.08); } 50% { opacity: .25; transform: scale(.95); } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cm-siren { animation: none; } }
.cm-appeal p { margin: 0 0 .55rem; line-height: 1.5; }
.cm-appeal-why { color: var(--mist); font-weight: 700; }
.cm-appeal-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .7rem 0 .5rem; }
.cm-appeal-actions .btn { min-height: 2.7rem; padding: .5rem 1rem; font-size: .95rem; }
.cm-appeal-note { color: var(--fog); font-size: .85rem; margin: 0 !important; }
[data-theme="light"] .cm-appeal { background: #fff1f1; }
.cm-linkedbox { margin-top: 1rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
.cm-linkedbox p { margin: 0 0 .3rem; }
.cm-admin-case input[type=text] { flex: 1; min-width: 0; }
/* Camera appeal: compact */
.cm-appeal { margin: .8rem 0 0; padding: .75rem .9rem; border-width: 1.5px; font-size: .92rem; }
.cm-appeal-head { display: block; font-weight: 800; font-size: .98rem; margin: 0 0 .3rem !important; }
.cm-appeal p { margin: 0 0 .35rem; line-height: 1.45; }
.cm-appeal-why { font-weight: 700; font-size: .9rem; }
.cm-appeal-actions { margin: .5rem 0 0; gap: .4rem; flex-wrap: nowrap; }
.cm-appeal-actions .btn { min-height: 2.3rem; padding: .35rem .8rem; font-size: .88rem; box-shadow: 0 3px 0 #b39500; }
.cm-appeal-actions .btn-quiet { box-shadow: none; }
.cm-fact { border-color: #2563eb; background: rgba(37,99,235,.08); margin: 0 0 1.4rem; }
[data-theme="light"] .cm-fact { background: #eef4ff; }
/* Header on phones: logo only, so the links have room */
@media (max-width: 560px) {
  .site-head .brand-name { display: none; }
  .head-nav { gap: .9rem; }
}

/* Header: Home is a house button, Community is a blue chat pill */
.head-nav a.nav-home { display: inline-flex; align-items: center; gap: .4rem; }
.nav-home .icon { width: 1.25rem; height: 1.25rem; }
.head-community { display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .8rem;
  border: 2px solid var(--hivis); color: #fff !important; border-radius: 999px; font-weight: 800; white-space: nowrap; }
.head-community .icon { width: 1.05rem; height: 1.05rem; color: var(--hivis); }
.head-community:hover { background: rgba(255,212,0,.12); }
.head-community[aria-current="page"] { background: rgba(255,212,0,.16); }
@media (max-width: 560px) {
  .nav-home .nav-label { display: none; }
  .head-nav a.nav-home { width: 2.3rem; height: 2.3rem; justify-content: center; border-radius: 50%;
    background: rgba(255,255,255,.08); color: #fff; }
  .head-nav { gap: .5rem; }
  .head-community { padding: .36rem .65rem; font-size: .92rem; }
}
@media (max-width: 340px) { .head-community .icon { display: none; } }
@media (max-width: 390px) {
  .site-head .wrap { gap: .35rem; padding-left: .6rem; padding-right: .6rem; }
  .brand img { width: 30px; height: 30px; }
  .head-nav { gap: .35rem; font-size: .85rem; }
  .head-nav a.nav-home { width: 2rem; height: 2rem; }
  .head-community, .head-today { padding: .32rem .55rem !important; font-size: .85rem; }
  .head-nav a.head-report { padding: .38rem .55rem; }
}
[data-theme="light"] .head-nav a.nav-home { background: #eef1f6; color: #0a1a33; }
[data-theme="light"] .head-community, [data-theme="light"] .head-nav a.head-community { color: var(--mist) !important; }

/* ---- Compact WhatsApp-style chat ------------------------------------------------- */
.cm-chat-list, #chat { gap: .3rem; }
.cm-row .cm-msg { padding: .32rem .6rem .28rem; border-radius: 10px 10px 10px 3px; }
.cm-row.mine .cm-msg { border-radius: 10px 10px 3px 10px; }
.cm-msg-body { line-height: 1.32; font-size: .98rem; }
.cm-msg-head { margin-bottom: .1rem; font-size: .8rem; }
/* Options live behind press-and-hold now; computers get the ⋯ on hover */
.cm-more { display: none !important; }
@media (hover: hover) and (pointer: fine) {
  .cm-msg:hover .cm-more { display: grid !important; position: absolute; top: .2rem; right: .3rem; width: 1.6rem; height: 1.3rem;
    font-size: 1rem; background: var(--steel); z-index: 2; }
}
.cm-row.mine .cm-msg-head { display: none; }
/* Time sits on the last line of text, like WhatsApp */
.cm-msg.inline-time .cm-msg-body::after { content: ""; display: inline-block; width: 3.3rem; height: 1px; }
.cm-msg.inline-time.was-edited .cm-msg-body::after { width: 5.4rem; }
.cm-msg.inline-time .cm-msg-foot { position: absolute; right: .6rem; bottom: .22rem; margin: 0 !important; line-height: 1.2; }
.cm-row.has-reacts .cm-msg.inline-time { padding-bottom: .75rem; }
.cm-row.has-reacts .cm-msg.inline-time .cm-msg-foot { bottom: .7rem; }
.cm-row.has-reacts { margin-bottom: .85rem; }
.cm-row .cm-av { width: 1.7rem; height: 1.7rem; font-size: .75rem; }
/* Selected message + slim action bar at the top */
.cm-msg.selected { box-shadow: 0 0 0 2px var(--hivis); }
.cm-row:has(.cm-msg.selected) { background: rgba(255,212,0,.08); border-radius: 8px; }
.cm-msgbar { position: fixed; top: 0; left: 0; right: 0; z-index: 70; display: flex; align-items: center; gap: .2rem;
  padding: .35rem .5rem; padding-top: calc(.35rem + env(safe-area-inset-top)); background: var(--night); border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.cm-msgbar[hidden] { display: none; }
.cm-msgbar-who { flex: 1; min-width: 0; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: .3rem; }
.cm-msgbar-btn { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 0; border-radius: 50%; background: none; color: var(--mist); cursor: pointer; }
.cm-msgbar-btn:hover, .cm-msgbar-btn:focus-visible { background: rgba(255,255,255,.1); }
.cm-msgbar-btn svg { width: 1.35rem; height: 1.35rem; }
.cm-msgbar-btn.danger { color: #ff9b9b; }
.cm-menu.float { width: auto; border-radius: 999px; border-color: var(--line); }
.cm-menu.float .cm-menu-emoji { flex-wrap: nowrap; border: 0; padding: .25rem .45rem; gap: .05rem; }
.cm-menu.float.wide { border-radius: var(--r-sm); }
[data-theme="light"] .cm-msgbar { background: #fff; }
[data-theme="light"] .cm-msgbar-who { color: var(--mist); }
[data-theme="light"] .cm-msgbar-btn:hover { background: rgba(0,0,0,.07); }
[data-theme="light"] .cm-row:has(.cm-msg.selected) { background: rgba(255,212,0,.18); }
/* Slimmer composer */
.cm-send textarea { min-height: 2.5rem; padding: .5rem .8rem; }
.cm-send .btn { min-height: 2.5rem; padding: .45rem .9rem; }
.cm-send .cm-attach { width: 2.5rem; height: 2.5rem; }
.cm-send .btn { box-shadow: none; }

/* Holding a message shows our menu, not the phone's Copy/Translate/Select all */
.cm-msg, .cm-msg * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.cm-msg a, .cm-msg img, .cm-msg video { -webkit-user-drag: none; }
/* Reactions bottom-left on every bubble, so they never cover the time */
.cm-reacts { flex-wrap: nowrap; white-space: nowrap; }
.cm-react { white-space: nowrap; }
.cm-row.mine .cm-reacts { left: .7rem; right: auto; }
.cm-row.has-reacts .cm-msg { padding-bottom: .6rem; }
.cm-row.has-reacts .cm-msg.inline-time .cm-msg-foot { bottom: .5rem; }
.cm-row.has-reacts .cm-msg { min-width: 5.5rem; }
.cm-composer { transition: transform .12s ease-out; will-change: transform; }
/* Get the app banner */
.cm-app { display: flex; align-items: center; gap: .7rem; margin: .8rem auto 0; max-width: 46rem; width: calc(100% - 1.5rem);
  padding: .6rem .7rem; background: var(--steel); border: 1px solid var(--hivis); border-radius: var(--r-sm); }
.cm-app img { border-radius: 10px; flex: none; }
.cm-app div { flex: 1; min-width: 0; display: grid; gap: .1rem; font-size: .88rem; color: var(--fog); }
.cm-app strong { color: #fff; font-size: .95rem; }
.cm-app .btn { padding: .45rem .8rem; min-height: 0; font-size: .9rem; box-shadow: none; }
.cm-app-x { background: none; border: 0; color: var(--fog); font-size: 1.1rem; cursor: pointer; padding: .3rem; }
[data-theme="light"] .cm-app { background: #fff; }
[data-theme="light"] .cm-app strong { color: var(--mist); }
.cm-msg-body.cm-emoji-only { font-size: 2.6rem; line-height: 1.1; }

/* ---- WhatsApp colours in the chat -------------------------------------------------- */
body:has(.cm-composer) { background: #0b141a; }
body:has(.cm-composer) .cm-composer { background: rgba(11,20,26,.97); }
.cm-row .cm-msg { background: #202c33; border: 0; color: #e9edef; box-shadow: 0 1px .5px rgba(0,0,0,.25); }
.cm-row.mine .cm-msg, .cm-row.mine .cm-msg.admin { background: #005c4b; border: 0; }
.cm-row .cm-msg.admin:not(.mine) { border: 0; }
.cm-row .cm-msg-foot { color: rgba(233,237,239,.6); }
.cm-row .cm-msg-body { color: #e9edef; }
.cm-row .cm-name { color: #53bdeb; }
.cm-row .cm-msg.admin .cm-name { color: var(--hivis); }
.cm-react, .cm-row .cm-react { background: #202c33; border: 2px solid #0b141a; box-shadow: none; color: #e9edef; padding: .05rem .45rem; font-size: .95rem; }
.cm-react.on { border-color: #0b141a; background: #2a3942; }
.cm-row .cm-quote { background: rgba(0,0,0,.18); border-left: 4px solid #53bdeb; }
.cm-row.mine .cm-quote { border-left-color: #06cf9c; }
.cm-msg.selected { box-shadow: 0 0 0 2px #06cf9c; }
.cm-row:has(.cm-msg.selected) { background: rgba(6,207,156,.12); }
.cm-send .btn-go, #send-btn { background: #00a884; color: #fff; border-color: #00a884; }
.cm-send textarea { background: #2a3942; border-color: #2a3942; color: #e9edef; border-radius: 1.4rem; }
.cm-send textarea:focus { border-color: #00a884; outline: none; }
.cm-send .cm-attach { border: 0; background: #2a3942; border-radius: 50%; }
.cm-send #send-btn { border-radius: 1.4rem; }
/* Unread divider and the ↓ button */
.cm-unread { display: flex; justify-content: center; margin: .5rem -1rem; padding: .3rem; background: rgba(0,0,0,.25); }
.cm-unread span { background: #182229; color: #e9edef; font-size: .8rem; font-weight: 700; padding: .25rem .8rem; border-radius: 8px; }
.cm-down { position: fixed; right: .9rem; bottom: 5.4rem; z-index: 55; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0;
  display: grid; place-items: center; background: #202c33; color: #e9edef; box-shadow: 0 2px 8px rgba(0,0,0,.4); cursor: pointer; }
.cm-down[hidden] { display: none; }
.cm-down svg { width: 1.3rem; height: 1.3rem; }
.cm-down b { position: absolute; top: -.35rem; right: -.2rem; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 999px;
  background: #00a884; color: #fff; font-size: .72rem; line-height: 1.25rem; text-align: center; }
.cm-down b[hidden] { display: none; }
/* Light mode: WhatsApp's day colours */
[data-theme="light"] body:has(.cm-composer) { background: #efeae2; }
[data-theme="light"] body:has(.cm-composer) .cm-composer { background: rgba(240,242,245,.97); }
[data-theme="light"] .cm-row .cm-msg { background: #fff; color: #111b21; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
[data-theme="light"] .cm-row.mine .cm-msg, [data-theme="light"] .cm-row.mine .cm-msg.admin { background: #d9fdd3; }
[data-theme="light"] .cm-row .cm-msg-body { color: #111b21; }
[data-theme="light"] .cm-row .cm-msg-foot { color: #667781; }
[data-theme="light"] .cm-row .cm-name { color: #027eb5; }
[data-theme="light"] .cm-row .cm-msg.admin .cm-name { color: #8a6500; }
[data-theme="light"] .cm-react, [data-theme="light"] .cm-row .cm-react { background: #fff; border-color: #efeae2; color: #111b21; }
[data-theme="light"] .cm-react.on { background: #e7fce3; }
[data-theme="light"] .cm-row .cm-quote { background: rgba(11,20,26,.05); }
[data-theme="light"] .cm-send textarea { background: #fff; border-color: #fff; color: #111b21; }
[data-theme="light"] .cm-send .cm-attach { background: #fff; color: #54656f; }
[data-theme="light"] .cm-unread { background: rgba(255,255,255,.45); }
[data-theme="light"] .cm-unread span { background: #fff; color: #54656f; }
[data-theme="light"] .cm-down { background: #fff; color: #54656f; }
[data-theme="light"] .cm-msg.selected { box-shadow: 0 0 0 2px #00a884; }

/* Chat pages: no site header, so the chat gets the room. The Community bar sits at the very top. */
body:has(.cm-composer) .site-head, body:has(.cm-composer) .band { display: none; }
body:has(.cm-composer) .back-bar { top: 0; padding-top: env(safe-area-inset-top); }
body:has(.cm-composer) :target, body:has(.cm-composer) h2[id] { scroll-margin-top: 4rem; }
/* Jump to top / bottom, on the left like a scroll thumb */
.cm-down { left: .7rem; right: auto; bottom: 5.2rem; opacity: .92; }
.cm-down.cm-up { top: 4.6rem; bottom: auto; }
.cm-down { width: 2.35rem; height: 2.35rem; }
.cm-notify-bell { font-size: 1.6rem; flex: none; }
.cm-push { margin: 1.4rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--steel); }
.cm-push h2 { margin: 0 0 .5rem; font-size: 1.1rem; }
.cm-push-status { margin: 0 0 .7rem; }
.cm-push-row { margin: .8rem 0 .4rem; font-weight: 700; }
[data-theme="light"] .cm-push { background: #fff; }
.cm-notify { align-items: flex-start; }
.cm-notify-btns { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .55rem; }
.cm-notify-btns .btn { padding: .5rem .9rem; font-size: .92rem; }
.cm-notify-why { color: var(--fog); font-size: .75rem; margin-top: .4rem; opacity: .8; }
.cm-push-diag { margin: .8rem 0; }
.cm-push-diag summary { cursor: pointer; font-weight: 700; color: var(--fog); }
.cm-push-diag pre { white-space: pre-wrap; font-size: .8rem; background: rgba(0,0,0,.2); padding: .6rem; border-radius: 6px; margin: .5rem 0; }
[data-theme="light"] .cm-push-diag pre { background: #f2f4f7; }
.cm-notify-more { margin-top: .5rem; } .cm-notify-more summary { cursor: pointer; color: var(--fog); font-size: .88rem; } .cm-notify-more span { display: block; margin-top: .3rem; }
/* Get the app page */
.ga { text-align: center; padding-top: 2rem; padding-bottom: 3rem; max-width: 30rem; }
.ga-logo { border-radius: 50%; margin: 0 auto 1rem; display: block; }
.ga h1 { margin: 0 0 .4rem; }
.ga-lead { color: var(--fog); margin: 0 0 1.5rem; }
.ga-card { background: var(--steel); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 1.2rem; text-align: left; }
.ga-big { font-size: 1.15rem; padding: .9rem 1rem; }
.ga-small { color: var(--fog); font-size: .9rem; margin: .7rem 0 0; }
.ga-steps { margin: 0; padding-left: 1.3rem; line-height: 1.9; }
.ga-done { font-size: 1.4rem; font-weight: 800; color: #3ddc84; margin: 0 0 .4rem; }
/* Inside the app, the alerts question is a pop-up in the middle of the screen */
.cm-notify.modal { position: fixed; inset: auto 1rem 50% 1rem; transform: translateY(50%); z-index: 90; margin: 0; width: auto; max-width: 26rem;
  margin-inline: auto; box-shadow: 0 0 0 100vmax rgba(0,0,0,.6), 0 12px 40px rgba(0,0,0,.5); padding: 1.2rem; flex-direction: column; align-items: center; text-align: center; }
.cm-notify.modal .cm-notify-bell { font-size: 2.6rem; }
.cm-notify.modal .cm-notify-btns { justify-content: center; flex-direction: column; }
.cm-notify.modal .cm-notify-btns .btn { width: 100%; font-size: 1.05rem; padding: .75rem; }
.cm-notify.modal div { text-align: center; }
.cm-notify.modal { max-height: 85vh; overflow-y: auto; }
.cm-join-url { width: 100%; margin: .5rem 0; font-size: .85rem; }
.cm-notes-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.cm-notes-head form { flex: none; margin-top: .4rem; }

/* Header: the name always sits next to the logo, stacked on phones */
.site-head .brand-name { display: inline-flex !important; gap: .28em; }
.head-theme { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 50%; flex: none;
  border: 1px solid var(--line); background: none; color: var(--mist); cursor: pointer; }
.head-theme svg { width: 1.15rem; height: 1.15rem; }
@media (max-width: 560px) {
  .site-head .brand-name { flex-direction: column; gap: 0; font-size: 1rem; line-height: .95; letter-spacing: .02em; text-transform: uppercase; }
  .site-head .brand { gap: .4rem; }
  .head-theme { width: 2rem; height: 2rem; }
}
@media (max-width: 380px) {
  .site-head .brand-name { font-size: .88rem; }
  .head-community .icon { display: none; }
}
[data-theme="light"] .head-theme { color: var(--mist); }

/* Light mode on the public pages (Today, Area Check, area pages, stories): white text becomes dark */
[data-theme="light"] :is(.postcodes li:has(a:hover), .postcodes li:has(a[aria-current]), .browse-topics li a:hover,
  .browse-topics a[aria-current], .browse-areas a:hover, .browse-areas a[aria-current], .crime-rows dd, .brief-title a,
  .crime-side li b, .day-band-day, .earlier-band h2, .bd-code, .areas-hub h2, .at-code, .foot-name, .trend-title,
  .trend-latest b, .changes h3, .ch-code, .back-bar a, .story h2, .tr-stats strong, .tr-list b, .tr-who, .tt-head h2,
  .tt-head strong, .tt-title, .story-newer strong, .story-line li.here span) { color: var(--mist); }
[data-theme="light"] .pc-form input, [data-theme="light"] .head-community, [data-theme="light"] .head-nav a.head-community { color: var(--mist) !important; }
[data-theme="light"] .site-head { background: rgba(255,255,255,.94); }
[data-theme="light"] .site-foot { background: #e4eaf2; }
[data-theme="light"] .areas-hub { background: radial-gradient(120% 80% at 100% 0%, rgba(255,212,0,.18), transparent 55%), linear-gradient(180deg, #e2e9f3 0%, var(--night) 100%); }
[data-theme="light"] .brief { background: linear-gradient(160deg, #e7eeff 0%, #f4f7fc 100%); border-color: #b9c9ea; box-shadow: none; }
[data-theme="light"] .brief-morning { background: linear-gradient(160deg, #fff4d6 0%, #f4f7fc 100%); border-color: #e2c26a; }
/* Area page: a clear break between the crime charts and the area's Bradford Today updates */
.area-today-head { margin: 2.6rem 0 1rem; padding-top: 1.6rem; border-top: 4px solid var(--hivis); }
.area-today-kicker { display: flex; align-items: center; gap: .45rem; margin: 0 0 .35rem; color: var(--hivis); font-weight: 800; font-size: .85rem; }
.area-today-head h2 { margin: 0 0 .35rem; font: 900 clamp(2rem, 7vw, 2.8rem)/.95 var(--display); color: var(--mist); }
.area-today-head h2 span { color: var(--hivis); }
.area-today-head p:last-child { margin: 0; color: var(--fog); }
/* The figures table under the crime charts scrolls sideways inside its box instead of widening the page */
.trend-table { max-width: 100%; overflow-x: auto; }
.trend-table table { display: block; overflow-x: auto; max-width: 100%; }
html, body { overflow-x: clip; }
/* Intelligence page: section headings that can't be missed */
.im-sec .im-head { display: flex; align-items: center; gap: .7rem; margin: 0 0 .6rem; padding: .75rem 1rem; border-radius: 14px;
  background: color-mix(in srgb, var(--hivis) 12%, transparent); border-left: 6px solid var(--hivis);
  font: 900 clamp(1.6rem, 6vw, 2.1rem)/1 var(--display); color: var(--mist); }
.im-sec .im-head i { font-style: normal; font-size: 1.3rem; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--hivis); flex: none; }
.im-sec .im-head span { margin-left: auto; min-width: 2rem; padding: .2rem .6rem; border-radius: 99px; background: var(--hivis); color: #0b1a33; font: 800 1rem/1.3 inherit; text-align: center; }
.im-sec .im-head-red { background: color-mix(in srgb, #e5484d 14%, transparent); border-left-color: #e5484d; }
.im-sec .im-head-red i, .im-sec .im-head-red span { background: #e5484d; color: #fff; }
.im-sec { margin-top: 2.2rem; }

/* Chat ⋯ button: a yellow "radar sweep" ring, only when there's something to look at in the intelligence
   (a member's first time, or new sightings/footage from others since they last looked) */
.cm-backtools { position: relative; }
.cm-kebab.nudge { position: relative; border-color: transparent; isolation: isolate; background: var(--night); color: var(--hivis); }
.cm-kebab.nudge::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; padding: 3px; z-index: -1; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 55%, color-mix(in srgb, var(--hivis) 35%, transparent) 75%, var(--hivis) 97%, #fff 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: wd-ring 1.8s linear infinite; }
.cm-kebab.nudge::after { content: ""; position: absolute; top: -2px; right: -2px; width: .7rem; height: .7rem; border-radius: 50%;
  background: var(--hivis); box-shadow: 0 0 0 2px var(--night); pointer-events: none; }
@keyframes wd-ring { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cm-kebab.nudge::before { animation: none; background: var(--hivis); } }
.cm-nudge-tip { position: absolute; top: calc(100% + .6rem); right: 0; z-index: 30; width: 14rem; margin: 0; padding: .6rem .8rem;
  border-radius: 12px; background: var(--hivis); color: #0b1a33; font-weight: 700; font-size: .9rem; line-height: 1.3;
  box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.cm-nudge-tip::before { content: ""; position: absolute; top: -.4rem; right: .9rem; border: .45rem solid transparent; border-top: 0; border-bottom-color: var(--hivis); }
.cm-new-pill { margin-left: auto; padding: .1rem .5rem; border-radius: 99px; background: var(--hivis); color: #0b1a33; font-size: .75rem; }
/* You page: invite your neighbours */
.cm-invite { margin: 1.5rem 0; padding: 1.2rem; border-radius: 18px; border: 2px solid var(--hivis); background: color-mix(in srgb, var(--hivis) 8%, var(--steel)); }
.cm-invite h2 { margin: 0 0 .4rem; font: 900 1.7rem/1 var(--display); }
.cm-invite p { margin: 0 0 .8rem; color: var(--mist); }
.cm-invite .cm-invite-count { margin: .8rem 0 0; color: var(--fog); font-size: .95rem; }
.cm-invite .cm-invite-count strong { color: var(--hivis); font-size: 1.2rem; }
/* Feed: Linked filter groups */
.cm-linked-intro { margin: 0 0 1rem; color: var(--fog); }
.cm-case-group { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin: 1.4rem 0 .6rem; padding: .7rem 1rem;
  border-radius: 14px; border-left: 6px solid #e5484d; background: color-mix(in srgb, #e5484d 14%, transparent); color: var(--mist); text-decoration: none; }
.cm-case-group span { font: 900 1.35rem/1.1 var(--display); }
.cm-case-group b { flex: none; color: var(--hivis); font-size: .9rem; }
.cm-list > .cm-case-group:first-of-type { margin-top: 0; }
/* Bottom bar: 5 tabs. Community gets the yellow radar sweep when there's a new post you haven't seen */
.cm-tabs { grid-template-columns: repeat(5, 1fr); }
.cm-tabs a > span:last-of-type { white-space: nowrap; }
.cm-tab-ico { position: relative; display: grid; place-items: center; width: 2.3rem; height: 2.3rem; margin-bottom: -.35rem; margin-top: -.3rem; }
.cm-tabs a.glow { color: var(--mist); }
.cm-tabs a.glow .cm-tab-ico .icon { color: var(--hivis); }
.cm-tabs a.glow .cm-tab-ico::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--hivis) 45%, transparent) 0, transparent 70%);
  animation: wd-alarm-pulse 2.6s ease-in-out infinite; }
.cm-tabs a.glow .cm-tab-ico .icon { animation: wd-alarm-icon 2.6s ease-in-out infinite; }
@keyframes wd-alarm-pulse { 0%, 100% { opacity: 0; transform: scale(.75); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes wd-alarm-icon { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cm-tabs a.glow .cm-tab-ico::before, .cm-tabs a.glow .cm-tab-ico .icon { animation: none; opacity: 1; } }
/* Chats tab: a clean WhatsApp-style list */
.ch-page .page-head h1 { margin-bottom: .2rem; }
.ch-sec { margin: 1.4rem 0 0; }
.ch-sec h2 { margin: 0 0 .5rem; font-size: .85rem; font-weight: 800; color: var(--hivis); letter-spacing: .02em; }
.ch-hint { margin: -.3rem 0 .5rem; color: var(--fog); font-size: .9rem; }
.ch-list { border-radius: 16px; background: var(--steel); border: 1px solid var(--line); overflow: hidden; }
.ch-row { display: flex; align-items: center; gap: .85rem; padding: .8rem 1rem; color: var(--mist); text-decoration: none; }
.ch-row + .ch-row { border-top: 1px solid var(--line); }
a.ch-row:active, a.ch-row:hover { background: color-mix(in srgb, var(--mist) 6%, transparent); }
.ch-ico { flex: none; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
  background: color-mix(in srgb, var(--hivis) 14%, var(--night)); color: var(--hivis); font-size: 1.4rem; }
.ch-ico .icon { width: 1.45rem; height: 1.45rem; }
.ch-ico-room { background: var(--hivis); }
.ch-main { flex: 1; min-width: 0; display: grid; gap: .2rem; }
.ch-top, .ch-bottom { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.ch-top strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.05rem; }
.ch-top strong small { font-weight: 600; color: var(--fog); font-size: .9rem; }
.ch-top time { flex: none; font-size: .78rem; color: var(--fog); }
.ch-last { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fog); font-size: .93rem; }
.ch-last b { font-weight: 700; color: var(--mist); }
.ch-row.has-new .ch-top time { color: #25d366; font-weight: 800; }
.ch-badge { flex: none; min-width: 1.4rem; height: 1.4rem; padding: 0 .4rem; border-radius: 99px; background: #25d366; color: #0b141a;
  font: 800 .78rem/1.4rem var(--body); font-style: normal; text-align: center; }
.ch-soon { opacity: .6; }
.ch-ico-soon { background: var(--night); }
.ch-pill { flex: none; padding: .1rem .55rem; border-radius: 99px; border: 1px solid var(--line); font-size: .72rem; font-weight: 700; color: var(--fog); }
.ch-empty { margin: 0; padding: 1rem; color: var(--fog); }
/* Chat rooms (General chat): a simple header instead of an incident card */
.cm-room-head { display: flex; gap: .9rem; align-items: center; padding: 1rem; margin: .5rem 0 1rem; border-radius: 16px; background: var(--steel); border: 1px solid var(--line); }
.cm-room-head .cm-room-ico { flex: none; display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--hivis); font-size: 1.5rem; }
.cm-room-head h1 { margin: 0 0 .2rem; font: 900 1.7rem/1 var(--display); }
.cm-room-head p { margin: 0; color: var(--fog); font-size: .93rem; }
.cm-room-head { padding: .7rem .9rem; gap: .7rem; border-radius: 12px; }
.cm-room-head .cm-room-ico { width: 2.2rem; height: 2.2rem; font-size: 1.1rem; }
.cm-room-head p { font-size: .88rem; line-height: 1.4; }
/* Voice notes: mic button (shows when the box is empty), recording bar and player */
.cm-mic { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; background: #00a884; color: #fff; cursor: pointer; }
.cm-mic .icon { width: 1.3rem; height: 1.3rem; }
.cm-mic[hidden], #send-btn[hidden] { display: none; }
.cm-rec { display: flex; align-items: center; gap: .6rem; min-height: 2.6rem; }
.cm-rec[hidden] { display: none; }
.cm-rec-x { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; background: transparent; font-size: 1.25rem; cursor: pointer; }
.cm-rec-live { flex: 1; display: flex; align-items: center; gap: .55rem; padding: .55rem 1rem; border-radius: 99px; background: #2a3942; color: #e9edef; font-weight: 700; }
.cm-rec-live i { width: .7rem; height: .7rem; border-radius: 50%; background: #ff3b3b; animation: wd-recblink 1s ease-in-out infinite; }
.cm-rec-live small { color: #8696a0; font-weight: 600; }
@keyframes wd-recblink { 50% { opacity: .25; } }
.cm-rec-send { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; background: #00a884; color: #fff; font-size: 1.1rem; cursor: pointer; }
[data-theme="light"] .cm-rec-live { background: #fff; color: #111b21; }
.cm-voice { display: flex; align-items: center; gap: .6rem; min-width: 14rem; max-width: 100%; padding: .2rem 0; }
.cm-vplay { flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; background: color-mix(in srgb, currentColor 18%, transparent); color: inherit; font-size: .95rem; cursor: pointer; }
.cm-vbars { flex: 1; display: flex; align-items: center; gap: 2px; height: 1.9rem; cursor: pointer; }
.cm-vbars i { flex: 1; min-width: 2px; border-radius: 2px; background: color-mix(in srgb, currentColor 35%, transparent); }
.cm-vbars i.on { background: #53bdeb; }
.cm-vtime { flex: none; font-size: .78rem; opacity: .75; font-variant-numeric: tabular-nums; min-width: 2.2rem; text-align: right; }
.cm-rec-x { color: #ff6b6b; display: grid; place-items: center; }
/* Possible links (admins only) */
.lk-banner { display: flex; align-items: center; gap: .6rem; margin: 0 0 1rem; padding: .75rem 1rem; border-radius: 14px; border: 2px solid var(--hivis);
  background: color-mix(in srgb, var(--hivis) 10%, var(--steel)); color: var(--mist); text-decoration: none; }
.lk-banner span { flex: 1; } .lk-banner b { color: var(--hivis); }
.lk-card { margin: 0 0 1rem; padding: 1rem; border-radius: 16px; background: var(--steel); border: 1px solid var(--line); }
.lk-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .5rem; }
.lk-score { padding: .2rem .65rem; border-radius: 99px; font-size: .85rem; color: #0b1a33;
  background: color-mix(in srgb, var(--hivis) calc(var(--s) * 1%), #9fb0c8); }
.lk-src { font-size: .8rem; font-weight: 700; color: var(--fog); }
.lk-reason { margin: 0 0 .8rem; font-weight: 700; font-size: 1.02rem; }
.lk-pair { display: grid; gap: .5rem; margin-bottom: .8rem; }
.lk-inc { display: grid; gap: .15rem; padding: .6rem .8rem; border-radius: 12px; background: var(--night); color: var(--mist); text-decoration: none; border-left: 4px solid #e5484d; }
.lk-inc span { font-size: .82rem; color: var(--fog); } .lk-inc em { font-style: normal; font-size: .9rem; color: var(--fog); }
.lk-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.lk-on-post { margin: 1rem 0; padding: .9rem; border-radius: 18px; border: 2px dashed var(--hivis); }
.lk-on-post h2 { margin: 0 0 .7rem; font: 900 1.4rem/1 var(--display); }
.lk-on-post h2 small { font: 700 .75rem var(--body); color: var(--fog); margin-left: .4rem; }
.lk-done { margin-top: 1.5rem; color: var(--fog); } .lk-done li { margin: .4rem 0; } .lk-done li span { display: block; font-size: .85rem; }
/* Chats: header with ☰, and the "Alarms you follow" sheet */
.ch-head { display: flex; align-items: center; justify-content: space-between; margin: 1rem 0 .2rem; }
.ch-head h1 { margin: 0; font: 900 clamp(2.2rem, 9vw, 3rem)/1 var(--display); }
.ch-menu-btn { display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%; border: 1px solid var(--line); background: var(--steel); color: var(--mist); cursor: pointer; }
.ch-sheet { width: min(32rem, 100vw); max-height: 85vh; margin: auto auto 0; padding: 1rem 1rem 1.5rem; border: 0; border-radius: 20px 20px 0 0; background: var(--steel); color: var(--mist); }
.ch-sheet::backdrop { background: rgba(0,0,0,.55); }
.ch-sheet-head { display: flex; align-items: center; justify-content: space-between; }
.ch-sheet-head h2 { margin: 0; font: 900 1.6rem/1 var(--display); }
.ch-sheet-x { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; background: var(--night); color: var(--mist); font-size: 1rem; cursor: pointer; }
.ch-sheet .ch-hint { margin: .5rem 0 .8rem; }
.ch-follow-list { list-style: none; margin: 0; padding: 0; }
.ch-follow-list li { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.ch-follow-list a { flex: 1; min-width: 0; display: grid; color: var(--mist); text-decoration: none; }
.ch-follow-list a b, .ch-follow-list a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-follow-list a span { font-size: .85rem; color: var(--fog); }
.ch-switch { position: relative; flex: none; width: 3rem; height: 1.75rem; }
.ch-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.ch-switch i { position: absolute; inset: 0; border-radius: 99px; background: #3b4a5e; transition: background .2s; }
.ch-switch i::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: #fff; transition: transform .2s; }
.ch-switch input:checked + i { background: #00a884; }
.ch-switch input:checked + i::after { transform: translateX(1.25rem); }
.ch-switch input:focus-visible + i { outline: 3px solid var(--hivis); outline-offset: 2px; }
.cm-case-no { margin: 0 0 .3rem; display: inline-block; padding: .2rem .7rem; border-radius: 99px; background: #e5484d; color: #fff; font-weight: 800; font-size: .85rem; }
.cm-case-group span small { font: 800 .8rem var(--body); color: var(--fog); margin-left: .3rem; }
.ch-case { flex: none; padding: .05rem .45rem; border-radius: 6px; background: color-mix(in srgb, #e5484d 25%, transparent); color: var(--mist); font-size: .7rem; font-weight: 800; }
.cm-brought { margin: .8rem 0 0; padding: .5rem .9rem; display: inline-block; border-radius: 99px; background: color-mix(in srgb, var(--hivis) 15%, transparent); }
.cm-brought strong { color: var(--hivis); } .cm-brought small { color: var(--fog); }
.cm-invite-privacy { margin: .8rem 0 0; font-size: .92rem; color: var(--fog); }
.cm-invite-privacy input { width: 1.1rem; height: 1.1rem; vertical-align: -2px; margin-right: .3rem; }
.ch-sheet { width: 100%; max-width: 34rem; margin: auto auto 0; }
/* Chats ☰ menu: first a list of options, then the full list of followed alarms */
.ch-pane[hidden] { display: none; }
.ch-menu-list { list-style: none; margin: .8rem 0 0; padding: 0; }
.ch-menu-list button { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .95rem .2rem; border: 0; border-top: 1px solid var(--line);
  background: none; color: var(--mist); font: inherit; font-size: 1.05rem; text-align: left; cursor: pointer; }
.ch-menu-list button b { flex: 1; } .ch-menu-list button em { font-style: normal; color: var(--fog); } .ch-menu-list button i { font-style: normal; font-size: 1.5rem; color: var(--fog); }
.ch-back { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; background: var(--night); color: var(--mist); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.ch-pane[data-pane="following"] .ch-sheet-head h2 { flex: 1; margin-left: .6rem; font-size: 1.35rem; }
.ch-tick { position: relative; flex: none; width: 1.9rem; height: 1.9rem; }
.ch-tick input { position: absolute; inset: 0; opacity: 0; margin: 0; z-index: 1; cursor: pointer; }
.ch-tick i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid #3b4a5e; }
.ch-tick input:checked + i { background: #00a884; border-color: #00a884; }
.ch-tick input:checked + i::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 900; }
.ch-tick input:focus-visible + i { outline: 3px solid var(--hivis); outline-offset: 2px; }
.ch-follow-list li.going { opacity: 0; transform: translateX(30px); transition: opacity .25s, transform .25s; }
/* Picking several messages to delete */
.is-picking .cm-msg { cursor: pointer; }
.cm-msg.picked { outline: 3px solid #53bdeb; outline-offset: 2px; background-image: linear-gradient(rgba(83,189,235,.18), rgba(83,189,235,.18)); }
.is-picking .cm-row { position: relative; }
/* Alerts: two clearly separated sections */
.al-sec { margin: 1.2rem 0 1.8rem; padding: 1rem; border-radius: 20px; }
.al-you { background: color-mix(in srgb, #53bdeb 10%, var(--steel)); border: 2px solid color-mix(in srgb, #53bdeb 55%, transparent); }
.al-follow { background: color-mix(in srgb, var(--hivis) 8%, var(--steel)); border: 2px solid color-mix(in srgb, var(--hivis) 55%, transparent); }
.al-sec h2 { display: flex; align-items: center; gap: .6rem; margin: 0 0 .8rem; font: 900 1.55rem/1 var(--display); }
.al-ico { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 50%; font-size: 1.15rem; }
.al-you .al-ico { background: #53bdeb; } .al-follow .al-ico { background: var(--hivis); }
.al-count { margin-left: auto; min-width: 1.8rem; padding: .15rem .55rem; border-radius: 99px; background: #e5484d; color: #fff; font: 800 .95rem/1.4 var(--body); text-align: center; }
.al-sec .cm-notes { display: grid; gap: .6rem; }
.al-sec .cm-note { margin: 0; }
.al-empty { margin: 0; color: var(--fog); }
.cm-msgbar { z-index: 80; } .cm-nudge-tip { z-index: 20; }
/* Private chats */
.dm-top .cm-backrow { gap: .6rem; }
.dm-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: .6rem; color: var(--mist); text-decoration: none; }
.dm-who span { display: grid; min-width: 0; }
.dm-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.1rem; }
.dm-who small { color: var(--fog); font-size: .78rem; }
.dm-who .cm-av { width: 2.4rem; height: 2.4rem; }
.dm-menu { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 40; min-width: 14rem; padding: .4rem; border-radius: 14px; background: var(--steel); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.dm-menu[hidden] { display: none; }
.dm-menu a, .dm-menu button { display: block; width: 100%; padding: .7rem .8rem; border: 0; border-radius: 10px; background: none; color: var(--mist); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.dm-menu a:hover, .dm-menu button:hover { background: var(--night); }
.dm-menu .danger { color: #ff6b6b; }
.dm-menu form { margin: 0; }
.dm-safety { margin: .8rem auto 1rem; max-width: 30rem; padding: .55rem .8rem; border-radius: 10px; background: color-mix(in srgb, var(--hivis) 12%, transparent); color: var(--mist); font-size: .82rem; text-align: center; }
.dm-photo { display: block; margin: -.1rem -.1rem .3rem; } .dm-photo img { display: block; max-width: min(18rem, 70vw); border-radius: 10px; }
/* Chats: Community | Private switch */
.ch-switch-row { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; margin: .9rem 0 .2rem; padding: .3rem; border-radius: 99px; background: var(--steel); border: 1px solid var(--line); }
.ch-switch-row a { display: flex; align-items: center; justify-content: center; gap: .45rem; padding: .6rem; border-radius: 99px; color: var(--fog); font-weight: 800; text-decoration: none; }
.ch-switch-row a[aria-current="page"] { background: var(--hivis); color: #0b1a33; }
.ch-switch-row a i { min-width: 1.35rem; height: 1.35rem; padding: 0 .35rem; border-radius: 99px; background: #25d366; color: #0b141a; font: 800 .75rem/1.35rem var(--body); font-style: normal; text-align: center; }
.ch-av { width: 3rem; height: 3rem; flex: none; }
.ch-av .cm-av { width: 3rem; height: 3rem; font-size: 1.1rem; }
/* Alerts: private messages section */
.al-dm { background: color-mix(in srgb, #25d366 8%, var(--steel)); border: 2px solid color-mix(in srgb, #25d366 50%, transparent); }
.al-dm .al-ico { background: #25d366; }
/* Profile: message + block */
.pf-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0 0; }
.pf-actions form { margin: 0; }
/* Private footage */
.im-private { margin: 0 0 .9rem; padding: .7rem .9rem; border-radius: 12px; background: color-mix(in srgb, var(--hivis) 10%, var(--steel)); border-left: 4px solid var(--hivis); color: var(--mist); }
.im-sub { margin: 1.2rem 0 .5rem; font-size: 1rem; }
.cm-private-note { margin: .3rem 0 0; font-size: .85rem; opacity: .85; }
/* Alarms page: one line of what happened; the full story is on the alarm under its photos/videos */
.cm-one-line { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.cm-what-h { margin: 1rem 0 .3rem; font-size: .8rem; font-weight: 800; color: var(--hivis); letter-spacing: .02em; }
.ch-search { width: 100%; margin: .8rem 0 .4rem; padding: .8rem 1rem; border-radius: 99px; border: 1px solid var(--line); background: var(--night); color: var(--mist); font: inherit; font-size: 1rem; }
.ch-people { list-style: none; margin: 0; padding: 0; }
.ch-people a { display: flex; align-items: center; gap: .8rem; padding: .65rem .2rem; border-top: 1px solid var(--line); color: var(--mist); text-decoration: none; }
.ch-people .cm-av { width: 2.5rem; height: 2.5rem; }
.ch-people small { margin-left: auto; color: #ff6b6b; }
.ch-hot { border: 2px solid color-mix(in srgb, #ff6b2b 70%, transparent); background: color-mix(in srgb, #ff6b2b 10%, var(--steel)); }
.ch-hot .ch-ico { background: color-mix(in srgb, #ff6b2b 25%, var(--night)); color: #ff9b5b; }
/* Alarms tab: the hot card */
.al-hot { display: flex; align-items: center; gap: .8rem; margin: 0 0 1rem; padding: .8rem 1rem; border-radius: 16px; border: 2px solid color-mix(in srgb, #ff6b2b 70%, transparent);
  background: color-mix(in srgb, #ff6b2b 12%, var(--steel)); color: var(--mist); text-decoration: none; position: relative; }
.al-hot b { display: block; font-size: 1.02rem; } .al-hot span { flex: 1; min-width: 0; } .al-hot small { color: var(--fog); }
.al-hot-x { position: absolute; top: .3rem; right: .4rem; border: 0; background: none; color: var(--fog); font-size: 1rem; cursor: pointer; padding: .3rem; }
/* ---- Chat colours: a setting of their own (You → Settings), WhatsApp dark by default, whatever the page theme */
html[data-chat="dark"] body:has(.cm-composer) { background: #0b141a; }
html[data-chat="dark"] body:has(.cm-composer) .cm-composer { background: rgba(11,20,26,.97); }
html[data-chat="dark"] .cm-row .cm-msg { background: #202c33; color: #e9edef; box-shadow: 0 1px .5px rgba(0,0,0,.25); }
html[data-chat="dark"] .cm-row.mine .cm-msg, html[data-chat="dark"] .cm-row.mine .cm-msg.admin { background: #005c4b; }
html[data-chat="dark"] .cm-row .cm-msg-body { color: #e9edef; }
html[data-chat="dark"] .cm-row .cm-msg-foot { color: rgba(233,237,239,.6); }
html[data-chat="dark"] .cm-row .cm-name { color: #53bdeb; }
html[data-chat="dark"] .cm-row .cm-msg.admin .cm-name { color: #ffd400; }
html[data-chat="dark"] .cm-react, html[data-chat="dark"] .cm-row .cm-react { background: #202c33; border-color: #0b141a; color: #e9edef; }
html[data-chat="dark"] .cm-row .cm-quote { background: rgba(0,0,0,.18); }
html[data-chat="dark"] .cm-send textarea { background: #2a3942; border-color: #2a3942; color: #e9edef; }
html[data-chat="dark"] .cm-send .cm-attach { background: #2a3942; color: #e9edef; }
html[data-chat="dark"] .cm-unread { background: rgba(0,0,0,.25); }
html[data-chat="dark"] .cm-unread span { background: #182229; color: #e9edef; }
html[data-chat="dark"] .cm-down { background: #202c33; color: #e9edef; }
html[data-chat="dark"] .cm-rec-live { background: #2a3942; color: #e9edef; }
html[data-chat="dark"] .dm-safety { color: #e9edef; }
html[data-chat="light"] body:has(.cm-composer) { background: #efeae2; }
html[data-chat="light"] body:has(.cm-composer) .cm-composer { background: rgba(240,242,245,.97); }
html[data-chat="light"] .cm-row .cm-msg { background: #fff; color: #111b21; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
html[data-chat="light"] .cm-row.mine .cm-msg, html[data-chat="light"] .cm-row.mine .cm-msg.admin { background: #d9fdd3; }
html[data-chat="light"] .cm-row .cm-msg-body { color: #111b21; }
html[data-chat="light"] .cm-row .cm-msg-foot { color: #667781; }
html[data-chat="light"] .cm-row .cm-name { color: #027eb5; }
html[data-chat="light"] .cm-row .cm-msg.admin .cm-name { color: #8a6500; }
html[data-chat="light"] .cm-react, html[data-chat="light"] .cm-row .cm-react { background: #fff; border-color: #efeae2; color: #111b21; }
html[data-chat="light"] .cm-row .cm-quote { background: rgba(11,20,26,.05); }
html[data-chat="light"] .cm-send textarea { background: #fff; border-color: #fff; color: #111b21; }
html[data-chat="light"] .cm-send .cm-attach { background: #fff; color: #54656f; }
html[data-chat="light"] .cm-unread { background: rgba(255,255,255,.45); }
html[data-chat="light"] .cm-unread span { background: #fff; color: #54656f; }
html[data-chat="light"] .cm-down { background: #fff; color: #54656f; }
html[data-chat="light"] .cm-rec-live { background: #fff; color: #111b21; }
html[data-chat="light"] .cm-row .cm-vplay { color: #54656f; }
html[data-chat="light"] .cm-chat-empty, html[data-chat="light"] .dm-safety { color: #111b21; }
/* You menu */
.you-head { display: flex; align-items: center; gap: 1rem; margin: 1rem 0 1.2rem; }
.you-head .cm-av { width: 4rem; height: 4rem; font-size: 1.5rem; }
.you-head strong { display: block; font: 900 1.8rem/1 var(--display); }
.you-head a { color: var(--fog); font-size: .9rem; }
.you-menu { list-style: none; margin: 0; padding: 0; border-radius: 18px; background: var(--steel); border: 1px solid var(--line); overflow: hidden; }
.you-menu li + li { border-top: 1px solid var(--line); }
.you-menu a, .you-menu button { display: flex; align-items: center; gap: .9rem; width: 100%; padding: 1rem 1.1rem; border: 0; background: none; color: var(--mist); font: inherit; font-size: 1.08rem; font-weight: 700; text-decoration: none; text-align: left; cursor: pointer; }
.you-menu span[aria-hidden] { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; background: var(--night); font-size: 1.1rem; flex: none; }
.you-menu small { display: block; font-weight: 500; font-size: .85rem; color: var(--fog); }
.you-menu i { margin-left: auto; font-style: normal; color: var(--fog); font-size: 1.4rem; }
.you-menu form { margin: 0; }
.set-choice { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin: .6rem 0; }
.set-choice label { position: relative; display: grid; gap: .5rem; padding: .7rem; border-radius: 14px; border: 2px solid var(--line); cursor: pointer; }
.set-choice input { position: absolute; opacity: 0; }
.set-choice label:has(input:checked) { border-color: #00a884; box-shadow: 0 0 0 2px #00a884; }
.set-choice .pv { height: 5rem; border-radius: 10px; padding: .5rem; display: grid; gap: .3rem; align-content: end; }
.set-choice .pv i { display: block; height: .9rem; border-radius: 6px; width: 70%; }
.set-choice .pv i.me { justify-self: end; width: 55%; }
.pv-dark { background: #0b141a; } .pv-dark i { background: #202c33; } .pv-dark i.me { background: #005c4b; }
.pv-light { background: #efeae2; } .pv-light i { background: #fff; } .pv-light i.me { background: #d9fdd3; }
.set-choice b { text-align: center; }

/* Chat colours only colour the chat itself (a full-width band behind the messages), not the alarm above it */
html[data-chat] body:has(.cm-composer) { background: var(--night); }
html[data-chat="light"] .cm-chat, html[data-chat="light"] .dm-wrap { background: #efeae2; box-shadow: 0 0 0 100vmax #efeae2; clip-path: inset(0 -100vmax); }
html[data-chat="dark"] .cm-chat, html[data-chat="dark"] .dm-wrap { background: #0b141a; box-shadow: 0 0 0 100vmax #0b141a; clip-path: inset(0 -100vmax); }
html[data-chat] .cm-chat { margin-top: 1.4rem; padding: 1rem 0 1.5rem; }
html[data-chat] .dm-wrap { padding-bottom: 1.5rem; min-height: 70vh; }
html[data-chat="light"] .cm-chat-h, html[data-chat="light"] .cm-chat-h span, html[data-chat="light"] .cm-chat-empty { color: #54656f; }
html[data-chat="dark"] .cm-chat-h, html[data-chat="dark"] .cm-chat-h span, html[data-chat="dark"] .cm-chat-empty { color: #8696a0; }
html[data-chat="light"] .cm-sight { background: #fffbe6; color: #111b21; border-color: #e0b400; }
html[data-chat="light"] .cm-sight strong, html[data-chat="light"] .cm-sight span, html[data-chat="light"] .cm-sight-by { color: #111b21 !important; }
html[data-chat="light"] .cm-sight-tag, html[data-chat="light"] .cm-sight-when { color: #7a5b00 !important; }
html[data-chat="light"] .cm-sight small, html[data-chat="light"] .cm-sight-link { color: #54656f; }
html[data-chat="dark"] .cm-sight { background: rgba(255,212,0,.08); color: #e9edef; border-color: #ffd400; }
html[data-chat="dark"] .cm-sight strong, html[data-chat="dark"] .cm-sight span, html[data-chat="dark"] .cm-sight-by { color: #e9edef !important; }
html[data-chat="dark"] .cm-sight-tag, html[data-chat="dark"] .cm-sight-when { color: #ffd400 !important; }
html[data-chat="light"] .cm-row .cm-quote strong { color: #027eb5; } html[data-chat="light"] .cm-row .cm-quote span { color: #54656f; }
html[data-chat="dark"] .cm-row .cm-quote strong { color: #53bdeb; } html[data-chat="dark"] .cm-row .cm-quote span { color: #aebac1; }
html[data-chat="light"] .cm-flagnote, html[data-chat="light"] .cm-private-note, html[data-chat="light"] .cm-gone { color: #54656f; }
html[data-chat="light"] .cm-row .cm-msg-body a { color: #027eb5; }
.pv-app-dark { background: #0b1a33; } .pv-app-dark i { background: #16294a; } .pv-app-dark i.me { background: #ffd400; }
.pv-app-light { background: #f4f6fa; } .pv-app-light i { background: #fff; } .pv-app-light i.me { background: #ffd400; }
html[data-chat="light"] .cm-sight span.cm-sight-tag, html[data-chat="light"] .cm-sight span.cm-sight-when { color: #7a5b00 !important; }
html[data-chat="dark"] .cm-sight span.cm-sight-tag, html[data-chat="dark"] .cm-sight span.cm-sight-when { color: #ffd400 !important; }

/* The chat colour carries on to the bottom of the screen, behind the message box */
html[data-chat="light"] .cm-chat, html[data-chat="dark"] .cm-chat { clip-path: inset(0 -100vmax -100vmax -100vmax); }
/* Send footage privately: a big, obvious file picker and why it matters */
.ft-why { margin: 0 0 1rem; padding: 1rem 1.1rem; border-radius: 16px; background: color-mix(in srgb, var(--hivis) 14%, var(--steel)); border: 2px solid var(--hivis); }
.ft-why-h { margin: 0 0 .4rem; font: 900 1.35rem/1.15 var(--display); color: var(--mist); }
.ft-why p:last-child { margin: 0; color: var(--mist); }
.ft-upload { min-height: 6.5rem; border: 3px dashed var(--hivis) !important; background: color-mix(in srgb, var(--hivis) 8%, transparent) !important; }
.ft-upload b { font-size: 1.2rem; }
.ft-upload.has-files { border-style: solid !important; border-color: #25d366 !important; }
.rules-alert { margin: 1rem 0 1.5rem; padding: 1rem 1.1rem; border-radius: 14px; background: color-mix(in srgb, #e5484d 14%, var(--steel)); border-left: 5px solid #e5484d; }
.rules-alert p { margin: 0; }
.rules-page .lead { font-size: 1.1rem; }
.rules-page { padding-left: 1.2rem; padding-right: 1.2rem; padding-bottom: 2rem; }
.im-clip { margin: 0; } .im-clip figcaption { margin-top: .3rem; font-size: .85rem; } .im-clip figcaption a { color: var(--hivis); font-weight: 700; }
/* Privacy: smaller, denser text */
.privacy-page { font-size: .92rem; line-height: 1.55; }
.privacy-page h1 { font-size: clamp(2rem, 7vw, 2.6rem); }
.privacy-page h2 { font-size: 1.15rem; margin-top: 1.6rem; }
.privacy-page .lead { font-size: 1rem; }
.privacy-page li { margin-bottom: .35rem; }
/* Install banner: text gets the full width, button on its own row on phones */
.cm-app { flex-wrap: wrap; }
.cm-app .btn { white-space: nowrap; }
@media (max-width: 560px) {
  .cm-app div { flex: 1 1 calc(100% - 6rem); }
  .cm-app .btn { order: 3; flex: 1 1 100%; text-align: center; padding: .6rem .8rem; }
  .cm-app-x { align-self: flex-start; }
}

/* ---------------- Landing page (signed out) ---------------- */
.lp-hero { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.lp-hero-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 820px) { .lp-hero-grid { grid-template-columns: 1.5fr 1fr; } }
.lp-hero h1 { font: 900 clamp(3rem, 10vw, 6.4rem)/.9 var(--display); margin: 0 0 1.1rem; color: #fff; letter-spacing: -.01em; max-width: 12ch; }
.lp-lede { font-size: clamp(1.1rem, 2.3vw, 1.3rem); max-width: 34rem; margin: 0 0 1.8rem; }
.lp-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.2rem; }
.lp-actions .btn { min-width: 9.5rem; }
.lp-999 { display: flex; align-items: center; gap: .5rem; color: var(--fog); font-size: .95rem; margin: 0; }
.lp-999 .icon { color: var(--siren); width: 1.2rem; height: 1.2rem; }
.lp-logo { width: min(100%, 22rem); height: auto; justify-self: center; filter: drop-shadow(0 18px 40px rgba(0,0,0,.45)); }
@media (max-width: 819px) { .lp-logo { display: none; } }

.lp-live { padding: 0 0 clamp(2.5rem, 6vw, 4rem); }
.lp-live-panel { position: relative; border: 2px solid var(--hivis); border-radius: var(--r-lg); background: var(--steel); padding: 1.3rem 1.2rem 1.1rem; overflow: hidden; }
.lp-live-panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px;
  background: repeating-linear-gradient(-45deg, var(--hivis) 0 14px, var(--night) 14px 28px); }
.lp-live-head h2 { display: flex; align-items: center; gap: .55rem; font: 900 clamp(1.7rem, 5vw, 2.3rem)/1 var(--display); margin: .4rem 0 .35rem; color: #fff; }
.lp-live-head p { margin: 0 0 1rem; color: var(--fog); }
.lp-live-head strong { color: var(--hivis); }
.lp-alarms { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
@media (min-width: 820px) { .lp-alarms { grid-template-columns: repeat(3, 1fr); } }
.lp-alarm { display: flex; align-items: center; gap: .75rem; padding: .75rem .85rem; border-radius: 10px; background: var(--night);
  border: 1px solid var(--line); color: var(--mist); text-decoration: none; }
.lp-alarm:hover { border-color: var(--hivis); }
.lp-alarm-ico { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: rgba(255,212,0,.12); color: var(--hivis); flex: none; }
.lp-alarm-ico .icon { width: 1.25rem; height: 1.25rem; }
.lp-alarm-txt { flex: 1; min-width: 0; display: grid; }
.lp-alarm-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-alarm-txt small { color: var(--fog); font-size: .88rem; }
.lp-lock { color: var(--fog); }
.lp-lock .icon { width: 1.1rem; height: 1.1rem; }
.lp-live-foot { margin: .9rem 0 0; font-size: .92rem; color: var(--fog); }
.lp-live-foot a { font-weight: 700; }

.lp-tiles { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 640px) { .lp-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .lp-tiles { grid-template-columns: repeat(4, 1fr); } }
.lp-tiles li { padding: 1.2rem 1.1rem; border-radius: var(--r-lg); background: var(--steel); border: 1px solid var(--line); }
.lp-tiles .icon { color: var(--hivis); width: 1.8rem; height: 1.8rem; margin-bottom: .7rem; }
.lp-tiles h3 { margin: 0 0 .35rem; font-size: 1.12rem; color: #fff; }
.lp-tiles p { margin: 0; color: var(--fog); font-size: .96rem; line-height: 1.5; }

.lp-steps { list-style: none; counter-reset: s; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.2rem; }
@media (min-width: 820px) { .lp-steps { grid-template-columns: repeat(3, 1fr); } }
.lp-steps li { counter-increment: s; position: relative; padding-left: 3.4rem; }
.lp-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--hivis); color: var(--hivis-ink); font: 900 1.4rem/1 var(--display); }
.lp-steps h3 { margin: .25rem 0 .3rem; font-size: 1.12rem; color: #fff; }
.lp-steps p { margin: 0; color: var(--fog); line-height: 1.5; }

.lp-faq details { border-bottom: 1px solid var(--line); }
.lp-faq summary { cursor: pointer; padding: 1rem 0; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; color: var(--hivis); font-size: 1.4rem; line-height: 1; }
.lp-faq details[open] summary::after { content: "–"; }
.lp-faq details p { margin: 0 0 1rem; color: var(--fog); }

.lp-end-panel { text-align: center; padding: clamp(2rem, 6vw, 3.5rem) 1.2rem; border-radius: var(--r-lg); background: var(--steel); border: 1px solid var(--line); }
.lp-end-panel h2 { max-width: 20ch; margin: 0 auto 1.4rem; }
.lp-end-panel .btn { min-width: 12rem; }
.lp-end-panel p { margin: 1.1rem 0 0; color: var(--fog); }

[data-theme="light"] .lp-hero h1, [data-theme="light"] .lp-live-head h2, [data-theme="light"] .lp-tiles h3, [data-theme="light"] .lp-steps h3 { color: var(--mist); }
[data-theme="light"] .lp-live-panel, [data-theme="light"] .lp-tiles li, [data-theme="light"] .lp-end-panel { background: #fff; }
[data-theme="light"] .lp-alarm { background: #f5f7fb; }

/* Signed-out header: Log in + Join free */
.head-login { color: var(--mist); text-decoration: none; font-weight: 700; padding: .45rem .6rem; }
.head-nav a.head-join { background: var(--hivis); color: var(--hivis-ink) !important; text-decoration: none; font-weight: 800; padding: .5rem .95rem; border-radius: 999px; white-space: nowrap; }
.head-nav a.head-join:hover { background: #ffe03d; color: var(--hivis-ink); }
@media (max-width: 430px) { .head-nav { gap: .5rem; } .head-login { padding: .45rem .3rem; } .head-nav a.head-join { padding: .45rem .8rem; } }
/* Soft fade from the dark post area into the chat colour, instead of a hard line */
html[data-chat="light"] .cm-chat, html[data-chat="dark"] .cm-chat { position: relative; }
html[data-chat] .cm-chat::before { content: ""; position: absolute; z-index: -1; left: -100vmax; right: -100vmax; top: 0; height: 40px;
  pointer-events: none; background: linear-gradient(to bottom, var(--night), rgba(10,26,51,0)); }
html[data-chat] .cm-chat > .cm-chat-h { padding-top: 2.4rem; }
/* Held or ticked message: highlight the whole row edge to edge (like WhatsApp), not a ring round the bubble */
.cm-row:has(.cm-msg.selected), .cm-row:has(.cm-msg.picked) {
  border-radius: 0; background: rgba(0,168,132,.16); box-shadow: 0 0 0 100vmax rgba(0,168,132,.16); clip-path: inset(-3px -100vmax); }
html[data-chat="dark"] .cm-row:has(.cm-msg.selected), html[data-chat="dark"] .cm-row:has(.cm-msg.picked) {
  background: rgba(0,168,132,.22); box-shadow: 0 0 0 100vmax rgba(0,168,132,.22); }
.cm-msg.selected, html[data-chat] .cm-msg.selected { box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.cm-msg.picked { outline: none; background-image: none; }
/* Press-and-hold works anywhere across the message's row, right to the screen edges */
.cm-msgs .cm-row { position: relative; }
.cm-msgs .cm-row::after { content: ""; position: absolute; z-index: -1; top: -.25rem; bottom: -.25rem; left: -1.25rem; right: -1.25rem; }
/* Draggable map pins: a small "Move me" tag until the pin has been moved once */
.pm-pin, .pm-head { position: relative; overflow: visible; }
.pm-pin span.pm-move, .pm-head span.pm-move { position: absolute; left: 50%; top: auto; width: auto; height: auto; bottom: calc(100% + 6px); transform: translateX(-50%); white-space: nowrap; border: 0;
  background: var(--hivis); color: var(--hivis-ink); font: 800 .78rem/1 var(--sans, system-ui); padding: .32rem .55rem;
  border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.35); pointer-events: none; animation: pm-bob 1.6s ease-in-out infinite; }
.pm-pin span.pm-move::after, .pm-head span.pm-move::after { content: ""; position: absolute; left: 50%; top: 100%; width: 0; height: 0;
  border-radius: 0; background: none; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--hivis); }
.pm-moved .pm-move { display: none; }
@keyframes pm-bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -3px); } }
@media (prefers-reduced-motion: reduce) { .pm-pin span.pm-move, .pm-head span.pm-move { animation: none; } }
.leaflet-dragging .pm-pin span.pm-move, .leaflet-dragging .pm-head span.pm-move { display: none; }
.foot-ogl { font-size: .75rem; opacity: .7; }
/* Our full-screen video viewer (instead of the phone's full screen and its "swipe to exit" message) */
.vv-wrap { position: relative; display: block; }
.vv-wrap > video { display: block; width: 100%; }
.vv-expand { position: absolute; top: .5rem; right: .5rem; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; }
.vv-expand svg { width: 1.25rem; height: 1.25rem; }
.vv-layer { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; align-items: center; justify-content: center; }
.vv-layer.on { display: flex; }
.vv-layer video { width: 100vw; height: 100dvh; max-height: 100dvh; object-fit: contain; background: #000; }
.vv-close { position: absolute; top: calc(env(safe-area-inset-top, 0px) + .8rem); right: .8rem; width: 2.9rem; height: 2.9rem;
  border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 3; }
.vv-close svg { width: 1.4rem; height: 1.4rem; }
html.vv-open, html.vv-open body { overflow: hidden; }
.cm-local-h { font-weight: 800; margin: 1rem 0 .3rem; }
.cm-schools input { margin-bottom: .45rem; }
#local-alerts .cm-push-row { display: flex; align-items: center; gap: .6rem; margin: .5rem 0; width: 100%; }
#local-alerts .cm-schools { margin-top: 1rem; }
/* School picker */
.sp-wrap { position: relative; }
.sp-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% - .4rem); margin: 0; padding: .25rem 0; list-style: none;
  background: var(--steel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.45); max-height: 16rem; overflow-y: auto; }
.sp-list li { padding: .6rem .85rem; cursor: pointer; }
.sp-list li:hover, .sp-list li.on { background: rgba(255,212,0,.14); color: #fff; }
.cm-welcome { border: 2px solid var(--hivis); border-radius: var(--r-lg); padding: 1rem 1.1rem; margin-bottom: 1.2rem; background: var(--steel); }
.cm-welcome ol { margin: .4rem 0 1rem; padding-left: 1.3rem; }

/* You tab and Settings: each card stands out with its own accent colour */
.cm-push { --acc: var(--hivis); border-left: 4px solid var(--acc);
  background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 9%, var(--steel)) 0, var(--steel) 4.5rem); }
.cm-push h2 { color: #fff; }
.cm-push[aria-labelledby="chat-colours-h"] { --acc: #25d366; }
.cm-push#push-settings { --acc: var(--hivis); }
.cm-push#local-alerts { --acc: #4aa3ff; }
.cm-push.cm-invite, .cm-invite { --acc: #ff8a3d; }

.you-menu { background: none; border: 0; border-radius: 0; overflow: visible; display: grid; gap: .65rem; }
.you-menu li + li { border-top: 0; }
.you-menu li { --acc: var(--hivis); background: var(--steel); border: 1px solid var(--line); border-left: 4px solid var(--acc);
  border-radius: 14px; overflow: hidden; }
.you-menu li > a > span:first-child, .you-menu li > form button > span:first-child {
  background: color-mix(in srgb, var(--acc) 22%, transparent); }
.you-menu li:nth-child(1) { --acc: #4aa3ff; }   /* Profile */
.you-menu li:nth-child(2) { --acc: #ff8a3d; }   /* Invite */
.you-menu li:nth-child(3) { --acc: var(--hivis); }  /* Settings */
.you-menu li:nth-child(4) { --acc: #25d366; }   /* Contact us */
.you-menu li:nth-child(5) { --acc: #b48cff; }   /* Rules */
.you-menu li:nth-child(6) { --acc: #2dd4bf; }   /* Privacy */
.you-menu li:nth-child(7) { --acc: #ff5c5c; }   /* Log out */

/* Header: Area Check, Travel and Today pills. On phones the name beside the logo gives way so all three fit */
.pill-short { display: none; }
.head-travel span[aria-hidden] { margin-right: -.1rem; }
@media (max-width: 560px) {
  .pill-long { display: none; }
  .pill-short { display: inline; }
}
@media (max-width: 480px) {
  .site-head:has(.head-travel) .brand-name { display: none !important; }
  .head-nav:has(.head-travel) { gap: .4rem; }
  .head-nav .head-community, .head-nav .head-today { padding: .34rem .6rem !important; font-size: .9rem; }
}

/* ---------------- Travel: buses and trains ---------------- */
.tv-page { padding-bottom: 2rem; }
.tv-head h1 { margin: 1.2rem 0 .3rem; }
.tv-head p { margin: 0 0 1rem; color: var(--fog); }
.tv-free { font-size: .9rem; color: var(--fog); margin: 0 0 .8rem; }
.tv-join { border: 2px solid var(--hivis); border-radius: var(--r-lg); padding: 1.1rem; margin: 0 0 1.2rem; background: var(--steel); text-align: center; }
.tv-join h2 { margin: 0 0 .4rem; }
.tv-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; background: var(--steel); border: 1px solid var(--line); border-radius: 999px; padding: .3rem; margin-bottom: 1rem; }
.tv-tab { border: 0; border-radius: 999px; padding: .6rem; font: inherit; font-weight: 800; background: none; color: var(--fog); cursor: pointer; }
.tv-tab.on { background: var(--hivis); color: var(--hivis-ink); }
.tv-step { color: var(--fog); margin: .5rem 0; }
.tv-map { height: 300px; border-radius: 14px; border: 1px solid var(--line); margin: .6rem 0; }
.tv-stops { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.tv-stops button { width: 100%; text-align: left; padding: .75rem .9rem; border-radius: 12px; border: 1px solid var(--line); background: var(--steel); color: var(--mist); font: inherit; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; }
.tv-stops button small { margin-left: auto; color: var(--fog); }
.tv-code { background: var(--night); color: var(--hivis); border-radius: 6px; padding: .05rem .4rem; font-weight: 800; font-size: .85rem; }
.tv-stophead { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.tv-stophead > div { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.tv-stophead h2 { margin: 0; font-size: 1.15rem; }
.tv-badge { background: var(--hivis); color: var(--hivis-ink); font: 900 1.3rem/1 var(--display); padding: .35rem .6rem; border-radius: 8px; flex: none; }
.tv-live { margin: .8rem 0; padding: 1rem; border-radius: 14px; background: var(--steel); border: 1px solid var(--line); border-left: 4px solid #25d366; }
.tv-next { margin: 0; font-size: 1.2rem; font-weight: 800; }
.tv-next b { font: 900 1.7rem/1 var(--display); color: #fff; }
.tv-sub { margin: .35rem 0 0; color: var(--fog); font-size: .92rem; }
.tv-late { color: #ff9b5c; font-size: .95rem; } .tv-early { color: #7cc7ff; font-size: .95rem; } .tv-ok { color: #4ade80; font-size: .95rem; }
.tv-timeshead { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.tv-timeshead h3 { margin: .6rem 0; }
.tv-timeshead select { max-width: 10rem; }
#st-times, .tv-board { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
#st-times li, .tv-board li { display: flex; gap: .8rem; align-items: baseline; padding: .6rem .85rem; border-top: 1px solid var(--line); background: var(--steel); }
#st-times li:first-child, .tv-board li:first-child { border-top: 0; }
#st-times b, .tv-board b { font-variant-numeric: tabular-nums; min-width: 3.2rem; }
#st-times span { color: var(--fog); }
.tv-none { color: var(--fog); }
.tv-board .tv-dest { flex: 1; } .tv-board .tv-dest small { display: block; color: var(--fog); font-size: .8rem; }
.tv-board .tv-plat { color: var(--fog); font-size: .85rem; white-space: nowrap; }
.tv-board .tv-status { font-weight: 800; white-space: nowrap; color: #4ade80; }
.tv-board li.late .tv-status { color: #ff5c5c; } .tv-board li.cx .tv-status { color: #ff5c5c; } .tv-board li.cx b { text-decoration: line-through; }
.tv-msg { background: rgba(255,155,92,.12); border: 1px solid rgba(255,155,92,.4); border-radius: 10px; padding: .6rem .8rem; font-size: .9rem; }
.tv-stopicon span { font-size: 1.5rem; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.tv-busicon { position: relative; }
.tv-busemoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.35rem; background: #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,.45); }
.tv-busdir { position: absolute; inset: -9px; }
.tv-busdir::before { content: ""; position: absolute; left: 50%; top: 0; transform: translateX(-50%); border: 7px solid transparent; border-bottom: 10px solid #25d366; border-top: 0; }
/* Travel: cancellations and disruption notices */
#st-times li.cx b { text-decoration: line-through; color: var(--fog); }
#st-times li.cx span { color: var(--fog); }
#st-times li em { margin-left: auto; font-style: normal; font-weight: 800; color: #ff5c5c; font-size: .85rem; }
.tv-cx { margin: .5rem 0 0; color: #ff8080; font-weight: 700; font-size: .92rem; }
.tv-notice { margin: .6rem 0; border: 1px solid rgba(255,155,92,.45); background: rgba(255,155,92,.1); border-radius: 12px; padding: .65rem .85rem; }
.tv-notice.here { border-color: #ff5c5c; background: rgba(255,92,92,.12); }
.tv-notice summary { cursor: pointer; font-weight: 700; }
.tv-notice summary small { color: var(--fog); font-weight: 500; }
.tv-notice p { margin: .5rem 0 0; color: var(--mist); font-size: .92rem; }

/* Travel: the bus search */
.tv-find { margin-bottom: 1rem; }
.tv-lbl { display: block; font-weight: 800; margin: 0 0 .45rem; }
.tv-find input[type=text], .tv-find input[type=search] { width: 100%; padding: .85rem 1rem; font: inherit; font-size: 1.05rem; color: var(--mist);
  background: var(--steel); border: 2px solid var(--line); border-radius: 14px; -webkit-appearance: none; appearance: none; }
.tv-find input:focus { outline: none; border-color: var(--hivis); }
.tv-find input::placeholder { color: #6f84a3; }
.tv-find input::-webkit-search-cancel-button { filter: invert(1) opacity(.6); }
#bus-route { text-transform: uppercase; font-weight: 800; letter-spacing: .02em; }
#bus-route::placeholder { text-transform: none; font-weight: 400; letter-spacing: 0; }
.tv-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .55rem 0 0; }
.tv-chip { display: inline-flex; align-items: baseline; gap: .45rem; max-width: 100%; padding: .45rem .75rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--steel); color: var(--mist); font: inherit; cursor: pointer; }
.tv-chip b { color: var(--hivis); }
.tv-chip span { color: var(--fog); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 15rem; }
.tv-find .tv-lbl[for=bus-where] { margin-top: 1.2rem; }
.tv-searchbox { position: relative; }
.tv-searchbox input[type=search] { padding-right: 7.2rem; }
.tv-near { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: 0; border-radius: 10px; padding: .5rem .7rem;
  background: var(--night); color: var(--mist); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
.tv-suggest { list-style: none; margin: .35rem 0 0; padding: .25rem; border: 1px solid var(--line); border-radius: 14px; background: var(--steel);
  box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.tv-suggest button { display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; padding: .65rem .6rem; border: 0; border-radius: 10px;
  background: none; color: var(--mist); font: inherit; cursor: pointer; }
.tv-suggest button:hover, .tv-suggest button:focus-visible { background: rgba(255,255,255,.06); outline: none; }
.tv-suggest li + li { border-top: 1px solid var(--line); }
.tv-s-ic { flex: none; font-size: 1.15rem; }
.tv-s-tx { flex: 1; min-width: 0; }
.tv-s-tx small { display: block; color: var(--fog); font-size: .82rem; margin-top: .1rem; }
.tv-suggest em { flex: none; font-style: normal; color: var(--fog); font-size: .82rem; }
.tv-s-any .tv-s-tx { color: var(--fog); }
.tv-find > .btn-go { margin-top: 1.1rem; }
.tv-find .msg.error { margin-top: .8rem; }
.tv-resume { display: flex; align-items: stretch; margin: 0 0 1rem; border: 1px solid var(--line); border-left: 4px solid var(--hivis);
  border-radius: 14px; background: var(--steel); overflow: hidden; }
.tv-resume-go { flex: 1; display: flex; align-items: center; gap: .5rem; text-align: left; padding: .9rem 1rem; border: 0; background: none;
  color: var(--mist); font: inherit; cursor: pointer; }
.tv-resume-go span { margin-left: auto; color: var(--fog); font-size: 1.3rem; }
.tv-resume-x { flex: none; width: 3rem; border: 0; border-left: 1px solid var(--line); background: none; color: var(--fog); font-size: 1.05rem; cursor: pointer; }
.tv-livebtns { display: flex; gap: .5rem; margin-top: .75rem; }
.tv-livebtns .btn { flex: 1; padding: .55rem .8rem; font-size: .92rem; }
#bus-stop, #bus-pick, #tv-join { scroll-margin-top: 5.5rem; }
#st-day { font: inherit; font-weight: 700; color: var(--mist); background: var(--steel); border: 2px solid var(--line); border-radius: 10px; padding: .45rem .6rem; }
.tv-mappick { display: block; margin: .7rem 0 0; font-weight: 700; }
.tv-pop { display: grid; gap: .35rem; min-width: 11rem; font: inherit; }
.tv-pop small { color: #4a5a72; }
.tv-pop .btn { padding: .5rem .8rem; font-size: .92rem; margin-top: .2rem; }
#bus-pick .tv-map { height: 380px; }
/* Travel: train station pickers */
#tab-train .tv-chip span:first-child { color: var(--mist); font-size: .92rem; }
#tab-train .tv-chip.on { background: var(--hivis); border-color: var(--hivis); }
#tab-train .tv-chip.on span { color: var(--hivis-ink) !important; font-weight: 800; }
.tv-lbl2 { margin-top: 1.2rem; }
#tab-train .tv-find { margin-bottom: 1.2rem; }
.tv-credit { font-size: .75rem; opacity: .7; }
.tv-when { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.tv-when select, .tv-when input[type=time] { width: 100%; font: inherit; color: var(--mist); background: var(--steel);
  border: 2px solid var(--line); border-radius: 14px; padding: .75rem .9rem; color-scheme: dark; }
.tv-tabs:has(.tv-tab[data-tab="dis"]) { grid-template-columns: 1fr 1fr 1.35fr; }
.tv-tab { white-space: nowrap; font-size: .95rem; padding: .6rem .4rem; }
.tv-dh { font-size: 1.1rem; margin: 1.2rem 0 .4rem; }
.tv-subtabs { display: inline-grid; grid-template-columns: 1fr 1fr; gap: .3rem; padding: .25rem; border: 1px solid var(--line); border-radius: 12px; background: var(--steel); margin: 0 0 .6rem; }
.tv-subtab { border: 0; border-radius: 9px; padding: .45rem 1rem; font: inherit; font-weight: 700; background: none; color: var(--fog); cursor: pointer; }
.tv-subtab.on { background: var(--night); color: var(--mist); box-shadow: inset 0 0 0 2px var(--hivis); }
.tv-dfind { margin: 0 0 .5rem; }
.tv-dfind .tv-searchbox input { padding-right: 5.5rem; }
.tv-dmap { height: 220px; border-radius: 12px; border: 1px solid var(--line); margin: .6rem 0 .2rem; }
.tv-dstops { margin: .2rem 0 0; padding: 0 0 0 .2rem; list-style: none; font-size: .9rem; color: var(--mist); columns: 1; }
.tv-dstops li { padding: .15rem 0; }
.tv-dstops-h { margin-bottom: 0 !important; }
.tv-dstops li { padding: .35rem 0; border-top: 1px solid var(--line); }
.tv-dstops li:first-child { border-top: 0; }
.tv-closed { display: block; font-weight: 700; }
.tv-instead { display: block; color: #4ade80; font-size: .88rem; margin: .15rem 0 0 1.4rem; }
.tv-instead b { color: var(--mist); }
.tv-key { font-size: .8rem; color: var(--fog); display: flex; align-items: center; gap: .35rem; }
.tv-key span { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.k-red { background: #ff5c5c; } .k-green { background: #4ade80; margin-left: .6rem; }
.tv-cx-card { display: grid; gap: .2rem; }
.tv-cx-card span { color: var(--mist); } .tv-cx-card small { color: var(--fog); }
/* Travel maps: big / small */
.tv-expand { width: 38px; height: 38px; border: 2px solid rgba(0,0,0,.25); border-radius: 8px; background: #fff; color: #0a1a33;
  font-size: 1.25rem; font-weight: 900; line-height: 1; cursor: pointer; box-shadow: 0 1px 5px rgba(0,0,0,.3); }
.leaflet-container.tv-map-full { position: fixed !important; inset: 0; width: 100vw !important; height: 100vh !important; height: 100dvh !important;
  z-index: 3000; border-radius: 0 !important; margin: 0 !important; border: 0 !important; }
html.tv-noscroll, html.tv-noscroll body { overflow: hidden; }
.leaflet-container.tv-map-full .leaflet-top { top: env(safe-area-inset-top, 0); }
/* Shared alarm page */
.sh-page { padding: 1.2rem 0 2rem; }
.sh-post { margin-bottom: 1rem; }
.sh-media { display: block; width: 100%; max-height: 70vh; background: #000; border-radius: 12px; margin: .6rem 0; object-fit: contain; }
.sh-join { border: 2px solid var(--hivis); border-radius: var(--r-lg); padding: 1.1rem; background: var(--steel); text-align: center; }
.sh-join h2 { margin: 0 0 .4rem; }
.sh-note { text-align: center; margin-top: 1rem; }
.cm-share svg { width: 1.15em; height: 1.15em; }

/* Shrinking a video on the phone before sending (shrink.js) */
.wd-shrink { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 20px; }
.wd-shrink-box { background: #fff; color: #111; border-radius: 16px; padding: 22px 20px; width: min(360px, 100%); text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.wd-shrink-box b { font-size: 1.1rem; display: block; }
.wd-shrink-box p { margin: 6px 0 14px; font-size: .92rem; color: #555; }
.wd-shrink-bar { height: 8px; border-radius: 99px; background: #e8e8e8; overflow: hidden; }
.wd-shrink-bar i { display: block; height: 100%; width: 0; background: #ffd400; transition: width .25s; }
.wd-shrink-box small { display: block; margin: 8px 0 14px; color: #555; }
.wd-shrink-skip { background: #fff; color: #111; border: 2px solid #111; border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; }
/* Watermark shown over a video until the burned-in version replaces it (a minute or two) */
.cm-wmwrap { position: relative; }
.cm-wm { position: absolute; right: 2.5%; bottom: 2.5%; color: rgba(255,255,255,.6); font-weight: 700; font-size: clamp(9px, 2.6vw, 15px);
  text-shadow: 0 0 2px rgba(0,0,0,.6), 0 1px 3px rgba(0,0,0,.5); pointer-events: none; z-index: 2; }
.cm-wmwrap .cm-wm { bottom: 3.5rem; }
/* Sending in the background (your own photo/video shows at once) */
.cm-pending .cm-media video, .cm-pending .cm-media img { width: 100%; max-height: 60vh; object-fit: contain; display: block; border-radius: 10px; background: #000; }
.cm-sendbar { height: 4px; border-radius: 99px; background: rgba(0,0,0,.12); overflow: hidden; margin-top: 6px; }
.cm-sendbar i { display: block; height: 100%; width: 0; background: #ffd400; transition: width .2s; }
.cm-sending { font-size: .8rem; opacity: .75; margin-top: 4px; }
.cm-failed .cm-sending { color: #b00020; opacity: 1; }
.cm-retry { margin-left: 6px; border: 0; background: none; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.cm-sendwrap { position: relative; }
.cm-ring { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background: rgba(0,0,0,.55); display: grid; place-items: center; pointer-events: none; z-index: 3; }
.cm-ring svg { position: absolute; inset: 4px; width: 56px; height: 56px; transform: rotate(-90deg); }
.cm-ring circle { fill: none; stroke-width: 3.5; }
.cm-ring-bg { stroke: rgba(255,255,255,.25); }
.cm-ring-fg { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset .25s; }
.cm-ring b { color: #fff; font-size: .85rem; font-weight: 700; }
.cm-sendwrap::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.28); border-radius: 10px; pointer-events: none; }
.cm-pending .cm-sendstill { pointer-events: none; }
.cm-ring { width: 72px; height: 72px; margin: -36px 0 0 -36px; background: rgba(0,0,0,.5); box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.cm-ring svg { inset: 6px; width: 60px; height: 60px; }
.cm-failed .cm-sendwrap::after { background: rgba(0,0,0,.45); }
.wd-shrink-note { display: block; margin-top: 6px; font-size: .85rem; opacity: .85; }
/* Full-day timetables: scroll inside the list, earlier buses greyed, opens at the next one */
#st-times, .tv-board { max-height: 60vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#st-times li.past b, #st-times li.past span { color: var(--fog); opacity: .55; }
#st-times li.next { background: color-mix(in srgb, var(--steel) 80%, #ffd400 20%); }
.tv-credit { text-align: center; font-size: .78rem; color: var(--fog); opacity: .8; margin: 1.5rem 1rem 6rem; }
/* Timetables: next few shown, the rest behind "Show all" (no inner scrolling) */
#st-times, .tv-board { max-height: none; overflow: hidden; }
.tv-more { display: block; width: 100%; margin: .5rem 0 0; padding: .7rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--steel); color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.tv-when1 { grid-template-columns: 1fr; }

/* Folded timetables: hidden rows really hidden (the rows use display:flex, which beat the hidden attribute) */
#st-times li[hidden], .tv-board li[hidden] { display: none !important; }
.tv-board li.late b { color: #ff5c5c; }
