/* ============================================================
   Public Grievance Portal — Citizen Web
   Design language: "Civic Tamil Modern"
   — TVK red masthead with a yellow keyline, kolam-dot paper
     background, diamond (vimana) motif, Anek Tamil display
     type over Hind Madurai body.
   ============================================================ */

:root {
  /* Brand - TVK party colors (Red & Yellow) */
  --red: #D62828;
  --red-dark: #B21E1E;
  --red-deep: #7E1010;
  --red-tint: #FCE7E7;
  --yellow: #FFD600;
  --yellow-soft: #FFF3B8;
  --yellow-deep: #C7A600;

  /* Neutrals */
  --bg: #F8F9FA;
  --paper: #FFFFFF;
  --ink: #1F1F1F;
  --ink-2: #4F4B47;
  --ink-3: #8A847D;
  --line: #E7E3DC;
  --line-strong: #D4CEC4;

  /* Semantic */
  --ok: #1B7A3D;
  --ok-tint: #E2F3E8;
  --warn: #9A6A00;
  --warn-tint: #FFF3CE;
  --info: #1D5FAD;
  --info-tint: #E4EEFA;
  --danger: #C01F1F;
  --danger-tint: #FCE7E7;

  /* Type */
  --font-display: 'Anek Tamil', 'Hind Madurai', sans-serif;
  --font-body: 'Hind Madurai', 'Anek Tamil', sans-serif;

  /* Shape & depth */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow-1: 0 1px 2px rgba(31, 31, 31, 0.06), 0 2px 8px rgba(31, 31, 31, 0.05);
  --shadow-2: 0 4px 12px rgba(31, 31, 31, 0.10), 0 12px 32px rgba(31, 31, 31, 0.10);
  --shadow-red: 0 6px 18px rgba(214, 40, 40, 0.32);

  --header-h: 60px;
  --nav-h: 64px;
  --maxw: 1140px;
  --narrow: 760px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--bg);
  /* Kolam dot-grid paper texture */
  background-image:
    radial-gradient(rgba(214, 40, 40, 0.055) 1.2px, transparent 1.2px),
    radial-gradient(rgba(31, 31, 31, 0.035) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px;
  background-position: 0 0, 14px 14px;
  min-height: 100dvh;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

p {
  margin: 0;
}

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

button {
  font-family: inherit;
}

input,
textarea,
select {
  font-family: inherit;
}

::selection {
  background: var(--yellow);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--info);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------- Boot splash ---------------- */

.boot-splash {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
}

.boot-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--red);
  position: relative;
  animation: bootPulse 1.2s ease-in-out infinite;
}

.boot-mark::after {
  content: '';
  position: absolute;
  inset: 16px;
  background: var(--yellow);
  border-radius: 4px;
  transform: rotate(45deg);
}

.boot-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}

@keyframes bootPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.07);
  }
}

/* ---------------- App shell ---------------- */

.shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--red);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.05));
  color: #fff;
  border-bottom: 4px solid var(--yellow);
  box-shadow: var(--shadow-1);
}

.masthead-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
}

.masthead .mark-img {
  flex: none;
  width: 75px;
  height: 75px;
  border-radius: 10px;
  object-fit: cover;
}

.masthead .wordmark {
  min-width: 0;
}

.masthead .wordmark .title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.01em;
  white-space: normal;
  line-height: 1.2;
}

.masthead .wordmark .subtitle {
  font-size: 12px;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.masthead .spacer {
  flex: 1;
}

.lang-pill {
  flex: none;
  display: inline-flex;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.10);
}

.lang-pill button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  padding: 5px 13px;
  cursor: pointer;
  font-family: var(--font-display);
}

.lang-pill button[aria-pressed="true"] {
  background: var(--yellow);
  color: var(--ink);
}

.main {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 16px calc(var(--nav-h) + 96px);
}

.main.full-bleed {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
}

/* ---------------- Bottom navigation ---------------- */

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  z-index: 40;
  width: min(calc(100% - 24px), 430px);
  height: var(--nav-h);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-2);
  display: flex;
  align-items: stretch;
  padding: 6px;
  gap: 4px;
}

.bottom-nav .nav-item {
  appearance: none;
  border: 0;
  background: transparent;
  flex: 1;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--font-display);
  transition: background 0.18s ease, color 0.18s ease;
  position: relative;
}

.bottom-nav .nav-item svg {
  width: 22px;
  height: 22px;
}

.bottom-nav .nav-item[aria-current="page"] {
  background: var(--red-tint);
  color: var(--red-dark);
}

.bottom-nav .nav-item .nav-badge {
  position: absolute;
  top: 5px;
  right: calc(50% - 22px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: grid;
  place-content: center;
  border: 2px solid var(--paper);
}

.bottom-nav .nav-fab {
  appearance: none;
  border: 0;
  flex: none;
  width: 52px;
  margin: 0;
  align-self: center;
  height: 52px;
  border-radius: 17px;
  background: var(--red);
  color: #fff;
  display: grid;
  place-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-red);
  transition: transform 0.15s ease, background 0.15s ease;
}

