/* CSPC WhereITis — public/css/style.css
   Hand-written, no framework. Mobile-first.
   Redesign: flat colour, full-width layout, system fonts + Georgia headings.
   Every existing class name is kept so no other view breaks. */

/* ===== TOKENS ===== */
:root {
  --brand: #10427a;
  --brand-600: #0b2f58;
  --brand-050: #eef3f9;
  --on-brand: #ffffff;
  --accent: #ffb703;            /* focus ring ONLY */
  --accent-red: #a8281f;
  --accent-red-600: #861f18;
  --green: #1b6e43;
  --amber: #8a5a00;
  --ink: #171b21;
  --muted: #5d6673;
  --bg: #fbfbf9;
  --card: #ffffff;
  --border: #dcdfe3;
  --veil: rgba(251, 251, 249, .5);
  --ok: #1b6e43;
  --warn: #8a5a00;
  --info: #10427a;
  --danger: #a8281f;

  --s-1: .25rem; --s-2: .5rem; --s-3: 1rem; --s-4: 1.5rem; --s-5: 2rem; --s-6: 3rem;
  --radius-sm: 4px;
  --radius: 6px;
  --radius-card: 6px;
  --pad: clamp(1rem, 3vw, 2.5rem);
  --font-serif: Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eceff3; --muted: #9ba5b2; --bg: #12161c; --card: #191e26; --border: #2a313c;
    --brand: #6aa6e8; --brand-600: #8dbbf0; --brand-050: #1a2a3d; --on-brand: #10151c;
    --accent-red: #ef8b83; --accent-red-600: #f4a8a1; --green: #6cc79a; --amber: #e3b255;
    --ok: #6cc79a; --warn: #e3b255; --info: #6aa6e8; --danger: #ef8b83;
    --veil: rgba(18, 22, 28, .55);
  }
}
:root[data-theme="dark"] {
  --ink: #eceff3; --muted: #9ba5b2; --bg: #12161c; --card: #191e26; --border: #2a313c;
  --brand: #6aa6e8; --brand-600: #8dbbf0; --brand-050: #1a2a3d; --on-brand: #10151c;
  --accent-red: #ef8b83; --accent-red-600: #f4a8a1; --green: #6cc79a; --amber: #e3b255;
  --ok: #6cc79a; --warn: #e3b255; --info: #6aa6e8; --danger: #ef8b83;
  --veil: rgba(18, 22, 28, .55);
}

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
/* Always reserve the scrollbar's space. Without this, short pages (no scrollbar) and
   long pages (scrollbar) have different widths, so the header and content jump sideways
   by ~15px whenever you navigate between them. */
html { font-size: 16px; -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) { html { overflow-y: scroll; } }   /* very old browsers */
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6; color: var(--ink); background: var(--bg);
  /* Sticky-footer layout: <main> stretches to fill the screen, so the footer sits in the
     same place on every page (home, lists, forms, error pages) instead of jumping. */
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
.site-header, .site-footer { flex: 0 0 auto; }
main { flex: 1 0 auto; }
h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.2; margin: 0 0 var(--s-3); letter-spacing: -.01em; }
h1 { font-size: 1.9rem; font-weight: 700; }
h2 { font-size: 1.4rem; font-weight: 700; margin-top: var(--s-5); }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 var(--s-3); }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-600); }
code {
  font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  background: var(--brand-050); padding: .1em .35em; border-radius: 3px; font-size: .9em;
}
img, svg { max-width: 100%; display: block; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: var(--s-1); }
label { font-weight: 600; }
@media (min-width: 1024px) { h1 { font-size: 2.2rem; } h2 { font-size: 1.55rem; } }

/* ===== ACCESSIBILITY ===== */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -100px; left: var(--s-3); z-index: 1000;
  background: var(--brand); color: var(--on-brand); padding: var(--s-2) var(--s-3);
  border-radius: var(--radius); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: var(--s-3); color: var(--on-brand); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ===== LAYOUT — full width, no empty gutters ===== */
.container { width: 100%; max-width: 1680px; margin-inline: auto; padding-inline: var(--pad); }
main.container { padding-top: var(--s-4); padding-bottom: var(--s-5); }
main.container > p, main.container > ul:not(.card-grid):not(.claim-list), main.container > ol { max-width: 72ch; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.lead { font-size: 1.1rem; }
.eyebrow { display: block; font-size: .8rem; color: var(--muted); margin-bottom: var(--s-1); }

/* ===== HEADER ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border); }
.nav-row { display: flex; align-items: center; gap: 2rem; min-height: 80px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand__seal { width: 52px; height: 52px; border-radius: 50%; object-fit: contain; flex-shrink: 0; }
.brand-text strong { display: block; font-size: 1.25rem; line-height: 1.1; }
.brand-text small { display: block; color: var(--muted); font-size: .85rem; }
.primary-nav { display: flex; gap: 2rem; margin-left: 1.5rem; }
.primary-nav a {
  text-decoration: none; color: var(--muted); font-size: 1.1rem; font-weight: 500; padding: .5rem 0;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover { color: var(--ink); }
.primary-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 1.5rem; }
.nav-cta { height: 48px; padding: 0 1.6rem; font-size: 1.05rem; }
.nav-link {
  white-space: nowrap; font: inherit; font-size: 1.1rem; color: var(--muted); text-decoration: none;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.nav-link:hover { color: var(--ink); }
@media (max-width: 860px) {
  .primary-nav { display: none; }
}
@media (max-width: 520px) {
  .nav-row { gap: .75rem; }
  .nav-actions { gap: .75rem; }
  .nav-link--hide-sm { display: none; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: .95rem; }
}
@media (max-width: 440px) {
  .brand-text { display: none; }
  .nav-cta { padding: 0 .9rem; height: 40px; }
}

/* ===== BUTTONS — text only, centred, one height ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  height: 44px; padding: 0 1.35rem; border-radius: var(--radius);
  border: 1.5px solid var(--brand); font: inherit; font-weight: 600; font-size: .95rem; line-height: 1;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: var(--on-brand); }
.btn--ghost { background: transparent; color: var(--brand); }
.btn--ghost:hover { background: var(--brand-050); color: var(--brand); }
.btn--danger { background: var(--accent-red); border-color: var(--accent-red); color: var(--on-brand); }
.btn--danger:hover { background: var(--accent-red-600); border-color: var(--accent-red-600); color: var(--on-brand); }
.btn--sm { height: 36px; padding: 0 1rem; font-size: .88rem; }
.btn--pill { border-radius: 999px; }
.btn svg { display: none; }
.inline { display: inline-block; margin: 0; }

/* ===== FORMS ===== */
.form { max-width: 720px; }
.form--narrow { max-width: 420px; }
.field { margin-bottom: var(--s-4); }
.field > label { display: block; margin-bottom: var(--s-2); }
.field-hint { color: var(--muted); font-size: .9rem; margin-top: var(--s-1); }
.field-error { color: var(--accent-red); font-size: .9rem; margin-top: var(--s-1); font-weight: 600; }
.input, .select, .textarea {
  display: block; width: 100%; font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .85rem; min-height: 44px;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 2px var(--brand-050); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--accent-red); }
.textarea { min-height: 120px; resize: vertical; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6673' stroke-width='2'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right .6rem center; background-size: 1.1rem; padding-right: 2.2rem;
}
.fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-3); margin-bottom: var(--s-4); }
.fieldset legend { font-weight: 700; padding: 0 var(--s-2); }
.radio-card {
  display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3);
  border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: var(--s-2); cursor: pointer; background: var(--card);
}
.radio-card:hover { border-color: var(--brand); }
.radio-card input { margin-top: 4px; accent-color: var(--brand); }
.radio-card input:checked + span { color: var(--brand); font-weight: 600; }
.checkbox { display: flex; align-items: center; gap: var(--s-2); min-height: 44px; }
.checkbox input { width: 20px; height: 20px; accent-color: var(--brand); }
.form-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; margin-top: var(--s-4); }

.filters {
  display: grid; gap: var(--s-3); grid-template-columns: 1fr; align-items: end;
  background: var(--card); padding: var(--s-3); border: 1px solid var(--border);
  border-radius: var(--radius-card); margin-bottom: var(--s-4);
}
@media (min-width: 640px) { .filters { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .filters { grid-template-columns: repeat(4, 1fr); } }
.filters > .field { display: flex; flex-direction: column; gap: 4px; }
.filters .form-actions { grid-column: 1 / -1; margin-top: 0; }
.filters label { font-size: .85rem; color: var(--muted); }
.filters .field { margin-bottom: 0; }

/* ===== HERO — full-bleed photo, progressive blur behind the text only ===== */
.hero--campus {
  position: relative; overflow: hidden; display: flex; align-items: center;
  min-height: clamp(380px, calc(100svh - 80px - 220px), 560px);
  background: var(--brand-050) url('/img/background.jpg') 100% 50% / cover no-repeat;
}
.veil { position: absolute; inset: 0 auto 0 0; width: 58%; pointer-events: none; }
.veil span { position: absolute; inset: 0; }
.veil .tint { background: var(--veil); -webkit-mask-image: linear-gradient(to right, #000 0, #000 45%, transparent 100%); mask-image: linear-gradient(to right, #000 0, #000 45%, transparent 100%); }
.veil .b1 { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); -webkit-mask-image: linear-gradient(to right, #000 0, #000 40%, transparent 60%); mask-image: linear-gradient(to right, #000 0, #000 40%, transparent 60%); }
.veil .b2 { -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); -webkit-mask-image: linear-gradient(to right, transparent 25%, #000 45%, #000 55%, transparent 75%); mask-image: linear-gradient(to right, transparent 25%, #000 45%, #000 55%, transparent 75%); }
.veil .b3 { -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px); -webkit-mask-image: linear-gradient(to right, transparent 50%, #000 68%, #000 76%, transparent 92%); mask-image: linear-gradient(to right, transparent 50%, #000 68%, #000 76%, transparent 92%); }
.veil .b4 { -webkit-backdrop-filter: blur(.5px); backdrop-filter: blur(.5px); -webkit-mask-image: linear-gradient(to right, transparent 72%, #000 86%, transparent 100%); mask-image: linear-gradient(to right, transparent 72%, #000 86%, transparent 100%); }
.hero__overlay { position: relative; width: 100%; padding-block: clamp(1.5rem, 3vw, 2.5rem); }
.hero__text { max-width: 50%; margin-left: clamp(0rem, 2.5vw, 2.5rem); }   /* nudges the whole hero block to the right */
.hero__kicker { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 .75rem; }
/* two lines, kept inside the left half of the hero */
.hero__headline { font-size: clamp(1.7rem, 2.8vw, 2.9rem); line-height: 1.15; letter-spacing: -.015em; margin: 0 0 1rem; }
.hero__headline span { display: block; }
.hero__headline-accent { font-style: italic; color: var(--brand); }
.hero__sub { font-size: 1rem; opacity: .85; max-width: 50ch; margin: 0 0 1.25rem; }
/* The two report buttons and the search bar share ONE width, so their edges line up.
   The buttons split that width 50/50 (no fixed min-width, so it never overflows). */
.hero__actions, .hero__search { width: 100%; max-width: 560px; }
.hero__actions { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1rem; }
.hero__actions .btn {
  width: 100%; min-width: 0; height: 48px; padding: 0 1rem; font-size: 1rem;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s, color .18s, border-color .18s;
}
.hero__actions .btn--ghost { background: var(--card); }
/* Hover: lift + shadow, and a clear colour change on BOTH buttons. (The ghost button's old
   hover was being cancelled by the rule above, so it never showed anything.) */
@media (hover: hover) {
  .hero__actions .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(11, 47, 88, .28); }
  .hero__actions .btn--primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: var(--on-brand); }
  .hero__actions .btn--ghost:hover { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
}
.hero__actions .btn:active { transform: translateY(0); box-shadow: none; }
.hero__action { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.hero__action-hint { margin: 0; font-size: .85rem; line-height: 1.35; opacity: .85; }
.hero__action-hint a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.hero__search { display: flex; border-radius: var(--radius); box-shadow: 0 0 0 3px rgba(16, 66, 122, .25), 0 8px 24px rgba(11, 47, 88, .22); transition: box-shadow .15s ease; }
.hero__search-input {
  flex: 1; min-width: 0; height: 52px; padding: 0 1.1rem; font: inherit; font-size: 1.05rem; color: var(--ink);
  background: var(--card); border: 2px solid var(--brand); border-right: 0; border-radius: var(--radius) 0 0 var(--radius);
}
/* Focus colour = the search bar's own blue. The global :focus-visible rule paints a yellow
   outline on inputs, so it is switched off here and the whole bar gets a blue ring instead. */
.hero__search-input:focus, .hero__search-input:focus-visible { border-color: var(--brand); outline: none; }
.hero__search:focus-within { box-shadow: 0 0 0 3px var(--brand), 0 8px 24px rgba(11, 47, 88, .25); }
.hero__search-btn {
  height: 52px; padding: 0 1.8rem; font: inherit; font-weight: 600; font-size: 1.05rem; cursor: pointer;
  background: var(--brand); color: var(--on-brand); border: 1px solid var(--brand); border-radius: 0 var(--radius) var(--radius) 0;
}
.hero__search-btn:hover { background: var(--brand-600); border-color: var(--brand-600); }
/* Keyboard focus on the Search button: white inset ring (visible, not yellow). */
.hero__search-btn:focus-visible { outline: 2px solid var(--on-brand); outline-offset: -5px; }
@media (max-width: 860px) {
  .hero--campus { background-position: 75% 50%; }
  .veil { width: 100%; }
  .veil span { -webkit-mask-image: none !important; mask-image: none !important; }
  .veil .b2, .veil .b3, .veil .b4 { display: none; }
  .hero__headline { font-size: 7vw; }
  .hero__text { max-width: 100%; margin-left: 0; }
}
@media (max-width: 520px) {
  .hero__actions { gap: .6rem; }
  .hero__actions .btn { padding: 0 .5rem; height: 52px; font-size: .95rem; }
  .hero__search-input, .hero__search-btn { height: 52px; font-size: 1rem; }
  .hero__search-btn { padding: 0 1.2rem; }
  .hero__sub { font-size: 1.05rem; }
}
/* Small phones: shrink the label a little so "Report found item" stays inside its button */
@media (max-width: 380px) {
  .hero__actions { gap: .4rem; }
  .hero__actions .btn { font-size: .85rem; padding: 0 .25rem; }
}
@media (max-width: 340px) {
  .hero__actions .btn { font-size: .78rem; }
}

/* ===== COUNTERS — one horizontal strip ===== */
.counters {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--card); margin-bottom: var(--s-5);
}
.counters--admin { grid-template-columns: repeat(2, 1fr); max-width: 560px; }
.counters--hero { margin-top: var(--s-3); margin-bottom: var(--s-3); }
.stat-card, .counter { padding: .6rem 1.25rem; border-left: 1px solid var(--border); }
.stat-card:first-child, .counter:first-child { border-left: 0; }
.stat-card span, .counter span { display: block; font-size: .78rem; color: var(--muted); }
.stat-card strong, .counter strong { display: block; font: 700 1.6rem/1.1 var(--font-serif); margin-top: .1rem; color: var(--ink); }
.counter { display: flex; flex-direction: column-reverse; }
@media (max-width: 860px) {
  .counters--hero { grid-template-columns: repeat(2, 1fr); }
  .counters--hero .stat-card:nth-child(3) { border-left: 0; }
  .counters--hero .stat-card:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* ===== CARDS ===== */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--s-3); }
.card-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .card-grid { grid-template-columns: repeat(4, 1fr); } .card-grid--3 { grid-template-columns: repeat(3, 1fr); } }
.card-grid > li { margin: 0; }

.report-card { display: flex; flex-direction: column; gap: .35rem; height: 100%; padding: 0; overflow: hidden; }
.report-card:hover, .report-card:focus-within { border-color: var(--brand); }
.report-card__photo-wrap { aspect-ratio: 16 / 10; background: var(--brand-050); overflow: hidden; }
.report-card__photo { width: 100%; height: 100%; object-fit: cover; }
.report-card__body { display: flex; flex-direction: column; gap: .35rem; padding: .9rem 1rem 1rem; flex: 1; }
.report-card__top { display: flex; align-items: center; gap: .6rem; font-size: .78rem; }
.report-card__kind { font-weight: 700; }
.report-card__kind--lost { color: var(--accent-red); }
.report-card__kind--found { color: var(--green); }
.report-card__status { color: var(--muted); }
.report-card__top .days-badge { margin-left: auto; }
.report-card__title { margin: 0; font-size: 1.02rem; line-height: 1.3; font-family: inherit; font-weight: 700; }
.report-card__title a { color: var(--ink); text-decoration: none; }
.report-card__title a:hover { text-decoration: underline; }
.report-card__ref { font-size: .8rem; color: var(--muted); margin: 0; }
.report-card__snippet { color: var(--muted); font-size: .88rem; margin: 0; }
.report-card__tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.report-card__meta {
  margin: auto 0 0; padding-top: .6rem; border-top: 1px solid var(--border);
  font-size: .82rem; color: var(--muted); display: flex; justify-content: space-between; gap: .5rem;
}
.report-card__bookmark { color: var(--brand); font-size: .8rem; font-weight: 600; }

/* ===== PILLS & BADGES — plain coloured text, no dots, no gradients ===== */
.pill {
  display: inline-block; padding: .1rem .55rem; border-radius: 4px; font-size: .75rem; font-weight: 700;
  border: 1px solid var(--border); text-transform: capitalize; background: var(--card);
}
.pill--open { color: var(--brand); border-color: var(--brand); }
.pill--matched, .pill--claimed { color: var(--amber); border-color: var(--amber); }
.pill--returned, .pill--found { color: var(--green); border-color: var(--green); }
.pill--archived { color: var(--muted); }
.pill--lost { color: var(--accent-red); border-color: var(--accent-red); }

.days-badge { font-size: .8rem; font-weight: 600; }
.days-badge svg { display: none; }
.days-badge--fresh { color: var(--green); }
.days-badge--warm { color: var(--muted); }
.days-badge--old { color: var(--amber); }
.days-badge--stale { color: var(--accent-red); }

/* ===== SECTION HEADER ===== */
.section-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem; margin: var(--s-4) 0 var(--s-2); }
.section-header h2 { margin: 0; }
.section-header__link { font-size: .92rem; }
.container > section { margin-bottom: var(--s-5); }
/* <main> is now a flex item, so its last section's bottom margin no longer merges into the
   footer's top margin; drop it so the home page keeps its original spacing above the footer. */
main > .container > section:last-child { margin-bottom: 0; }

/* ===== DETAIL ===== */
.detail { max-width: 900px; }
.detail__head { margin-bottom: var(--s-4); }
.detail__ref { color: var(--muted); font-size: .9rem; margin: 0 0 var(--s-2); }
.detail__pills { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; margin: var(--s-2) 0 0; }
.detail__body { background: var(--card); padding: var(--s-4); border-radius: var(--radius-card); border: 1px solid var(--border); margin-bottom: var(--s-4); }
.detail__meta { display: grid; grid-template-columns: auto 1fr; gap: var(--s-2) var(--s-4); margin: var(--s-3) 0 0; padding-top: var(--s-3); border-top: 1px solid var(--border); }
.detail__meta dt { font-weight: 600; color: var(--muted); font-size: .9rem; }
.detail__meta dd { margin: 0; }
.detail__actions { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; margin-bottom: var(--s-4); }
.matches { margin-bottom: var(--s-4); }
.comments { margin-top: var(--s-4); }
.comments__head { display: flex; align-items: center; gap: .6rem; margin: 0 0 var(--s-3); }
.comments__head h2 { margin: 0; }
.comments__count { font-size: .8rem; font-weight: 600; padding: .1rem .6rem; border-radius: 999px; background: var(--brand-050); color: var(--brand); }
.comments__empty { margin: 0 0 var(--s-3); padding: var(--s-3); border: 1px dashed var(--border); border-radius: var(--radius-card); color: var(--muted); text-align: center; }
.comment-list { list-style: none; padding: 0; margin: 0 0 var(--s-3); }
.comment { position: relative; display: flex; align-items: flex-start; gap: .85rem; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem; margin-bottom: .6rem; }
.comment__avatar { all: unset; flex: none; cursor: pointer; border-radius: 50%; line-height: 0; }
.comment__avatar .avatar { width: 42px; height: 42px; font-size: .9rem; }
.comment__avatar:hover .avatar { border-color: var(--brand); }
.comment__avatar:focus-visible, .comment__name:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.comment__main { flex: 1; min-width: 0; }
.comment__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .55rem; margin: 0 0 .15rem; }
.comment__name { all: unset; cursor: pointer; font-weight: 700; font-size: .95rem; color: var(--ink); border-radius: 3px; }
.comment__name:hover { text-decoration: underline; text-underline-offset: 2px; color: var(--brand); }
.comment__badge { font-size: .7rem; font-weight: 600; padding: .05rem .5rem; border-radius: 999px; background: var(--brand-050); color: var(--muted); }
.comment__badge--owner { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); }
.comment__time { font-size: .8rem; color: var(--muted); }
.comment__body { margin: 0; font-size: .95rem; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-line; }

/* Profile popover (opens from a commenter's picture or name) */
.profile-pop { position: absolute; z-index: 20; left: .75rem; top: 3.6rem; width: min(280px, calc(100% - 1.5rem)); background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: .9rem; box-shadow: 0 12px 32px rgba(0, 0, 0, .18); }
.profile-pop[hidden] { display: none; }
.profile-pop__top { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.profile-pop .avatar--xl { width: 56px; height: 56px; font-size: 1.15rem; }
.profile-pop__name { margin: 0; font-weight: 700; }
.profile-pop__role { margin: 0; font-size: .8rem; color: var(--muted); }
.profile-pop__msg { display: flex; justify-content: center; width: 100%; text-align: center; }
.profile-pop__hint { margin: .5rem 0 0; font-size: .75rem; color: var(--muted); text-align: center; }

/* New-comment box with the writer's own picture */
.comment-form { display: flex; align-items: flex-start; gap: .85rem; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem; }
.comment-form > .avatar { width: 42px; height: 42px; font-size: .9rem; }
.comment-form__main { flex: 1; min-width: 0; }
.comment-form__main .textarea { width: 100%; }
.comment-form__row { display: flex; justify-content: flex-end; margin-top: .5rem; }
@media (max-width: 520px) { .comment, .comment-form { padding: .75rem; gap: .65rem; } .profile-pop { left: .5rem; } }

.match-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--s-3); }
.match-card__ribbon { display: inline-block; color: var(--brand); font-weight: 700; font-size: .8rem; margin-bottom: var(--s-2); }
.match-card__title { margin: 0 0 var(--s-1); font-size: 1rem; }
.match-card__reasons { list-style: none; padding: 0; margin: var(--s-2) 0 0; }
.match-card__reasons li { font-size: .85rem; color: var(--muted); display: flex; gap: 4px; align-items: flex-start; }
.match-card__reasons svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--ok); }

