:root {
  --ink: #252530; /* body text, charcoal */
  --ink-soft: #5c5c6e; /* secondary text */
  --ink-muted: #8e8e9e;
  --line: #e4e3ec; /* borders */
  --line-soft: #f0eff5;
  --bg: #fafaf8; /* page background, warm white */
  --panel: #ffffff; /* cards */
  --accent: #4f46e5; /* buttons and the selected tab, indigo */
  --accent-hover: #4338ca;
  --accent-soft: #eeedff; /* icon backgrounds, light lavender */
  --accent-softer: #f6f5ff;
  --shadow: 0 1px 2px rgba(37,37,48,0.04), 0 8px 24px -12px rgba(79,70,229,0.18);
  --radius: 14px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body { background: var(--bg); }

a { color: var(--accent); }

.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  vertical-align: -0.125em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- header ---------- */

header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
  transition: transform 0.25s ease;
}

.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }

nav {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}

nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

nav a .icon { font-size: 14px; }
nav a:hover { color: var(--ink); background: var(--accent-soft); }

nav a.active {
  background: var(--accent);
  color: #fff;
}

/* ---------- layout ---------- */

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.view { display: none; }
.view.active { display: block; }

.view.active > * { animation: rise 0.5s ease both; }
.view.active > *:nth-child(2) { animation-delay: 0.05s; }
.view.active > *:nth-child(3) { animation-delay: 0.1s; }
.view.active > *:nth-child(4) { animation-delay: 0.15s; }
.view.active > *:nth-child(5) { animation-delay: 0.2s; }
.view.active > *:nth-child(n+6) { animation-delay: 0.25s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}

h1 {
  font-size: 34px;
  line-height: 1.15;
  margin: 0 0 10px;
  letter-spacing: -0.015em;
}

.lede {
  font-size: 15.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 32px;
  max-width: 56ch;
}

/* ---------- report: compose box ---------- */

.composer {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 1px 2px rgba(11,11,11,0.03);
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}

.composer:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(79,70,229,0.12), var(--shadow);
}

#complaint {
  width: 100%;
  border: none;
  outline: none;
  resize: vertical;
  min-height: 160px;
  font-family: inherit;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: transparent;
  padding: 0;
}

#complaint::placeholder {
  color: var(--ink-muted);
  font-style: italic;
}

.char-meter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.char-bar {
  flex: 1;
  height: 4px;
  background: var(--line-soft);
  border-radius: 99px;
  overflow: hidden;
}

.char-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #7c75ee, var(--accent));
  border-radius: 99px;
  transition: width 0.15s ease;
}

.char-bar span.near { background: var(--accent-hover); }

.char-count {
  font-size: 12px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1px dashed #bab5f2;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.chip:hover { background: var(--accent-soft); border-style: solid; transform: translateY(-1px); }

.chip-field {
  display: none;
  align-items: center;
  gap: 2px;
  background: var(--accent-soft);
  border-radius: 999px;
  padding-left: 12px;
  color: var(--accent);
  font-size: 13px;
  max-width: 100%;
}

.chip-field.show { display: inline-flex; animation: pop 0.25s ease; }
.chip-field.pop { animation: pop 0.3s ease; }

@keyframes pop {
  0% { transform: scale(0.85); opacity: 0.4; }
  70% { transform: scale(1.04); }
  100% { transform: scale(1); opacity: 1; }
}

.chip-field select {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: none;
  padding: 7px 22px 7px 6px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  max-width: 260px;
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234f46e5' stroke-width='1.5' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
}

.chip-field select:focus { outline: none; }

.chip-clear {
  background: none;
  border: none;
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px 4px 4px;
}
.chip-clear:hover { color: var(--accent-hover); }

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 700;
  padding: 13px 24px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 16px -8px rgba(79,70,229,0.8);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary .icon { transition: transform 0.2s ease; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:hover .icon { transform: translateX(3px) rotate(-8deg); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
  background: #c2c1cc;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}
.btn-primary:disabled .icon { transform: none; }

.post-note {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.5;
  max-width: 30ch;
  margin: 0;
}

.post-note .icon { margin-top: 2px; }

.fine-print {
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* Rounded icon tile, used on the register stats, About page and dialogs. */
.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  margin-bottom: 6px;
  flex-shrink: 0;
}

/* ---------- success state ---------- */

.success-panel {
  display: none;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px 32px;
  text-align: center;
  box-shadow: var(--shadow);
  animation: rise 0.4s ease;
}

.success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 0 0 8px var(--accent-soft);
  animation: pop 0.45s ease 0.1s both;
}

.burst {
  position: absolute;
  top: 76px;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
}

.burst span {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
  animation: burst 0.9s ease-out 0.15s forwards;
}

.burst span:nth-child(3n) { background: #7c75ee; border-radius: 50%; }
.burst span:nth-child(3n+1) { background: #c7c3f5; }

@keyframes burst {
  0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d))) scale(0.4); }
}

