/* Public reporting page (M12), redesigned 18 Aug 2026 in the Clay-style card
   language: a soft-gradient cover (Zahir's image, rebuilt as layered CSS
   gradients + same-origin grain), giant hero type, rounded pastel section
   cards with pill badges, and pill buttons throughout.

   §3.1 still holds: system fonts only, no external assets — the grain is an
   inline data-URI SVG filter, served from nowhere. */

:root {
  --ink: #16181d;
  --muted: #5c5f66;
  --blue: #4353ff;
  --green: #114b34;
  --lime: #d9e94e;
  --coral: #e88a76;
  --card-blue: #e9f1fc;
  --card-cream: #f6efe4;
  --paper: #fbfaf7;
  --border: #e4e1d8;
  --radius: 28px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  overflow: hidden;
  /* The cover image: blue drifting in from the top, cream through the middle,
     coral pooling along the bottom. */
  background:
    radial-gradient(55% 60% at 30% -5%, #8fa5da 0%, rgba(143, 165, 218, 0) 62%),
    radial-gradient(40% 45% at 58% -10%, #a9b9e2 0%, rgba(169, 185, 226, 0) 58%),
    radial-gradient(45% 42% at 6% 108%, #e8836d 0%, rgba(232, 131, 109, 0) 62%),
    radial-gradient(55% 45% at 55% 115%, #ec9d7e 0%, rgba(236, 157, 126, 0) 58%),
    radial-gradient(38% 40% at 96% 100%, #eba184 0%, rgba(235, 161, 132, 0) 62%),
    linear-gradient(180deg, #dfe3ef 0%, #f2e5d6 55%, #f3ddc8 100%);
}
.hero::after {
  /* Film grain, from this file and nowhere else. */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}
/* The two-column Clay hero (restored 19 Aug 2026 — "that version was better"):
   headline left, text + buttons right, the pair vertically centered so the
   right side hangs level with the title. */
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  padding: 96px 28px 88px;
}
.hero-row {
  display: flex;
  gap: 48px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.hero h1 {
  margin: 0;
  font-size: clamp(44px, 6.5vw, 78px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero-side { max-width: 430px; }
.hero-side > p:first-child { margin: 0 0 24px; font-size: 16px; line-height: 1.6; }
.privacy {
  font-size: 12px;
  color: var(--ink);
  opacity: 0.6;
  margin: 20px 0 0;
}

/* --------------------------------------------------------------- buttons */

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 14px 24px;
  font-size: 15.5px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  transition: transform 0.06s ease;
}
.btn:active { transform: scale(0.98); }
.btn-ink   { background: var(--ink);  color: #fff; }
.btn-white { background: #fff;        color: var(--ink); }
.btn-lime  { background: var(--lime); color: var(--ink); }
.btn-blue  { background: var(--blue); color: #fff; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* -------------------------------------------------------------- sections */

.sections { max-width: 1160px; margin: 0 auto; padding: 24px 20px 40px; }
.card {
  border-radius: var(--radius);
  padding: clamp(32px, 5vw, 64px);
  margin-bottom: 20px;
}
.card-blue  { background: var(--card-blue); }
.card-cream { background: var(--card-cream); }
.card-green { background: var(--green); color: #fff; text-align: center; }

.badge {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 22px;
}
.badge-blue  { background: var(--blue); }
.badge-coral { background: var(--coral); }

.card h2 {
  margin: 52px 0 14px;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.card h2:first-child { margin-top: 0; }
.card p { margin: 0 0 16px; font-size: 15px; line-height: 1.7; max-width: 46em; }
/* The closing line is a title of its own, with air on both sides — not a
   stray paragraph glued to the buttons (19 Aug 2026). */
.card .thanks {
  margin: 72px 0 40px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.two-col { columns: 2; column-gap: 32px; max-width: 40em; margin: 18px 0; }
.two-col li { break-inside: avoid; }
@media (max-width: 640px) { .two-col { columns: 1; } }

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  align-items: start;
}
.prose p { margin: 0 0 16px; font-size: 16px; }
.prose p:last-child { margin-bottom: 0; }

.inner {
  background: #fff;
  border-radius: 20px;
  padding: 28px 30px;
}
.inner-title { margin: 0 0 14px; font-weight: 700; font-size: 17px; }
.note { margin: 14px 0 0; font-size: 13.5px; color: var(--muted); }

ul.checks, ul.dots, ul.dashes { list-style: none; margin: 0; padding: 0; }
ul.checks li, ul.dots li, ul.dashes li {
  position: relative;
  padding: 6px 0 6px 32px;
  font-size: 15px;
}
ul.checks li::before {
  content: "✓";
  position: absolute; left: 0; top: 6px;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
ul.dots li::before {
  content: "";
  position: absolute; left: 6px; top: 15px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue);
}
ul.dashes li::before {
  content: "";
  position: absolute; left: 4px; top: 17px;
  width: 12px; height: 3px; border-radius: 2px;
  background: var(--coral);
}

.card-green .cta-title {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.card-green .cta-sub {
  margin: 0 auto 28px;
  max-width: 34em;
  font-size: 16px;
  opacity: 0.85;
}
.card-green .cta { justify-content: center; }

/* ------------------------------------------------------- report/check-in */

.flow { max-width: 780px; margin: 0 auto; padding: 40px 20px 60px; }
.flow-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 48px);
  margin-top: 14px;
}
.flow h1 { font-size: 34px; margin: 0 0 8px; letter-spacing: -0.015em; }
.flow h2 { font-size: 20px; margin: 28px 0 6px; }
.flow h3 { font-size: 17px; margin: 26px 0 6px; }

.linkish {
  background: none; border: none; cursor: pointer; font-family: inherit;
  color: var(--ink); font-size: 14px; padding: 0; font-weight: 600;
}
.muted { color: var(--muted); font-size: 14px; }
.help { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; }

label { display: block; margin: 14px 0; font-weight: 600; font-size: 14.5px; }
input[type="text"], input[type="password"], input[type="date"],
textarea, select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--blue);
  outline-offset: 0;
  border-color: transparent;
}
/* ---- modern controls (19 Aug 2026 — the native widgets read "90s") ---- */

/* Selects: no native chrome, our own chevron (inline data URI — same-origin). */
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2316181d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}
select[multiple] { background-image: none; padding-right: 14px; }

/* Date fields open the custom calendar (report.js) — the input itself just
   wears a calendar glyph. */
.wb-date {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 17 17'%3E%3Crect x='1.5' y='2.5' width='14' height='13' rx='3' fill='none' stroke='%2316181d' stroke-width='1.6'/%3E%3Cpath d='M1.5 6.5h14' stroke='%2316181d' stroke-width='1.6'/%3E%3Cpath d='M5.5 1v3M11.5 1v3' stroke='%2316181d' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.cal-pop {
  position: fixed;
  z-index: 60;
  width: 332px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 18px 48px rgba(22, 24, 29, 0.16);
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cal-title { font-weight: 700; font-size: 16px; }
.cal-nav {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f2f1ec;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  margin-left: 8px;
  color: var(--ink);
}
.cal-nav:hover { background: var(--ink); color: #fff; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 0 6px;
}
.cal-day {
  height: 40px;
  border: none;
  background: none;
  border-radius: 50%;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
}
.cal-day:hover { background: #f0efe9; }
.cal-today { box-shadow: inset 0 0 0 1.5px #c9c6bc; }
.cal-selected, .cal-selected:hover { background: var(--ink); color: #fff; }

/* File pickers: the native control hides behind a pill button. */
input[type="file"] { margin: 10px 0; font-size: 13.5px; color: var(--muted); }
input[type="file"]::file-selector-button {
  appearance: none;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 11px 20px;
  margin-right: 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  background: var(--ink);
  color: #fff;
}
input[type="file"]::file-selector-button:hover { opacity: 0.9; }

/* Radios & checkboxes: appearance off, a clean ring that fills with ink. */
input[type="radio"], input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 2px solid #c9c6bc;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-block;
  transition: border-color 0.1s ease, border-width 0.1s ease;
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"] { border-radius: 6px; }
input[type="radio"]:checked { border: 6px solid var(--ink); }
input[type="checkbox"]:checked {
  border: none;
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10'%3E%3Cpath d='M1 5.2 4.2 8.4 11 1.6' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat;
}
input[type="radio"]:focus-visible, input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* The identity choice wears the radios as bordered chips. */
.identity-modes { display: flex; gap: 12px; margin: 12px 0 6px; flex-wrap: wrap; }
.radio-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14.5px;
  margin: 0;
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}
.radio-inline:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.choice { display: flex; align-items: center; gap: 10px; font-weight: 400; }

.actions { margin-top: 26px; }
.error { color: #b3261e; font-size: 14px; }

.code-box {
  background: var(--card-cream);
  border-radius: 16px;
  padding: 18px 22px;
  margin: 14px 0;
}
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; }
.code-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  flex-wrap: wrap;
}
.code-label { color: var(--muted); font-size: 13.5px; min-width: 96px; }
.code-row .mono { word-break: break-all; }
.copy-btn {
  border: none;
  background: #fff;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  flex-shrink: 0;
}
.copy-btn:hover { background: var(--ink); color: #fff; }
.copy-btn .ic-check { display: none; }
.copy-btn.copied { background: var(--ink); color: #fff; }
.copy-btn.copied .ic-copy { display: none; }
.copy-btn.copied .ic-check { display: block; }
.followup-note {
  background: var(--card-blue);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.6;
  margin: 16px 0;
}

.pill {
  display: inline-block;
  background: var(--lime);
  color: var(--ink);
  border-radius: 999px;
  padding: 3px 14px;
  font-size: 12.5px;
  font-weight: 700;
}
/* ---- the reporter's case page (check-in step 2) ---- */
.case-page { max-width: 1120px; margin: 0 auto; padding: 40px 20px 60px; }
.case-head h1 { font-size: 30px; letter-spacing: -0.015em; margin: 14px 0 8px; }
.case-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 16px;
  align-items: start;
  margin-top: 10px;
}
@media (max-width: 880px) { .case-grid { grid-template-columns: 1fr; } }
.case-grid .flow-card { margin-top: 0; }
.report-field { margin-bottom: 16px; }
.report-field .rf-label { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.report-field .rf-value { font-size: 15px; white-space: pre-wrap; }
#case-evidence { list-style: none; padding: 0; margin: 6px 0 0; }
#case-evidence li { padding: 7px 0; border-bottom: 1px solid #f0eee7; font-size: 14px; }
#case-evidence li:last-child { border-bottom: none; }
/* The chat fills the column, WhatsApp-style: tall thread, compact bubbles,
   composer pinned at the bottom (19 Aug 2026). */
.chat-card {
  display: flex;
  flex-direction: column;
  height: min(80vh, 820px);
}
.chat-card h2 { font-size: 15px; margin: 0 0 12px; flex-shrink: 0; }
.chat-card .messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 14px;
  padding: 12px;
}
/* The composer: one big rounded card at the bottom — text on top, the
   controls row beneath it (paperclip left, send circle right). */
.composer {
  display: block;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  padding: 12px 12px 10px;
  flex-shrink: 0;
}
.composer:focus-within { border-color: #b9b6ab; }
.composer textarea {
  width: 100%;
  border: none;
  background: none;
  margin: 0;
  padding: 4px 8px 10px;
  resize: none;
  min-height: 48px;
  max-height: 160px;
  font-size: 14.5px;
  line-height: 1.5;
}
.composer textarea:focus { outline: none; border: none; }
.composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.composer input[type="file"] { display: none; }
.icon-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn:hover { background: #f2f1ec; }
.icon-btn.send { background: var(--ink); color: #fff; }
.icon-btn.send:hover { background: var(--ink); opacity: 0.88; }
.attach-status { font-size: 12px; margin: 8px 2px 0; }
.chat-empty { color: var(--muted); font-size: 13px; padding: 8px 4px; }

.messages { margin: 16px 0; }
/* Phone-messenger bubble scale: small type, tight padding, fit-content width. */
.msg {
  background: var(--card-blue);
  border-radius: 12px 12px 12px 4px;
  padding: 7px 11px;
  margin-bottom: 5px;
  max-width: 78%;
  width: fit-content;
  font-size: 13px;
  line-height: 1.45;
}
.msg.mine {
  background: var(--ink);
  color: #fff;
  margin-left: auto;
  border-radius: 12px 12px 4px 12px;
}
.msg .when { font-size: 10px; opacity: 0.55; margin-top: 2px; text-align: right; }

footer { text-align: center; padding: 20px 20px 40px; }

@media (max-width: 720px) {
  .hero-inner { padding: 48px 20px 44px; }
  .hero-row { align-items: flex-start; }
}
