:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --bg-strong: #eff6ff;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, .82);
  --surface-soft: #eff6ff;
  --surface-mint: #dbeafe;
  --text: #0f172a;
  --text-soft: #24324a;
  --muted: #64748b;
  --line: #d8e3f0;
  --line-strong: #c2d1e3;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --amber: #b87816;
  --amber-soft: #fff3d9;
  --danger: #b42318;
  --danger-soft: #fff1ef;
  --ok: #157347;
  --ok-soft: #e5f7eb;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 22px;
  --space-6: 28px;
  --space-7: 38px;
  --shadow-sm: 0 8px 22px rgba(15, 23, 42, .055);
  --shadow-md: 0 16px 42px rgba(15, 23, 42, .08);
  --shadow-lg: 0 22px 56px rgba(15, 23, 42, .11);
  --focus: 0 0 0 4px rgba(37, 99, 235, .18);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(820px 360px at 74% 2%, rgba(37, 99, 235, .12), transparent 62%),
    linear-gradient(180deg, #eff6ff 0, #f7f9fc 350px, #f7f9fc 100%);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
  font-weight: 450;
}

button,
a,
input,
textarea,
select {
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

:focus-visible {
  outline: 0;
  box-shadow: var(--focus);
}

.site-shell {
  width: min(1160px, calc(100% - 28px));
  margin: 0 auto;
  padding: 14px 0 34px;
}

.topbar,
.footer,
.section-head,
.card-topline,
.row-actions,
.form-actions,
.admin-layout,
.admin-nav nav,
.inline-form {
  display: flex;
}

.topbar {
  position: sticky;
  top: 10px;
  z-index: 20;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0 0 var(--space-5);
  padding: 8px 10px;
  border: 1px solid rgba(216, 227, 240, .76);
  border-radius: 16px;
  background: rgba(255, 255, 255, .74);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .045);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
}

.brand-logo {
  display: block;
  width: auto;
  height: 34px;
}

.public-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.public-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: .9rem;
  font-weight: 850;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.public-nav a:hover,
.public-nav a.is-active {
  color: var(--primary-dark);
  border-color: rgba(37, 99, 235, .18);
  background: var(--primary-soft);
}

.admin-brand {
  align-items: center;
  gap: 8px;
}

.admin-brand-logo {
  height: 30px;
}

.admin-brand span {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--primary);
  box-shadow: 0 8px 22px rgba(37, 99, 235, .2);
}

.beta-pill,
.eyebrow,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: 0;
}

.beta-pill {
  min-height: 30px;
  padding: 5px 12px;
  color: var(--primary-dark);
  background: linear-gradient(180deg, rgba(255, 255, 255, .9), var(--primary-soft));
  border: 1px solid rgba(37, 99, 235, .16);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .06);
}

.eyebrow {
  width: fit-content;
  color: var(--text);
  background: rgba(219, 234, 254, .78);
  border: 1px solid rgba(37, 99, 235, .12);
}

.how-it-works .section-head > div {
  display: grid;
  gap: var(--space-4);
}

.section-kicker {
  width: fit-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 5px 11px;
  border: 1px solid rgba(37, 99, 235, .14);
  border-radius: 999px;
  color: var(--text);
  background: rgba(219, 234, 254, .86);
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: 0;
}

.hero {
  position: relative;
  display: grid;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-3) 0 var(--space-4);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -24px -12px auto;
  height: 78%;
  pointer-events: none;
  background: radial-gradient(ellipse at top right, rgba(37, 99, 235, .09), transparent 58%);
  z-index: -1;
}

.hero-content {
  display: grid;
  gap: var(--space-3);
}

.hero h1,
.detail-main h1,
.narrow-page h1 {
  margin: 0;
  color: var(--text);
  font-weight: 850;
  line-height: 1.03;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 15.8ch;
  font-size: clamp(2.12rem, 7.6vw, 2.86rem);
}

.hero-slogan span {
  display: block;
  white-space: nowrap;
}

.detail-main h1,
.narrow-page h1 {
  max-width: 760px;
  font-size: clamp(2.15rem, 8vw, 4.1rem);
}