.success-panel h2 { font-size: 21px; margin: 0 0 8px; }

.success-panel p {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 40ch;
  margin: 0 auto 22px;
}

.success-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn-ghost .icon { color: var(--accent); }

/* ---------- register ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat .stat-icon { margin: 0; }
.stat div { display: flex; flex-direction: column; min-width: 0; }

.stat strong {
  font-size: 24px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat div span { font-size: 12px; color: var(--ink-muted); line-height: 1.3; }

.register-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--ink-muted);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search:focus-within { border-color: #c7c3f5; box-shadow: 0 0 0 4px var(--accent-soft); color: var(--accent); }

.search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  padding: 10px 0;
  min-width: 0;
}

.filter-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 10px;
  margin-bottom: 8px;
  scrollbar-width: thin;
}

.filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  max-width: 260px;
  transition: all 0.15s ease;
}

.filter span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter .icon { color: var(--accent); }

.filter em {
  font-style: normal;
  font-size: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 1px 7px;
  border-radius: 99px;
}

.filter:hover { border-color: #c7c3f5; color: var(--ink); }

.filter.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter.active .icon { color: #fff; }
.filter.active em { background: rgba(255,255,255,0.25); color: #fff; }

.register-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.register-count {
  font-size: 13px;
  color: var(--ink-muted);
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
}

.live-dot span.dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0ca30c;
  display: inline-block;
}

.live-dot span.dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #0ca30c;
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% { transform: scale(2.6); opacity: 0; }
}

.data-note {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin: 20px 0 0;
}

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.entry {
  display: flex;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  animation: fadeIn 0.4s ease both;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.entry:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c7c3f5; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.entry-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.entry:hover .entry-icon { background: var(--accent); color: #fff; }

.entry-body { flex: 1; min-width: 0; }

.entry-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill.outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.entry-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-size: 12.5px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.entry-platform {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.entry-platform .icon { color: var(--ink-muted); }

.entry-platform.unspecified {
  color: var(--ink-muted);
  font-weight: 500;
  font-style: italic;
}

.entry-text {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.entry-text.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  background: none;
  border: none;
  padding: 0;
  margin-top: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}

.read-more:hover { text-decoration: underline; }

.entry-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
}

.entry-id { color: var(--ink-muted); font-variant-numeric: tabular-nums; }

.entry-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 600;
  opacity: 0.8;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.entry:hover .entry-flag { opacity: 1; }
.entry-flag:hover { color: var(--accent); }

.entry.new {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.entry-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--ink-muted);
  font-size: 14px;
  text-align: center;
  padding: 36px 0;
  border: 1px dashed var(--line);
  border-radius: 12px;
  margin: 0;
}

.entry-empty .icon { font-size: 26px; color: #bab5f2; }

/* ---------- about ---------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0 32px;
}

.pillar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.45;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pillar:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pillar strong { font-size: 15px; color: var(--ink); }

.prose p {
  font-size: 15.5px;
  color: var(--ink-soft);
  line-height: 1.65;
  margin: 0 0 20px;
  max-width: 60ch;
}

.prose p:last-child { margin-bottom: 0; }

.prose p.emphasis {
  color: var(--ink);
  font-weight: 500;
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}

.help-block {
  margin-top: 40px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  scroll-margin-top: 90px;
}

.help-block.flash { animation: flash 1.6s ease; }

@keyframes flash {
  0%, 40% { box-shadow: 0 0 0 4px var(--accent-soft); border-color: var(--accent); }
  100% { box-shadow: none; border-color: var(--line); }
}

.help-block h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  margin: 0 0 10px;
}

.help-block h2 .stat-icon { margin: 0; }

.help-intro {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 18px;
  max-width: 60ch;
}

.help-steps {
  list-style: none;
  counter-reset: help;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.help-steps li {
  position: relative;
  padding-left: 40px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  counter-increment: help;
}

.help-steps li::before {
  content: counter(help);
  position: absolute;
  left: 0;
  top: -1px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-steps strong { color: var(--ink); }
.help-steps em { font-style: normal; font-weight: 600; color: var(--ink); }

.help-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.help-actions .btn-primary { font-size: 14.5px; padding: 11px 20px; }

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--accent-softer);
  border: 1px solid #dad7f7;
  overflow-wrap: anywhere;
  transition: background 0.15s ease, transform 0.15s ease;
}

.contact-link:hover { background: var(--accent-soft); transform: translateY(-1px); }

/* "Email address copied" message */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  max-width: calc(100% - 32px);
  background: var(--ink);
  color: var(--panel);
  font-size: 14px;
  line-height: 1.4;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 1000;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-softer));
  border: 1px solid #dad7f7;
}

