:root {
  --bg: #08111f;
  --bg-alt: #101b2d;
  --panel: #ffffff;
  --panel-muted: #eef3f8;
  --text: #0b1220;
  --text-on-dark: #f8fbff;
  --accent: #ffb703;
  --accent-strong: #fb8500;
  --danger: #b42318;
  --success: #146c43;
  --border: #d8e1eb;
  --shadow: 0 18px 48px rgba(2, 12, 27, 0.12);
  --radius: 1.25rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #eef5ff 0%, #ffffff 32%, #f8fbff 100%);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.container { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.section { padding: 4.5rem 0; }
.stack-xl > * + * { margin-top: 2.5rem; }
.stack-lg > * + * { margin-top: 1.5rem; }
.stack-md > * + * { margin-top: 1rem; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: #fff;
  color: #000;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  z-index: 1000;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: static;
  backdrop-filter: blur(12px);
  background: rgba(8, 17, 31, 0.92);
  color: var(--text-on-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner,
.header-actions,
.brand,
.nav-list,
.hero-actions,
.form-row,
.stats-grid,
.social-icon-list,
.header-nav-shell,
.section-cta-row {
  display: flex;
  gap: 1rem;
}

.header-inner,
.brand,
.header-nav-shell {
  align-items: center;
  justify-content: space-between;
}

.header-inner {
  padding: 0.95rem 0;
  flex-wrap: wrap;
}

.brand {
  text-decoration: none;
  color: inherit;
  justify-content: flex-start;
  gap: 0.9rem;
}

.brand img {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  object-fit: cover;
}

.brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand small,
.record-date,
.fine-print {
  color: rgba(248, 251, 255, 0.78);
  font-size: 0.92rem;
}

.admin-body .record-date,
.admin-body .fine-print {
  color: #5e6c84;
}

.header-nav-shell {
  flex-wrap: wrap;
  flex: 1 1 24rem;
  min-width: 0;
  justify-content: flex-end;
}
.nav-list,
.social-icon-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.nav-list { min-width: 0; }

.nav-list a {
  text-decoration: none;
  color: inherit;
  font-weight: 600;
}

.nav-list a:hover,
.nav-list a:focus-visible,
.nav-list a[aria-current='page'] {
  color: var(--accent);
}

.social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 999px;
  color: var(--text-on-dark);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.social-icon-link:hover,
.social-icon-link:focus-visible {
  background: rgba(255, 183, 3, 0.16);
  color: var(--accent);
  transform: translateY(-1px);
}

.social-icon-link svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

.hero-section,
.page-hero {
  background: radial-gradient(circle at top right, rgba(255, 183, 3, 0.24), transparent 26%),
    linear-gradient(135deg, var(--bg), #14345d);
  color: var(--text-on-dark);
}

.hero-section { padding: 5.5rem 0 4.25rem; }
.page-hero { padding: 4.75rem 0 3.25rem; }

.hero-grid,
.two-column-layout,
.card-grid {
  display: grid;
  gap: 1.5rem;
}

.hero-copy-shell { max-width: 42rem; }
.hero-copy,
.page-intro {
  font-size: 1.1rem;
  max-width: 46rem;
}

.hero-card,
.card,
.stat-card,
.filter-bar,
.feature-panel,
.about-section-card {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.hero-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
  color: var(--text-on-dark);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-logo {
  width: min(100%, 320px);
  margin: 0 auto 1rem;
  border-radius: 1.5rem;
}

.hero-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-strong);
  margin: 0 0 0.75rem;
}

.section-heading h2,
.hero-section h1,
.page-hero h1,
.auth-card h1,
.faq-card h3,
.qa-feed-card h2 {
  margin: 0 0 0.75rem;
  line-height: 1.1;
}

.left-aligned { text-align: left; }
.compact-heading h2 { margin-bottom: 0; }

.section-dark {
  background: linear-gradient(180deg, #0d1728, #11223c);
  color: var(--text-on-dark);
}

.section-accent {
  background: linear-gradient(180deg, #fff8e8, #fffdf8);
}

.card-dark {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-on-dark);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--panel-muted);
}

.tag-supportive { background: #dff6e7; color: #14532d; }
.tag-warning { background: #fff4cc; color: #7a4b00; }
.tag-danger { background: #ffe0e3; color: #8c1020; }

.notice {
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  font-weight: 600;
}

.notice.success { background: #e4f8ec; color: var(--success); }
.notice.error { background: #ffe7ea; color: var(--danger); }

.status-region { padding-top: 1.5rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.25rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #111;
  box-shadow: 0 10px 28px rgba(251, 133, 0, 0.24);
}

.button-secondary {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
}

.form label { display: block; font-weight: 600; }

.form input,
.form textarea,
.form select {
  width: 100%;
  margin-top: 0.45rem;
  padding: 0.9rem 1rem;
  border-radius: 0.95rem;
  border: 1px solid var(--border);
  font: inherit;
  background: #fff;
}

.form textarea { resize: vertical; }
.checkbox-row { display: flex !important; align-items: center; gap: 0.75rem; }
.checkbox-row input { width: auto; margin-top: 0; }
.honeypot { position: absolute; left: -9999px; }

.feature-panel {
  display: grid;
  gap: 1rem;
  align-items: center;
}

.feature-panel-actions {
  display: flex;
  justify-content: flex-start;
}

.section-cta-row {
  justify-content: flex-start;
  margin-top: 1.5rem;
}

.faq-card,
.qa-feed-card,
.empty-state {
  padding: 1.75rem;
}

.qa-feed {
  display: grid;
  gap: 1.5rem;
}

.qa-answer {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.about-editorial {
  display: grid;
  gap: 1.75rem;
}

.about-section-card {
  padding: 2rem;
}

.about-section-heading {
  max-width: 44rem;
  margin-bottom: 1rem;
}

.about-copy {
  max-width: 48rem;
  font-size: 1.05rem;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.auth-card { width: min(100%, 34rem); }

.auth-brand {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.auth-brand img,
.inline-logo {
  width: 4rem;
  height: 4rem;
  object-fit: cover;
  border-radius: 1rem;
}

.admin-body { background: #f3f7fb; }
.admin-header { position: static; }
.stats-grid { flex-wrap: wrap; }

.stat-card {
  min-width: 10rem;
  flex: 1 1 10rem;
  display: grid;
  gap: 0.35rem;
}

.stat-card strong { font-size: 2rem; }

.table-shell {
  overflow-x: auto;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e6edf4;
}

.admin-record-header,
summary,
.summary-title,
.summary-flags {
  display: flex;
  gap: 1rem;
}

.admin-record-header,
summary {
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

summary {
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker { display: none; }
summary::after { content: '▾'; font-size: 1.1rem; font-weight: 700; }
details:not([open]) summary::after { transform: rotate(-90deg); }
.details-body { padding-top: 1rem; }

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1.3fr 0.7fr;
    align-items: center;
  }

  .two-column-layout {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: start;
  }

  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature-panel { grid-template-columns: 1.4fr auto; }
}

@media (max-width: 767px) {
  .header-actions,
  .hero-actions,
  .form-row,
  .stats-grid,
  .header-nav-shell {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-list,
  .social-icon-list {
    justify-content: flex-start;
  }

  .header-nav-shell { flex: 1 1 100%; }

  .hero-section { padding-top: 4.5rem; }
  .page-hero { padding-top: 4rem; }
  .section { padding: 3.5rem 0; }
}