.hero-copy,
.lead {
  margin: 0;
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(1rem, 2.7vw, 1.13rem);
  line-height: 1.55;
}

.narrow-hero {
  max-width: 760px;
  padding: var(--space-3) 0 var(--space-5);
}

.narrow-hero h1 {
  max-width: 820px;
  margin: var(--space-2) 0 var(--space-2);
  color: var(--text);
  font-size: clamp(2.05rem, 6vw, 3.25rem);
  line-height: 1.03;
}

.narrow-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.12rem);
  line-height: 1.58;
}

.faq-hero {
  max-width: 900px;
}

.faq-hero h1 {
  max-width: 900px;
  font-size: clamp(2.15rem, 5vw, 3.15rem);
}

.hero-panel,
.event-card,
.subscribe-panel,
.admin-section,
.stat-card,
.login-panel,
.empty-state,
.step-card {
  border: 1px solid rgba(216, 228, 222, .92);
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  box-shadow: var(--shadow-sm);
}

.faq-list {
  display: grid;
  gap: var(--space-3);
  max-width: 860px;
}

.faq-item {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--shadow-sm);
}

.faq-item h2 {
  margin: 0 0 var(--space-2);
  color: var(--text);
  font-size: 1.12rem;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.hero-panel {
  padding: var(--space-4);
  overflow: hidden;
}

.stat-card strong {
  display: block;
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
}

.hero-panel span,
.stat-card span,
.muted {
  color: var(--muted);
}

.preview-kicker {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--primary-dark);
  font-size: .78rem;
  font-weight: 850;
}

.benefit-panel {
  position: relative;
  display: grid;
  gap: var(--space-3);
  background:
    radial-gradient(circle at 92% 8%, rgba(37, 99, 235, .16), transparent 34%),
    linear-gradient(155deg, rgba(255, 255, 255, .95), rgba(239, 246, 255, .82)),
    var(--surface);
}

.benefit-panel::after {
  content: "";
  position: relative;
}

.benefit-head {
  position: relative;
  z-index: 1;
}

.benefit-head h2 {
  margin: var(--space-1) 0 2px;
  color: var(--text);
  font-size: clamp(1.35rem, 4.6vw, 1.75rem);
  line-height: 1.08;
}

.benefit-head p,
.benefit-item p,
.benefit-trust {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.benefit-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.benefit-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 11px;
  align-items: start;
  padding: 11px;
  border: 1px solid rgba(216, 227, 240, .76);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
}

.benefit-marker {
  position: relative;
  width: 34px;
  height: 34px;
  display: block;
  border-radius: 999px;
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .12);
}

.benefit-marker::before,
.benefit-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--primary);
}

.benefit-marker-search::before {
  width: 13px;
  height: 13px;
  border: 3px solid var(--primary);
  border-radius: 999px;
  background: transparent;
  transform: translate(-58%, -58%);
}

.benefit-marker-search::after {
  width: 9px;
  height: 3px;
  border-radius: 999px;
  transform: translate(1px, 5px) rotate(45deg);
}