.bottom-nav .nav-fab:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.bottom-nav .nav-fab:active {
  transform: scale(0.96);
}

.bottom-nav .nav-fab svg {
  width: 26px;
  height: 26px;
}

/* ---------------- Page header block ---------------- */

.page-head {
  margin-bottom: 18px;
}

.page-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-dark);
  margin-bottom: 6px;
}

.page-head .eyebrow::before {
  content: '';
  width: 9px;
  height: 9px;
  background: var(--yellow);
  border: 1.5px solid var(--red);
  transform: rotate(45deg);
}

.page-head h1 {
  font-size: 26px;
  font-weight: 800;
}

.page-head .lede {
  color: var(--ink-2);
  margin-top: 4px;
  font-size: 14.5px;
}

/* ---------------- Cards ---------------- */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
}

.card.pad {
  padding: 18px;
}

.complaint-card {
  display: block;
  width: 100%;
  text-align: start;
  text-decoration: none;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--status-color, var(--ink-3));
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 14px 16px;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.complaint-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: var(--line-strong);
  border-inline-start-color: var(--status-color, var(--ink-3));
}

.complaint-card .row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.refno {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 6px;
}

.complaint-card h3 {
  font-size: 16.5px;
  font-weight: 700;
  margin: 2px 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.complaint-card .meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--ink-3);
  font-size: 13px;
}

.complaint-card .meta-line .sep::before {
  content: '·';
  margin-inline-end: 14px;
}

.list-stack {
  display: grid;
  gap: 12px;
}

/* ---------------- Chips & badges ---------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  padding: 3px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.chip::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: currentColor;
  opacity: 0.85;
}

.chip.s-submitted,
.chip.s-unassigned {
  background: #EFEDE9;
  color: var(--ink-2);
  border-color: var(--line-strong);
}

.chip.s-assigned {
  background: var(--info-tint);
  color: var(--info);
}

.chip.s-in_progress {
  background: var(--warn-tint);
  color: var(--warn);
}

.chip.s-resolved {
  background: var(--ok-tint);
  color: var(--ok);
}

.chip.s-closed {
  background: var(--ink);
  color: #fff;
}

.chip.s-disputed {
  background: var(--danger-tint);
  color: var(--danger);
}

.chip.s-escalated_sup,
.chip.s-escalated_min {
  background: #FBE8D6;
  color: #A35200;
}

.chip.s-merged {
  background: #EFEDE9;
  color: var(--ink-3);
}

.chip.confidential {
  background: var(--ink);
  color: var(--yellow);
}

.chip.priority-urgent {
  background: var(--danger-tint);
  color: var(--danger);
}

/* Filter chips */
.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: none;
  margin-bottom: 8px;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  appearance: none;
  flex: none;
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--yellow);
}

/* ---------------- Buttons ---------------- */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15.5px;
  padding: 12px 22px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.985);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn.primary {
  background: var(--red);
  color: #fff;
  box-shadow: var(--shadow-red);
}

.btn.primary:hover:not([disabled]) {
  background: var(--red-dark);
}

.btn.secondary {
  background: var(--yellow);
  color: var(--ink);
}

.btn.secondary:hover:not([disabled]) {
  background: #F2CB00;
}

.btn.outline {
  background: transparent;
  color: var(--red-dark);
  border-color: var(--red);
}

.btn.outline:hover:not([disabled]) {
  background: var(--red-tint);
}

.btn.ghost {
  background: transparent;
  color: var(--ink-2);
}

.btn.ghost:hover:not([disabled]) {
  background: rgba(31, 31, 31, 0.06);
}

.btn.danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}

.btn.danger:hover:not([disabled]) {
  background: var(--danger-tint);
}

.btn.block {
  width: 100%;
}

.btn.sm {
  padding: 8px 14px;
  font-size: 13.5px;
  border-radius: 10px;
}

.btn .spinner {
  width: 18px;
  height: 18px;
}

/* ---------------- Forms ---------------- */

.field {
  margin-bottom: 18px;
}

.field>label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--ink);
}

.field .hint {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 5px;
}

.field .error-text {
  font-size: 13px;
  color: var(--danger);
  margin-top: 5px;
  font-weight: 600;
}

.input,
.textarea {
  width: 100%;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: var(--paper);
  padding: 12px 14px;
  font-size: 16px;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus,
.textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.14);
}

.field.invalid .input,
.field.invalid .textarea {
  border-color: var(--danger);
}

.textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.5;
}

.char-count {
  text-align: end;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* Phone input with fixed +91 prefix */
.phone-wrap {
  display: flex;
}

.phone-wrap .cc {
  flex: none;
  display: grid;
  place-content: center;
  padding: 0 14px;
  background: var(--bg);
  border: 1.5px solid var(--line-strong);
  border-inline-end: 0;
  border-radius: 12px 0 0 12px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--ink-2);
}