/* ===== EMPTY STATE ===== */
.empty-state { padding: var(--s-5) var(--s-3); background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius-card); color: var(--muted); text-align: center; }
.empty-state svg { display: none; }
.empty-state h3 { margin: 0 0 var(--s-1); }
.empty-state p { margin: 0 0 var(--s-3); }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; margin-bottom: var(--s-4); border-radius: var(--radius-card); border: 1px solid var(--border); background: var(--card); }
.table { width: 100%; border-collapse: collapse; min-width: 480px; }
.table th, .table td { padding: var(--s-2) var(--s-3); text-align: left; border-bottom: 1px solid var(--border); }
.table th { font-size: .82rem; font-weight: 700; color: var(--muted); background: var(--brand-050); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--brand-050); }

/* ===== FLASH ===== */
.flash { display: flex; align-items: center; gap: var(--s-2); padding: .75rem var(--s-3); border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius); margin: var(--s-3) 0; background: var(--card); transition: opacity .3s; }
.flash--leaving { opacity: 0; }
.flash--ok { border-left-color: var(--ok); }
.flash--err { border-left-color: var(--accent-red); }
.flash--info { border-left-color: var(--brand); }
.flash__icon { display: none; }
.flash__message { flex: 1; }
.flash__close { background: none; border: 0; cursor: pointer; color: var(--muted); min-height: 32px; min-width: 32px; display: inline-flex; align-items: center; justify-content: center; }
.flash__close svg { width: 18px; height: 18px; }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: var(--s-3); align-items: center; justify-content: center; margin: var(--s-4) 0; flex-wrap: wrap; }
.pagination__status { color: var(--muted); font-size: .9rem; }

/* ===== FOOTER ===== */
.site-footer { border-top: 1px solid var(--border); margin-top: var(--s-5); padding: var(--s-4) 0; color: var(--muted); font-size: .88rem; }
.footer-grid { display: grid; gap: var(--s-4); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.5fr 1.5fr 1.2fr; } }
.footer-brand { color: var(--ink); margin: 0 0 var(--s-2); }
.footer-note { margin: 0; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s-3); }
.footer-links a { color: var(--muted); }
.footer-tagline { font-family: var(--font-serif); font-style: italic; margin: 0; }

/* ===== ERRORS ===== */
.error-page { text-align: center; padding: var(--s-6) var(--s-3); }
.error-page h1 { color: var(--accent-red); }
.ref-id { font-size: .9rem; word-break: break-all; }

.print-actions { text-align: center; margin: var(--s-4); }
.print-body { background: var(--bg); }
@media print {
  .site-header, .site-footer, .skip-link, .no-print, .flash, .detail__actions, .primary-nav, .nav-actions { display: none !important; }
  body { background: #fff; color: #000; display: block; min-height: 0; }
    @page { margin: 1.5cm; }
}

/* ===== MY REPORTS / CLAIMS ===== */
.my-section { margin-bottom: var(--s-5); }
.claim-list { list-style: none; padding: 0; max-width: 900px; }
.claim-row { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--s-3); margin-bottom: var(--s-2); }
.claim-row a { font-weight: 700; }
.claim-row p { margin: var(--s-1) 0 0; font-size: .85rem; }
.claim-card { margin-bottom: var(--s-4); max-width: 900px; }
.claim-card__head { border-bottom: 1px solid var(--border); padding-bottom: var(--s-3); margin-bottom: var(--s-3); }
.claim-card__head p { margin: 0 0 var(--s-1); }
.claim-card__body h2 { font-size: 1.1rem; margin-top: var(--s-3); }
.claim-actions { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--s-4); max-width: 900px; }
.claim-actions form { margin-bottom: var(--s-4); }
.claim-summary { margin-bottom: var(--s-4); }
.claim-summary p { margin: 0 0 var(--s-1); }

/* ===== TAGS ===== */
.tag-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .1rem .55rem; border-radius: 4px; font-size: .75rem; font-weight: 600; background: var(--brand-050); color: var(--brand); text-decoration: none; }
.tag-chip:hover { text-decoration: underline; color: var(--brand); }
.tag-chip--sm { font-size: .72rem; }
.tag-chip input[type="checkbox"] { accent-color: var(--brand); }
.tag-picker { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ===== STAFF NOTES ===== */
.staff-notes { background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius); padding: var(--s-4); max-width: 900px; }
.staff-notes h2 { font-size: 1.15rem; margin-top: 0; }
.note-list { list-style: none; padding: 0; margin: 0 0 var(--s-3); }
.note { border-left: 3px solid var(--border); padding-left: .75rem; margin: .5rem 0; }
.note__meta { font-size: .85rem; color: var(--muted); margin: 0 0 .15rem; }
.note__body { margin: 0; }

/* ===== REPORT AN ITEM (new report form) ===== */
.req { color: var(--brand); font-weight: 700; }
.optional { color: var(--muted); font-weight: 400; font-size: .9em; }
.label { display: block; font-weight: 600; margin-bottom: var(--s-2); }
.report-layout { display: grid; gap: var(--s-4); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .report-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-5); } }
.report-form { max-width: 820px; }
.report-aside { display: grid; gap: var(--s-3); }
@media (min-width: 960px) { .report-aside { position: sticky; top: 96px; } }
.aside-card { padding: var(--s-3) var(--s-4); }
.aside-card[hidden] { display: none; }
.aside-card h2 { font-size: 1rem; margin: 0 0 var(--s-2); font-family: inherit; }
.aside-card p { margin: 0 0 var(--s-2); font-size: .92rem; }
.aside-card p:last-child { margin-bottom: 0; }
.aside-card ul, .aside-card ol { margin: 0; padding-left: 1.1rem; font-size: .92rem; color: var(--muted); }

.form-section { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: var(--s-4); margin-bottom: var(--s-3); }
.form-section__title { display: flex; align-items: center; gap: .6rem; font-family: inherit; font-size: 1.1rem; margin: 0 0 var(--s-3); }
.form-section__num { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; flex: none; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: .85rem; font-weight: 700; }
.form-section .field:last-child { margin-bottom: 0; }
.field-row { display: grid; gap: 0 var(--s-3); grid-template-columns: 1fr; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }

.kind-choice { display: grid; gap: var(--s-2); grid-template-columns: 1fr; }
@media (min-width: 640px) { .kind-choice { grid-template-columns: 1fr 1fr; } }
.kind-choice__option { position: relative; display: block; cursor: pointer; font-weight: 400; }
.kind-choice__option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.kind-choice__body { display: block; height: 100%; position: relative; padding: var(--s-3) var(--s-3) var(--s-3) 3rem; border: 1.5px solid var(--border); border-radius: 10px; background: var(--card); transition: border-color .15s, background-color .15s; }
.kind-choice__body::before { content: ""; position: absolute; left: 1rem; top: 1.1rem; width: 1.15rem; height: 1.15rem; border: 2px solid var(--border); border-radius: 50%; background: var(--card); transition: border-color .15s, background-color .15s, box-shadow .15s; }
.kind-choice__body strong { display: block; font-size: 1rem; }
.kind-choice__body small { display: block; color: var(--muted); font-size: .86rem; margin-top: .15rem; line-height: 1.4; }
.kind-choice__option:hover .kind-choice__body { border-color: var(--brand); }
.kind-choice__option input:checked + .kind-choice__body { border-color: var(--brand); background: var(--brand-050); }
.kind-choice__option input:checked + .kind-choice__body::before { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 3px var(--brand-050); }
.kind-choice__option input:focus-visible + .kind-choice__body { outline: 3px solid var(--accent); outline-offset: 2px; }

.tag-chip--pick { padding: 0; background: none; cursor: pointer; font-weight: 400; position: relative; }
.tag-chip--pick input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.tag-chip--pick span { display: inline-block; padding: .3rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 600; border: 1px solid var(--border); background: var(--card); color: var(--ink); transition: background-color .15s, border-color .15s, color .15s; }
.tag-chip--pick:hover span { border-color: var(--brand); }
.tag-chip--pick input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.tag-chip--pick input:disabled + span { opacity: .45; cursor: not-allowed; }
.tag-chip--pick input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.charcount { font-size: .82rem; margin: var(--s-1) 0 0; text-align: right; color: var(--muted); }
.charcount--ok { color: var(--brand); }

.photo-preview { margin-top: var(--s-3); }
.photo-preview[hidden] { display: none; }
.photo-preview img { width: 100%; max-width: 280px; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--border); border-radius: 10px; background: var(--brand-050); }
.photo-preview img[hidden] { display: none; }

.form-alert { background: var(--card); border: 1px solid var(--accent-red); border-radius: 10px; padding: var(--s-3) var(--s-4); margin-bottom: var(--s-4); max-width: 820px; }
.form-alert:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
.form-alert ul { margin: var(--s-2) 0 0; padding-left: 1.1rem; }
.form-alert li { margin: 0; }
.form-alert a { color: var(--accent-red); }

.form-actions--bar { margin-top: var(--s-4); }
.form-actions--bar .btn { min-width: 150px; }
.form-actions__note { margin: 0 0 0 auto; font-size: .85rem; color: var(--muted); }
.btn[disabled] { opacity: .65; cursor: not-allowed; }
@media (max-width: 520px) {
  .form-section { padding: var(--s-3); }
  .form-actions--bar .btn { flex: 1; min-width: 0; }
  .form-actions__note { width: 100%; margin: 0; }
}