.benefit-marker-signal::before {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.benefit-marker-signal::after {
  width: 22px;
  height: 22px;
  border: 3px solid var(--primary);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 999px;
  background: transparent;
  opacity: .58;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.benefit-marker-check::before {
  width: 15px;
  height: 8px;
  border-left: 3px solid var(--primary);
  border-bottom: 3px solid var(--primary);
  background: transparent;
  transform: translate(-50%, -62%) rotate(-45deg);
}

.benefit-item h3 {
  margin: 0 0 3px;
  color: var(--text-soft);
  font-size: .96rem;
  line-height: 1.25;
}

.benefit-item p {
  font-size: .9rem;
}

.benefit-trust {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(216, 227, 240, .58);
  border-radius: 18px;
  background: rgba(239, 246, 255, .58);
  color: #50627d;
  font-size: .84rem;
  font-weight: 620;
  line-height: 1.35;
}

.benefit-shield {
  position: relative;
  width: 24px;
  height: 26px;
  flex: 0 0 auto;
  display: block;
  background: linear-gradient(180deg, #dbeafe, #bfdbfe);
  box-shadow:
    inset 0 0 0 1px rgba(37, 99, 235, .16),
    0 6px 14px rgba(37, 99, 235, .12);
  clip-path: polygon(50% 0, 89% 13%, 83% 61%, 50% 100%, 17% 61%, 11% 13%);
}

.benefit-shield::after {
  content: "";
  position: absolute;
  inset: 5px 8px 9px;
  border-radius: 999px 999px 5px 5px;
  background: linear-gradient(180deg, rgba(37, 99, 235, .72), rgba(37, 99, 235, .48));
  opacity: .32;
}

.benefit-trust > span:last-child {
  min-width: 0;
}

.benefit-trust > span:last-child > span {
  display: block;
}

.how-it-works {
  margin: calc(var(--space-7) + 8px) 0 var(--space-7);
}

.steps-grid {
  display: grid;
  gap: var(--space-3);
}

.step-card {
  position: relative;
  padding: var(--space-3);
  background: rgba(255, 255, 255, .72);
}

.step-card::after {
  content: "";
  position: absolute;
  inset: 12px 12px auto auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  opacity: .22;
}

.step-number,
.category-pill {
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--primary-soft), rgba(255, 255, 255, .86));
  color: var(--primary-dark);
  font-weight: 900;
}

.step-number {
  width: 38px;
  height: 38px;
  margin-bottom: var(--space-2);
}

.category-pill {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(37, 99, 235, .1);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
}

.step-card h3 {
  margin: 0 0 var(--space-1);
  font-size: 1.02rem;
}

.step-card p {
  margin: 0;
  color: var(--muted);
}

.section-head {
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin: var(--space-6) 0 var(--space-4);
}

.section-head.compact {
  align-items: center;
  margin-top: 0;
}

.public-events-head {
  padding-top: 0;
  margin-top: var(--space-7);
}

.section-head h2,
.event-group h3,
.rich-text h2,
.subscribe-panel h2,
.admin-section h2 {
  margin: 0 0 var(--space-1);
  color: var(--text);
  font-size: clamp(1.22rem, 3.5vw, 1.58rem);
  line-height: 1.18;
}

.admin-section h2 {
  font-size: 1.15rem;
}

.section-head p,
.event-card p,
.subscribe-panel p,
.narrow-page p {
  margin: 0;
  color: var(--muted);
}

.category-filter,
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 13px;
  background: #fff;
  color: var(--text);
  font-weight: 450;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(37, 99, 235, .48);
  outline: 0;
  box-shadow: var(--focus);
}

.category-filter {
  max-width: 260px;
}

.event-group {
  margin: 0 0 var(--space-7);
}

.event-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  max-width: 1160px;
  margin-inline: auto;
  justify-content: center;
  align-items: stretch;
}

.event-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  padding: var(--space-4);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .78)),
    var(--surface);
  color: inherit;
  text-decoration: none;
}

.event-card h4 {
  margin: var(--space-3) 0 var(--space-2);
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.22;
}

.event-card-body {
  flex: 1 1 auto;
}

.event-card p {
  line-height: 1.58;
}

.card-topline {
  align-items: center;
  gap: var(--space-2);
  color: var(--muted);
  font-size: .85rem;
}

.card-topline .status {
  margin-right: auto;
}