.phone-wrap .input {
  border-radius: 0 12px 12px 0;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

/* OTP boxes */
.otp-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  direction: ltr;
}

.otp-box {
  width: 48px;
  height: 58px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-display);
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.otp-box:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.14);
}

.otp-box.filled {
  border-color: var(--ink);
  background: var(--yellow-soft);
}

/* Checkbox (consent) */
.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.5;
}

.check-row input[type="checkbox"] {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--red);
}

/* Segmented control */
.segmented {
  display: flex;
  background: #EFEDE9;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
}

.segmented button {
  appearance: none;
  border: 0;
  flex: 1;
  background: transparent;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s ease;
}

.segmented button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--red-dark);
  box-shadow: var(--shadow-1);
}

.segmented button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Picker trigger (category / area / temple) */
.picker-btn {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: start;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15.5px;
  color: var(--ink-3);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.picker-btn:hover {
  border-color: var(--ink-3);
}

.picker-btn.has-value {
  color: var(--ink);
  font-weight: 600;
}

.picker-btn .grow {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-btn svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--ink-3);
}

/* ---------------- Photo attach ---------------- */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 10px;
}

.photo-add {
  aspect-ratio: 1;
  border: 2px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--paper);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--font-display);
  transition: all 0.15s ease;
}

.photo-add:hover {
  border-color: var(--red);
  color: var(--red-dark);
  background: var(--red-tint);
}

.photo-add svg {
  width: 24px;
  height: 24px;
}

.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-thumb .remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(31, 31, 31, 0.78);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-content: center;
}

.photo-thumb .upload-state {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  font-size: 10.5px;
  font-weight: 700;
  text-align: center;
  padding: 3px;
  background: rgba(31, 31, 31, 0.72);
  color: var(--yellow);
}

/* ---------------- GPS capture ---------------- */

.gps-row {
  margin-top: 8px;
}

.gps-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all 0.15s ease;
}

.gps-btn:hover:not(:disabled) {
  border-color: var(--red);
  color: var(--red-dark);
  background: var(--red-tint);
}

.gps-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.gps-btn svg {
  width: 17px;
  height: 17px;
}

.gps-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--red-tint);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
}

.gps-chip svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--red);
}

.gps-chip .grow {
  flex: 1;
  min-width: 0;
}

.gps-clear {
  flex: none;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(31, 31, 31, 0.1);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-content: center;
}

.gps-clear:hover {
  background: var(--red);
  color: #fff;
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--red-dark);
  text-decoration: none;
}

.map-link:hover {
  text-decoration: underline;
}

.map-link svg {
  width: 16px;
  height: 16px;
}

/* ---------------- Detail page ---------------- */

.detail-hero {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  margin-bottom: 16px;
}

.detail-hero .hero-band {
  height: 8px;
  background: repeating-linear-gradient(-45deg,
      var(--red) 0 14px,
      var(--yellow) 14px 22px);
}

.detail-hero .hero-body {
  padding: 18px;
}

.detail-hero h1 {
  font-size: 21px;
  font-weight: 800;
  margin: 8px 0 10px;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  border-top: 1px dashed var(--line-strong);
  margin-top: 14px;
  padding-top: 14px;
}

.fact .k {
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.fact .v {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 1px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 800;
  margin: 22px 0 12px;
}

.section-title::before {
  content: '';
  width: 9px;
  height: 9px;
  background: var(--yellow);
  border: 1.5px solid var(--red);
  transform: rotate(45deg);
  flex: none;
}

.desc-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
  white-space: pre-wrap;
  font-size: 15px;
  color: var(--ink-2);
}

/* Timeline */
.timeline {
  position: relative;
  padding-inline-start: 26px;
  display: grid;
  gap: 0;
}

.timeline::before {
  content: '';
  position: absolute;
  inset-block: 10px;
  inset-inline-start: 7px;
  width: 2px;
  background: var(--line-strong);
}

.tl-item {
  position: relative;
  padding: 0 0 20px;
}

.tl-item:last-child {
  padding-bottom: 4px;
}

.tl-item .node {
  position: absolute;
  inset-inline-start: -26px;
  top: 5px;
  width: 12px;
  height: 12px;
  background: var(--paper);
  border: 2.5px solid var(--ink-3);
  transform: rotate(45deg);
}

.tl-item.tone-ok .node {
  border-color: var(--ok);
  background: var(--ok-tint);
}

.tl-item.tone-warn .node {
  border-color: var(--warn);
  background: var(--warn-tint);
}

.tl-item.tone-danger .node {
  border-color: var(--danger);
  background: var(--danger-tint);
}

.tl-item.tone-info .node {
  border-color: var(--info);
  background: var(--info-tint);
}

.tl-item:first-child .node {
  border-color: var(--red);
  background: var(--yellow);
}