/* ===== SIGN IN ===== */
.auth-main { flex: 1 0 auto; padding: var(--s-5) var(--pad); display: flex; flex-direction: column; align-items: center; }
.auth-main > .flash { width: 100%; max-width: 980px; }
.auth-card { width: 100%; max-width: 980px; display: grid; grid-template-columns: 1fr; margin: auto 0; background: #1b2430 url('/img/background.jpg') 30% 50% / cover no-repeat; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 18px 50px rgba(0, 0, 0, .22); }
@media (min-width: 860px) { .auth-card { grid-template-columns: 1.05fr 1fr; min-height: 560px; } }

.auth-brand { position: relative; color: #fff; padding: var(--s-5); display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-4);
  background: linear-gradient(180deg, rgba(8, 16, 28, .48) 0%, rgba(8, 16, 28, .18) 45%, rgba(8, 16, 28, .5) 100%); text-shadow: 0 1px 8px rgba(0, 0, 0, .45); }
.auth-brand__top { display: flex; align-items: center; gap: .75rem; }
.auth-brand__seal { width: 52px; height: 52px; border-radius: 50%; background: #fff; object-fit: contain; flex: none; }
.auth-brand__name { margin: 0; font-weight: 700; font-size: 1.15rem; line-height: 1.15; }
.auth-brand__name span { display: block; font-weight: 400; font-size: .85rem; opacity: .8; }
.auth-brand__copy h2 { color: #fff; font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 0 0 var(--s-2); }
.auth-brand__copy p { margin: 0; opacity: .95; max-width: 38ch; }
.auth-brand__foot { margin: 0; font-size: .8rem; opacity: .7; }
@media (max-width: 859px) {
  .auth-brand { padding: var(--s-3) var(--s-4); }
  .auth-brand__copy, .auth-brand__foot { display: none; }
}

.auth-panel { padding: clamp(1.5rem, 4vw, 3rem); display: flex; flex-direction: column; justify-content: center;
  background: rgba(255, 255, 255, .58); border-left: 1px solid rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
.auth-panel .muted, .auth-panel .field-hint, .auth-help { color: #35404d; }
.auth-panel .input { background: rgba(255, 255, 255, .55); border-color: rgba(16, 66, 122, .28); }
.auth-panel .input:focus { background: rgba(255, 255, 255, .85); }
:root[data-theme="dark"] .auth-panel { background: rgba(18, 22, 28, .55); border-left-color: rgba(255, 255, 255, .12); }
:root[data-theme="dark"] .auth-panel .muted, :root[data-theme="dark"] .auth-panel .field-hint, :root[data-theme="dark"] .auth-panel .auth-help { color: var(--muted); }
:root[data-theme="dark"] .auth-panel .input { background: rgba(25, 30, 38, .6); border-color: rgba(255, 255, 255, .18); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .auth-panel { background: rgba(18, 22, 28, .55); border-left-color: rgba(255, 255, 255, .12); }
  :root:not([data-theme="light"]) .auth-panel .muted, :root:not([data-theme="light"]) .auth-panel .field-hint, :root:not([data-theme="light"]) .auth-panel .auth-help { color: var(--muted); }
  :root:not([data-theme="light"]) .auth-panel .input { background: rgba(25, 30, 38, .6); border-color: rgba(255, 255, 255, .18); }
}
@media (max-width: 859px) { .auth-panel { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .5); } }
.auth-panel h1 { margin: 0 0 .25rem; font-size: 1.9rem; }
.auth-panel__sub { margin: 0 0 var(--s-4); }
.auth-alert { max-width: none; margin: 0 0 var(--s-3); padding: .7rem var(--s-3); font-size: .92rem; font-weight: 600; color: var(--accent-red); }
.auth-form { max-width: 420px; }
.auth-form .field { margin-bottom: var(--s-3); }
.input--lg { min-height: 48px; font-size: 1.02rem; }
.pin-wrap { position: relative; }
.pin-wrap .input { padding-right: 4.5rem; letter-spacing: .2em; }
.pin-wrap .input::placeholder { letter-spacing: .2em; }
.pin-toggle { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--brand); font: inherit; font-weight: 600; font-size: .85rem; padding: .4rem .6rem; border-radius: 6px; cursor: pointer; }
.pin-toggle:hover { background: var(--brand-050); }
.auth-remember { margin: 0 0 var(--s-3); font-weight: 400; font-size: .92rem; }
.auth-submit { width: 100%; height: 48px; font-size: 1rem; }
/* Forgot-password link sits below the password field, not beside the label. */
.auth-forgot { max-width: 420px; margin: -.2rem 0 clamp(.5rem, 1.5vh, .85rem); font-size: .85rem; }
.auth-forgot a { color: var(--brand); }
/* Google sign-in: always-visible "or" divider + branded button, matching the
   familiar Google button pattern without depending on a broken CSP setup. */
.auth-google { max-width: 420px; width: 100%; margin: clamp(.9rem, 2.4vh, 1.35rem) auto 0;
  display: flex; flex-direction: column; align-items: stretch; gap: .85rem; }
.auth-google__divider { display: flex; align-items: center; gap: .8rem; color: #35404d;
  font-size: .85rem; letter-spacing: .02em; }
.auth-google__divider::before, .auth-google__divider::after { content: ""; flex: 1; height: 1px; background: rgba(16, 66, 122, .2); }
:root[data-theme="dark"] .auth-google__divider { color: var(--muted); }
:root[data-theme="dark"] .auth-google__divider::before,
:root[data-theme="dark"] .auth-google__divider::after { background: rgba(255, 255, 255, .18); }
.auth-google-custom { position: relative; width: 100%; height: 44px; display: flex; align-items: center; justify-content: center; gap: .7rem;
  background: var(--card); color: var(--brand); border: 1.5px solid var(--brand); border-radius: var(--radius);
  font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none;
  transition: background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease; }
/* Same hover whether the real link or the invisible Google button on top is hovered. */
.auth-google-custom:hover, .auth-google__wrap:hover .auth-google-custom {
  background: var(--brand-050); color: var(--brand-600); border-color: var(--brand-600); box-shadow: 0 2px 8px rgba(16, 66, 122, .18); }
.auth-google-custom:focus-visible, .auth-google__wrap:focus-within .auth-google-custom { outline: 3px solid var(--accent); outline-offset: 2px; }
.auth-google-custom__icon { width: 20px; height: 20px; display: inline-flex; flex: none; }
.auth-google-custom__icon svg { width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) { .auth-google-custom { transition: none; } }
/* Official Google Identity Services button: invisible, stretched over the branded button above. */
.auth-google__wrap { position: relative; width: 100%; max-width: 400px; height: 44px; margin: 0 auto; }
.auth-google__wrap .auth-google-custom { pointer-events: none; }
.auth-google__button { display: block; }
.auth-google__overlay { position: absolute; inset: 0; z-index: 2; opacity: .001; overflow: hidden; cursor: pointer; }
.auth-google__overlay > div { transform: scaleY(1.1); transform-origin: 0 0; }   /* Google's button is 40px tall; this covers all 44px */
.auth-google__error { color: #b42318; text-align: center; margin: 0; font-size: .85rem; }
.auth-help { margin: var(--s-4) auto var(--s-2); font-size: .9rem; color: var(--muted); max-width: 420px; text-align: center; }
.auth-back { margin: 0 auto; font-size: .9rem; text-align: center; }
/* Auth text links: bold, no underline. The Google logo stays visually separate. */
.auth-panel a:not(.auth-google):not(.auth-google-custom) { font-weight: 400; text-decoration: none; }
.auth-panel a:not(.auth-google):not(.auth-google-custom):hover { text-decoration: none; }
.auth-panel [data-staff-only][hidden] { display: none; }

/* sign-in entrance animation (pure CSS; reduced-motion users get none via the global rule) */
@keyframes auth-rise   { from { opacity: 0; transform: translateY(24px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes auth-from-left  { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }
@keyframes auth-from-right { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }
@keyframes auth-fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.auth-card { animation: auth-rise .6s cubic-bezier(.22, 1, .36, 1) both; }
.auth-brand { animation: auth-from-left .75s cubic-bezier(.22, 1, .36, 1) .05s both; }
.auth-panel { animation: auth-from-right .75s cubic-bezier(.22, 1, .36, 1) .05s both; }
.auth-panel > h1, .auth-panel__sub, .auth-alert, .auth-form .field, .auth-remember, .auth-submit, .auth-help, .auth-back {
  animation: auth-fade-up .5s ease-out both;
}
.auth-panel > h1 { animation-delay: .25s; }
.auth-panel__sub { animation-delay: .3s; }
.auth-alert { animation-delay: .32s; }
.auth-form .field:nth-of-type(1) { animation-delay: .38s; }
.auth-form .field:nth-of-type(2) { animation-delay: .46s; }
.auth-remember { animation-delay: .54s; }
.auth-submit { animation-delay: .6s; }
.auth-help { animation-delay: .68s; }
.auth-back { animation-delay: .72s; }
@media (max-width: 859px) {
  .auth-brand { animation-name: auth-fade-up; }
  .auth-panel { animation-name: auth-fade-up; }
}

/* ===== MISC ===== */
fieldset, legend { font-family: inherit; }
::selection { background: var(--accent); color: #171b21; }

/* =====================================================================
   REPORTS: three different pages  (All = registry · Lost = board · Found = claim centre)
   ===================================================================== */
:root { --lost: var(--brand); --lost-050: var(--brand-050); --found: var(--brand); --found-050: var(--brand-050); }

.reports-page { padding-top: var(--s-5); }
.btn--lost, .btn--found { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn--lost:hover, .btn--found:hover { background: var(--brand-600); border-color: var(--brand-600); color: var(--on-brand); }
.result-count { color: var(--muted); margin: 0 0 var(--s-2); font-size: .92rem; }
.result-count strong { color: var(--ink); }
.section-h { font-size: 1.15rem; margin: var(--s-4) 0 var(--s-2); }

/* page header (All) */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-4); }
.page-head__eyebrow { margin: 0 0 .35rem; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.page-head__title { margin: 0 0 .35rem; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.page-head__sub { margin: 0; color: var(--muted); max-width: 70ch; }

/* shared toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: flex-end; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: var(--s-3); margin-bottom: var(--s-3); }
.toolbar__field { display: flex; flex-direction: column; gap: .3rem; min-width: 150px; }
.toolbar__field--grow { flex: 1 1 260px; }
.toolbar__field--check { min-width: 0; }
.toolbar__field label { font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.toolbar__field .checkbox { text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--ink); font-weight: 600; }
.toolbar__actions { display: flex; gap: .5rem; }
.seg { display: inline-flex; padding: 3px; gap: 3px; background: var(--brand-050); border: 1px solid var(--border); border-radius: 9px; }
.seg a { position: relative; z-index: 0; padding: .35rem .9rem; border-radius: 6px; font-size: .85rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.seg a[aria-current="true"] { color: var(--ink); }
/* the selected "pill" is a separate layer behind the label so it can glide without stretching the text */
.seg a[aria-current="true"]::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 6px;
  background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.list-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-2); }
.list-bar .result-count { margin: 0; }

/* ---------- ALL: dashboard + registry ---------- */
.status-tabs { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: var(--s-3); }
.status-tabs a { position: relative; padding: .6rem 1rem; font-weight: 600; font-size: .92rem; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
/* the active-tab bar is a separate element (not the tab's border) so it can slide between tabs on its own */
.status-tabs a::after, .mod-tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--brand); transform: scaleX(0); pointer-events: none;
}
.status-tabs a span { display: inline-block; margin-left: .3rem; padding: 0 .45rem; border-radius: 999px; background: var(--brand-050); font-size: .75rem; }
.status-tabs a:hover { color: var(--ink); }
.status-tabs a[aria-current="true"] { color: var(--brand); }
.status-tabs a[aria-current="true"]::after { transform: scaleX(1); }
.registry-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
.registry { width: 100%; border-collapse: collapse; }
.registry th { text-align: left; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--brand-050); padding: .7rem 1rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.sort-link { color: inherit; text-decoration: none; } .sort-link:hover { color: var(--brand); text-decoration: underline; }
.registry td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: .92rem; }
.registry tbody tr:last-child td { border-bottom: 0; }
.registry tbody tr:hover td { background: var(--brand-050); }
.registry__item { display: flex; align-items: center; gap: .85rem; min-width: 260px; }
.registry__thumb { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 8px; overflow: hidden; background: var(--brand-050); border: 1px solid var(--border); }
.registry__thumb img { width: 100%; height: 100%; object-fit: cover; }
.registry__title { display: block; font-weight: 700; color: var(--ink); text-decoration: none; }
.registry__title:hover { text-decoration: underline; }
.registry__ref { font-size: .72rem; }
.registry__go { text-align: right; }
.kind-badge { display: inline-block; padding: .12rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 700; border: 1px solid; }
.kind-badge--lost  { background: var(--card); color: var(--brand); border-color: var(--brand); }
.kind-badge--found { background: var(--brand-050); color: var(--brand); border-color: var(--brand-050); }
.status-pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; background: var(--brand-050); color: var(--brand); }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill--matched, .status-pill--claimed { background: var(--brand); color: var(--on-brand); }
.status-pill--returned, .status-pill--archived { background: var(--brand-050); color: var(--muted); }
.all-reports-mobile { display: none; }
@media (max-width: 760px) {
  .registry thead { display: none; }
  .registry, .registry tbody, .registry tr, .registry td { display: block; }
  .registry tr { padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
  .registry td { border: 0 !important; padding: .15rem 0; background: none !important; }
  .registry td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 600; font-size: .8rem; }
  .registry__go { text-align: left; padding-top: .4rem; }
}
@media (max-width: 640px) {
  .all-reports-desktop { display: none; }
  .all-reports-mobile { display: block; }
  .all-reports-mobile__hint { margin: 0 0 .45rem; color: var(--muted); font-size: .8rem; text-align: center; }
  .all-reports-mobile__track { margin: 0; padding: 0; list-style: none; }
  .all-report-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: start; gap: .75rem; min-width: 0; padding: .8rem; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
  .all-report-card__thumb { display: block; width: 64px; height: 64px; overflow: hidden; border: 1px solid var(--border); border-radius: 9px; background: var(--brand-050); }
  .all-report-card__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .all-report-card__body { display: grid; gap: .4rem; min-width: 0; }
  .all-report-card__badges { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
  .all-report-card__title { margin: 0; font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
  .all-report-card__title a { color: var(--ink); text-decoration: none; }
  .all-report-card__title a:hover { text-decoration: underline; }
  .all-report-card__ref { font-size: .7rem; }
  .all-report-card__meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem .7rem; margin: .15rem 0 0; }
  .all-report-card__meta dt { color: var(--muted); font-size: .65rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
  .all-report-card__meta dd { margin: 0; font-size: .78rem; line-height: 1.3; overflow-wrap: anywhere; }
  .all-report-card__view { justify-self: start; min-height: 38px; margin-top: .1rem; }
}

/* ---------- hero shared by Lost + Found ---------- */
.board-hero { display: grid; gap: var(--s-4); align-items: center; grid-template-columns: 1fr; padding: clamp(1.25rem, 3vw, 2.25rem); margin-bottom: var(--s-4); border: 1px solid var(--border); border-radius: 12px; }
@media (min-width: 960px) { .board-hero { grid-template-columns: 1.4fr 1fr; } .board-hero--lost { grid-template-columns: 1fr auto; } }
.board-hero h1 { margin: 0 0 .5rem; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.board-hero p { max-width: 62ch; }
.board-hero--lost, .board-hero--found, .board-hero--all { background: var(--brand-050); }
@media (min-width: 960px) { .board-hero--all { grid-template-columns: 1fr; } }
.board-hero .btn--ghost { background: var(--card); color: var(--brand); border-color: var(--brand); }
.board-hero .btn--ghost:hover { background: var(--brand-050); }
.board-hero__cta { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: var(--s-2); }
.board-hero--lost .board-hero__cta { flex-direction: column; margin: 0; }
.mode-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: .6rem; }
.mode-steps li { counter-increment: step; display: grid; grid-template-columns: 2.2rem 1fr; column-gap: .75rem; margin: 0; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: .7rem .9rem; }
.mode-steps li::before { content: counter(step); grid-row: span 2; align-self: center; width: 2rem; height: 2rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--on-brand); background: var(--brand); }
.mode-steps span { font-size: .85rem; color: var(--muted); }

/* ---------- LOST: sidebar + missing list ---------- */
.board-layout { display: grid; gap: var(--s-4); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .board-layout { grid-template-columns: 270px 1fr; } .side { position: sticky; top: 96px; } }
.side { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: var(--s-3); }
.side__search { display: grid; gap: .5rem; margin-bottom: var(--s-3); }
.side__h { font: 700 .75rem/1 system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: var(--s-3) 0 .4rem; }
.facet { list-style: none; margin: 0; padding: 0; }
.facet li { margin: 0; }
.facet a { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem .6rem; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: .9rem; }
.facet a span { color: var(--muted); font-size: .8rem; }
.facet a:hover { background: var(--brand-050); }
.facet a[aria-current="true"] { background: var(--brand-050); color: var(--brand); font-weight: 700; }
.side__foot { margin: var(--s-3) 0 0; padding-top: var(--s-3); border-top: 1px solid var(--border); font-size: .85rem; line-height: 2; }
.missing-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.missing { display: grid; grid-template-columns: 92px 1fr auto; gap: var(--s-3); align-items: start; margin: 0; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: var(--s-3); transition: box-shadow .18s, border-color .18s; }
.missing:hover { border-color: var(--brand); box-shadow: 0 8px 22px rgba(16,66,122,.12); }
.missing__days { text-align: center; border-radius: 8px; padding: .55rem .3rem; background: var(--brand-050); color: var(--brand); }
.missing__days strong { display: block; font: 700 1.7rem/1 var(--font-serif); }
.missing__days span { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.missing__days--new  { background: var(--brand-050); color: var(--brand); }
.missing__days--long { background: var(--brand); color: var(--on-brand); }
.missing--returned .missing__days, .missing--archived .missing__days { background: var(--brand-050); color: var(--muted); }
.missing__cat { margin: 0 0 .15rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.missing__title { margin: 0 0 .3rem; font-size: 1.2rem; font-family: inherit; }
.missing__title a { color: var(--ink); text-decoration: none; } .missing__title a:hover { text-decoration: underline; }
.missing__alert { margin: 0 0 .4rem; padding: .3rem .6rem; border-radius: 6px; background: var(--brand-050); color: var(--brand); font-size: .82rem; font-weight: 600; display: inline-block; }
.missing__desc { margin: 0 0 .5rem; color: var(--muted); font-size: .92rem; }
.missing__meta { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin: 0 0 .4rem; font-size: .85rem; }
.missing__meta strong { color: var(--muted); font-weight: 600; }
.missing__actions { display: flex; flex-direction: column; gap: .5rem; min-width: 130px; }
@media (max-width: 700px) {
  .missing { grid-template-columns: 70px 1fr; }
  .missing__actions { grid-column: 1 / -1; flex-direction: row; }
}

/* ---------- FOUND: category tiles, expiring, gallery ---------- */
.cat-tiles { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px)  { .cat-tiles { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .cat-tiles { grid-template-columns: repeat(7, 1fr); } }
.cat-tiles li { margin: 0; }
.cat-tiles a { display: flex; flex-direction: column; gap: .15rem; padding: .8rem 1rem; height: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.cat-tiles a:hover { border-color: var(--found); transform: translateY(-2px); }
.cat-tiles strong { font: 700 1.5rem/1 var(--font-serif); color: var(--found); }
.cat-tiles span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.cat-tiles a[aria-current="true"] { background: var(--found); border-color: var(--found); }
.cat-tiles a[aria-current="true"] strong, .cat-tiles a[aria-current="true"] span { color: var(--on-brand); }
.expiring { background: var(--brand-050); border: 1px solid var(--border); border-radius: 12px; padding: var(--s-3); margin-bottom: var(--s-4); }
.expiring__head h2 { margin: 0 0 .15rem; font-size: 1.1rem; color: var(--brand); }
.expiring__head p { margin: 0 0 var(--s-3); font-size: .9rem; color: var(--muted); }
.board { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.board > li { margin: 0; }
@media (min-width: 600px)  { .board { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px)  { .board { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1400px) { .board { grid-template-columns: repeat(4, 1fr); } }
.custody { height: 100%; display: flex; flex-direction: column; background: var(--card); overflow: hidden; border: 1px solid var(--border); border-radius: 10px; transition: transform .18s, box-shadow .18s, border-color .18s; }
@media (hover: hover) { .custody:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: 0 12px 28px rgba(16,66,122,.14); } }
.custody__photo { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--brand-050); overflow: hidden; }
.custody__photo img { width: 100%; height: 100%; object-fit: cover; }
.custody__flag { position: absolute; left: .65rem; bottom: .65rem; padding: .2rem .65rem; border-radius: 999px; font-size: .72rem; font-weight: 700; background: #fff; color: #171b21; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.custody__flag--open { background: var(--brand); color: var(--on-brand); }
.custody__body { padding: .9rem 1.1rem .4rem; flex: 1; display: flex; flex-direction: column; gap: .45rem; }
.custody__cat { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--found); }
.custody__title { margin: 0; font-size: 1.12rem; font-family: inherit; }
.custody__title a { color: var(--ink); text-decoration: none; } .custody__title a:hover { text-decoration: underline; }
.custody__desc { margin: 0; color: var(--muted); font-size: .88rem; }
.custody__facts { margin: 0; display: grid; gap: .3rem; }
.custody__facts div { display: grid; grid-template-columns: 5.5rem 1fr; gap: .5rem; font-size: .88rem; }
.custody__facts dt { color: var(--muted); font-weight: 600; } .custody__facts dd { margin: 0; }
.custody__hold { background: var(--found-050); border-radius: 6px; padding: .35rem .5rem; margin-top: .2rem; }
.custody__hold dd { font-weight: 700; color: var(--found); }
.custody__foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .75rem 1.1rem 1rem; }
.custody__foot code { font-size: .75rem; }
.retention { margin-top: .3rem; }
.retention__label { display: flex; justify-content: space-between; font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: .25rem; }
.retention__bar { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.retention__bar span { display: block; height: 100%; border-radius: 999px; background: var(--found); }
.retention--warm .retention__bar span { background: var(--muted); }
.retention--old .retention__bar span, .retention--stale .retention__bar span { background: var(--brand-600); }
.retention--old .retention__label span:last-child, .retention--stale .retention__label span:last-child { color: var(--brand); }

/* ---------- pagination + empty ---------- */
.pagination { gap: .5rem; margin: var(--s-5) 0 var(--s-3); }
.pagination__pages { display: flex; list-style: none; margin: 0; padding: 0; gap: .35rem; }
.pagination__pages li { margin: 0; }
.pagination__gap { color: var(--muted); padding: 0 .25rem; align-self: center; }
.pagination__num, .pagination__link { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-width: 40px; height: 40px; padding: 0 .85rem; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
a.pagination__num:hover, a.pagination__link:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-050); }
.pagination__num.is-current { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.pagination__link.is-disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 520px) { .pagination__pages li:not(:first-child):not(:last-child) { display: none; } }
.empty-state { padding: var(--s-6) var(--s-3); border-radius: 10px; }
.empty-state svg { display: block; margin: 0 auto var(--s-3); width: 44px; height: 44px; color: var(--brand); opacity: .7; }
.empty-state h3 { color: var(--ink); }
.empty-state__actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }


/* =====================================================================
   PREMIUM POLISH  (additive layer — motion, depth, micro-interactions)
   Nothing above this line was changed. To undo the whole effect,
   delete everything from here down (and the "Visual polish" block in app.js).
   ===================================================================== */
:root {
  --ease: cubic-bezier(.22, 1, .36, 1);        /* soft "expo out" — fast start, gentle landing */
  --lift: 0 10px 26px rgba(16, 66, 122, .16);  /* hover shadow for cards / buttons */
  --lift-sm: 0 6px 16px rgba(16, 66, 122, .22);
  --header-shadow: 0 6px 24px rgba(11, 47, 88, .10);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --lift: 0 12px 28px rgba(0, 0, 0, .45); --lift-sm: 0 6px 16px rgba(0, 0, 0, .45); --header-shadow: 0 6px 24px rgba(0, 0, 0, .4); }
}
:root[data-theme="dark"] { --lift: 0 12px 28px rgba(0, 0, 0, .45); --lift-sm: 0 6px 16px rgba(0, 0, 0, .45); --header-shadow: 0 6px 24px rgba(0, 0, 0, .4); }

/* ---------- Typography finish ---------- */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; scroll-padding-top: 96px; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.stat-card strong, .counter strong { font-variant-numeric: tabular-nums; }

/* ---------- Page-to-page navigation ----------
   Real cross-document view transitions: the page cross-fades with a small rise while the
   header stays put. Chrome / Edge / Safari 18.2+. Other browsers fall back to the page-in
   animation below. Zero JavaScript, and the pages are still plain server-rendered HTML. */
.site-header { view-transition-name: site-header; }
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  html { scroll-behavior: smooth; }
  /* Page change: the old page fades out quickly, the new one fades in with a very small rise.
     No sideways sliding: it fought with the photo morph and felt jerky. Forward and back look the same. */
  /* Old and new use the SAME duration and easing, so their opacities always add up to 1: no dip to a blank
     page and no brightness flash in the middle (the old version delayed the new page and faded the old one
     out faster, which read as a flicker). */
  ::view-transition-old(root) { animation: vt-out .26s cubic-bezier(.4, 0, .2, 1) both; }
  ::view-transition-new(root) { animation: vt-in  .26s cubic-bezier(.4, 0, .2, 1) both; }
  ::view-transition-group(site-header) { animation-duration: .3s; }
  @keyframes vt-out { to { opacity: 0; } }
  @keyframes vt-in  { from { opacity: 0; transform: translateY(6px); } }

  /* Refining the page you are already on (status tab, sort, filter, page number): the header, tabs and
     toolbar must stay perfectly still, so it is a plain, short, linear cross-fade with no movement at all.
     Identical pixels blend into themselves, so only what actually changed appears to change.
     (html.nav-refine is set by the script in head.ejs.) */
  html.nav-refine::view-transition-old(root) { animation: vt-out .18s linear both; }
  html.nav-refine::view-transition-new(root) { animation: vt-fade-in .18s linear both; }
  @keyframes vt-fade-in { from { opacity: 0; } }

  /* shared element: the card photo grows into the report photo (and shrinks back on return).
     Rounded + clipped so corners never pop, and a gentler curve so it settles instead of snapping. */
  ::view-transition-group(report-photo) {
    animation-duration: .5s; animation-timing-function: cubic-bezier(.32, .72, 0, 1);
    border-radius: var(--radius-card, 12px); overflow: clip;
  }
  ::view-transition-image-pair(report-photo) { isolation: auto; }
  ::view-transition-old(report-photo), ::view-transition-new(report-photo) {
    height: 100%; width: 100%; object-fit: cover; overflow: clip;
  }

  @keyframes page-in { from { opacity: 0; } }
  @supports not (view-transition-name: none) {
    main:not(.auth-main) { animation: page-in .3s ease-out backwards; }
    html.nav-refine main:not(.auth-main) { animation: none; }
  }

  /* thin reading-progress line under the header (scroll-driven, Chrome/Edge/Safari) */
  @supports (animation-timeline: scroll()) {
    .site-header::after {
      content: ""; position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px; background: var(--brand);
      transform: scaleX(0); transform-origin: 0 50%; pointer-events: none;
      animation: scroll-progress linear both; animation-timeline: scroll(root);
    }
    @keyframes scroll-progress { to { transform: scaleX(1); } }
  }
}

/* ---------- Header: frosted, with a shadow once you scroll ---------- */
.site-header {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  transition: box-shadow .35s var(--ease), border-color .35s;
}
.site-header.is-scrolled { box-shadow: var(--header-shadow); border-bottom-color: transparent; }
.brand__seal { transition: transform .45s var(--ease); }
@media (hover: hover) { .brand:hover .brand__seal { transform: scale(1.07) rotate(-4deg); } }

/* nav links: underline grows in from the left */
.primary-nav a { position: relative; transition: color .2s; }
.primary-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--brand);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s var(--ease);
}
.primary-nav a:hover::after, .primary-nav a[aria-current="page"]::after { transform: scaleX(1); }
.primary-nav a[aria-current="page"] { border-bottom-color: transparent; }
.nav-link { transition: color .2s; }

/* ---------- Buttons: lift on hover, press on click ---------- */
.btn { transition: background-color .2s, color .2s, border-color .2s, transform .25s var(--ease), box-shadow .25s var(--ease); }
@media (hover: hover) {
  .btn:not([disabled]):not(.hero__search-btn):hover { transform: translateY(-2px); box-shadow: var(--lift-sm); }
}
.btn:not([disabled]):active { transform: translateY(0) scale(.98); box-shadow: none; }
.hero__search-btn { transition: background-color .2s, border-color .2s; }

/* ---------- Form fields: soft glow on focus ---------- */
.input, .select, .textarea { transition: border-color .2s, box-shadow .25s var(--ease), background-color .2s; }
.input:focus, .select:focus, .textarea:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.radio-card, .kind-choice__body, .tag-chip--pick span { transition: border-color .2s, background-color .2s, color .2s, box-shadow .25s var(--ease), transform .2s var(--ease); }
.tag-chip--pick:active span { transform: scale(.95); }
.form-section { transition: box-shadow .3s var(--ease), border-color .3s; }
.form-section:focus-within { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); box-shadow: 0 6px 22px rgba(16, 66, 122, .08); }

/* ---------- Cards: rise + image zoom ---------- */
.report-card { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .2s; }
.report-card__photo { transition: transform .7s var(--ease); }
.custody__photo img { transition: transform .7s var(--ease); }
@media (hover: hover) {
  .report-card:hover { transform: translateY(-5px); box-shadow: var(--lift); }
  .report-card:hover .report-card__photo, .custody:hover .custody__photo img { transform: scale(1.06); }
}
.tag-chip, .pill, .status-pill { transition: background-color .2s, color .2s, border-color .2s; }
.tag-chip:not(.tag-chip--pick):hover { background: var(--brand); color: var(--on-brand); text-decoration: none; }

/* stat strip */
.counters { overflow: hidden; box-shadow: 0 1px 2px rgba(16, 66, 122, .06); }
.stat-card, .counter { transition: background-color .25s; }
@media (hover: hover) { .stat-card:hover, .counter:hover { background: var(--brand-050); } }

/* ---------- Lists, tables, tabs, pagination ---------- */
.registry tbody td, .table tbody td { transition: background-color .2s; }
.facet a, .seg a, .status-tabs a, .sort-link { transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s; }
.pagination__num, .pagination__link { transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease); }
@media (hover: hover) { a.pagination__num:hover, a.pagination__link:hover { transform: translateY(-1px); } }
.footer-links a {
  text-decoration: none; padding-bottom: 1px; transition: color .2s, background-size .35s var(--ease);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
}
.footer-links a:hover { color: var(--ink); background-size: 100% 1px; }

/* ---------- Flash message slides in ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes flash-in { from { opacity: 0; transform: translateY(-10px); } }
  .flash { animation: flash-in .5s var(--ease) backwards; }

  /* ---------- Home hero: staggered entrance ---------- */
  @keyframes hero-rise { from { opacity: 0; transform: translateY(18px); } }
  .hero__kicker, .hero__headline span, .hero__sub, .hero__actions, .hero__search { animation: hero-rise .8s var(--ease) backwards; }
  .hero__kicker { animation-delay: .05s; }
  .hero__headline span:nth-child(1) { animation-delay: .15s; }
  .hero__headline span:nth-child(2) { animation-delay: .27s; }
  .hero__sub { animation-delay: .4s; }
  .hero__actions { animation-delay: .5s; }
  .hero__search { animation-delay: .6s; }
  .counters--hero .stat-card { animation: hero-rise .7s var(--ease) backwards; }
  .counters--hero .stat-card:nth-child(1) { animation-delay: .7s; }
  .counters--hero .stat-card:nth-child(2) { animation-delay: .78s; }
  .counters--hero .stat-card:nth-child(3) { animation-delay: .86s; }
  .counters--hero .stat-card:nth-child(4) { animation-delay: .94s; }
  /* not when you are only refining the page you are already on */
  html.nav-refine :is(.hero__kicker, .hero__headline span, .hero__sub, .hero__actions, .hero__search, .counters--hero .stat-card) { animation: none; }

  /* ---------- Scroll reveal (classes added by app.js, only to content below the fold) ---------- */
  @keyframes reveal-up { from { opacity: 0; transform: translateY(26px); } }
  .reveal { opacity: 0; }
  .reveal.is-in { opacity: 1; animation: reveal-up .7s var(--ease) backwards; animation-delay: var(--d, 0ms); }
}
@media print { .reveal { opacity: 1 !important; } }

/* ---------- Report photo on the detail page (target of the photo morph) ---------- */
.detail__photo { margin: 0 0 var(--s-4); aspect-ratio: 16 / 9; max-height: 400px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--brand-050); }
.detail__photo img { width: 100%; height: 100%; object-fit: cover; }