.status-active,
.status-checking {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.status-candidate_found {
  background: var(--amber-soft);
  color: #8a5600;
}

.status-confirmed,
.status-notified {
  background: var(--ok-soft);
  color: var(--ok);
}

.status-draft,
.status-archived {
  background: #edf0f2;
  color: #52616b;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.button-primary {
  color: #fff;
  background: linear-gradient(180deg, #3b82f6, var(--primary));
  box-shadow: 0 10px 22px rgba(37, 99, 235, .18);
}

.button-primary:hover {
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  box-shadow: 0 14px 28px rgba(37, 99, 235, .24);
  transform: translateY(-1px);
}

.button-waiting,
.button-waiting:hover {
  border-color: #d7dee8;
  background: #e8edf4;
  color: #718096;
  box-shadow: none;
  transform: none;
}

.button-secondary,
.button-small {
  background: rgba(255, 255, 255, .86);
  border-color: var(--line);
  color: var(--text);
}

.button-secondary:hover,
.button-small:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.button-danger {
  background: var(--danger-soft);
  border-color: #ffc9c4;
  color: var(--danger);
}

.button-disabled {
  background: #edf0f2;
  border-color: #d7dee0;
  color: #6f7b76;
  cursor: not-allowed;
}

.button-small {
  min-height: 34px;
  padding: 6px 10px;
  font-size: .88rem;
}

.event-card .button {
  margin-top: var(--space-4);
  width: 100%;
  pointer-events: none;
}

.event-card .card-actions {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.event-card .card-actions .button {
  margin-top: 0;
}

.mail-icon {
  position: relative;
  width: 18px;
  height: 13px;
  display: inline-block;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.mail-icon::before,
.mail-icon::after {
  content: "";
  position: absolute;
  top: 1px;
  width: 9px;
  height: 2px;
  background: currentColor;
}

.mail-icon::before {
  left: 1px;
  transform: rotate(35deg);
  transform-origin: left center;
}

.mail-icon::after {
  right: 1px;
  transform: rotate(-35deg);
  transform-origin: right center;
}

.back-button {
  width: auto;
  margin: 0 0 var(--space-4);
}

.detail-layout {
  display: grid;
  gap: var(--space-5);
}

.detail-main,
.subscribe-panel,
.narrow-page,
.admin-form {
  min-width: 0;
}

.rich-text {
  margin-top: var(--space-6);
}

.rich-text h2 {
  margin-top: var(--space-5);
}

.rich-text p {
  margin: 0;
  color: var(--muted);
}

.subscribe-panel {
  padding: var(--space-5);
  align-self: start;
  background: rgba(255, 255, 255, .86);
}

.stack-form,
.admin-form,
.danger-zone,
.settings-form,
.filter-form,
.suggestion-form {
  display: grid;
  gap: var(--space-3);
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

label {
  display: grid;
  gap: var(--space-1);
  font-weight: 750;
}

.required-label-text {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.required-marker {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--danger);
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
  cursor: help;
}

.required-marker:focus-visible {
  box-shadow: 0 0 0 3px rgba(180, 35, 24, .18);
}

.checkbox-label {
  align-content: center;
  grid-template-columns: auto 1fr;
  align-items: center;
  font-weight: 750;
}

.checkbox-label input {
  width: auto;
}

.mini-stats {
  display: grid;
  gap: 4px;
  margin-top: var(--space-4);
  color: var(--muted);
  font-size: .9rem;
}

.narrow-page {
  max-width: 720px;
  padding: var(--space-5);
  margin: 0 auto;
}

.legal-content {
  max-width: 860px;
}

.legal-content h2 {
  margin: var(--space-6) 0 var(--space-2);
  font-size: 1.35rem;
}

.legal-content h3 {
  margin: var(--space-4) 0 var(--space-1);
  font-size: 1.05rem;
}

.legal-content p {
  margin: 0 0 var(--space-3);
}

.legal-content .imprint-owner {
  margin-top: 4.5rem;
}

.subscription-list {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.subscription-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.subscription-row span {
  display: block;
  color: var(--muted);
}

.empty-state {
  padding: var(--space-5);
  color: var(--muted);
}

.notice {
  margin: 0 0 var(--space-4);
  padding: 13px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .86);
}

.notice.success {
  border-color: #b8dfc5;
  background: #eef9f1;
}

.notice.error {
  border-color: #ffc9c4;
  background: #fff0ef;
}

.notice.warning {
  border-color: #ffe0a6;
  background: #fff8e9;
}

.footer {
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .92rem;
}

.footer-slogan {
  display: inline-flex;
  align-items: center;
  max-width: 430px;
  color: var(--text);
  font-size: clamp(1rem, 2vw, 1.08rem);
  font-weight: 850;
  line-height: 1.45;
  letter-spacing: 0;
}

.footer-slogan::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-right: 10px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 7px var(--primary-soft);
}

.to-top-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(37, 99, 235, .2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--primary-dark);
  font-size: 1.35rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .14);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.to-top-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.to-top-button:hover {
  color: #fff;
  background: var(--primary);
}

.footer nav {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.admin-body {
  background: #f5f7fb;
}

.admin-layout {
  min-height: 100vh;
  flex-direction: column;
}

.admin-nav {
  padding: var(--space-4);
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
}

.admin-nav nav {
  gap: var(--space-2);
  overflow-x: auto;
  margin-top: var(--space-4);
  padding-bottom: 2px;
}

.admin-nav nav a {
  flex: 0 0 auto;
  text-decoration: none;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .78);
}

.admin-nav nav a:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.admin-nav nav a.is-active {
  color: var(--primary-dark);
  border-color: rgba(37, 99, 235, .28);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .08);
}

.admin-main {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: var(--space-5) 0 var(--space-7);
}

.admin-main h1 {
  margin: 0 0 var(--space-5);
  font-size: clamp(1.85rem, 4vw, 2.5rem);
}

.stat-grid,
.admin-columns,
.dashboard-stack,
.form-grid {
  display: grid;
  gap: var(--space-4);
}

.dashboard-stack {
  grid-template-columns: 1fr;
}

.stat-grid {
  margin-bottom: var(--space-4);
}

.stat-card,
.admin-section {
  padding: var(--space-4);
  background: rgba(255, 255, 255, .86);
}

.admin-section {
  margin-bottom: var(--space-4);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.compact-table {
  min-width: 0;
  table-layout: fixed;
}

.compact-table th,
.compact-table td {
  overflow-wrap: anywhere;
}

th,
td {
  padding: 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: .84rem;
}

.row-actions {
  gap: var(--space-2);
  flex-wrap: wrap;
}

.wide-cell {
  max-width: 360px;
  overflow-wrap: anywhere;
}

.admin-form {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .9);
  margin-bottom: var(--space-4);
}

textarea {
  resize: vertical;
}

.admin-form label {
  color: #34413b;
  font-size: .92rem;
  font-weight: 650;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  color: var(--text);
  font-weight: 450;
}

.admin-form .checkbox-label {
  font-size: 1rem;
}

.form-help {
  margin: var(--space-2) 0 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.5;
}

.form-actions,
.admin-page-actions {
  gap: var(--space-2);
  flex-wrap: wrap;
}

.admin-page-actions {
  display: flex;
  margin: 0 0 var(--space-4);
}

.inline-actions {
  margin: 0;
}

.event-card-closed {
  background: rgba(255, 255, 255, .54);
  box-shadow: none;
  opacity: .78;
}

.closed-events {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.detail-summary {
  display: grid;
  gap: var(--space-3);
}

.detail-summary div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.detail-summary strong {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

.detail-summary .stat-card-compact strong {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.12;
}

.inline-empty {
  box-shadow: none;
}

.privacy-note {
  font-size: .92rem;
}

.suggestion-section {
  margin: var(--space-7) 0;
}

.suggestion-card {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(460px 240px at 100% 0, rgba(37, 99, 235, .08), transparent 58%),
    rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-sm);
}

.suggestion-copy {
  display: grid;
  gap: var(--space-2);
  align-content: start;
}

.suggestion-copy h2 {
  margin: 0;
  font-size: clamp(1.28rem, 4vw, 1.7rem);
  line-height: 1.18;
}

.suggestion-copy p {
  margin: 0;
  color: var(--muted);
}

.suggestion-form textarea {
  min-height: 110px;
}

.suggestion-success-panel {
  display: grid;
  gap: var(--space-3);
  align-content: center;
  padding: var(--space-5);
  border: 1px solid rgba(34, 197, 94, .22);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(240, 253, 244, .96), rgba(255, 255, 255, .82));
}

.success-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--ok);
  background: var(--ok-soft);
  font-weight: 900;
}