.tl-item .tl-title {
  font-weight: 700;
  font-size: 14.5px;
  font-family: var(--font-display);
}

.tl-item .tl-meta {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 1px;
}

.tl-item .tl-note {
  margin-top: 7px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--yellow);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--ink-2);
  white-space: pre-wrap;
}

/* Media gallery */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.media-grid a {
  display: block;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  position: relative;
  background: var(--bg);
}

.media-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-grid .purpose-tag {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  font-size: 9.5px;
  font-weight: 700;
  font-family: var(--font-display);
  text-align: center;
  padding: 2px 4px;
  background: rgba(31, 31, 31, 0.72);
  color: #fff;
  letter-spacing: 0.04em;
}

.media-grid .purpose-tag.after {
  background: rgba(27, 122, 61, 0.85);
}

/* Resolution prompt panel */
.resolution-panel {
  background: linear-gradient(135deg, var(--yellow-soft), #FFFDF2);
  border: 1.5px solid var(--yellow-deep);
  border-radius: var(--r-lg);
  padding: 18px;
  margin: 20px 0;
}

.resolution-panel h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 4px;
}

.resolution-panel p {
  font-size: 13.5px;
  color: var(--ink-2);
  margin-bottom: 14px;
}

.resolution-panel .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.resolution-panel .actions .btn {
  flex: 1;
  min-width: 140px;
}

/* Star rating */
.stars {
  display: inline-flex;
  gap: 6px;
  direction: ltr;
}

.stars button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 2px;
  cursor: pointer;
  color: var(--line-strong);
  transition: transform 0.12s ease, color 0.12s ease;
}

.stars button.on {
  color: var(--yellow-deep);
}

.stars button:hover {
  transform: scale(1.15);
}

.stars svg {
  width: 32px;
  height: 32px;
  display: block;
}

/* ---------------- Notifications ---------------- */

.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: box-shadow 0.14s ease, transform 0.14s ease;
  text-align: start;
  width: 100%;
}

.notif-item:hover {
  box-shadow: var(--shadow-1);
  transform: translateY(-1px);
}

.notif-item.unread {
  border-inline-start: 4px solid var(--red);
  background: linear-gradient(90deg, var(--red-tint), var(--paper) 35%);
}

.notif-item .dot {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: grid;
  place-content: center;
  color: var(--ink-3);
}

.notif-item.unread .dot {
  background: var(--yellow);
  border-color: var(--yellow-deep);
  color: var(--ink);
}

.notif-item .dot svg {
  width: 19px;
  height: 19px;
}

.notif-item .n-title {
  font-weight: 700;
  font-size: 14.5px;
  font-family: var(--font-display);
}

.notif-item .n-body {
  font-size: 13.5px;
  color: var(--ink-2);
  margin-top: 1px;
}

.notif-item .n-time {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 4px;
}

/* ---------------- Profile ---------------- */

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
}

.profile-card::after {
  content: '';
  position: absolute;
  inset-inline-end: -34px;
  top: -34px;
  width: 110px;
  height: 110px;
  background: var(--red);
  transform: rotate(45deg);
  opacity: 0.85;
}

.profile-card::before {
  content: '';
  position: absolute;
  inset-inline-end: -14px;
  top: 44px;
  width: 52px;
  height: 52px;
  background: var(--yellow);
  transform: rotate(45deg);
  z-index: 1;
}

.profile-card .avatar {
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--yellow);
  color: var(--ink);
  display: grid;
  place-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 25px;
  z-index: 2;
}

.profile-card .who {
  z-index: 2;
  min-width: 0;
}

.profile-card .who .nm {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
}

.profile-card .who .ph {
  font-size: 13.5px;
  opacity: 0.8;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  text-align: start;
}

.settings-list {
  display: grid;
  gap: 10px;
}

.settings-row {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
}

.settings-row .row-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-row .row-label svg {
  width: 17px;
  height: 17px;
  color: var(--red-dark);
}

/* ---------------- Modal / sheet ---------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(31, 31, 31, 0.48);
  backdrop-filter: blur(2px);
  display: grid;
  align-items: end;
  justify-items: center;
  animation: fadeIn 0.18s ease;
}

@media (min-width: 560px) {
  .modal-backdrop {
    align-items: center;
  }
}

.modal-sheet {
  width: 100%;
  max-width: 520px;
  max-height: 86dvh;
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  animation: sheetUp 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
  overflow: hidden;
}

@media (min-width: 560px) {
  .modal-sheet {
    border-radius: 22px;
    max-height: 80dvh;
  }
}

.modal-sheet .sheet-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.modal-sheet .sheet-head h2 {
  font-size: 17px;
  font-weight: 800;
  flex: 1;
}

.modal-sheet .sheet-head .close-x {
  appearance: none;
  border: 0;
  background: var(--bg);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 16px;
  color: var(--ink-2);
  display: grid;
  place-content: center;
}

.modal-sheet .sheet-body {
  overflow-y: auto;
  padding: 14px 18px 22px;
}

@keyframes sheetUp {
  from {
    transform: translateY(48px);
    opacity: 0.4;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Picker option rows inside modal */