/* =====================================================================
   HOME + LISTS: richer stat strip, "how it works", empty states, Lost/Found colour coding
   (additive — delete from here down to undo)
   ===================================================================== */

/* ---------- stat strip: tinted, with icons and bigger numbers ---------- */
.counters--hero { background: linear-gradient(135deg, var(--brand-050), var(--card) 70%); }
.counters--hero .stat-card { display: flex; align-items: center; gap: .9rem; padding: .8rem 1.25rem; }
.counters--hero .stat-card span { font-size: .82rem; }
.counters--hero .stat-card strong { font-size: 2rem; }
.stat-card__icon {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; font-style: normal;
  color: var(--c, var(--brand)); background: color-mix(in srgb, var(--c, var(--brand)) 14%, transparent);
  transition: transform .35s var(--ease);
}
.stat-card__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stat-card--lost { --c: var(--accent-red); }
.stat-card--found { --c: var(--green); }
.stat-card--returned { --c: var(--amber); }
@media (hover: hover) { .stat-card:hover .stat-card__icon { transform: scale(1.1) rotate(-6deg); } }

/* ---------- how it works ---------- */
.how { margin-bottom: var(--s-4); }
.how__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.how__steps li {
  position: relative; display: flex; gap: .85rem; align-items: flex-start; margin: 0; padding: 1rem 1.15rem;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .2s;
}
.how__num { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent); color: #171b21; font: 700 1rem/1 var(--font-serif); }
.how__steps strong { display: block; font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.2; }
.how__steps p { margin: .2rem 0 0; font-size: .88rem; color: var(--muted); }
@media (hover: hover) { .how__steps li:hover { transform: translateY(-3px); box-shadow: var(--lift); border-color: var(--accent); } }
@media (min-width: 861px) {
  .how__steps li:not(:last-child)::after { content: "\2192"; position: absolute; right: -.95rem; top: 50%; transform: translateY(-50%); z-index: 1; color: var(--muted); font-size: 1.1rem; line-height: 1; }
}
@media (max-width: 860px) { .how__steps { grid-template-columns: 1fr; } }

/* ---------- trust strip (home) ---------- */
.trust-strip {
  margin-bottom: var(--s-4); padding: 1.1rem 1.25rem;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem;
  background: linear-gradient(135deg, var(--brand-050), var(--card) 65%);
  border: 1px solid var(--border); border-radius: var(--radius-card);
}
.trust-strip__item { display: flex; align-items: flex-start; gap: .8rem; min-width: 0; }
.trust-strip__icon {
  flex: none; display: grid; place-items: center; width: 2.35rem; height: 2.35rem;
  border-radius: 12px; background: var(--card); border: 1px solid var(--border);
  color: var(--brand);
}
.trust-strip__icon svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.trust-strip strong { display: block; font-family: var(--font-serif); font-size: .98rem; line-height: 1.25; color: var(--ink); }
.trust-strip p { margin: .15rem 0 0; font-size: .82rem; line-height: 1.45; color: var(--muted); }
@media (max-width: 860px) { .trust-strip { grid-template-columns: 1fr; gap: .85rem; } }
@media (prefers-reduced-motion: no-preference) {
  .trust-strip__item { transition: transform .25s var(--ease); }
  .trust-strip__item:hover { transform: translateY(-2px); }
}