.cta-card div { display: flex; flex-direction: column; gap: 2px; }
.cta-card strong { font-size: 16px; }
.cta-card div span { font-size: 13.5px; color: var(--ink-soft); }

/* ---------- footer ---------- */

footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 60px;
  font-size: 13px;
  color: var(--ink-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

footer a { color: var(--ink-muted); }
footer a:hover { color: var(--accent); }

.form-error { color: #c0392b; font-size: 13.5px; margin: 12px 0 0; min-height: 0; }
.form-error:empty { display: none; }

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .pillars { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .stat strong { font-size: 20px; }
  .cta-card { flex-direction: column; align-items: stretch; text-align: center; }
}

@media (max-width: 480px) {
  h1 { font-size: 26px; }
  main { padding: 32px 16px 64px; }
  .header-inner { padding: 12px 16px; }
  .logo { font-size: 0; gap: 0; }
  .logo-mark { font-size: 15px; }
  .composer { padding: 18px; }
  .composer-footer { flex-direction: column-reverse; align-items: stretch; gap: 12px; }
  .post-note { max-width: none; justify-content: center; text-align: center; }
  .btn-primary { width: 100%; }
  nav a { padding: 7px 10px; }
  nav a:not(.active) span { display: none; }
  .help-block { padding: 18px; }
  .help-actions > * { width: 100%; justify-content: center; }
  .entry { padding: 16px; gap: 12px; }
  .entry-icon { width: 34px; height: 34px; font-size: 16px; }
  .entry-time { margin-left: 0; }
  .register-toolbar { flex-direction: column; align-items: stretch; }

  .chip-field select { max-width: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- admin ---------- */

body.admin .view, body.admin main > * { animation: none; }
.admin code { background: var(--accent-soft); padding: 1px 6px; border-radius: 4px; }
.admin-login { max-width: 380px; margin: 0 auto; }
.admin-login .composer { display: flex; flex-direction: column; gap: 10px; }
.admin-label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }

.admin-input, .admin-select {
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.admin-input:focus, .admin-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.admin-select { border-radius: 999px; padding: 9px 14px; cursor: pointer; }
.admin-search .btn-primary { padding: 10px 20px; font-size: 14px; }
.admin .register-count { display: block; margin-bottom: 14px; }

.admin-flash {
  background: #e9f7ec;
  border: 1px solid #bfe5c8;
  color: #1d6b31;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
  margin: 0 0 16px;
}

.admin-id { font-size: 14px; }
.admin-entry.is-hidden { background: var(--line-soft); border-style: dashed; }
.admin-entry.is-hidden .entry-text { opacity: 0.7; }
.hidden-pill { background: var(--ink-soft); color: #fff; }
.hide-form { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.hide-form .btn-primary { padding: 8px 18px; font-size: 13.5px; width: auto; }
.hide-form [hidden] { display: none; }
.hide-step { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin .entry-foot .hide-step .btn-ghost { margin-left: 0; }
.admin .entry-foot .btn-ghost { padding: 7px 14px; font-size: 13px; margin-left: auto; }
.admin .entry-foot { flex-wrap: wrap; }

@media (max-width: 480px) {
  .admin .logo { font-size: 15px; gap: 9px; }
  .admin-search .btn-primary { width: 100%; }
  .hide-form { margin-left: 0; width: 100%; }
  .hide-step { width: 100%; }
  .hide-form .admin-select { flex: 1; min-width: 0; }
}

.admin-stats { grid-template-columns: repeat(4, 1fr); }
a.stat { color: inherit; text-decoration: none; }
.stat.attention { border-color: var(--accent); background: var(--accent-softer); }
.stat.attention strong { color: var(--accent); }

.admin-pending-note {
  background: var(--accent-softer);
  border: 1px solid #dad7f7;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  margin: 0 0 16px;
}

.admin-pending-note a { font-weight: 700; }
.admin-entry.is-pending { border-color: var(--accent); border-left-width: 4px; }
.pending-pill { background: var(--accent); color: #fff; }
.review-actions { display: flex; gap: 8px; margin-left: auto; }
.review-actions .btn-primary { padding: 8px 18px; font-size: 13.5px; width: auto; }
.admin .review-actions .btn-ghost { margin-left: 0; }

@media (max-width: 640px) {
  .admin-stats { grid-template-columns: 1fr 1fr; }
}

/* ---------- word filter notice (report form) ---------- */

.flag-panel {
  display: none;
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: var(--accent-softer);
  border: 1px solid #c7c3f5;
  animation: rise 0.3s ease;
}

.flag-panel.show { display: block; }

.flag-panel h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  margin: 0 0 6px;
  color: var(--accent-hover);
}

.flag-panel p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; margin: 0 0 10px; }
.flag-matches { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.flag-matches .pill { background: #fff; border: 1px solid #c7c3f5; color: var(--accent-hover); }
.flag-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.flag-actions .btn-primary { font-size: 14px; padding: 10px 18px; }

@media (max-width: 480px) {
  .flag-actions > * { width: 100%; justify-content: center; }
}

/* ---------- removal request dialog ---------- */

button.entry-flag { background: none; border: none; padding: 0; font-family: inherit; font-size: inherit; cursor: pointer; }

.modal {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: none;
  border-radius: 18px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 24px 60px -20px rgba(37,37,48,0.45);
}

.modal[open] { animation: pop 0.25s ease; }
.modal::backdrop { background: rgba(37,37,48,0.45); backdrop-filter: blur(2px); }
.modal form, .modal-done { position: relative; padding: 24px; }

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--line-soft);
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { background: var(--accent-soft); color: var(--accent); }

.modal-head { display: flex; gap: 12px; align-items: flex-start; margin: 0 36px 18px 0; }
.modal-head .stat-icon { margin: 0; }
.modal-head h2 { font-size: 19px; margin: 2px 0 4px; }
.modal-head p { font-size: 13px; color: var(--ink-muted); margin: 0; line-height: 1.45; }

.field-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin: 16px 0 8px; }
.field-label span { font-weight: 500; color: var(--ink-muted); }

.id-field {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding-left: 12px;
  font-weight: 700;
  color: var(--ink-muted);
}
.id-field input { width: 110px; border: none; outline: none; background: transparent; font: inherit; font-weight: 700; color: var(--ink); padding: 10px 12px 10px 4px; }
.id-field input:read-only { color: var(--accent); }
.id-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.removal-excerpt { font-size: 13px; color: var(--ink-muted); font-style: italic; line-height: 1.5; margin: 8px 0 0; }
.removal-excerpt:empty { display: none; }

.reason-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reason input { position: absolute; opacity: 0; pointer-events: none; }

.reason span {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.reason span .icon { font-size: 16px; color: var(--accent); }
.reason:hover span { border-color: #c7c3f5; }
.reason input:checked + span { border-color: var(--accent); background: var(--accent-softer); color: var(--accent-hover); box-shadow: inset 0 0 0 1px var(--accent); }
.reason input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.modal textarea, .text-input {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--panel);
}
.modal textarea { min-height: 80px; resize: vertical; }
.modal textarea:focus, .text-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.modal-actions .btn-primary { font-size: 14.5px; padding: 11px 20px; }

.modal-done { display: none; text-align: center; padding: 40px 28px; }
.modal-done h2 { font-size: 20px; margin: 0 0 8px; }
.modal-done p { font-size: 14px; color: var(--ink-soft); line-height: 1.6; margin: 0 auto 20px; max-width: 36ch; }

@media (max-width: 480px) {
  .reason-grid { grid-template-columns: 1fr; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions > * { width: 100%; justify-content: center; }
}

/* ---------- admin: removal requests ---------- */

.removal-list { display: flex; flex-direction: column; gap: 10px; margin: 0 0 28px; }
.removal-list h2 { font-size: 17px; margin: 0 0 4px; }
.removal-item { border-left: 4px solid var(--accent); }
.removal-item .reason-pill { background: var(--accent); color: #fff; }
.removal-details { font-size: 14px; color: var(--ink); background: var(--accent-softer); border-radius: 8px; padding: 8px 12px; margin: 8px 0; white-space: pre-wrap; }
.removal-quote { font-size: 13.5px; color: var(--ink-muted); }

/* Honeypot field: off-screen for people, still in the form for bots. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- admin: surges and groups ---------- */

.spike-alert {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff4e5;
  border: 1px solid #f5c27a;
  border-left: 4px solid #d97706;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 0 16px;
  font-size: 14px;
}
.spike-alert strong { color: #92400e; }
.spike-alert a { font-weight: 700; }

.group-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 16px;
  font-size: 14px;
}
.group-bar strong { margin-right: auto; }
.group-bar .btn-primary, .group-bar .btn-ghost { padding: 8px 16px; font-size: 13.5px; width: auto; }

.sender-tags { display: inline-flex; gap: 6px; font-size: 11.5px; color: var(--ink-muted); font-family: ui-monospace, Consolas, monospace; }
.sender-tags span { background: var(--line-soft); padding: 1px 6px; border-radius: 4px; }
.group-link { font-size: 12.5px; font-weight: 700; }

.privacy-hint {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.5;
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.privacy-hint .icon { margin-top: 2px; color: var(--accent); }

.admin-export { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: -12px 0 24px; font-size: 13px; color: var(--ink-muted); }

/* ---------- privacy / terms ---------- */

.prose.legal { margin-top: 24px; }
.prose.legal h2 { font-size: 17px; margin: 28px 0 8px; }
.prose.legal h2:first-child { margin-top: 0; }
.prose.legal ul { margin: 0 0 20px; padding-left: 20px; color: var(--ink-soft); font-size: 15px; line-height: 1.65; max-width: 60ch; }
.prose.legal li + li { margin-top: 6px; }
.prose.legal strong { color: var(--ink); }

/* Visible to screen readers only. */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.report-title { font-size: 30px; margin: 0 0 24px; }
.post-note a { color: inherit; }
@media (max-width: 480px) { .report-title { font-size: 24px; } }
.export-label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 13.5px; }
.admin-export .btn-ghost { padding: 7px 14px; font-size: 13px; }
.admin-export span { flex-basis: 100%; }