.suggestion-success-panel p {
  margin: 0;
  color: var(--text-soft);
}

.suggestion-list {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.suggestion-mini-card {
  display: grid;
  gap: 4px;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .76);
}

.suggestion-mini-card a {
  color: var(--primary-dark);
  font-weight: 800;
}

.rejected-box summary {
  cursor: pointer;
  font-weight: 850;
}

.admin-rich-text {
  margin-top: var(--space-5);
}

.toggle-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: var(--space-3);
  padding: var(--space-4);
  margin: var(--space-4) 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .76);
}

.toggle-row input {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.toggle-row strong,
.toggle-row small {
  display: block;
}

.toggle-row small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 500;
}

.filter-form {
  margin-top: var(--space-4);
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: end;
}

@media (hover: hover) and (pointer: fine) {
  .event-card:hover {
    border-color: rgba(37, 99, 235, .2);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }

  .event-card-closed:hover {
    transform: none;
    box-shadow: none;
  }
}

@media (min-width: 720px) {
  .site-shell {
    width: min(1160px, calc(100% - 40px));
    padding-top: var(--space-4);
  }

  .topbar {
    padding: 9px 12px;
    margin-bottom: var(--space-5);
  }

  .brand-logo {
    height: 38px;
  }

  .hero {
    gap: var(--space-5);
    padding: var(--space-3) 0 var(--space-5);
  }

  .hero h1 {
    max-width: 15.8ch;
    font-size: clamp(2.55rem, 4.4vw, 3.28rem);
  }

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

  .suggestion-card {
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    align-items: start;
  }

  .event-grid {
    gap: var(--space-4);
  }

  .event-card {
    flex: 0 1 calc((100% - 18px) / 2);
    max-width: 376px;
  }

  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .form-grid.two,
  .admin-columns,
  .filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid.three,
  .stat-grid,
  .detail-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .hero {
    align-items: start;
    grid-template-columns: minmax(0, 1.04fr) minmax(330px, .72fr);
    min-height: 330px;
  }

  .hero-panel {
    padding: var(--space-5);
  }

  .how-it-works {
    margin-top: var(--space-6);
  }

  .event-grid {
    max-width: 1160px;
  }

  .event-card {
    flex-basis: calc((100% - 36px) / 3);
    padding: var(--space-4);
  }

  .admin-layout {
    flex-direction: row;
  }

  .admin-nav {
    width: 238px;
    min-height: 100vh;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    position: sticky;
    top: 0;
    align-self: flex-start;
  }

  .admin-nav nav {
    display: grid;
    overflow: visible;
  }

  .admin-main {
    padding: var(--space-6);
  }

  .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .detail-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .filter-form {
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) minmax(160px, .8fr) minmax(160px, .8fr) auto;
  }
}