/* ---------- empty states ---------- */
.empty-state { background: linear-gradient(180deg, color-mix(in srgb, var(--brand-050) 55%, var(--card)), var(--card)); }
.empty-state p { max-width: 46ch; margin-inline: auto; }
.empty-state__icon {
  display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto var(--s-3); border-radius: 50%;
  color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent);
}
.empty-state__icon svg { width: 30px; height: 30px; margin: 0; opacity: 1; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.empty-state--green .empty-state__icon { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  @keyframes soft-float { 50% { transform: translateY(-6px); } }
  .empty-state__icon { animation: soft-float 3.4s ease-in-out infinite; }
}

/* ---------- Lost / Found colour coding (red = lost, green = found) ----------
   Colour lives in the small badges and pills only. Cards keep a plain, neutral outline: no coloured
   strip on the top or side edge. */
.report-card__photo-wrap { position: relative; }
.report-card__kind { position: absolute; left: .6rem; top: .6rem; z-index: 1; padding: .18rem .7rem; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; box-shadow: 0 2px 8px rgba(0, 0, 0, .28); }
.report-card__kind--lost { background: var(--accent-red); color: var(--on-brand); }
.report-card__kind--found { background: var(--green); color: var(--on-brand); }
.kind-badge--lost  { background: color-mix(in srgb, var(--accent-red) 10%, var(--card)); color: var(--accent-red); border-color: var(--accent-red); }
.kind-badge--found { background: color-mix(in srgb, var(--green) 12%, var(--card)); color: var(--green); border-color: var(--green); }


/* =====================================================================
   OUTLINE ICON STYLE  — line only: no tile, no fill, no shadow
   (stat-strip icons, how-it-works numbers, empty-state icons;
    delete this block to go back to the soft tinted style)
   ===================================================================== */
.stat-card__icon {
  width: 40px; height: 40px; background: none; border: 0; border-radius: 0; box-shadow: none;
  color: var(--c, var(--brand)); transition: transform .3s var(--ease);
}
.stat-card__icon svg { width: 32px; height: 32px; stroke-width: 1.6; }
.stat-card--returned { --c: var(--amber); }
@media (hover: hover) {
  .stat-card:hover .stat-card__icon { transform: translateY(-2px) scale(1.08); box-shadow: none; }
}

.how__num {
  width: 2.2rem; height: 2.2rem; border-radius: 50%; background: none; box-shadow: none;
  border: 2px solid var(--accent); color: var(--ink); font-size: 1rem;
  transition: background-color .25s, transform .25s var(--ease);
}
@media (hover: hover) {
  .how__steps li:hover .how__num { background: var(--accent); color: #171b21; transform: none; box-shadow: none; }
}

.empty-state .empty-state__icon {
  --c: var(--brand);
  width: 64px; height: 64px; border-radius: 0; background: none; border: 0; box-shadow: none; color: var(--c);
}
.empty-state--green .empty-state__icon { --c: var(--green); color: var(--c); background: none; }
.empty-state__icon svg { width: 56px; height: 56px; stroke-width: 1.5; }


/* =====================================================================
   DARK / LIGHT MODE TOGGLE
   ===================================================================== */
:root[data-theme="dark"]  { color-scheme: dark; }     /* dark scrollbars, form controls, date pickers */
:root[data-theme="light"] { color-scheme: light; }
.theme-toggle {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  border: 1px solid var(--border); background: var(--card); color: var(--ink); cursor: pointer;
  transition: border-color .2s, color .2s, transform .4s var(--ease), background-color .2s;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (hover: hover) { .theme-toggle:hover { border-color: var(--brand); color: var(--brand); transform: rotate(18deg); } }
.theme-toggle:active { transform: scale(.92); }
@media (max-width: 520px) { .theme-toggle { width: 40px; height: 40px; } }

/* switching animation: the new theme grows out of the button as a circle (see app.js).
   The header is excluded from its own transition group so it is revealed along with the page. */
html.theme-switching .site-header { view-transition-name: none; }
html.theme-switching::view-transition-old(root), html.theme-switching::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.theme-switching::view-transition-old(root) { z-index: 1; }
html.theme-switching::view-transition-new(root) { z-index: 2; }


/* =====================================================================
   LIGHT-MODE FIXES (from screenshot review)
   ===================================================================== */
/* 1. Georgia's old-style digits make "0" look like the letter "o" — use the system sans for numbers */
.stat-card strong, .counter strong, .missing__days strong, .cat-tiles strong, .how__num {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: lining-nums tabular-nums;
}
.counters--hero .stat-card strong { font-weight: 800; letter-spacing: -.02em; }

/* 2. even background across the whole stat strip (the gradient only tinted the first cell) */
.counters--hero { background: var(--card); }

/* 3. arrows between the "how it works" cards: a small round badge centred in the gap */
.how__steps { gap: 1.75rem; }
@media (min-width: 861px) {
  .how__steps li:not(:last-child)::after {
    content: "\2192"; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; right: -1.675rem; z-index: 2;
    border: 1px solid var(--border); border-radius: 50%; background: var(--card); color: var(--brand); font-size: .9rem;
  }
}
@media (max-width: 860px) { .how__steps { gap: .75rem; } }

/* 4. hero: stronger veil + darker kicker so the small text stays readable over the photo (light mode) */
:root { --veil: rgba(251, 251, 249, .62); }
.hero__kicker { color: var(--ink); opacity: .8; font-weight: 600; }


/* =====================================================================
   PREMIUM BUTTONS + SEARCH BAR
   (delete from here down to go back to the flat versions; also remove the icons in home.ejs / nav.ejs if you like)
   ===================================================================== */

/* ---------- primary buttons (site-wide): soft top-light gradient, inner highlight, tinted shadow ---------- */
.btn--primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 84%, #fff) 0%, var(--brand) 55%, var(--brand-600) 130%);
  border-color: var(--brand-600);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), 0 6px 14px -6px color-mix(in srgb, var(--brand-600) 70%, transparent);
}
.btn--primary:hover { background: linear-gradient(180deg, var(--brand) 0%, var(--brand-600) 100%); }

/* ---------- hero + nav report buttons: icon, glass ghost button, light sweep on hover ---------- */
.hero__actions .btn, .nav-cta { position: relative; overflow: hidden; isolation: isolate; }
.hero__actions .btn::before, .nav-cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, .38) 50%, transparent 68%);
  transform: translateX(-130%); transition: transform .8s var(--ease);
}
@media (hover: hover) { .hero__actions .btn:hover::before, .nav-cta:hover::before { transform: translateX(130%); } }
.hero__actions .btn svg, .nav-cta svg {
  display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .35s var(--ease);
}
.hero__actions .btn svg { width: 20px; height: 20px; margin-right: .55rem; }
.nav-cta svg { width: 18px; height: 18px; margin-right: .45rem; }
@media (hover: hover) { .hero__actions .btn:hover svg, .nav-cta:hover svg { transform: scale(1.15) rotate(-6deg); } }
.hero__actions .btn { letter-spacing: .01em; border-radius: 10px; height: 52px; }
.hero__actions .btn--primary:hover { background: linear-gradient(180deg, var(--brand) 0%, var(--brand-600) 100%); }
.hero__actions .btn--ghost {
  background: color-mix(in srgb, var(--card) 82%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(150%); backdrop-filter: blur(10px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 6px 14px -8px rgba(11, 47, 88, .35);
}
.hero__actions .btn--ghost:hover { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
@media (max-width: 520px) { .hero__actions .btn svg, .nav-cta svg { display: none; } }

/* ---------- search bar: one floating panel, icon inside, button nested in it ---------- */
.hero__search {
  position: relative; align-items: center; gap: .25rem; padding: 6px; border-radius: 14px;
  background: var(--card); border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--border));
  box-shadow: 0 14px 34px -12px color-mix(in srgb, var(--brand-600) 55%, transparent), 0 2px 6px rgba(11, 47, 88, .10);
  transition: box-shadow .3s var(--ease), border-color .25s, transform .3s var(--ease);
}
.hero__search:focus-within {
  border-color: var(--brand); transform: translateY(-1px);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 28%, transparent), 0 18px 40px -12px color-mix(in srgb, var(--brand-600) 60%, transparent);
}
.hero__search-icon {
  position: absolute; left: 1.2rem; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); pointer-events: none;
  fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; transition: stroke .2s;
}
.hero__search:focus-within .hero__search-icon { stroke: var(--brand); }
.hero__search-input {
  height: 48px; padding: 0 .5rem 0 2.8rem; border: 0; border-radius: 10px 0 0 10px; background: transparent; font-size: 1.05rem;
}
.hero__search-input:focus, .hero__search-input:focus-visible { border: 0; box-shadow: none; }
.hero__search-input::placeholder { color: var(--muted); opacity: .85; }
.hero__search-kbd {
  flex: none; margin-right: .5rem; padding: .1rem .5rem; font: 600 .8rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--muted); background: var(--brand-050); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px;
}
.hero__search-input:focus ~ .hero__search-kbd, .hero__search-input:not(:placeholder-shown) ~ .hero__search-kbd { display: none; }
@media (hover: none) { .hero__search-kbd { display: none; } }
.hero__search-btn {
  display: inline-flex; align-items: center; gap: .5rem; flex: none; height: 46px; padding: 0 1.4rem; border-radius: 9px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 84%, #fff) 0%, var(--brand) 55%, var(--brand-600) 130%);
  border: 1px solid var(--brand-600);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), 0 4px 10px -4px color-mix(in srgb, var(--brand-600) 70%, transparent);
  transition: background-color .2s, transform .25s var(--ease), box-shadow .25s var(--ease);
}
.hero__search-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.hero__search-btn:hover { background: linear-gradient(180deg, var(--brand) 0%, var(--brand-600) 100%); border-color: var(--brand-600); }
@media (hover: hover) { .hero__search-btn:hover svg { transform: translateX(4px); } }
.hero__search-btn:active { transform: scale(.97); }
@media (max-width: 520px) { .hero__search-btn { padding: 0 1rem; } .hero__search-btn svg { display: none; } .hero__search-input { font-size: 1rem; } }


/* =====================================================================
   SIGN-IN: full-width background slideshow (3 CSPC photos, smooth crossfade)
   Pure CSS. 3 photos x 5s = a 15s loop. To change the pace, change the three delays and the
   "18s" together (duration = number of photos x seconds per photo).
   Kept from looking "zoomed in" on purpose: each photo has its own focal point, the drift is only
   6%, and a soft dark wash sits on top so any upscaled photo reads as atmosphere, not a close-up.
   Visitors who prefer reduced motion see the first photo, still.
   ===================================================================== */
.auth-main { position: relative; isolation: isolate; overflow: hidden; }
.auth-main > .flash { position: relative; z-index: 1; }
.auth-main + .site-footer { margin-top: 0; }            /* no gap between the photo and the footer */

.auth-slides { position: absolute; inset: 0; z-index: -1; overflow: hidden; isolation: isolate; background: #1b2430; pointer-events: none; }
.auth-slides::after {                                    /* dark wash: makes the card pop and softens upscaled photos */
  content: ""; position: absolute; inset: 0; z-index: 5;
  background: linear-gradient(180deg, rgba(8, 16, 28, .42) 0%, rgba(8, 16, 28, .2) 45%, rgba(8, 16, 28, .5) 100%);
}
/* The photos stay sharp. Only the sign-in card (the form panel) blurs what is behind it — see .auth-panel below. */
.auth-slide { position: absolute; inset: 0; background-size: cover; background-repeat: no-repeat; opacity: 0; will-change: opacity, transform; }
.auth-slide:nth-child(1) { opacity: 1; background-image: url('/img/background.jpg'); background-position: 75% 50%; transform-origin: 60% 50%; }
.auth-slide:nth-child(2) { background-image: url('/img/Facilities.jpg');  background-position: 30% 15%; transform-origin: 35% 30%; }
.auth-slide:nth-child(3) { background-image: url('/img/campus.jpg');      background-position: 50% 50%; transform-origin: 55% 55%; }

/* the card is now a floating glass card over the full-width photos */
.auth-card { background: none; border-color: rgba(255, 255, 255, .3); box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .6); }
.auth-brand { background: linear-gradient(180deg, rgba(8, 16, 28, .5) 0%, rgba(8, 16, 28, .22) 45%, rgba(8, 16, 28, .55) 100%); }

@media (prefers-reduced-motion: no-preference) {
  .auth-slide { animation: auth-slide 15s linear infinite; }
  .auth-slide:nth-child(1) { animation-delay: -1.2s; }   /* starts already visible, so the page never opens on a dark flash */
  .auth-slide:nth-child(2) { animation-delay: 3.8s; }
  .auth-slide:nth-child(3) { animation-delay: 8.8s; }
  /* The incoming photo is raised on top (z-index 2) and fades in over the outgoing one, which stays
     fully opaque beneath it until the fade is done — so the picture never dips dark mid-fade. */
  @keyframes auth-slide {
    0%     { opacity: 0; z-index: 2; transform: scale(1); }
    8%     { opacity: 1; z-index: 2; }
    33%    { opacity: 1; z-index: 2; }
    33.1%  { opacity: 1; z-index: 1; }
    42%    { opacity: 1; z-index: 1; }
    42.1%  { opacity: 0; z-index: 1; }
    100%   { opacity: 0; z-index: 1; transform: scale(1.06); }
  }
}


/* =====================================================================
   SIGN-IN CARD: frosted glass
   Why this works: the blur is on the card itself (it sits directly over the photos), and the card's
   entrance animation is transform-only. An animated OPACITY on the card would make the browser treat
   it as an isolated layer, and the blur would have nothing behind it to blur (the photos are outside it).
   ===================================================================== */
@keyframes auth-rise-t { from { transform: translateY(24px) scale(.985); } to { transform: none; } }
.auth-card {
  --auth-card-blur: 7px;                                   /* raise for smoother, lower to see more of the photo */
  animation-name: auth-rise-t;
  background: rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(var(--auth-card-blur)) saturate(150%); backdrop-filter: blur(var(--auth-card-blur)) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .38);
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.auth-panel { -webkit-backdrop-filter: none; backdrop-filter: none; }   /* the card already blurs everything behind it */
.auth-brand { background: linear-gradient(180deg, rgba(8, 16, 28, .42) 0%, rgba(8, 16, 28, .18) 45%, rgba(8, 16, 28, .48) 100%); }


/* =====================================================================
   PREMIUM PASS — the rest of the system (styles only: no markup, no behaviour)
   Forms · report detail · lists & tables · tabs · pills · flash · footer · admin
   To undo, delete everything from here down.
   ===================================================================== */
:root { --card-shadow: 0 1px 2px rgba(11, 47, 88, .05), 0 10px 24px -14px rgba(11, 47, 88, .22); }
:root[data-theme="dark"] { --card-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 24px -14px rgba(0, 0, 0, .7); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --card-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 24px -14px rgba(0, 0, 0, .7); } }

/* ---------- global finish ---------- */
html { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--brand) 40%, transparent) transparent; }
body { background: radial-gradient(900px 420px at 50% -80px, color-mix(in srgb, var(--brand) 6%, transparent), transparent 70%) no-repeat, var(--bg); }
a { text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
h1, h2 { letter-spacing: -.02em; }
input[type="checkbox"], input[type="radio"], input[type="range"], progress { accent-color: var(--brand); }
.section-header h2 { position: relative; padding-bottom: .55rem; }
.section-header h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 2.4rem; height: 3px; border-radius: 3px; background: var(--accent); }
.page-head__eyebrow::before { content: ""; display: inline-block; width: 1.6rem; height: 2px; margin: 0 .6rem .22em 0; vertical-align: middle; background: var(--accent); }

/* ---------- surfaces: one soft shadow + rounder corners everywhere ---------- */
.card, .detail__body, .comment, .match-card, .claim-row, .claim-actions, .staff-notes, .side, .toolbar, .form-section,
.table-wrap, .registry-wrap, .card, .detail__body, .comment, .match-card, .claim-row, .claim-actions, .side, .toolbar, .form-section, .table-wrap, .registry-wrap { box-shadow: var(--card-shadow); }
.claim-row, .match-card, .comment { transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .2s; }
@media (hover: hover) {
  .claim-row:hover, .match-card:hover { transform: translateY(-3px); box-shadow: var(--lift); border-color: var(--brand); }
}

/* ---------- buttons: danger matches the primary finish; softer ghost ---------- */
.btn--danger {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-red) 86%, #fff) 0%, var(--accent-red) 60%, var(--accent-red-600) 140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 6px 14px -6px color-mix(in srgb, var(--accent-red-600) 70%, transparent);
}
.btn--ghost:hover { border-color: var(--brand); }