.option-list {
  display: grid;
  gap: 6px;
}

.option-row {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.13s ease;
}

.option-row:hover {
  border-color: var(--red);
  background: var(--red-tint);
}

.option-row .grow {
  flex: 1;
  min-width: 0;
}

.option-row .sub {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
}

.option-row svg {
  flex: none;
  width: 17px;
  height: 17px;
  color: var(--ink-3);
}

.crumb-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 12.5px;
  color: var(--ink-3);
  margin-bottom: 12px;
  font-weight: 600;
}

.crumb-row .crumb-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 2px 4px;
  color: var(--red-dark);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  font-family: var(--font-display);
}

/* ---------------- Toast ---------------- */

#toast-root {
  position: fixed;
  bottom: calc(var(--nav-h) + 28px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: grid;
  gap: 8px;
  width: min(calc(100% - 32px), 420px);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-2);
  animation: sheetUp 0.2s ease;
  border-inline-start: 4px solid var(--yellow);
}

.toast.ok {
  border-inline-start-color: #45C272;
}

.toast.error {
  border-inline-start-color: var(--red);
}

.toast .t-icon {
  flex: none;
  display: grid;
  place-content: center;
}

.toast .t-icon svg {
  width: 18px;
  height: 18px;
}

/* ---------------- States: empty / loading / error ---------------- */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  display: grid;
  justify-items: center;
  gap: 6px;
}

.empty-state .glyph {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  background: var(--paper);
  border: 1.5px dashed var(--line-strong);
  display: grid;
  place-content: center;
  color: var(--ink-3);
  margin-bottom: 10px;
  position: relative;
}

.empty-state .glyph::after {
  content: '';
  position: absolute;
  top: -7px;
  right: -7px;
  width: 14px;
  height: 14px;
  background: var(--yellow);
  border: 1.5px solid var(--red);
  transform: rotate(45deg);
}

.empty-state .glyph svg {
  width: 34px;
  height: 34px;
}

.empty-state h3 {
  font-size: 17px;
  font-weight: 800;
}

.empty-state p {
  font-size: 14px;
  color: var(--ink-3);
  max-width: 300px;
}

.skeleton {
  border-radius: var(--r-md);
  background: linear-gradient(90deg, #EFEDE9 25%, #F7F5F1 50%, #EFEDE9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

.spinner {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 999px;
  border: 3px solid rgba(214, 40, 40, 0.18);
  border-top-color: var(--red);
  animation: spin 0.7s linear infinite;
}

.btn .spinner {
  border-width: 2.5px;
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
}

.btn.outline .spinner,
.btn.secondary .spinner {
  border-color: rgba(31, 31, 31, 0.2);
  border-top-color: var(--ink);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.center-loader {
  display: grid;
  place-content: center;
  padding: 48px;
  justify-items: center;
  gap: 12px;
  color: var(--ink-3);
  font-size: 14px;
}

/* ---------------- Auth screens ---------------- */

.auth-wrap {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.auth-hero {
  background: var(--red);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.10) 1.4px, transparent 1.4px),
    linear-gradient(165deg, var(--red) 30%, var(--red-deep));
  background-size: 26px 26px, 100% 100%;
  color: #fff;
  padding: clamp(36px, 9vh, 76px) 24px 86px;
  text-align: center;
  position: relative;
  border-bottom: 5px solid var(--yellow);
}

.auth-hero .crest {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.13);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  display: grid;
  place-content: center;
  margin: 0 auto 18px;
}

.auth-hero .crest::after {
  content: '';
  width: 24px;
  height: 24px;
  background: var(--yellow);
  border-radius: 5px;
  transform: rotate(45deg);
}

.auth-hero h1 {
  color: #fff;
  font-size: clamp(24px, 6vw, 32px);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.auth-hero .alt-name {
  font-size: 14.5px;
  opacity: 0.85;
  margin-top: 4px;
  font-weight: 500;
}

.auth-hero .motto {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--yellow);
  border: 1px solid rgba(255, 214, 0, 0.45);
  border-radius: 999px;
  padding: 5px 16px;
}

.auth-card-zone {
  padding: 0 16px 48px;
  margin-top: -52px;
}

.auth-card {
  max-width: 440px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  padding: 26px 22px;
}

.auth-card h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.auth-card .sub {
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 20px;
}

.auth-card .auth-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
}

.auth-lang {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.auth-lang .segmented {
  width: 220px;
}

.resend-line {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-2);
}

.linklike {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--red-dark);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font-display);
  padding: 4px 6px;
}

.linklike:disabled {
  color: var(--ink-3);
  cursor: default;
}

/* ---------------- Misc ---------------- */

.load-more-zone {
  display: grid;
  place-content: center;
  padding: 18px 0 6px;
}

.banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: var(--r-md);
  padding: 13px 15px;
  font-size: 13.5px;
  margin-bottom: 16px;
}

.banner.info {
  background: var(--info-tint);
  color: var(--info);
  border: 1px solid #C4D9F2;
}

.banner.warn {
  background: var(--warn-tint);
  color: var(--warn);
  border: 1px solid #EDD9A3;
}

.banner svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

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

.back-row {
  margin-bottom: 14px;
}

.back-link {
  appearance: none;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 8px 6px 0;
}

.back-link:hover {
  color: var(--red-dark);
}

.back-link svg {
  width: 17px;
  height: 17px;
}

.narrow {
  max-width: var(--narrow);
  margin: 0 auto;
}

/* Page-head row with an inline action (desktop) */
.page-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.desktop-only {
  display: none !important;
}

/* ============================================================
   DESKTOP LAYER — top navigation, wide grids, sidebar, footer.
   Mobile keeps the bottom tab bar; ≥900px becomes a classic
   website: horizontal nav, two-column lists, sticky aside.
   ============================================================ */

.top-nav {
  display: none;
}

.site-footer {
  background: var(--ink);
  color: #CFC9C2;
  margin-top: 56px;
  border-top: 4px solid var(--yellow);
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 38px 16px 30px;
  display: grid;
  gap: 28px;
}

.site-footer .f-brand .f-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-footer .f-brand .f-title::before {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--yellow);
  border-radius: 3px;
  transform: rotate(45deg);
}

.site-footer .f-brand .f-motto {
  color: var(--yellow);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  margin-top: 6px;
}

.site-footer .f-brand p {
  font-size: 13.5px;
  margin-top: 12px;
  max-width: 420px;
  line-height: 1.65;
}

.site-footer .f-col h4 {
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.site-footer .f-col a {
  display: block;
  color: #CFC9C2;
  text-decoration: none;
  font-size: 14px;
  padding: 4px 0;
}

.site-footer .f-col a:hover {
  color: var(--yellow);
}

.site-footer .f-col p {
  font-size: 13.5px;
  line-height: 1.6;
}

.site-footer .f-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 6px;
  padding-top: 18px;
  font-size: 12.5px;
  color: #9B958E;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Detail page: main column + sticky facts aside */
.detail-grid {
  display: grid;
  gap: 4px 28px;
  grid-template-areas: "side" "main";
}

.detail-main {
  grid-area: main;
  min-width: 0;
}

.detail-side {
  grid-area: side;
  min-width: 0;
}

.facts-card .fact {
  padding: 11px 0;
  border-bottom: 1px dashed var(--line-strong);
}

.facts-card .fact:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.facts-card .fact:first-child {
  padding-top: 0;
}

@media (min-width: 700px) {
  .page-head h1 {
    font-size: 30px;
  }

  .main {
    padding-top: 28px;
  }
}

@media (min-width: 900px) {
  body {
    font-size: 16.5px;
  }

  .masthead {
    border-bottom-width: 3px;
  }

  .masthead-inner {
    min-height: 74px;
    gap: 20px;
  }

  .masthead .wordmark .title {
    font-size: 20px;
  }

  .masthead .wordmark .subtitle {
    font-size: 12.5px;
  }

  /* Horizontal site navigation */
  .top-nav {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .top-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    padding: 10px 16px;
    border-radius: 10px;
    transition: background 0.15s ease;
    position: relative;
  }

  .top-nav a:hover {
    background: rgba(255, 255, 255, 0.13);
  }

  .top-nav a[aria-current="page"] {
    background: rgba(0, 0, 0, 0.20);
    box-shadow: inset 0 -3px 0 var(--yellow);
  }

  .top-nav a.nav-cta {
    background: var(--yellow);
    color: var(--ink);
    margin-inline-start: 8px;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  }

  .top-nav a.nav-cta:hover {
    background: #F2CB00;
  }

  .top-nav .nav-badge {
    position: static;
    margin-inline-start: 2px;
    min-width: 18px;
    height: 18px;
    border: 0;
    background: var(--yellow);
    color: var(--ink);
    font-size: 11px;
    border-radius: 999px;
    display: grid;
    place-content: center;
    padding: 0 5px;
    font-weight: 700;
  }

  /* Website mode: no app tab bar, normal page padding */
  .bottom-nav {
    display: none;
  }

  .main {
    padding-bottom: 56px;
    padding-inline: 24px;
  }

  #toast-root {
    bottom: 36px;
  }

  .desktop-only {
    display: inline-flex !important;
  }

  .page-head h1 {
    font-size: 32px;
  }

  .page-head .lede {
    font-size: 15.5px;
  }

  /* Complaint cards in two columns */
  .list-stack.two-col {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .footer-inner {
    grid-template-columns: 1.6fr 1fr 1fr;
    padding-inline: 24px;
  }
}

@media (min-width: 980px) {

  /* Detail: content + sticky aside */
  .detail-grid {
    grid-template-areas: "main side";
    grid-template-columns: minmax(0, 1fr) 350px;
    align-items: start;
  }

  .detail-side {
    position: sticky;
    top: 96px;
  }

  .detail-hero h1 {
    font-size: 26px;
  }

  /* Login becomes a split-screen page */
  .auth-wrap {
    grid-template-rows: none;
    grid-template-columns: 1.05fr 1fr;
    min-height: 100dvh;
  }

  .auth-hero {
    text-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 72px 64px;
    border-bottom: 0;
    border-inline-end: 5px solid var(--yellow);
  }

  .auth-hero .crest {
    margin: 0 0 24px;
  }

  .auth-hero h1 {
    font-size: 40px;
  }

  .auth-hero .alt-name {
    font-size: 16px;
  }

  .auth-hero .motto {
    margin-top: 18px;
    align-self: flex-start;
  }

  .auth-card-zone {
    margin-top: 0;
    display: grid;
    place-items: center;
    padding: 48px 40px;
  }

  .auth-card {
    width: 100%;
    max-width: 470px;
    padding: 34px 32px;
  }

  .hero-points {
    display: grid;
    gap: 16px;
    margin-top: 40px;
    max-width: 440px;
  }
}

/* ============================================================
   LANDING PAGE — hero + stats band + news + success stories.
   ============================================================ */

.landing {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.landing .site-footer {
  margin-top: 0;
}

.land-hero {
  background: var(--red);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.10) 1.4px, transparent 1.4px),
    linear-gradient(160deg, var(--red) 25%, var(--red-deep));
  background-size: 26px 26px, 100% 100%;
  color: #fff;
  border-bottom: 5px solid var(--yellow);
  padding: clamp(30px, 6vh, 64px) 16px clamp(36px, 7vh, 72px);
}