@media (max-width: 520px) {
  .site-shell {
    width: min(100% - 24px, 1120px);
    padding-top: 12px;
  }

  .topbar {
    position: static;
    border-radius: var(--radius-md);
    align-items: center;
    gap: var(--space-2);
    padding: 10px;
  }

  .brand-logo {
    height: 30px;
  }

  .public-nav {
    flex: 1 1 auto;
    max-width: none;
    justify-content: flex-end;
    gap: 8px;
  }

  .public-nav a[href="/"] {
    display: none;
  }

  .public-nav a {
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: clamp(.82rem, 3.25vw, .96rem);
    line-height: 1;
    white-space: nowrap;
  }

  .public-nav a[href="/events.php"] {
    max-width: 112px;
    text-align: center;
    white-space: normal;
    line-height: 1.08;
  }

  .to-top-button {
    right: 14px;
    bottom: 82px;
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }

  .section-head,
  .subscription-row,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .category-filter,
  .button {
    max-width: none;
    width: 100%;
  }

  .hero {
    gap: var(--space-3);
    padding-top: var(--space-2);
  }

  .hero h1 {
    font-size: clamp(1.82rem, 7.85vw, 2.38rem);
    line-height: 1.05;
    max-width: 15.8ch;
  }

  .hero-copy {
    font-size: 1.02rem;
    line-height: 1.58;
  }

  .narrow-hero h1,
  .faq-hero h1 {
    font-size: clamp(2rem, 8.5vw, 2.68rem);
    line-height: 1.05;
  }

  .legal-content h1 {
    max-width: 100%;
    font-size: clamp(2.05rem, 10.5vw, 3rem);
    line-height: 1.04;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  .hero-panel,
  .event-card,
  .step-card,
  .subscribe-panel {
    border-radius: var(--radius-md);
  }
}