/* ---------- forms ---------- */
.input, .select, .textarea { border-radius: 10px; box-shadow: inset 0 1px 2px rgba(11, 47, 88, .05); }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.label, .field > label { font-weight: 600; letter-spacing: .005em; }
.form-section__num {
  background: linear-gradient(145deg, color-mix(in srgb, var(--brand) 80%, #fff), var(--brand-600));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.kind-choice__body { border-radius: 12px; transition: border-color .2s, background-color .2s, box-shadow .3s var(--ease), transform .3s var(--ease); }
@media (hover: hover) { .kind-choice__option:hover .kind-choice__body { transform: translateY(-2px); box-shadow: var(--lift); } }
.kind-choice__option input:checked + .kind-choice__body { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
/* Lost = red, Found = green when chosen (browsers without :has() simply keep the blue) */
.kind-choice__option:has(input[value="lost"]:checked) .kind-choice__body { border-color: var(--accent-red); background: color-mix(in srgb, var(--accent-red) 8%, var(--card)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-red) 18%, transparent); }
.kind-choice__option:has(input[value="lost"]:checked) .kind-choice__body::before { border-color: var(--accent-red); background: var(--accent-red); box-shadow: inset 0 0 0 3px var(--card); }
.kind-choice__option:has(input[value="found"]:checked) .kind-choice__body { border-color: var(--green); background: color-mix(in srgb, var(--green) 8%, var(--card)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 18%, transparent); }
.kind-choice__option:has(input[value="found"]:checked) .kind-choice__body::before { border-color: var(--green); background: var(--green); box-shadow: inset 0 0 0 3px var(--card); }
.tag-chip--pick input:checked + span { box-shadow: 0 4px 10px -4px color-mix(in srgb, var(--brand) 70%, transparent); }
.photo-preview img { box-shadow: var(--card-shadow); }
.form-alert { border-left: 4px solid var(--accent-red); background: color-mix(in srgb, var(--accent-red) 6%, var(--card)); }
/* the Submit / Cancel bar floats over long forms as a frosted strip */
.form-actions--bar {
  position: sticky; bottom: .75rem; z-index: 5; padding: .7rem .9rem; border: 1px solid var(--border); border-radius: 14px;
  background: color-mix(in srgb, var(--card) 82%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(150%); backdrop-filter: blur(12px) saturate(150%); box-shadow: var(--lift);
}

/* ---------- report detail ---------- */
.detail__ref {
  display: inline-block; padding: .15rem .7rem; border-radius: 999px; background: var(--brand-050); color: var(--muted);
  font: 600 .8rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em;
}
.detail__head h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.detail__meta dt { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; align-self: center; }
.detail__photo { box-shadow: var(--card-shadow); }
.detail__photo img { transition: transform .8s var(--ease); }
@media (hover: hover) { .detail__photo:hover img { transform: scale(1.03); } }
.match-card__ribbon { padding: .1rem .65rem; border-radius: 999px; background: var(--brand-050); }
.note { border-left-color: color-mix(in srgb, var(--brand) 50%, var(--border)); }

/* ---------- pills & badges: rounded, softly tinted ---------- */
.pill { padding: .15rem .75rem; border-radius: 999px; }
.pill--open { background: color-mix(in srgb, var(--brand) 9%, var(--card)); }
.pill--matched, .pill--claimed { background: color-mix(in srgb, var(--amber) 10%, var(--card)); }
.pill--returned, .pill--found, .pill--approved { color: var(--green); border-color: var(--green); background: color-mix(in srgb, var(--green) 10%, var(--card)); }
.pill--lost, .pill--rejected { color: var(--accent-red); border-color: var(--accent-red); background: color-mix(in srgb, var(--accent-red) 9%, var(--card)); }
.status-pill--open { background: color-mix(in srgb, var(--brand) 12%, var(--card)); }
@media (prefers-reduced-motion: no-preference) {
  @keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
  .status-pill--open::before { animation: pulse-dot 2.2s ease-out infinite; }
}

/* ---------- lists: toolbar, tabs, registry, tables ---------- */
.toolbar__field label { transition: color .2s; }
.toolbar__field:focus-within label { color: var(--brand); }
.seg { border-radius: 11px; }
.seg a { transition: color .25s; }
.seg a:hover { color: var(--ink); }
.status-tabs a { border-radius: 8px 8px 0 0; transition: color .2s, background-color .2s; }
.status-tabs a:hover { background: var(--brand-050); }
.status-tabs a[aria-current="true"] span { background: var(--brand); color: var(--on-brand); }
.registry th, .table th { background: linear-gradient(180deg, var(--brand-050), color-mix(in srgb, var(--brand-050) 55%, var(--card))); }
.table th { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.registry tbody tr:hover td:first-child, .table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.registry__thumb { box-shadow: 0 1px 3px rgba(11, 47, 88, .15); }
.registry__thumb img { transition: transform .5s var(--ease); }
@media (hover: hover) { .registry tbody tr:hover .registry__thumb img { transform: scale(1.12); } }
.board-hero {
  background: linear-gradient(135deg, var(--brand-050), color-mix(in srgb, var(--brand) 9%, var(--card)));
  box-shadow: var(--card-shadow);
}
.mode-steps li { box-shadow: 0 1px 2px rgba(11, 47, 88, .05); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
@media (hover: hover) { .mode-steps li:hover { transform: translateX(4px); box-shadow: var(--lift); } }
.pagination__num.is-current { box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--brand-600) 80%, transparent); }

/* ---------- flash messages: tinted by type ---------- */
.flash { border-radius: 12px; box-shadow: var(--card-shadow); }
.flash--ok   { background: color-mix(in srgb, var(--ok) 8%, var(--card)); }
.flash--err  { background: color-mix(in srgb, var(--accent-red) 7%, var(--card)); }
.flash--info { background: color-mix(in srgb, var(--brand) 7%, var(--card)); }
.flash__close { border-radius: 8px; transition: background-color .2s, color .2s; }
.flash__close:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }

/* ---------- footer: fading hairline + soft tint ---------- */
.site-footer { position: relative; border-top: 0; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--brand) 4%, transparent)); }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--border) 15%, var(--border) 85%, transparent); }


/* =====================================================================
   FX PASS — motion & depth, added on top of the existing style (nothing above is changed)
   Spotlight · gliding nav/tab indicators · title morph · match meter · retention fill ·
   "returned" stamp · image fade-in · film grain · form feedback · mobile header tuck
   Every moving effect sits inside prefers-reduced-motion: no-preference, and every
   scroll-driven one inside @supports, so older browsers simply see the page as before.
   To undo: delete from here down (and the "FX pass" block at the bottom of app.js,
   and the second <script> in views/partials/head.ejs).
   ===================================================================== */

/* ---------- 1. Fine print: selection, caret, balanced headings, steady digits ---------- */
::selection { background: color-mix(in srgb, var(--brand) 26%, transparent); }
input, textarea { caret-color: var(--brand); }
.section-header h2, .detail__head h1, .page-head h1, .report-card__title, .custody__title, .missing__title { text-wrap: balance; }
.report-card__snippet, .custody__desc, .detail__body p, .hero__sub, .muted { text-wrap: pretty; }
.stat-card strong, .counter strong, .retention__label, .days-badge, .pagination__num, .match-card__ribbon, .detail__ref { font-variant-numeric: tabular-nums; }

/* ---------- 2. Spotlight: a soft light follows the cursor across cards (app.js sets --mx / --my) ---------- */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .report-card, .custody, .missing, .match-card, .stat-card, .how__steps li { position: relative; }
  .report-card::before, .custody::before, .missing::before, .match-card::before, .stat-card::before, .how__steps li::before {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
    background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--brand) 12%, transparent), transparent 72%);
    opacity: 0; transition: opacity .4s var(--ease);
  }
  .report-card:hover::before, .custody:hover::before, .missing:hover::before, .match-card:hover::before,
  .stat-card:hover::before, .how__steps li:hover::before { opacity: 1; }
}

/* ---------- 3. Morphs between pages (cross-document view transitions; Chrome / Edge / Safari 18.2+) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* the nav underline glides from the old page's link to the new one instead of vanishing and reappearing */
  .primary-nav a[aria-current="page"]::after { view-transition-name: nav-indicator; }
  ::view-transition-group(nav-indicator) { animation-duration: .55s; animation-timing-function: var(--ease); }

  /* the active filter tab / sort pill slides to the one you picked */
  .status-tabs a[aria-current="true"]::after, .mod-tab[aria-current="page"]::after { view-transition-name: filter-tab; }
  .seg a[aria-current="true"]::before { view-transition-name: filter-seg; }
  ::view-transition-group(filter-tab), ::view-transition-group(filter-seg) { animation-duration: .38s; animation-timing-function: cubic-bezier(.32, .72, 0, 1); }
  /* a solid bar / pill just moves and resizes: show the new one only, never cross-fade two copies of it */
  ::view-transition-old(filter-tab), ::view-transition-new(filter-tab),
  ::view-transition-old(filter-seg), ::view-transition-new(filter-seg) { animation: none; mix-blend-mode: normal; height: 100%; width: 100%; }
  ::view-transition-old(filter-tab), ::view-transition-old(filter-seg) { display: none; }
  /* arriving from a page that had no such bar: fade it in with the page instead of popping */
  ::view-transition-new(filter-tab):only-child, ::view-transition-new(filter-seg):only-child { animation: vt-fade-in .26s linear both; }

}

/* ---------- 4. "How long have we held it?" — the holding bar fills, and a nearly-expired one breathes ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes bar-fill { from { transform: scaleX(0); } }
  .retention__bar > span { transform-origin: 0 50%; animation: bar-fill 1.1s var(--ease) .35s backwards; }
  .retention.fx-wait .retention__bar > span { animation: none; transform: scaleX(0); }      /* below the fold: waits until seen (app.js) */
  @keyframes hold-breathe { 50% { opacity: .55; } }
  .retention--stale .retention__bar > span { animation: bar-fill 1.1s var(--ease) .35s backwards, hold-breathe 2.6s ease-in-out 1.6s infinite; }
  .retention--stale.fx-wait .retention__bar > span { animation: none; }
}

/* ---------- 5. Possible matches: the score is drawn as a meter, and the reasons tick in one by one ---------- */
.match-card { position: relative; overflow: hidden; }
.match-card[data-strength] { --m: var(--brand); }
.match-card[data-strength="high"] { --m: var(--green); }
.match-card[data-strength="low"]  { --m: var(--amber); }
/* (the coloured score strip that used to run along the top edge is gone; the score is shown in the ribbon) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    @keyframes tick-in { from { opacity: 0; transform: translateX(-10px); } }
    .match-card__reasons li { animation: tick-in linear both; animation-timeline: view(); animation-range: entry 0% entry 75%; }
    @keyframes line-grow { from { transform: scaleX(0); } }
    .section-header h2::after { transform-origin: 0 50%; animation: line-grow linear both; animation-timeline: view(); animation-range: entry 10% entry 85%; }
  }
}

/* ---------- 6. Good news gets a stamp: "Returned" and "Approved" land like an ink stamp ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes stamp {
    0%   { opacity: 0; transform: scale(1.9) rotate(-10deg); }
    55%  { opacity: 1; transform: scale(.93) rotate(1.5deg); }
    100% { transform: none; }
  }
  .detail__pills .pill--returned, .claim-card__head .pill--returned, .pill--approved { animation: stamp .6s var(--ease) .55s backwards; }

  /* the green "returned" check on the home page draws itself */
  @keyframes draw { from { stroke-dashoffset: 60; } to { stroke-dashoffset: 0; } }
  .stat-card--returned .stat-card__icon :is(circle, path), .empty-state--green .empty-state__icon :is(circle, path) { stroke-dasharray: 60; animation: draw 1s var(--ease) 1s backwards; }
  .stat-card--returned .stat-card__icon path, .empty-state--green .empty-state__icon path { animation-delay: 1.35s; }
}

/* ---------- 7. Photos: a quiet shimmer while they load, then a soft focus-in (class added by app.js) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes shimmer { to { background-position: -120% 0; } }
  .img-pending {
    background: linear-gradient(100deg, var(--brand-050) 35%, color-mix(in srgb, var(--brand) 11%, var(--brand-050)) 50%, var(--brand-050) 65%) 120% 0 / 220% 100%;
    animation: shimmer 1.5s linear infinite;
  }
  /* the photo is not hidden while pending: it paints over the shimmer as soon as it has pixels */
  @keyframes img-in { from { opacity: 0; } }
  img.img-in { animation: img-in .35s ease-out backwards; }
}

/* ---------- 8. Hero: a touch of film grain (hides gradient banding), and the text eases away as you scroll ---------- */
.hero--campus::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
:root[data-theme="dark"] .hero--campus::after { opacity: .14; mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero--campus::after { opacity: .14; mix-blend-mode: normal; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    @keyframes hero-exit { to { opacity: 0; transform: translateY(-26px); } }
    .hero__text { animation: hero-exit linear both; animation-timeline: view(); animation-range: exit 8% exit 75%; }
  }
}

/* ---------- 9. Header: the seal tucks in a little once you scroll; on phones the bar slides away while reading ---------- */
.site-header.is-scrolled .brand__seal { transform: scale(.88); }
@media (hover: hover) { .site-header.is-scrolled .brand:hover .brand__seal { transform: scale(.95) rotate(-4deg); } }
@media (max-width: 860px) and (prefers-reduced-motion: no-preference) {
  .site-header { transition: box-shadow .35s var(--ease), border-color .35s, transform .45s var(--ease); }
  .site-header.is-tucked:not(:focus-within) { transform: translateY(-100%); }
}

/* ---------- 10. Forms & messages: clear feedback, no layout change ---------- */
@supports selector(:user-invalid) {
  .input:user-invalid, .select:user-invalid, .textarea:user-invalid {
    border-color: var(--accent-red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-red) 14%, transparent);
  }
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes nudge { 20% { transform: translateX(-5px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
  @supports selector(:user-invalid) {
    .input:user-invalid, .select:user-invalid, .textarea:user-invalid { animation: nudge .4s var(--ease); }
  }
  /* the submit button shows it is working (app.js already disables it and changes its label) */
  @keyframes spin { to { transform: rotate(360deg); } }
  .btn[data-submit]:disabled::after {
    content: ""; display: inline-block; width: .95em; height: .95em; margin-left: .6rem; vertical-align: -.14em;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite;
  }
  /* the notice shows how long it will stay (6 s matches data-autodismiss="6000" in flash.ejs) */
  @keyframes countdown { to { transform: scaleX(0); } }
  .flash[data-autodismiss] { position: relative; overflow: hidden; }
  .flash[data-autodismiss]::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--brand); opacity: .55;
    transform-origin: 0 50%; animation: countdown 6s linear forwards; pointer-events: none;
  }
  .flash--ok[data-autodismiss]::after { background: var(--ok); }
  .flash--err[data-autodismiss]::after { background: var(--danger); }
}

/* ---------- print: none of the decoration ---------- */
@media print {
  .hero--campus::after, .report-card::before, .custody::before, .missing::before, .match-card::before, .stat-card::before,
  .how__steps li::before, .flash[data-autodismiss]::after { display: none !important; }
  .img-pending > img { opacity: 1 !important; }
}
/* ---------- Item photo on match cards and claim details ---------- */
.match-card__photo { display: block; aspect-ratio: 16 / 10; margin: 0 0 var(--s-3); overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--brand-050); }
.match-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.claim-card__photo { margin: 0 0 var(--s-4); max-width: 420px; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--brand-050); }
.claim-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* =====================================================================
   GUEST REPORTING, REVIEW QUEUE, INBOX
   Additions only: every colour comes from the tokens above, so light and
   dark themes work without extra rules.
   ===================================================================== */