.land-hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  gap: 30px;
}

.land-hero-text {
  text-align: center;
}

.land-hero-text .crest {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.13);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  display: grid;
  place-content: center;
  margin: 0 auto 16px;
}

.land-hero-text .crest::after {
  content: '';
  width: 24px;
  height: 24px;
  background: var(--yellow);
  border-radius: 5px;
  transform: rotate(45deg);
}

.land-hero-text h1 {
  color: #fff;
  font-size: clamp(26px, 5vw, 42px);
  font-weight: 800;
}

.land-hero-text .alt-name {
  font-size: 15px;
  opacity: 0.85;
  margin-top: 4px;
}

.land-hero-text .motto {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--yellow);
  border: 1px solid rgba(255, 214, 0, 0.45);
  border-radius: 999px;
  padding: 5px 16px;
}

.auth-slot {
  width: 100%;
  max-width: 470px;
  margin: 0 auto;
}

.auth-slot .auth-card {
  box-shadow: var(--shadow-2);
}

/* Stats band */
.stats-band {
  background: var(--ink);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stats-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: center;
}

.stats-inner .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 4vw, 34px);
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
}

.stats-inner .lbl {
  font-size: 12.5px;
  opacity: 0.85;
  margin-top: 2px;
}

/* Generic landing section */
.land-section {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 52px 16px 8px;
}

.land-section:last-of-type {
  padding-bottom: 56px;
}

.land-sec-head {
  margin-bottom: 24px;
}

.land-sec-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-dark);
  margin-bottom: 6px;
}

.land-sec-head .eyebrow::before {
  content: '';
  width: 9px;
  height: 9px;
  background: var(--yellow);
  border: 1.5px solid var(--red);
  transform: rotate(45deg);
}

.land-sec-head h2 {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
}

.land-sec-head .lede {
  color: var(--ink-2);
  margin-top: 6px;
  font-size: 14.5px;
}

/* News cards */
.news-grid {
  display: grid;
  gap: 16px;
}

.news-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--yellow);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 18px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
}

.news-card .n-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.news-card .n-tag {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red-dark);
  background: var(--red-tint);
  border-radius: 6px;
  padding: 3px 9px;
}

.news-card .n-date {
  font-size: 12px;
  color: var(--ink-3);
}

.news-card h3 {
  font-size: 16.5px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.news-card p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.6;
}

/* Success-story cards */
.land-section.stories {
  position: relative;
}

.story-grid {
  display: grid;
  gap: 16px;
}

.story-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--ok);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.story-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
}

.story-card .s-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.story-card h3 {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}

.story-card .s-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.story-card .s-cat {
  color: var(--red-dark);
  font-weight: 700;
}

.story-card .s-story {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.65;
  flex: 1;
}

.story-card .s-foot {
  border-top: 1px dashed var(--line-strong);
  padding-top: 12px;
}

.story-card .s-days {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--ok);
  background: var(--ok-tint);
  border-radius: 999px;
  padding: 5px 14px;
}

.land-cta-row {
  display: grid;
  place-content: center;
  padding: 34px 0 8px;
}

@media (min-width: 900px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .story-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .land-section {
    padding-inline: 24px;
  }
}