/* Spam-trap field: off-screen, not display:none (some bots skip hidden inputs). */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Nav: unread badge */
.nav-badge {
  display: inline-block; min-width: 1.3rem; margin-left: .35rem; padding: 0 .4rem;
  border-radius: 999px; background: var(--accent-red); color: var(--on-brand);
  font-size: .72rem; font-weight: 700; line-height: 1.3rem; text-align: center; vertical-align: 1px;
}
:root[data-theme="dark"] .nav-badge { color: #12161c; }

/* Source pill */
.pill--guest { color: var(--amber); border-color: var(--amber); }

/* Account prompts */
.upgrade-card__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.upgrade-hint { margin: var(--s-4) 0; padding: var(--s-3); border: 1px dashed var(--border); border-radius: var(--radius-card); background: var(--brand-050); }
.upgrade-hint p { margin: 0; }
.contact-note { margin-top: 0; }

/* Guest confirmation page */
.thanks { max-width: 62ch; padding: var(--s-4) 0; }
.thanks--claim { width: min(100%, 52rem); max-width: none; margin-inline: auto; padding: clamp(1.25rem, 4vw, 3rem) 0; }
.thanks--claim h1 { max-width: 22ch; font-size: clamp(1.8rem, 4vw, 2.6rem); overflow-wrap: anywhere; }
.thanks--claim > p, .thanks--claim > ol { max-width: 68ch; }
.thanks--claim .thanks__upgrade { padding: clamp(1rem, 3vw, 2rem); }
.thanks--claim .thanks__upgrade h2 { margin-top: 0; }
.thanks--claim .thanks__ref { overflow-wrap: anywhere; }
.thanks--claim > ol { padding-left: 1.5rem; }
.thanks--claim > ol li { padding-left: .2rem; }
.thanks--claim .thanks__links { margin-top: var(--s-4); }
.thanks__ref { font-size: 1.1em; font-weight: 700; }
.thanks__qr { width: min(100%, 17rem); margin: var(--s-3) auto var(--s-4); text-align: center; }
.thanks__qr img { display: block; width: min(100%, 12rem); height: auto; margin: 0 auto; background: #fff; }
.thanks__qr figcaption { margin-top: var(--s-2); }
.thanks__upgrade { margin: var(--s-4) 0; }
.thanks__links { display: flex; flex-wrap: wrap; gap: var(--s-2); }
@media (max-width: 600px) {
  .thanks--claim { padding: 1rem 0 calc(1.5rem + env(safe-area-inset-bottom)); }
  .thanks--claim h1 { font-size: clamp(1.7rem, 8vw, 2rem); }
  .thanks--claim .thanks__links { display: grid; grid-template-columns: minmax(0, 1fr); }
  .thanks--claim .thanks__links .btn { width: 100%; justify-content: center; white-space: normal; text-align: center; }
}

/* Staff: review queue + panel on the report page */
.mod-tabs { display: flex; flex-wrap: wrap; gap: var(--s-1); margin: var(--s-3) 0 var(--s-4); border-bottom: 1px solid var(--border); }
.mod-tab { position: relative; padding: .55rem 1rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.mod-tab:hover { color: var(--ink); }
.mod-tab[aria-current="page"] { color: var(--brand); }
.mod-tab[aria-current="page"]::after { transform: scaleX(1); }
.mod-tab--end { margin-left: auto; }
.mod-count { display: inline-block; min-width: 1.4rem; padding: 0 .45rem; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: .75rem; font-weight: 700; text-align: center; }
.table--mod { min-width: 760px; }
.table--mod td { vertical-align: top; }
.mod-title { display: block; margin-top: var(--s-1); }
.mod-desc { margin: var(--s-1) 0; font-size: .9rem; color: var(--muted); max-width: 52ch; }
.mod-form { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-top: var(--s-2); }
.mod-form .input { flex: 1 1 14rem; min-width: 0; }
.staff-source { margin-bottom: var(--s-4); padding: var(--s-3) var(--s-4); border: 1px solid color-mix(in srgb, var(--amber) 40%, var(--border)); border-radius: var(--radius-card); background: color-mix(in srgb, var(--amber) 7%, var(--card)); }
.staff-source h2 { margin-top: 0; font-size: 1.1rem; }
.staff-source__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }

/* Inbox: notifications + conversations */
.notif-list { list-style: none; padding: 0; margin: var(--s-3) 0 0; }
.notif { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3); margin-bottom: var(--s-2); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); }
.notif--unread { background: color-mix(in srgb, var(--brand) 6%, var(--card)); border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.notif__main { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
.notif__main a { font-weight: 600; }
.notif-pref { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3); margin: var(--s-3) 0 0; background: color-mix(in srgb, var(--brand) 4%, var(--card)); border: 1px solid var(--border); border-left: 3px solid var(--brand); border-radius: var(--radius-card); }
.notif-pref__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: .92rem; }
.notif-pref__state { display: inline-block; margin-left: .35rem; padding: 0 .5rem; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--border); color: var(--muted); vertical-align: 1px; }
.notif-pref__state.is-on { background: color-mix(in srgb, #2fb36b 20%, transparent); color: #1f7a49; }
@media (prefers-color-scheme: dark) { .notif-pref__state.is-on { color: #6fd3a0; } }
:root[data-theme="dark"] .notif-pref__state.is-on { color: #6fd3a0; }
:root[data-theme="light"] .notif-pref__state.is-on { color: #1f7a49; }
@media (max-width: 520px) { .notif-pref { flex-direction: column; align-items: flex-start; } }
.my-links { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* Message thread */
.thread { list-style: none; padding: 0; margin: var(--s-3) 0; display: flex; flex-direction: column; gap: var(--s-2); max-width: 70ch; }
.bubble { align-self: flex-start; max-width: 85%; margin: 0; padding: var(--s-2) var(--s-3); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); }
.bubble--me { align-self: flex-end; background: var(--brand-050); border-color: var(--brand); }
.bubble__meta { margin: 0 0 var(--s-1); font-size: .8rem; color: var(--muted); }
.bubble__body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-form { max-width: 70ch; }


/* ---------------------------------------------------------------------
   Compact report cards (home "Latest Reports"): 5 per row on desktop,
   fewer on smaller screens. Photo, kind, status, title, place and ref
   only; the long snippet and tags are hidden to keep each plate small.
   --------------------------------------------------------------------- */
.card-grid--compact { gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px)  { .card-grid--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px)  { .card-grid--compact { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .card-grid--compact { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.card-grid--compact .report-card__photo-wrap { aspect-ratio: 4 / 3; }
.card-grid--compact .report-card__body { padding: .55rem .65rem .65rem; gap: .25rem; }
.card-grid--compact .report-card__kind { left: .4rem; top: .4rem; padding: .1rem .5rem; font-size: .66rem; }
.card-grid--compact .report-card__top { font-size: .7rem; gap: .4rem; flex-wrap: wrap; }
.card-grid--compact .report-card__title { font-size: .88rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-grid--compact .report-card__snippet,
.card-grid--compact .report-card__tags { display: none; }
.card-grid--compact .report-card__meta { font-size: .72rem; gap: .15rem .6rem; }
.card-grid--compact .report-card__meta-item:nth-child(2) { display: none; }
.card-grid--compact .report-card__meta svg { width: 12px; height: 12px; }
.card-grid--compact .report-card__ref { font-size: .7rem; }

/* Latest Reports cards: no coloured strip along the top edge. */

/* Pressing a card: no hover lift/zoom while the page is changing, so the photo
   that morphs into the detail image does not jump. */
.report-card:active { transform: none; box-shadow: none; }
.report-card:active .report-card__photo { transform: none; }


/* ---------------------------------------------------------------------
   Report detail: photo on the left, information on the right (stacks on
   phones/tablets). The page is wide enough to use the screen instead of
   leaving a blank column on the right.
   --------------------------------------------------------------------- */
.detail { max-width: 1240px; margin-inline: auto; }
.detail__top {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; margin-bottom: var(--s-5);
}
.detail__top--nophoto { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.detail__top .detail__photo {
  margin: 0; max-height: none; aspect-ratio: 4 / 3; width: 100%;
  position: sticky; top: 6rem; border-radius: var(--radius-card);
}
.detail__top .detail__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail__info { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.detail__info .detail__head { margin: 0; }
.detail__info .detail__head h1 { margin: .5rem 0 .25rem; line-height: 1.15; overflow-wrap: anywhere; }
.detail__info .detail__body { margin: 0; padding: clamp(1rem, 2vw, 1.5rem); }
.detail__info .detail__body > p { margin: 0; font-size: 1.02rem; line-height: 1.6; }
.detail__info .detail__meta { grid-template-columns: minmax(7.5rem, auto) 1fr; row-gap: .7rem; }
.detail__info .detail__actions { margin: 0; }
@media (max-width: 860px) {
  .detail__top { grid-template-columns: minmax(0, 1fr); }
  .detail__top .detail__photo { position: static; aspect-ratio: 16 / 10; }
}
.detail__info .detail__actions .muted { flex-basis: 100%; margin: 0; }
.detail__info .detail__actions { gap: .6rem; }

/* ---------------------------------------------------------------------
   Report detail, final layout: ONE panel. The photo fills the whole left
   half (top to bottom, no blank space under it); the reference, title,
   description, facts and actions sit in the right half, with the actions
   pinned to the bottom. Stacks (photo on top) on tablets and phones.
   --------------------------------------------------------------------- */
.detail { max-width: 1320px; margin-inline: auto; }
.detail__top {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; align-items: stretch;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: var(--card-shadow); overflow: hidden; margin-bottom: var(--s-5);
}
.detail__top .detail__photo {
  position: relative; top: auto; margin: 0; width: 100%; height: 100%; aspect-ratio: auto; max-height: none;
  min-height: clamp(340px, 36vw, 560px); border: 0; border-radius: 0; box-shadow: none; background: var(--brand-050);
}
.detail__top .detail__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail__info {
  display: flex; flex-direction: column; gap: var(--s-4); min-width: 0;
  padding: clamp(1.25rem, 2.6vw, 2.5rem);
}
.detail__info .detail__head h1 { font-size: clamp(1.7rem, 2.6vw, 2.35rem); margin: .6rem 0 .5rem; }
.detail__info .detail__body { background: transparent; border: 0; box-shadow: none; padding: 0; margin: 0; }
.detail__info .detail__body > p { font-size: 1.05rem; line-height: 1.65; color: var(--ink); }
.detail__info .detail__meta { margin-top: var(--s-4); padding-top: var(--s-4); gap: 0; grid-template-columns: minmax(8rem, 10rem) 1fr; }
.detail__info .detail__meta dt { padding-right: 1rem; }
.detail__info .detail__meta dt, .detail__info .detail__meta dd { padding: .65rem 0; border-bottom: 1px solid var(--border); }
.detail__info .detail__meta dt:nth-last-of-type(1), .detail__info .detail__meta dd:last-child { border-bottom: 0; }
.detail__info .detail__actions {
  margin: auto 0 0; padding-top: var(--s-4); border-top: 1px solid var(--border); gap: .6rem; align-items: center;
}
.detail__info .detail__actions .muted { flex-basis: 100%; margin: 0 0 .1rem; font-size: .92rem; }
@media (max-width: 860px) {
  .detail__top { grid-template-columns: minmax(0, 1fr); }
  .detail__top .detail__photo { min-height: 0; aspect-ratio: 16 / 10; }
}
.detail__info .detail__meta dt { align-self: stretch; display: flex; align-items: center; }
@media (max-width: 560px) {
  .detail__info .detail__meta { grid-template-columns: minmax(0, 1fr); }
  .detail__info .detail__meta dt { padding: .75rem 0 0; border-bottom: 0; }
  .detail__info .detail__meta dd { padding: .15rem 0 .75rem; }
  .detail__info .detail__actions .btn { flex: 1 1 100%; justify-content: center; text-align: center; }
}


/* ---------------------------------------------------------------------
   Sign-in page, compact: sized from the viewport height so the whole
   page (header, card and a slim footer) fits a laptop screen without
   scrolling. Scoped to .auth-main--compact so Register is unchanged.
   --------------------------------------------------------------------- */
.auth-main--compact { padding: clamp(.6rem, 2.2vh, 1.5rem) var(--pad); justify-content: center; }
.auth-main--compact .auth-card { min-height: 0; margin: 0; }
@media (min-width: 860px) { .auth-main--compact .auth-card { min-height: 0; } }
.auth-main--compact .auth-brand { padding: clamp(1rem, 3vh, 2rem) clamp(1.25rem, 3vw, 2.25rem); gap: var(--s-3); }
.auth-main--compact .auth-brand__seal { width: 44px; height: 44px; }
.auth-main--compact .auth-brand__copy h2 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
.auth-main--compact .auth-brand__copy p { font-size: .95rem; }
.auth-main--compact .auth-panel { padding: clamp(1rem, 3vh, 2rem) clamp(1.25rem, 3vw, 2.5rem); }
.auth-main--compact .auth-panel h1 { font-size: 1.6rem; margin-bottom: .15rem; }
.auth-main--compact .auth-panel__sub { margin: 0 0 clamp(.6rem, 1.8vh, 1rem); font-size: .92rem; }
.auth-main--compact .auth-form .field { margin-bottom: clamp(.5rem, 1.5vh, .85rem); }
.auth-main--compact .auth-form label { font-size: .9rem; }
.auth-main--compact .input--lg { min-height: 42px; font-size: .98rem; }
.auth-main--compact .field-hint { font-size: .8rem; margin-top: .25rem; }
.auth-main--compact .auth-remember { margin: 0 0 clamp(.5rem, 1.5vh, .85rem); font-size: .88rem; }
.auth-main--compact .auth-submit { height: 44px; }
.auth-main--compact .auth-help { margin: clamp(.5rem, 1.5vh, .85rem) auto 0; font-size: .86rem; line-height: 1.5; text-align: center; }
.auth-main--compact .auth-help + .auth-help { margin-top: .2rem; }
.auth-main--compact .auth-links span { margin: 0 .25rem; opacity: .6; }
/* slim footer under the compact sign-in card: links only, one row */
.auth-main--compact + .site-footer { padding: .6rem 0; }
.auth-main--compact + .site-footer .footer-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1.25rem; }
.auth-main--compact + .site-footer .footer-note,
.auth-main--compact + .site-footer .footer-tagline { display: none; }
.auth-main--compact + .site-footer .footer-brand { margin: 0; font-size: .85rem; }
.auth-main--compact + .site-footer .footer-brand br { display: none; }
.auth-main--compact + .site-footer .footer-brand strong { margin-right: .4rem; }
.auth-main--compact + .site-footer .footer-links { margin: 0; }
/* very short screens (small laptops, split windows) and phones: drop the optional hint line */
@media (max-height: 680px), (max-width: 859px) {
  .auth-main--compact #pin-hint { display: none; }
  .auth-main--compact .auth-brand { padding-block: .6rem; }
}
@media (max-height: 680px) and (min-width: 860px) {
  .auth-main--compact .auth-brand__copy p { display: none; }
}
@media (max-height: 640px) { .auth-main--compact .auth-panel, .auth-main--compact .auth-brand { padding-block: .75rem; } }
@media (max-width: 859px) { .auth-main--compact + .site-footer .footer-brand { display: none; } .auth-main--compact + .site-footer .footer-links { margin: 0 auto; } }


/* ---------------------------------------------------------------------
   Create-account page, compact: wider card and a two-column form, so six
   fields fit on a laptop screen without scrolling. (Uses the compact
   rules above; the grid only applies to .auth-form--grid.)
   --------------------------------------------------------------------- */
.auth-main--compact .auth-card--wide { max-width: 1120px; }
@media (min-width: 860px) { .auth-main--compact .auth-card--wide { grid-template-columns: .8fr 1.2fr; } }
.auth-main--compact .auth-form--grid { max-width: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .85rem; }
.auth-main--compact .auth-form--grid .field--wide { grid-column: 1 / -1; }
.auth-main--compact .auth-form--grid .field { margin-bottom: clamp(.4rem, 1.3vh, .75rem); }
.auth-main--compact .auth-form--grid .optional { font-size: .8rem; }
.auth-main--compact .auth-form--grid .field-error { font-size: .8rem; margin: .2rem 0 0; }
@media (max-width: 560px) {
  .auth-main--compact .auth-form--grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-height: 640px) and (min-width: 860px) {
  .auth-main--compact .auth-panel__sub { display: none; }
  .auth-main--compact .input--lg { min-height: 38px; }
  .auth-main--compact .auth-submit { height: 40px; }
  .auth-main--compact .auth-panel h1 { margin-bottom: .5rem; }
}
/* phones: keep the short fields paired, but give the password fields the
   full row so the strength meter and rule list are never squeezed. */
@media (max-width: 560px) {
  .auth-main--compact .auth-form--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-main--compact .auth-form--grid .field:nth-child(-n+4),
  .auth-main--compact .auth-form--grid .field--stack-mobile { grid-column: 1 / -1; }
}


/* =====================================================================
   Report forms (signed-in and guest): one clean card, sections separated
   by dividers, fields paired up, tidy photo box, action bar attached to
   the card. Scoped to .report-page.
   ===================================================================== */
.report-page { max-width: 1240px; }
.report-page .board-hero { padding: 1.25rem 1.75rem; margin-bottom: 1.25rem; box-shadow: none; }
.report-page .board-hero h1 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin: 0 0 .25rem; }
.report-page .board-hero p { margin: 0; max-width: 72ch; }
.report-page .board-hero .page-head__eyebrow { margin-bottom: .35rem; }

.report-page .report-layout { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (min-width: 960px) { .report-page .report-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 1.75rem; } }
.report-page .report-form {
  max-width: none; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
}
.report-page .form-alert { max-width: none; }

/* sections: no boxes of their own, just dividers inside the one card */
.report-page .form-section {
  border: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; margin: 0;
  padding: 1.4rem clamp(1.1rem, 2.4vw, 1.9rem);
}
.report-page .form-section:first-of-type { border-top: 0; }
.report-page .form-section:focus-within { box-shadow: none; border-color: var(--border); }
.report-page .form-section__title { font-size: 1.05rem; margin: 0 0 1.1rem; }
.report-page .form-section .field { margin-bottom: 1.1rem; }
.report-page .form-section .field:last-child { margin-bottom: 0; }
.report-page .field-row { gap: 0 1.1rem; }
.report-page .field label, .report-page .label { font-size: .92rem; margin-bottom: .35rem; }
.report-page .field-hint { margin: .35rem 0 0; font-size: .82rem; }
.report-page .textarea { min-height: 112px; }

/* photo: dashed drop-box look around the native file input */
.report-page input[type="file"] {
  width: 100%; padding: .9rem 1rem; border: 1.5px dashed color-mix(in srgb, var(--brand) 40%, var(--border));
  border-radius: 12px; background: var(--brand-050); color: var(--muted); font-size: .92rem; cursor: pointer;
}
.report-page input[type="file"]:hover { border-color: var(--brand); }
.report-page input[type="file"]::file-selector-button {
  margin-right: .9rem; padding: .5rem 1rem; border: 0; border-radius: 8px; background: var(--brand); color: var(--on-brand);
  font: inherit; font-weight: 600; cursor: pointer;
}
.report-page .photo-preview { margin-top: .9rem; }
.report-page .photo-preview img { max-width: 240px; border-radius: 12px; }

/* action bar: attached to the bottom of the card, stays visible while scrolling */
.report-page .form-actions--bar {
  position: sticky; bottom: 0; z-index: 5; margin: 0; padding: .9rem clamp(1.1rem, 2.4vw, 1.9rem);
  border: 0; border-top: 1px solid var(--border); border-radius: 0 0 var(--radius-card) var(--radius-card);
  background: var(--card); -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: 0 -10px 18px -14px rgba(11, 47, 88, .28);
}
.report-page .form-actions--bar .btn { min-width: 160px; }

/* side panel: aligned with the card's top edge, quiet and uniform */
.report-page .report-aside { gap: .9rem; }
@media (min-width: 960px) { .report-page .report-aside { top: 88px; } }
.report-page .aside-card { border-left: 1px solid var(--border); padding: 1.1rem 1.25rem; box-shadow: var(--card-shadow); }
.report-page .aside-card h2 { font-size: .98rem; margin-bottom: .5rem; }
.report-page .aside-card:first-child { background: var(--brand-050); }
@media (max-width: 520px) {
  .report-page .form-actions--bar .btn { flex: 1; min-width: 0; }
}
.report-page .contact-note { margin: 0 0 1rem; }
.kind-switch{margin:var(--s-3) 0 0}

/* ---------- Claim form: "item you are claiming" panel (the rest reuses the .report-page layout) ---------- */
.claim-item__photo { margin: 0 0 .9rem; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
.claim-item__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.claim-item__title { margin: 0 0 .75rem; font-size: 1.05rem; line-height: 1.35; overflow-wrap: anywhere; }
.claim-item__meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .45rem .9rem; margin: 0; font-size: .9rem; }
.claim-item__meta dt { color: var(--muted); font-weight: 600; }
.claim-item__meta dd { margin: 0; overflow-wrap: anywhere; }
.claim-item__link { margin: .9rem 0 0; font-size: .9rem; font-weight: 600; }
.report-page .aside-card ul { margin: 0; padding-left: 1.1rem; font-size: .9rem; }
.report-page .aside-card li { margin: 0 0 .35rem; }

/* ---------- Profile icon in the header (signed-in): the name slides out on hover / keyboard focus ----------
   The icon is a fixed 44px circle, so nothing else in the header ever moves. The name is a pill that
   is revealed from the icon towards the left. It ignores the pointer (so it never gets in the way of the
   links it passes over); only the icon itself opens it. Touch screens just get the icon. */
.profile-chip { position: relative; flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; text-decoration: none; color: var(--brand); }
.profile-chip__icon {
  position: relative; z-index: 2; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--brand-050); color: var(--brand);
  transition: border-color .2s, background-color .2s, color .2s, transform .25s var(--ease);
}
.profile-chip__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.profile-chip[aria-current="page"] .profile-chip__icon { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.profile-chip:focus-visible { outline: none; }
.profile-chip:focus-visible .profile-chip__icon { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent); }

.profile-chip__name {
  position: absolute; z-index: 1; top: 0; right: 0; height: 44px; max-width: min(18rem, 60vw);
  display: flex; align-items: center; box-sizing: border-box; padding: 0 56px 0 1.1rem;
  border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--ink);
  box-shadow: var(--card-shadow); font-size: .95rem; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; pointer-events: none;
  clip-path: inset(0 0 0 100% round 999px); opacity: 0;
  transition: clip-path .38s cubic-bezier(.32, .72, 0, 1), opacity .2s;
}
@media (hover: hover) {
  .profile-chip:hover .profile-chip__icon { border-color: var(--brand); transform: scale(1.04); }
  .profile-chip:hover .profile-chip__name { clip-path: inset(0 0 0 0 round 999px); opacity: 1; }
}
.profile-chip:focus-visible .profile-chip__name { clip-path: inset(0 0 0 0 round 999px); opacity: 1; }
@media (max-width: 520px) { .profile-chip, .profile-chip__icon { width: 40px; height: 40px; } .profile-chip__name { height: 40px; padding-right: 52px; } }
@media (prefers-reduced-motion: reduce) { .profile-chip__name, .profile-chip__icon { transition: none; } }

/* "Other (please specify)" text box under the Category / Location selects */
[data-specify-for][hidden] { display: none; }
.field--specify { margin-top: .6rem; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes specify-in { from { opacity: 0; transform: translateY(-4px); } }
  .field--specify:not([hidden]) { animation: specify-in .2s ease-out; }
}

/* ---------- My Reports page ---------- */
.my-page { padding-block: var(--s-4) var(--s-6); }
.my-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-4);
  padding: clamp(1rem, 2.5vw, 1.6rem) clamp(1rem, 3vw, 1.8rem); margin-bottom: var(--s-3); }
.my-hero__who { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.my-hero__avatar { flex: none; width: 3.6rem; height: 3.6rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: .02em; }
.my-hero .page-head__eyebrow { margin: 0 0 .15rem; }
.my-hero__name { margin: 0; font-size: clamp(1.3rem, 2.6vw, 1.75rem); line-height: 1.15; overflow-wrap: anywhere; }
.my-hero__sub { margin: .2rem 0 0; font-size: .9rem; }
.my-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.my-hero__actions form { margin: 0; }
.my-badge { display: inline-block; min-width: 1.25rem; padding: 0 .4rem; border-radius: 999px; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; text-align: center; line-height: 1.25rem; }

.my-stats { list-style: none; margin: 0 0 var(--s-5); padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .my-stats { grid-template-columns: repeat(4, 1fr); } }
.my-stats a { display: flex; flex-direction: column; gap: .15rem; height: 100%; padding: .9rem 1rem; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); transition: border-color .15s, box-shadow .15s; }
.my-stats a:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.my-stats strong { font-size: 1.7rem; line-height: 1.1; }
.my-stats span { font-size: .85rem; color: var(--muted); }
.my-stats em { font-style: normal; font-weight: 700; color: var(--brand); margin-left: .25rem; }

.my-section { margin-bottom: var(--s-5); scroll-margin-top: 5rem; }
.my-section__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-bottom: var(--s-3);
  padding-bottom: .6rem; border-bottom: 1px solid var(--border); }
.my-section__head h2 { margin: 0; font-size: 1.15rem; display: flex; align-items: center; gap: .5rem; }
.my-count { display: inline-block; min-width: 1.6rem; padding: .05rem .5rem; border-radius: 999px; background: var(--brand-050); color: var(--ink);
  font-size: .78rem; font-weight: 700; text-align: center; }
.my-columns { display: grid; gap: 0 var(--s-5); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .my-columns { grid-template-columns: 1fr 1fr; } }
.my-page .empty-state { padding: var(--s-4) var(--s-3); }
.my-page .empty-state p:last-child { margin-bottom: 0; }

.claim-list--my { max-width: none; margin: 0; }
.claim-list--my .claim-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: .6rem; padding: .8rem 1rem; }
.claim-row__main { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.claim-row__main strong { overflow-wrap: anywhere; }
.claim-row__main .muted { font-size: .85rem; }
.claim-row__side { display: flex; align-items: center; gap: .75rem; flex: none; }
@media (max-width: 480px) { .claim-list--my .claim-row { flex-direction: column; align-items: flex-start; } }
main.container.my-page > ul.my-stats { max-width: none; }
.my-stats em { display: block; margin: .1rem 0 0; }
.my-hero__actions .my-badge { margin-left: .35rem; }

/* ---------- Information pages (About, Help, Privacy, Terms, Cookies, Accessibility) ---------- */
.doc-page { padding-block: var(--s-4) var(--s-6); }
.doc-hero { position: relative; overflow: hidden; margin-bottom: var(--s-3); padding: clamp(1.4rem, 4vw, 2.6rem) clamp(1.2rem, 4vw, 2.6rem);
  border: 1px solid var(--border); border-radius: 14px;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 60%), var(--card); }
.doc-hero h1 { margin: 0 0 .6rem; font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.12; text-wrap: balance; }
.doc-hero .lead { margin: 0; max-width: 62ch; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.12rem); line-height: 1.6; }
.doc-hero .page-head__eyebrow { margin-bottom: .6rem; }

.doc-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 var(--s-4); padding: .35rem; background: var(--brand-050);
  border: 1px solid var(--border); border-radius: 12px; width: fit-content; max-width: 100%; }
.doc-tabs a { padding: .45rem .95rem; border-radius: 8px; font-size: .9rem; font-weight: 600; color: var(--muted); text-decoration: none; transition: background-color .15s, color .15s; }
.doc-tabs a:hover { color: var(--ink); background: color-mix(in srgb, var(--card) 70%, transparent); }
.doc-tabs a[aria-current="page"] { background: var(--card); color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,.14); }
@media (max-width: 640px) { .doc-tabs { flex-wrap: nowrap; overflow-x: auto; width: 100%; } .doc-tabs a { white-space: nowrap; } }

.doc-layout { display: grid; gap: var(--s-4); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .doc-layout { grid-template-columns: 230px minmax(0, 1fr); gap: var(--s-5); } }
.doc-toc { display: none; }
@media (min-width: 960px) { .doc-toc { display: block; position: sticky; top: 5.5rem; padding: 1rem 1.1rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); } }
.doc-toc__title { margin: 0 0 .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.doc-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; counter-reset: toc; }
.doc-toc li { counter-increment: toc; }
.doc-toc a { display: flex; gap: .55rem; padding: .35rem .4rem; border-radius: 6px; font-size: .88rem; line-height: 1.35; color: var(--muted); text-decoration: none; }
.doc-toc a::before { content: counter(toc, decimal-leading-zero); font-variant-numeric: tabular-nums; font-size: .75rem; font-weight: 700; color: var(--brand); padding-top: .1rem; }
.doc-toc a:hover { background: var(--brand-050); color: var(--ink); }

.doc-body { counter-reset: sec; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--card-shadow);
  padding: clamp(1.2rem, 3.5vw, 2.4rem) clamp(1.1rem, 3.5vw, 2.6rem); max-width: 100%; }
.doc-body > * { max-width: 72ch; }
.doc-body > .table-wrap { max-width: 100%; }
.doc-body h2 { counter-increment: sec; display: flex; align-items: baseline; gap: .7rem; margin: 2.2rem 0 .8rem; padding-top: 1.6rem;
  border-top: 1px solid var(--border); font-size: 1.3rem; line-height: 1.25; scroll-margin-top: 5.5rem; }
.doc-body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc-body h2::before { content: counter(sec); flex: none; display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 8px;
  background: var(--brand-050); color: var(--brand); font-size: .85rem; font-weight: 800; transform: translateY(-.08rem); }
.doc-body p, .doc-body li { line-height: 1.7; }
.doc-body p { margin: 0 0 1rem; }
.doc-body ul { margin: 0 0 1.1rem; padding-left: 1.3rem; }
.doc-body ul li { margin-bottom: .45rem; padding-left: .2rem; }
.doc-body ul li::marker { color: var(--brand); }
.doc-body ol { list-style: none; counter-reset: step; margin: 0 0 1.1rem; padding: 0; display: grid; gap: .55rem; }
.doc-body ol > li { counter-increment: step; position: relative; padding: .6rem .9rem .6rem 3rem; background: var(--brand-050);
  border-radius: 10px; margin: 0; }
.doc-body ol > li::before { content: counter(step); position: absolute; left: .8rem; top: .62rem; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand); color: #fff; font-size: .8rem; font-weight: 700; line-height: 1; }
.doc-body code { padding: .1rem .4rem; border-radius: 5px; background: var(--brand-050); font-size: .88em; }
.doc-body .table-wrap { margin: 0 0 1.2rem; }
.doc-body .table th, .doc-body .table td { vertical-align: top; }
.doc-help { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin-top: 2.2rem; padding: 1rem 1.2rem; max-width: 100% !important;
  background: var(--brand-050); border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: 10px; }
.doc-help span { color: var(--muted); }
.doc-layout { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .doc-layout { grid-template-columns: 230px minmax(0, 1fr); } }
.doc-body { min-width: 0; }
.doc-body .table { min-width: 520px; }

/* ---------- Flat labels: no outlined, fully-rounded "pill" chips anywhere ----------
   Status, kind and count labels are plain tinted blocks: no border, a small radius. */
.pill, .kind-badge, .status-pill, .custody__flag, .report-card__kind, .match-card__ribbon, .detail__ref,
.my-count, .my-badge, .mod-count, .status-tabs a span, .tag-chip, .tag-chip--pick span, .chat__day span {
  border: 0; border-radius: 4px;
}
.pill { padding: .2rem .6rem; letter-spacing: .01em; }
.pill--open { background: color-mix(in srgb, var(--brand) 12%, var(--card)); }
.pill--archived { background: var(--brand-050); }
.pill--guest { background: color-mix(in srgb, var(--amber) 14%, var(--card)); }
.kind-badge { padding: .2rem .6rem; }
.status-pill { padding: .2rem .6rem; border-radius: 4px; }
.report-card__kind, .custody__flag { padding: .22rem .6rem; box-shadow: none; }
.tag-chip--pick span { background: var(--brand-050); }
.tag-chip--pick:hover span { background: color-mix(in srgb, var(--brand) 14%, var(--card)); }
.btn--pill { border-radius: 8px; }
.chat__day span { background: var(--brand-050); }

/* ---------- Passwords: show/hide field, strength meter and checklist (sign-up / set-password) ---------- */
.pin-wrap--password .input { letter-spacing: normal; }
.pin-wrap--password .input::placeholder { letter-spacing: normal; }
.pw-meter { margin-top: .55rem; }
.pw-meter__track { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.pw-meter__bar { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--muted); transition: width .25s ease, background-color .25s ease; }
.pw-meter__label { margin: .3rem 0 0; font-size: .85rem; font-weight: 600; color: var(--muted); }
.pw-meter[data-level="1"] .pw-meter__bar { width: 25%; background: var(--danger); }
.pw-meter[data-level="2"] .pw-meter__bar { width: 50%; background: var(--amber); }
.pw-meter[data-level="3"] .pw-meter__bar { width: 75%; background: var(--green); }
.pw-meter[data-level="4"] .pw-meter__bar { width: 100%; background: var(--green); }
.pw-meter[data-level="1"] .pw-meter__label { color: var(--danger); }
.pw-meter[data-level="2"] .pw-meter__label { color: var(--amber); }
.pw-meter[data-level="3"] .pw-meter__label, .pw-meter[data-level="4"] .pw-meter__label { color: var(--green); }
.pw-rules { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .2rem; font-size: .85rem; color: var(--muted); }
.pw-rules li { line-height: 1.35; padding-left: 1.3em; text-indent: -1.3em; overflow-wrap: anywhere; }
.pw-rules li::before { content: "\25CB"; display: inline-block; width: 1.3em; font-family: Arial, "Segoe UI Symbol", sans-serif; }
.pw-rules li.is-met { color: var(--green); }
.pw-rules li.is-met::before { content: "\2713"; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .pw-meter__bar { transition: none; } }

/* Photo upload card (replaces the plain browser file bar on the report forms) */
.photo-card { position: relative; border: 1.5px dashed var(--border); border-radius: 12px; background: var(--brand-050); padding: 1.25rem 1rem; text-align: center; transition: border-color .2s, background-color .2s; }
.photo-card:focus-within { border-color: var(--brand); }
.photo-card.has-file { border-style: solid; background: var(--card); }
.photo-card [hidden] { display: none !important; }
.photo-card__input { position: absolute; left: 50%; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photo-card__icon { display: inline-flex; color: var(--brand); }
.photo-card__title { display: block; margin: .4rem 0 .9rem; font-weight: 600; color: var(--ink); }
.photo-card__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.photo-card__actions .btn { display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; }
.photo-card .photo-preview { margin: 0 0 .9rem; }
.photo-card .photo-preview img { display: block; margin: 0 auto; }
.photo-card__file { display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.photo-card__name { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ink); }
.photo-card__size { color: var(--muted); font-size: .85rem; margin-bottom: .5rem; }
.photo-card__error { margin: .75rem 0 0; }

/* ---------- Found board: "Can't find it? Report it as lost" callout ---------- */
.board-cta { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-4); padding: .85rem 1rem; background: var(--brand-050); border: 1px solid var(--border); border-radius: 10px; }
.board-cta__text { margin: 0; flex: 1 1 18rem; display: grid; gap: .15rem; }
.board-cta__text span { font-size: .875rem; color: var(--muted); }
.board-cta .btn { flex: 0 0 auto; background: var(--card); }
@media (max-width: 480px) { .board-cta .btn { width: 100%; } }

/* ===== Claim verification (hidden details + question) ===== */
.protect-box { border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-3); background: var(--brand-050); }
.protect-box .check { display: flex; gap: var(--s-2); align-items: flex-start; cursor: pointer; }
.protect-box .check input { margin-top: .25rem; }
.protect-box [data-protect-question] { margin-top: var(--s-3); }
.protected-note { border-left: 4px solid var(--brand); background: var(--brand-050); padding: var(--s-2) var(--s-3); border-radius: var(--radius-sm); margin: var(--s-2) 0; }
.protected-note--owner { border-left-color: var(--green); }

/* Cloudflare Turnstile widget spacing */
.captcha-field { margin: 1rem 0; min-height: 65px; }

/* ---------- All reports: filters sit in the right side of the header ---------- */
@media (min-width: 1100px) { .board-hero--filters { grid-template-columns: minmax(0, 1fr) minmax(560px, 740px); gap: var(--s-5); } }
.board-hero .hero-filters { display: grid; grid-template-columns: repeat(12, 1fr); gap: .6rem .7rem; padding: .9rem 1rem; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--card-shadow); }
.hero-filters__f { grid-column: span 4; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.hero-filters__f--s3 { grid-column: span 3; }
.hero-filters__f label { font-size: .64rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.board-hero .hero-filters .input, .board-hero .hero-filters .select { width: 100%; height: 36px; min-height: 0; padding-top: 0; padding-bottom: 0; font-size: .86rem; border-radius: 8px; text-overflow: ellipsis; }
.hero-filters__actions { grid-column: span 3; display: flex; gap: .4rem; align-items: flex-end; }
.board-hero .hero-filters .btn { flex: 1; justify-content: center; height: 36px; min-height: 0; padding: 0 .7rem; font-size: .86rem; border-radius: 8px; }
@media (max-width: 1099px) { .board-hero--filters { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
  .hero-filters__f, .hero-filters__f--s3 { grid-column: span 6; }
  .hero-filters__f:first-child, .hero-filters__actions { grid-column: 1 / -1; }
  .board-hero .hero-filters input[type="date"] { padding-left: .5rem; padding-right: .35rem; font-size: .8rem; }
}