@media (min-width: 980px) {
  .land-hero {
    padding-inline: 24px;
  }

  .land-hero-inner {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 56px;
  }

  .land-hero-text {
    text-align: start;
  }

  .land-hero-text .crest {
    margin: 0 0 20px;
  }

  .land-hero-text .motto {
    margin-top: 16px;
  }

  .auth-slot {
    margin: 0;
    justify-self: end;
  }
}

/* Login hero feature bullets — desktop only */
.hero-points {
  display: none;
}

.hero-point {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.5;
}

.hero-point .pt-icon {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: grid;
  place-content: center;
  color: var(--yellow);
}

.hero-point .pt-text b {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
}

.hero-point .pt-text span {
  opacity: 0.82;
  font-size: 13.5px;
}

/* ============================================================
   WELCOME DASHBOARD (Authenticated Home)
   ============================================================ */

/* ── Hero ──────────────────────────────────────────────────── */

.whero {
  background:
    radial-gradient(ellipse at 80% 30%, rgba(255, 214, 0, 0.12) 0%, transparent 55%),
    linear-gradient(160deg, var(--red) 0%, var(--red-deep) 100%);
  color: #fff;
  border-bottom: 4px solid var(--yellow);
  padding: clamp(32px, 6vw, 72px) 16px clamp(40px, 8vw, 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  overflow: hidden;
  position: relative;
}

.whero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

@media (min-width: 768px) {
  .whero {
    flex-direction: row;
    justify-content: center;
    gap: 48px;
    padding-left: 5%;
    padding-right: 5%;
  }
}

@media (min-width: 1100px) {
  .whero {
    gap: 80px;
    max-width: none;
  }
}

.whero-left {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 560px;
}

@media (min-width: 768px) {
  .whero-left {
    text-align: left;
    flex: 1;
    max-width: 520px;
  }
}

.whero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
  color: var(--yellow);
}

.whero-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
  position: relative;
}

.whero-pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--yellow);
  opacity: 0;
  animation: hero-pulse 2s ease-out infinite;
}

@keyframes hero-pulse {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

.whero-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.5vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 12px;
}

.whero-title .gradient-text {
  background: linear-gradient(135deg, var(--yellow) 0%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.whero-name {
  color: var(--yellow);
}

.whero-sub {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.88;
  margin-bottom: 28px;
  max-width: 420px;
}

@media (min-width: 768px) {
  .whero-sub { margin-left: 0; margin-right: auto; }
}

@media (max-width: 767px) {
  .whero-sub { margin: 0 auto 28px; }
}

.whero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 480px) {
  .whero-actions { flex-direction: row; }
}

.whero-actions .btn {
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
}

.whero-actions .btn:hover { transform: translateY(-2px); }

.whero-actions .btn.primary {
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 4px 16px rgba(255, 214, 0, 0.35);
}

.whero-actions .btn.primary:hover {
  box-shadow: 0 8px 24px rgba(255, 214, 0, 0.45);
}

.whero-actions .btn.outline {
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #fff;
}

.whero-actions .btn.outline:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Minister image */
.whero-right {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.whero-minister-img {
  width: clamp(200px, 30vw, 320px);
  height: auto;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  border: 4px solid rgba(255, 255, 255, 0.15);
}

@media (max-width: 767px) {
  .whero-minister-img { width: 180px; border-radius: 20px; }
}

/* ── Quick Stats Row ──────────────────────────────────────── */

.wstats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  max-width: var(--maxw);
  margin: -32px auto 0;
  padding: 0 16px;
  position: relative;
  z-index: 2;
}

.wstat-card {
  background: var(--paper);
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow-2);
  border: 1px solid var(--line);
  transition: transform 0.2s, box-shadow 0.2s;
}

.wstat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.wstat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.wstat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 3vw, 30px);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.wstat-lbl {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
  font-weight: 500;
}

/* ── Section Headings ─────────────────────────────────────── */

.wsec {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 16px 0;
}

.wsec:last-child { padding-bottom: 40px; }

.wsec-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.wsec-head h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
}

.wsec-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.15s;
}

.wsec-link:hover { gap: 8px; }

/* ── Recent Complaints ────────────────────────────────────── */

.wrecent-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wrecent-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--ink-3);
}

.wrecent-empty p { margin-top: 8px; font-size: 14px; }

.wrecent-card {
  display: flex;
  background: var(--paper);
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-1);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.wrecent-card:hover {
  border-color: var(--sc, var(--red));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.wrecent-bar {
  width: 5px;
  flex-shrink: 0;
  background: var(--sc, var(--ink-3));
  border-radius: 14px 0 0 14px;
}

.wrecent-body {
  flex: 1;
  padding: 14px 16px;
  min-width: 0;
}

.wrecent-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.wrecent-ref {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}

.wrecent-body h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wrecent-meta {
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.wrecent-meta .sep::before {
  content: '·';
  margin: 0 5px;
  color: var(--ink-3);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

