:root {
  --ink: #f7fbff;
  --muted: #b8c7d9;
  --panel: #ffffff;
  --panel-ink: #101827;
  --line: rgba(255, 255, 255, 0.22);
  --deep-a: #000033;
  --deep-b: #00003c;
  --deep-c: #000051;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-soft: #f4f8fd;
  --surface-raised: #ffffff;
  --surface-selected: #edf6ff;
  --surface-line: #c8d6e7;
  --glass-dark: rgba(3, 8, 28, 0.78);
  --glass-line: rgba(255, 255, 255, 0.18);
  --accent-blue: #0072f0;
  --accent-blue-deep: #003f95;
  --author-dark-a: #050820;
  --author-dark-b: #091044;
  --red: #e53232;
  --yellow: #ffd34d;
  --shadow: 0 18px 42px rgba(0, 0, 20, 0.18);
  --shadow-soft: 0 8px 22px rgba(0, 0, 20, 0.11);
  --shadow-selected: 0 18px 35px rgba(0, 114, 240, 0.18);
  --gloss: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.03) 44%, rgba(0,0,0,0.06));
  --metal-strip: linear-gradient(90deg, #000033 0%, #4e5f73 42%, #0072f0 72%, #ffd34d 100%);
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html {
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(0, 0, 24, 0.64), rgba(0, 0, 45, 0.76)),
    radial-gradient(circle at 15% 0%, rgba(0, 114, 240, 0.16), transparent 34%),
    var(--site-background-image, url("background.webp")) center center / cover fixed no-repeat,
    var(--deep-a);
}
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
  color: var(--ink);
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px clamp(16px, 3vw, 38px);
  background:
    var(--gloss),
    rgba(0, 0, 51, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(0, 0, 20, 0.28);
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 220px; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 3px solid var(--yellow);
  background: var(--red);
  color: white;
  border-radius: 8px;
  font-weight: 900;
}
.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; color: var(--muted); }
.brand-logo {
  display: block;
  width: clamp(150px, 16vw, 230px);
  height: auto;
  border-radius: 8px;
}
.brand-logo-combined {
  display: block;
  width: clamp(180px, 20vw, 300px);
  height: auto;
  border-radius: 4px;
}
.partner-logo {
  display: block;
  width: clamp(118px, 12vw, 170px);
  height: auto;
  border-radius: 8px;
}
.logo-fallback {
  width: auto;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 900;
  background: var(--deep-c);
}

.site-nav { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.97rem;
}
.site-nav a:hover, .site-nav a.active {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.24);
  background: var(--gloss), var(--deep-c);
}
.account-actions, .hero-actions, .emoji-row, .tag-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.account-actions {
  justify-self: end;
  flex-wrap: nowrap;
  gap: 8px;
}
.admin-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 3px clamp(16px, 4vw, 54px);
  background: #ffd34d;
  border-bottom: 1px solid rgba(0, 0, 51, 0.18);
}
.admin-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.admin-bar-label {
  margin-right: 6px;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #000033;
}
.admin-bar-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid rgba(0, 0, 51, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.5);
  color: #000033;
  text-decoration: none;
  font-size: 0.76rem;
  line-height: 1;
}
.admin-bar-item.has-alert {
  border-color: #000033;
  background: rgba(255, 255, 255, 0.78);
}
.admin-bar-item strong {
  font-size: 0.76rem;
  line-height: 1;
}
.admin-bar-count {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  min-height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.66rem;
  line-height: 1;
}
.admin-bar-count.muted {
  background: rgba(0, 0, 51, 0.16);
  color: #000033;
}
.admin-bar-menu {
  position: relative;
  display: inline-flex;
}
.admin-bar-preview {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 80;
  display: none;
  width: min(430px, calc(100vw - 24px));
  max-height: 62vh;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(0, 0, 51, 0.24);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(0, 0, 51, 0.22);
}
.admin-bar-menu:hover .admin-bar-preview,
.admin-bar-menu:focus-within .admin-bar-preview,
.admin-bar-menu.is-open .admin-bar-preview {
  display: grid;
  gap: 4px;
}
.admin-bar-preview a,
.admin-bar-preview p {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 8px 9px;
  border-radius: 4px;
  color: #000033;
  text-decoration: none;
}
.admin-bar-preview a {
  border: 1px solid transparent;
}
.admin-bar-preview a:hover {
  border-color: #ffd34d;
  background: #fff6c8;
}
.admin-bar-preview span {
  color: #a40000;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}
.admin-bar-preview strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #07101f;
  font-size: 0.82rem;
  line-height: 1.2;
}
.admin-bar-preview em {
  color: #4e5f73;
  font-size: 0.72rem;
  font-style: normal;
  line-height: 1.2;
}
.has-admin-bar .site-header {
  top: 28px;
}
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  padding: 0;
}
.cookie-banner-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  width: 100%;
  padding: 18px clamp(16px, 4vw, 54px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-left: 0;
  border-radius: 0;
  background: rgba(0, 0, 51, 0.96);
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.24);
}
.cookie-banner h2 {
  margin: 0 0 6px;
}
.cookie-banner .description {
  color: #d7e0f5;
  margin: 0;
}
.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.account-menu {
  position: relative;
  padding-bottom: 8px;
  margin-bottom: -8px;
}
.account-button {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--deep-c);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}
.account-button span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}
.account-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  display: none;
  min-width: 190px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--deep-c);
  box-shadow: var(--shadow);
}
.account-menu:hover .account-dropdown,
.account-menu:focus-within .account-dropdown,
.account-menu.is-open .account-dropdown {
  display: grid;
  gap: 4px;
}
.account-dropdown a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}
.account-dropdown a:hover,
.account-dropdown a:focus {
  background: var(--deep-b);
}

.button, .nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(0, 0, 51, 0.18);
  border-radius: 4px;
  padding: 11px 16px;
  background: var(--gloss), var(--yellow);
  color: #080812;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.button:hover,
.button:focus,
.nav-toggle:hover,
.nav-toggle:focus {
  filter: brightness(1.04);
  box-shadow: 0 7px 18px rgba(0, 0, 51, 0.18);
}
.button.ghost { background: rgba(255,255,255,0.05); color: var(--ink); border: 1px solid var(--line); }
.button.dark { background: var(--gloss), var(--deep-c); color: var(--ink); border-color: rgba(255,255,255,0.18); }
.button.large { min-height: 50px; padding-inline: 20px; }
.nav-toggle { display: none; }
.nav-toggle-bars {
  position: relative;
  display: block;
  width: 20px;
  height: 15px;
  background: linear-gradient(#000033, #000033) center / 20px 3px no-repeat;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: #000033;
}
.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { bottom: 0; }
.mobile-auth-links { display: none; }

main {
  flex: 1 0 auto;
  min-height: 0;
}
main > .page-hero + *,
main > .wide-section,
main > .content-grid,
main > .forum-layout,
main > .events-layout,
main > .projects-layout {
  margin-top: 22px;
}
main > .page-hero + .flash-section {
  margin-top: 22px;
}
main > .flash-section + * {
  margin-top: 22px;
}
main > *:last-child {
  margin-bottom: 34px;
}
.hero {
  min-height: 72vh;
  display: grid;
  align-items: end;
  padding: clamp(34px, 6vw, 86px);
  background:
    linear-gradient(120deg, rgba(0, 0, 51, 0.75) 0%, rgba(0, 0, 60, 0.55) 48%, rgba(0, 0, 81, 0.25) 100%),
    url("assets/home-hero.png");
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
}
.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: end;
  width: 100%;
}
.hero-copy {
  max-width: none;
  background: rgba(0, 0, 51, 0.66);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 18px 44px rgba(0, 0, 20, 0.3);
}
.hero-news {
  grid-column: auto;
  box-shadow: 0 18px 52px rgba(0, 0, 20, 0.42);
}
.hero-logo {
  display: block;
  width: min(100%, 540px);
  height: auto;
  margin-bottom: 22px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.hero h1, .page-hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 5.4vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}
.hero-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 50%);
  gap: 18px;
  align-items: start;
}
.hero-title-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.hero-welcome {
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #101827;
  box-shadow: 0 12px 26px rgba(0, 0, 20, 0.18);
  justify-self: end;
  width: 100%;
}
.hero-welcome h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: #a40000;
}
.hero-welcome .description {
  margin: 0;
  font-size: 0.95rem;
  color: #3c4a5c;
}
.hero-welcome .description p {
  margin: 0;
}
.hero p, .page-hero p { max-width: 690px; color: #d7e0f5; font-size: 1.1rem; line-height: 1.6; }
.hero-title-main .hero-body,
.hero-title-main .hero-actions {
  max-width: 100%;
}
.hero-body { margin-top: 0; }
.eyebrow { margin: 0 0 10px; color: var(--yellow); font-weight: 900; text-transform: uppercase; letter-spacing: 0; }

.quick-forum, .page-hero, .content-grid, .forum-layout, .events-layout, .projects-layout, .wide-section, .site-footer { padding-inline: clamp(16px, 4vw, 54px); }
.quick-forum {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-block: 26px;
  background: var(--deep-b);
  border-bottom: 1px solid var(--line);
}
.quick-forum h2, .panel h2, .page-hero h1, .wide-section h2 { margin: 0; }

.content-grid, .forum-layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  align-items: start;
  padding-block: 22px 28px;
}
.forum-layout {
  align-items: start;
}
.panel {
  grid-column: span 6;
  background: var(--panel);
  color: var(--panel-ink);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 4px;
  padding: 22px;
  box-shadow: var(--shadow);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,251,255,0.98)),
    var(--panel);
}
.panel.full { grid-column: 1 / -1; }
.panel.half { grid-column: span 6; }
.panel.third { grid-column: span 4; }
.sponsor-card > img,
.sponsor-logo {
  display: block;
  width: min(100%, 520px);
  height: auto;
  margin-bottom: 18px;
  border-radius: 8px;
}
.section-heading {
  position: relative;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-top: 12px;
}
.section-heading::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  border-radius: 4px;
  background: linear-gradient(90deg, #000051, #d6dde8 42%, #ffffff 58%, #0072f0);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 1px 0 rgba(0,0,51,0.12);
}
.section-heading .eyebrow, .panel .eyebrow { color: #a40000; }
.section-heading a { color: #003f95; font-weight: 800; }
.list { display: grid; gap: 12px; }
.list-item, .forum-row, .post-row, .reaction {
  border: 1px solid #b9c7d8;
  border-radius: 4px;
  padding: 13px 14px;
  background: #ffffff;
  text-decoration: none;
}
.card-flat,
.card-raised,
.card-selected {
  border: 1px solid #c8d5e4;
  border-radius: 4px;
}
.card-flat {
  background: #ffffff;
  box-shadow: none;
}
.card-raised,
.panel,
.event-card,
.project-card,
.useful-link-card,
.home-module-card,
.profile-list-item,
.forum-row,
.post-row,
.forum-main .list > .list-item {
  box-shadow: 0 10px 22px rgba(0, 0, 51, 0.12);
}
.card-selected,
.event-card:hover,
.event-card:focus-within,
.project-card:hover,
.project-card:focus-within,
.useful-link-card:hover,
.useful-link-card:focus-within,
.home-module-card:hover,
.home-module-card:focus-within,
.profile-list-item:hover,
.profile-list-item:focus-within,
.forum-row:hover,
.forum-row:focus-within,
.post-row:hover,
.post-row:focus-within,
.forum-main .list > .list-item:hover,
.forum-main .list > .list-item:focus-within {
  box-shadow: 0 18px 35px rgba(0, 0, 51, 0.2);
}
.forum-row, .post-row {
  border-left: 5px solid #0064c8;
}
.forum-row a, .post-row a {
  color: #0b0f1a;
}
.forum-row a:visited, .post-row a:visited {
  color: #0b0f1a;
}
.list-item:hover, .forum-row:hover, .post-row:hover {
  background: #eef5ff;
}

.useful-link-card,
.home-module-card,
.profile-list-item,
.forum-row,
.post-row,
.forum-main .list > .list-item {
  border-left: 5px solid #0072f0;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background-color 160ms ease;
}

.useful-link-card:hover,
.useful-link-card:focus-within,
.home-module-card:hover,
.home-module-card:focus-within,
.profile-list-item:hover,
.profile-list-item:focus-within,
.forum-row:hover,
.forum-row:focus-within,
.post-row:hover,
.post-row:focus-within,
.forum-main .list > .list-item:hover,
.forum-main .list > .list-item:focus-within {
  border-color: #0072f0;
  border-left-color: #ffd23f;
  background: #ffffff;
  box-shadow: 0 18px 35px rgba(0, 0, 51, 0.18);
  transform: translateY(-1px);
}
.profile-page {
  display: grid;
  gap: 22px;
}

.profile-card {
  overflow: hidden;
  background: var(--panel);
  color: var(--panel-ink);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.profile-cover {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 22px;
  padding: 30px;
  background: linear-gradient(135deg, var(--deep-c), var(--deep-b));
  color: var(--ink);
  border: 2px solid #ffffff;
  border-bottom: 0;
}
.profile-cover .eyebrow { color: var(--yellow); }
.profile-cover h2 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: 0;
}
.profile-cover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-cover-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink);
  font-weight: 800;
}
.profile-avatar {
  width: clamp(110px, 18vw, 180px);
  aspect-ratio: 1;
  object-fit: cover;
  border: 4px solid var(--yellow);
  border-radius: 8px;
  background: var(--deep-c);
}
.profile-avatar.small {
  width: 96px;
}
.avatar-review {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}
.actions-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.button.danger {
  border-color: #710000;
  color: #710000;
}
.profile-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 24px;
}
.wide-profile-section { grid-column: auto; }
.profile-activity {
  border-top: 1px solid #d8e0ea;
  padding: 24px;
}
.profile-activity h3,
.profile-activity h4 {
  margin: 0 0 12px;
}
.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.activity-grid section {
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  padding: 16px;
  background: #f8fbff;
}
.mini-list {
  display: grid;
  gap: 10px;
}
.mini-list a {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  background: white;
  color: var(--panel-ink);
  text-decoration: none;
}
.mini-list a:hover,
.mini-list a:focus {
  background: #eef5ff;
  color: #003f95;
}
.mini-list-static {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--panel-ink);
}
.mini-list span {
  color: #4e5f73;
  font-size: 0.92rem;
}
.profile-activity-panel {
  display: grid;
  gap: 16px;
}
.profile-stat-grid,
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.dashboard-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #f8fbff;
}
.dashboard-card strong {
  color: #003f95;
  font-size: 1.75rem;
  line-height: 1;
}
.dashboard-card span {
  color: #4e5f73;
  font-weight: 900;
}
.profile-about-text {
  color: #34465c;
  line-height: 1.6;
}
.profile-about-text p:first-child {
  margin-top: 0;
}
.profile-about-text p:last-child {
  margin-bottom: 0;
}
.profile-emoji-row {
  align-items: flex-start;
}
.profile-body section {
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  padding: 16px;
  background: #f8fbff;
}
.profile-body h3 { margin: 0 0 10px; }
.profile-fields {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 10px 18px;
  align-items: start;
  margin: 0;
}
.profile-fields dt {
  color: #4e5f73;
  font-weight: 800;
  line-height: 1.35;
}
.profile-fields dd {
  margin: 0;
  color: var(--panel-ink);
  min-width: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.profile-fields a {
  color: #003f95;
  font-weight: 800;
}
.social-fields {
  grid-template-columns: 180px minmax(0, 1fr);
}
.social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.social-list a {
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--deep-c);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}
.profile-report {
  padding: 0 24px 24px;
}
.report-details {
  border-top: 1px solid #d8e0ea;
  padding-top: 14px;
}
.report-details summary {
  cursor: pointer;
  color: #710000;
  font-weight: 900;
}
.list-item h3, .forum-row h3, .post-row h3 { color: #000000; margin: 0 0 3px; }
.meta, .description { color: #4e5f73; line-height: 1.5; }
.tag, .role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #e7edf6;
  color: #26364a;
  font-weight: 800;
}
.lock-tag {
  margin-left: 8px;
  background: #ffe7c2;
  color: #6a3a00;
  border: 1px solid #f1c37a;
  font-size: 0.85rem;
}
.lock-icon {
  margin-right: 6px;
  font-size: 0.95rem;
}

.page-hero {
  padding-block: 18px 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.97), rgba(241,246,252,0.97)),
    var(--panel);
  color: var(--panel-ink);
  border-bottom: 1px solid #d8e0ea;
  box-shadow: 0 12px 26px rgba(0, 0, 20, 0.14);
}
.page-hero-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
}
.page-hero-copy {
  min-width: 0;
  flex: 1 1 620px;
}
.page-hero-actions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  flex: 0 0 auto;
  max-width: 48%;
}
.page-hero-action-groups {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 8px;
  width: auto;
  max-width: 100%;
}
.page-hero-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.hero-action-group {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 10px 22px rgba(0, 0, 40, 0.08);
}
.hero-action-group-label {
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a40000;
}
.hero-action-group--buttons .page-hero-action-row {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(3, minmax(0, auto));
  grid-auto-columns: max-content;
  justify-content: flex-start;
  align-items: start;
}
.hero-action-group--notifications {
  min-width: 0;
}
.hero-action-group--notifications .page-hero-action-row {
  justify-content: flex-end;
}
.hero-action-group--buttons {
  min-width: 0;
}
.page-hero h1 {
  font-size: clamp(1.55rem, 2.6vw, 2.3rem);
  line-height: 1.05;
}
.page-hero .eyebrow { color: #a40000; }
.page-hero p { color: #4e5f73; }
.page-hero .button.hero-action-button,
.page-hero .subscription-switch-form {
  margin: 0;
}
.page-hero .subscription-switch-form {
  border: 1px solid #c8d5e4;
  border-radius: 6px;
  background: rgba(255,255,255,0.92);
}
.page-hero .hero-action-button {
  min-height: 36px;
  padding: 8px 12px;
}
.page-hero .hero-status-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 190px;
}
.page-hero .hero-status-button strong {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 114, 206, 0.14);
  color: #000033;
  font-size: 0.82rem;
  font-weight: 900;
}
.page-hero .hero-status-button.is-on strong {
  background: #d7f4de;
  color: #0b5f2a;
  border: 1px solid #7fc891;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45);
}
.page-hero .hero-status-button.is-off strong {
  background: #ffe1e1;
  color: #9d1010;
  border: 1px solid #e19a9a;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
}
.page-hero .subscription-switch {
  min-height: 34px;
  padding: 6px 8px;
  gap: 8px;
}
.page-hero .subscription-switch-ui {
  width: 38px;
  height: 22px;
}
.page-hero .subscription-switch-ui::after {
  width: 18px;
  height: 18px;
}
.page-hero .subscription-switch input:checked + .subscription-switch-ui::after {
  transform: translateX(16px);
}
.page-hero .subscription-switch-label {
  font-size: 0.96rem;
}
.forum-sidebar { grid-column: span 3; }
.forum-main { grid-column: span 9; }
.forum-sidebar {
  display: grid;
  gap: 16px;
  align-self: start;
}
.forum-sidebar .panel + .panel {
  margin-top: 16px;
}
.forum-main .notice {
  margin-bottom: 16px;
}
.forum-main .notice + .forum-category-list {
  margin-top: 16px;
}
.board-layout .forum-main > .panel + .panel {
  margin-top: 16px;
}
.board-topic-panel {
  display: grid;
  gap: 16px;
}
.board-topic-panel .section-heading {
  margin-bottom: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid #d8e0ea;
}
.side-nav { display: grid; gap: 8px; }
.side-nav-group { display: grid; gap: 8px; margin-top: 12px; }
.side-nav-title {
  margin: 6px 4px 2px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #5b6a7f;
}
.side-nav-title-inline {
  margin: 0;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px;
  background: var(--gloss), var(--deep-c);
  color: var(--ink);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 4px;
  text-decoration: none;
}
.side-nav a:hover,
.side-nav a:focus {
  border-color: #ffd23f;
  box-shadow: 0 8px 18px rgba(0, 0, 51, 0.18);
}
.recent-activity-list .list-item {
  padding: 12px;
}
.recent-activity-list h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}
.forum-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.forum-hero-activity {
  margin-bottom: 16px;
}
.forum-hero-activity .recent-activity-list .list-item {
  padding: 12px;
}
.forum-footer-card {
  padding: 14px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #f8fbff;
  text-align: center;
}
.forum-footer-card strong {
  display: block;
  font-size: 1.8rem;
  color: #003f95;
}
.forum-footer-card span {
  color: #4e5f73;
  font-weight: 800;
}
.forum-category,
.forum-category-list {
  display: grid;
  gap: 18px;
}
.forum-category-group {
  overflow: hidden;
  border: 1px solid #b9c7d8;
  border-radius: 8px;
  background: #f3f7fc;
}
.forum-category-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px;
  background: var(--deep-c);
  color: var(--ink);
  border-bottom: 3px solid var(--yellow);
}
.forum-category-header .eyebrow {
  margin-bottom: 5px;
  color: var(--yellow);
}
.forum-category-header h3 {
  margin: 0 0 4px;
  font-size: 1.45rem;
}
.forum-category-header .description {
  margin: 0;
  color: var(--muted);
}
.forum-category-header a {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}
.forum-board-list {
  display: grid;
  gap: 10px;
  padding: 0;
}
.forum-category-group .forum-board-list {
  padding: 14px;
}
.forum-row, .post-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.forum-stats { display: grid; grid-template-columns: repeat(2, minmax(70px, 1fr)); gap: 8px; text-align: center; }
.forum-stats strong { display: block; font-size: 1.35rem; }
.post-body { line-height: 1.65; font-size: 1.04rem; }
.topic-thread {
  display: grid;
  gap: 18px;
  padding-block: 22px 28px;
}
.forum-thread {
  display: grid;
  gap: 18px;
}
.forum-message {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  background: var(--panel);
  color: var(--panel-ink);
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid #d8e0ea;
}
.forum-message.topic-post {
  border: 2px solid #ffffff;
  box-shadow: 0 18px 52px rgba(0, 0, 20, 0.38);
}
.forum-message.reply-post {
  box-shadow: 0 10px 26px rgba(0, 0, 20, 0.16);
}
.reply-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}
.reply-details summary::-webkit-details-marker {
  display: none;
}
.reply-details summary .expand-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #e7edf6;
  color: #26364a;
  font-weight: 800;
  transition: transform 0.2s ease;
}
.reply-details[open] summary .expand-indicator {
  transform: rotate(180deg);
}
.reply-details form {
  margin-top: 18px;
}
.forum-quote {
  margin: 14px 0;
  padding: 14px 16px;
  border-left: 4px solid #003f95;
  border-radius: 8px;
  background: #f2f6fb;
  color: #203046;
}
.forum-quote .quote-title {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
  color: #0b0f1a;
}
.forum-quote .quote-body {
  color: #203046;
}
.message-author {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 12px;
  background: var(--deep-c);
  color: var(--ink);
  border-right: 1px solid #d8e0ea;
  box-sizing: border-box;
  min-width: 0;
  max-width: 190px;
  overflow: hidden;
}
.message-author *,
.message-author *::before,
.message-author *::after {
  box-sizing: border-box;
}
.message-author > *,
.message-author form,
.message-author select,
.message-author button,
.message-author .button,
.message-author details {
  min-width: 0;
  max-width: 100%;
}
.message-author span,
.message-author small {
  color: var(--muted);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}
.message-author .moderation-trigger {
  width: 100%;
  margin-top: 4px;
  justify-content: center;
  text-align: center;
  border-color: #ffd23f;
  background: #ffd23f;
  color: #000033;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65), 0 8px 18px rgba(0,0,0,0.18);
}

.moderation-trigger-icon {
  display: none;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.moderation-trigger-label {
  display: inline-flex;
}

.message-author .moderation-trigger:hover,
.message-author .moderation-trigger:focus-visible {
  background: #ffe071;
  color: #000033;
}
.message-author-name-link,
.message-author-avatar-link {
  color: inherit;
  text-decoration: none;
}
.message-author-name-link:hover,
.message-author-name-link:focus-visible {
  color: var(--yellow);
  text-decoration: underline;
}
.message-author .emoji-row {
  display: grid;
  align-items: stretch;
  gap: 8px;
  margin-top: 8px;
}
.message-author .emoji-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.message-author .emoji-totals .tag {
  flex: 1 1 calc(50% - 5px);
  min-width: 46px;
  background: #ffffff;
  color: #000033;
  border-color: #ffd23f;
}
.message-author .emoji-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.message-author .emoji-form .button {
  min-height: 34px;
  padding: 6px;
}
.message-author .tag {
  justify-content: center;
  min-height: 30px;
}
.message-author .moderation-box,
.message-author .compact-moderation-box {
  width: 100%;
  max-width: 100%;
  margin-top: 6px;
  padding: 8px;
  background: #f8fbff;
  color: var(--panel-ink);
  overflow: hidden;
}
.message-moderation-menu {
  display: grid;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}
.message-moderation-menu > summary {
  list-style: none;
  cursor: pointer;
  box-sizing: border-box;
}
.message-moderation-menu > summary::-webkit-details-marker {
  display: none;
}
.message-moderation-content {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px;
  border: 2px solid #ffd23f;
  border-radius: 6px;
  background: #fff7cf;
  overflow: hidden;
}
.moderation-content-modal .content-modal-panel {
  max-width: min(760px, calc(100vw - 24px));
}

.moderation-content-modal .message-moderation-content {
  margin-top: 12px;
}

.message-moderation-content .button,
.message-moderation-content button[type="submit"] {
  border-color: #ffd23f;
  background: #ffd23f;
  color: #000033;
}
.message-moderation-content .button:hover,
.message-moderation-content button[type="submit"]:hover,
.message-moderation-content .button:focus-visible,
.message-moderation-content button[type="submit"]:focus-visible {
  background: #ffe071;
  color: #000033;
}
.message-author .mod-grid {
  grid-template-columns: 1fr;
}
.message-author .mod-grid label {
  min-height: 38px;
  padding: 7px 8px;
  font-size: 0.92rem;
}
.message-author .moderation-actions {
  grid-template-columns: 1fr;
}
.message-author .compact-moderation-actions {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}
.message-author .compact-moderation-actions .field,
.message-author .compact-moderation-actions select {
  min-width: 0;
  width: 100%;
}
.message-author .compact-moderation-actions .button {
  min-width: 42px;
  padding-inline: 8px;
}
.message-avatar {
  width: 92px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 3px solid var(--yellow);
  border-radius: 8px;
  background: var(--deep-b);
}
.message-content {
  padding: 20px;
}
.message-title-band {
  margin: -20px -20px 18px;
  padding: 18px 20px 16px;
  background: #eef5ff;
  border-bottom: 2px solid #0064c8;
}
.message-title-band .eyebrow {
  margin-bottom: 6px;
  color: #a40000;
}
.message-title-band h2 {
  margin: 0;
  color: #101827;
  font-size: clamp(1.45rem, 2.6vw, 2.25rem);
  line-height: 1.15;
}
.forum-underline { text-decoration: underline; }
.forum-title-text {
  display: block;
  margin: 14px 0 8px;
  font-size: 1.35rem;
  font-weight: 900;
  color: #101827;
}
.forum-quote {
  position: relative;
  margin: 16px 0;
  padding: 18px 18px 18px 46px;
  border: 1px solid #a9c2df;
  border-radius: 8px;
  background: #eef7ff;
  color: #203349;
  box-shadow: inset 0 0 0 2px #ffffff;
}
.forum-quote::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0064c8;
  box-shadow: -8px 18px 0 -5px #0064c8, 10px 23px 0 -7px #0064c8;
}
.forum-normal-text { font-size: 1rem; font-weight: 400; }
.forum-image-thumb {
  border: 0;
  padding: 0;
  background: transparent;
  display: inline-flex;
  margin: 6px;
  border-radius: 8px;
  cursor: pointer;
}
.forum-embedded-image {
  display: block;
  width: 160px;
  height: auto;
  border-radius: 8px;
  border: 1px solid #b9c7d8;
}
.image-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 24, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}
.image-lightbox.open {
  display: flex;
}
.image-lightbox-inner {
  position: relative;
  display: grid;
  gap: 10px;
  justify-items: center;
}
.image-lightbox-inner img {
  max-width: min(94vw, 1200px);
  max-height: 90vh;
  border-radius: 8px;
  background: #fff;
}
.image-lightbox-caption {
  max-width: min(94vw, 900px);
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #000033;
  font-weight: 800;
  text-align: center;
}
.image-lightbox-nav,
.image-lightbox-close {
  position: absolute;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  background: rgba(0, 0, 40, 0.78);
  color: #ffffff;
  cursor: pointer;
  transition: opacity 160ms ease, visibility 160ms ease, background 160ms ease, transform 160ms ease;
}
.image-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}
.image-lightbox-nav.prev {
  left: 16px;
}
.image-lightbox-nav.next {
  right: 16px;
}
.image-lightbox-close {
  top: 12px;
  right: 12px;
}
@media (hover: hover) and (pointer: fine) {
  .image-lightbox-nav,
  .image-lightbox-close {
    opacity: 0;
    visibility: hidden;
  }
  .image-lightbox-inner:hover .image-lightbox-nav,
  .image-lightbox-inner:hover .image-lightbox-close,
  .image-lightbox-nav:focus-visible,
  .image-lightbox-close:focus-visible {
    opacity: 1;
    visibility: visible;
  }
}
.message-tool-link {
  width: 100%;
}
.message-author .report-details {
  width: 100%;
}
.message-author .report-details summary {
  display: flex;
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  background: var(--gloss), linear-gradient(180deg, #12128a 0%, #000051 100%);
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}
.message-author .report-details summary:hover,
.message-author .report-details summary:focus-visible {
  border-color: var(--yellow);
  color: var(--yellow);
}
.message-author .report-details form {
  margin-top: 8px;
  padding: 8px;
  border: 1px solid #c8d5e4;
  border-radius: 4px;
  background: #fff;
  color: var(--panel-ink);
}
.message-author .report-details .form-grid {
  grid-template-columns: 1fr;
}
.message-author .report-details textarea {
  min-height: 90px;
}
.content-report {
  margin-top: 16px;
  border-top: 1px solid #d8e0ea;
}
.content-changelog {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #d8e0ea;
  color: #4e5f73;
}
.content-changelog summary {
  cursor: pointer;
  font-weight: 900;
  color: #003f95;
}
.revision-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.revision-item {
  padding: 10px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #f8fbff;
}
.revision-item strong,
.revision-item span {
  display: block;
}
.message-list {
  display: grid;
  gap: 14px;
}
.replies-panel {
  display: grid;
  gap: 16px;
}
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.pagination a,
.pagination strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 36px;
  padding: 8px 11px;
  border-radius: 8px;
  border: 1px solid #c9d4e2;
  text-decoration: none;
  font-weight: 900;
}
.pagination a {
  background: #f8fbff;
  color: #003f95;
}
.pagination strong {
  background: var(--deep-c);
  color: var(--ink);
}
.listing-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 0 0 14px;
}
.listing-toolbar .compact-inline {
  min-width: 180px;
}
.section-heading > .listing-toolbar {
  margin: 0;
  align-self: end;
}
.section-heading > .listing-toolbar .field {
  margin: 0;
}
.forum-compose {
  margin-top: 18px;
  border-top: 1px solid #d8e0ea;
  padding-top: 18px;
}
.standalone-compose {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}
.forum-editor {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #f8fbff;
}
.forum-editor .field.full {
  display: grid;
  gap: 8px;
}
.forum-comment-compose .forum-textarea,
.project-comment-compose .forum-textarea,
.event-comment-compose .forum-textarea {
  min-height: 220px;
}
.editor-toolbar .button {
  min-height: 34px;
  padding: 7px 10px;
}
.color-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.color-swatch {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid #ffffff;
  border-radius: 8px;
  background: var(--swatch);
  box-shadow: 0 0 0 1px #9fb0c4;
  cursor: pointer;
}
.color-swatch span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #ffffff;
}
.emoji-picker:empty::before {
  content: "Emoji laden...";
  color: #4e5f73;
}
.emoji-choice {
  min-width: 38px;
  min-height: 36px;
  border: 1px solid #c9d4e2;
  border-radius: 8px;
  background: #f8fbff;
  cursor: pointer;
}
.selected-files {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}
.selected-file {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #f8fbff;
  color: #101827;
}
.selected-file-preview {
  width: 74px;
  height: 54px;
  object-fit: cover;
  border: 1px solid #c8d5e4;
  border-radius: 6px;
  background: #eef3f8;
}
.selected-file-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.image-upload-description {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #c8d5e4;
  border-radius: 6px;
}
.forum-image-figure {
  display: inline-grid;
  gap: 6px;
  margin: 8px 10px 8px 0;
  vertical-align: top;
}
.forum-image-figure figcaption {
  max-width: 260px;
  color: #4e5f73;
  font-size: 0.9rem;
  line-height: 1.3;
}
.selected-file span {
  overflow-wrap: anywhere;
}
.selected-file .button {
  min-height: 34px;
  padding: 7px 10px;
}
.emoji-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.moderation-box {
  display: none;
  margin-top: 16px;
  border: 1px solid #b9c7d8;
  background: #ffffff;
  color: var(--panel-ink);
  border-radius: 8px;
  padding: 16px;
}
.moderation-box.visible { display: block; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; margin: 12px 0; }
.mod-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #f8fbff;
  font-weight: 800;
}
.mod-grid input {
  width: auto;
  min-height: 0;
}
.moderation-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.compact-moderation-box {
  padding: 10px;
  border: 1px solid #b9c7d8;
  background: #ffffff;
  color: var(--panel-ink);
  border-radius: 4px;
}
.compact-moderation-box > strong,
.compact-moderation-box summary {
  font-size: 0.9rem;
}
.compact-moderation-form {
  gap: 8px;
}
.compact-mod-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 6px;
  margin: 8px 0;
}
.compact-mod-grid label,
.message-author .compact-mod-grid label {
  min-height: 30px;
  padding: 5px 7px;
  gap: 6px;
  border-radius: 4px;
  font-size: 0.78rem;
  line-height: 1.15;
}

.compact-mod-grid label span,
.compact-mod-grid label {
  user-select: none;
}

.compact-mod-grid input[type="checkbox"] {
  flex: 0 0 auto;
  accent-color: #ffd23f;
}

.compact-moderation-actions,
.message-author .compact-moderation-actions {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}
.compact-moderation-actions select {
  min-height: 34px;
  padding: 6px 8px;
}
.compact-moderation-actions .button {
  min-height: 34px;
  padding: 7px 12px;
}
.moderation-logbook-trigger {
  width: 100%;
}
.moderation-logbook {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 30, 0.78);
}
.moderation-logbook[hidden] {
  display: none;
}
.moderation-logbook-panel {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(760px, 96vw);
  max-height: 86vh;
  overflow: auto;
  padding: 20px;
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  background: #ffffff;
  color: #07101f;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}
.moderation-logbook-panel h2 {
  margin: 0;
}
.moderation-logbook-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #c8d5e4;
  border-radius: 4px;
  background: #f8fbff;
  color: #000033;
  font-weight: 900;
  cursor: pointer;
}
.moderation-logbook-list {
  display: grid;
  gap: 8px;
}
.moderation-logbook-list article {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid #d8e0ea;
  border-left: 4px solid #0072f0;
  border-radius: 4px;
  background: #f8fbff;
}
.moderation-logbook-list article div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.moderation-logbook-list span,
.moderation-logbook-list p {
  color: #4e5f73;
}
.moderation-logbook-list p {
  margin: 0;
  line-height: 1.45;
}
.content-modal {
  position: fixed;
  inset: 0;
  z-index: 2105;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 30, 0.72);
}
.content-modal[hidden] {
  display: none;
}
.content-modal-panel {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(760px, 96vw);
  max-height: 86vh;
  overflow: auto;
  padding: 22px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #fdfefe;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}
.content-modal-panel h2,
.content-modal-panel p {
  margin: 0;
}
.content-modal-panel,
.content-modal-panel label,
.content-modal-panel legend,
.content-modal-panel .field,
.content-modal-panel .field-help,
.content-modal-panel .description {
  color: #102033;
}
.content-modal-panel .eyebrow {
  color: #a40000;
}
.content-modal-panel input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.content-modal-panel select,
.content-modal-panel textarea {
  color: #102033;
  background: #ffffff;
  border: 1px solid #b8c9dc;
}
.content-modal-panel input::placeholder,
.content-modal-panel textarea::placeholder {
  color: #5f7288;
}
.content-modal-panel .subscription-switch-form {
  border-color: #b8c9dc;
  background: #f8fbff;
}
.content-modal-panel .subscription-switch {
  background: #f8fbff;
}
.content-modal-panel .subscription-switch-label {
  color: #091a44;
}
.content-modal-panel .button.ghost {
  color: #091a44;
  border-color: #b8c9dc;
  background: #ffffff;
}
.content-modal-panel .button.ghost:hover,
.content-modal-panel .button.ghost:focus-visible {
  background: #eef5ff;
}
.content-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #c8d5e4;
  border-radius: 6px;
  background: #fff;
  color: #091a44;
  font-size: 1.1rem;
  cursor: pointer;
}
.modal-form-stack {
  display: grid;
  gap: 12px;
}
.notifications-modal-controls .subscription-switch-form {
  width: 100%;
}
.notifications-modal-controls .subscription-switch {
  width: 100%;
  justify-content: space-between;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.search-results { margin-top: 18px; }
.field { display: grid; gap: 6px; font-weight: 800; align-self: start; }
.field.full { grid-column: 1 / -1; }

.compact-form {
  align-items: end;
}

.events-page,
.projects-page {
  align-items: start;
}

.events-layout,
.projects-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 22px;
  align-items: start;
}

.events-main,
.events-sidebar,
.projects-main,
.projects-sidebar {
  display: grid;
  gap: 18px;
}

.events-sidebar,
.projects-sidebar {
  position: sticky;
  top: 88px;
}

.sidebar-tools-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.sidebar-tools-panel > summary::-webkit-details-marker {
  display: none;
}

.sidebar-tools-summary h2,
.sidebar-tools-summary .eyebrow {
  margin: 0;
}

.sidebar-tools-body {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.panel-embedded {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.event-list {
  display: grid;
  gap: 16px;
}

.event-card {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 10px;
  align-content: start;
  align-items: start;
  border: 1px solid #b9c7d8;
  border-left: 5px solid #0072f0;
  border-radius: 4px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #f4f8fd);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background-color 160ms ease;
}

.event-card:hover,
.event-card:focus-within {
  border-color: #0072f0;
  border-left-color: #ffd23f;
  background: #ffffff;
  box-shadow: 0 18px 35px rgba(0, 0, 51, 0.18);
  transform: translateY(-1px);
}

.event-card.past {
  border-left-color: #6f7e91;
  background: #ffffff;
}

.event-card.no-poster {
  grid-template-columns: 142px minmax(0, 1fr);
}

.event-card.no-poster .event-card-actions {
  grid-column: 1;
}

.event-poster {
  display: block;
  border-radius: 4px;
  overflow: hidden;
  background: #111827;
}

.event-poster img {
  width: 100%;
  height: auto;
  display: block;
}

.event-card-body {
  display: grid;
  gap: 10px;
}

.event-card-header-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.event-card-info {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.event-card-link {
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.event-card-link:hover h3 {
  color: #003f95;
  text-decoration: underline;
}

.event-card-actions {
  grid-column: 2;
}

.event-card-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #d8e0ea;
}

.event-card-title h3 {
  margin: 0;
}

.event-description {
  display: grid;
  gap: 8px;
}

.event-details,
.event-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.event-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  color: #40536a;
}

.event-meta-grid > span,
.event-address {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.event-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  background: #eef4fb;
  color: #000051;
  line-height: 1;
  text-align: center;
}

.event-icon::before {
  display: block;
  font-size: 14px;
  line-height: 1;
}

.event-icon.icon-location::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50% 50% 50% 0;
  background: #d01616;
  transform: rotate(-45deg);
  box-shadow: 0 0 0 3px rgba(208, 22, 22, 0.12);
}

.event-icon.icon-person::before {
  content: "P";
  font-weight: 900;
  color: #6b3fa0;
}

.event-icon.icon-calendar::before {
  content: "D";
  font-weight: 900;
  color: #003f95;
}

.event-icon.icon-ticket::before {
  content: "T";
  font-weight: 900;
  color: #7a3d00;
}

.event-icon.icon-people::before {
  content: "2";
  font-weight: 900;
  color: #0b7a35;
}

.event-icon.icon-contact::before {
  content: "?";
  font-weight: 900;
  color: #4e5f73;
}

.event-icon.icon-compass::before {
  content: ">";
  font-weight: 900;
  color: #d01616;
}

.event-form {
  display: grid;
  gap: 18px;
}

.event-form-group {
  border: 1px solid #c8d5e4;
  border-radius: 4px;
  padding: 16px;
  background: #f8fbff;
  display: grid;
  gap: 14px;
}

.event-form-group legend {
  padding: 0 8px;
  color: #a40000;
  font-size: 1.05rem;
  font-weight: 900;
}

.registration-builder-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.registration-field-list,
.event-registration-list,
.event-registration-admin-list {
  display: grid;
  gap: 12px;
}

.event-registration-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-self: end;
}

.event-registration-table-wrap {
  overflow-x: auto;
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  background: #ffffff;
}

.event-registration-list-panel {
  margin-top: 10px;
}

.event-registration-list-panel > summary {
  min-height: 48px;
  padding-inline: 14px;
}

.event-registration-list-panel[open] {
  padding: 0 14px 14px;
}

.event-registration-list-panel[open] > summary {
  margin: 0 -14px 12px;
}

.event-registration-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.event-registration-table th,
.event-registration-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #d8e0ea;
  border-right: 1px solid #e4ebf3;
  vertical-align: top;
  text-align: left;
}

.event-registration-table th:last-child,
.event-registration-table td:last-child {
  border-right: 0;
}

.event-registration-table tr:last-child th,
.event-registration-table tr:last-child td {
  border-bottom: 0;
}

.event-registration-table thead th {
  background: linear-gradient(180deg, #eef4fb, #e5edf7);
  color: #000033;
  font-size: 0.86rem;
  font-weight: 950;
  text-transform: uppercase;
}

.event-registration-table tbody td strong {
  color: #000033;
}

.registration-field-card,
.event-registration-card,
.event-registration-admin-item {
  border: 1px solid #c8d5e4;
  border-radius: 6px;
  background: #ffffff;
  padding: 12px;
}

.registration-field-card-header,
.event-registration-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

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

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.registration-multiselect {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  padding: 8px 0 0;
}

.event-registration-toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.content-modal-secondary-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #d8e0ea;
}

.content-modal-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #d8e0ea;
}

.content-modal-inline-form {
  margin: 0;
}

.button.solid-danger {
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02)), #b40018;
  border-color: rgba(120, 0, 16, 0.72);
  color: #ffffff;
}

.button.solid-danger:hover,
.button.solid-danger:focus-visible {
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03)), #c10019;
  color: #ffffff;
}

.event-registration-answer-list {
  display: grid;
  gap: 8px;
}

.event-registration-answer {
  display: grid;
  gap: 3px;
  padding-top: 6px;
  border-top: 1px solid #e0e7f0;
}

.event-registration-answer:first-child {
  border-top: 0;
  padding-top: 0;
}

.event-registration-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 900;
  border: 1px solid #c8d5e4;
  background: #f3f7fc;
  color: #0f2b55;
}

.event-registration-status.status-submitted { background: #fff6d8; border-color: #ffd36d; }
.event-registration-status.status-approved { background: #e6f7ea; border-color: #91d5a4; }
.event-registration-status.status-declined { background: #fde8e8; border-color: #efb2b2; }
.event-registration-status.status-archived { background: #eef2f7; border-color: #c8d5e4; }

.event-archived-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #edf2f9;
  color: #32465f;
  border: 1px solid #c8d5e4;
  font-size: 0.88rem;
  font-weight: 900;
}

@media (max-width: 760px) {
  .registration-builder-header,
  .registration-field-card-header,
  .event-registration-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .compact-form-grid {
    grid-template-columns: 1fr;
  }
}

.event-detail-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.event-detail-card.no-poster {
  grid-template-columns: 260px minmax(0, 1fr);
}

.event-detail-main {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.event-card .event-detail-main {
  gap: 10px;
}

.event-detail-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 2px solid #d8e0ea;
}

.event-card .event-detail-header {
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 0;
}

.event-card-title-header {
  justify-content: space-between;
}

.event-more-button {
  flex: 0 0 auto;
  align-self: center;
  white-space: nowrap;
}

.event-card .event-date-cube {
  width: 58px;
  min-height: 58px;
  font-size: 0.95rem;
  box-shadow: 0 3px 0 #000033;
}

.event-card .event-date-cube-separator {
  width: 36px;
}

.event-detail-header h2 {
  margin: 0;
  font-size: 2.25rem;
  line-height: 1.08;
}

.event-title-organizer {
  display: inline-block;
  margin-left: 8px;
  font-size: 1rem;
  font-weight: 800;
  color: #4e5f73;
  vertical-align: middle;
}

.event-date-cube {
  flex: 0 0 auto;
  width: 74px;
  min-height: 74px;
  display: grid;
  place-items: center;
  border: 2px solid #000051;
  border-radius: 8px;
  background: #ffd23f;
  color: #000033;
  font-weight: 950;
  font-size: 1.15rem;
  line-height: 1;
  text-align: center;
  box-shadow: 0 5px 0 #000033;
}

.event-date-cube span {
  display: block;
}

.event-date-cube-separator {
  width: 48px;
  height: 2px;
  background: #000051;
}

.event-detail-header h3 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.12;
  color: #081427;
}

.event-card .event-title-organizer {
  font-size: 0.9rem;
}

.event-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 11px 13px;
  background: #e8eef6;
  color: #102033;
  font-weight: 900;
  white-space: nowrap;
}

.event-card .event-date-badge {
  padding: 8px 10px;
  font-size: 0.95rem;
}

.event-detail-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.event-card .event-detail-summary {
  gap: 8px;
}

.event-detail-summary > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fbff;
  color: #33465c;
  font-weight: 800;
}

.event-card .event-detail-summary > span {
  padding: 8px 10px;
}

.event-comments-list {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.reaction-sort-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px 14px;
  margin: 0 0 16px;
}

.section-heading > .reaction-sort-form,
.section-heading-sort {
  margin: 0;
  justify-content: flex-end;
  align-self: end;
}

.reaction-sort-form .field {
  min-width: min(280px, 100%);
  margin: 0;
}

.section-heading-sort .field {
  min-width: min(220px, 100%);
}

[data-async-section] .content-section-compose {
  margin: 14px 0 18px;
}

[data-async-section] .content-section-compose:last-child {
  margin-bottom: 0;
}

[data-async-section].is-loading {
  opacity: 0.72;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.event-comment-compose > summary,
.event-create-compose > summary,
.project-comment-compose > summary,
.forum-comment-compose > summary,
.forum-topic-compose > summary {
  background: linear-gradient(180deg, #0f0f78 0%, #000051 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 210, 63, 0.75);
  box-shadow: 0 10px 22px rgba(0, 0, 51, 0.22);
}

.event-comment-compose > summary span:first-child,
.event-create-compose > summary span:first-child,
.project-comment-compose > summary span:first-child,
.forum-comment-compose > summary span:first-child,
.forum-topic-compose > summary span:first-child {
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0;
}

.event-comment-compose > summary span:last-child,
.event-create-compose > summary span:last-child,
.project-comment-compose > summary span:last-child,
.forum-comment-compose > summary span:last-child,
.forum-topic-compose > summary span:last-child {
  color: #ffd23f;
  font-weight: 900;
}

.event-comment-compose[open] > summary,
.event-create-compose[open] > summary,
.project-comment-compose[open] > summary,
.forum-comment-compose[open] > summary,
.forum-topic-compose[open] > summary {
  background: linear-gradient(180deg, #12128a 0%, #000051 100%);
}

.event-detail-description {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #34465d;
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  padding: 14px 16px;
  background: #f8fbff;
}

.event-card-description {
  font-size: 1rem;
  line-height: 1.45;
  padding: 10px 12px;
}

.event-detail-section {
  display: grid;
  gap: 12px;
}

.event-card .event-detail-section {
  gap: 8px;
}

.event-card .event-detail-section h4 {
  margin-top: 0;
}

.event-detail-section h3 {
  margin: 0;
  color: #000051;
}

.event-detail-section h4 {
  margin: 0;
  color: #000051;
  font-size: 1.05rem;
}

.event-detail-poster {
  display: block;
  width: 100%;
  height: 401px;
  aspect-ratio: auto;
  border-radius: 4px;
  overflow: hidden;
  background: #111827;
  border: 1px solid #c8d5e4;
  position: relative;
}

.event-detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.event-image-carousel [data-carousel-image][hidden] {
  display: none !important;
}

.event-image-carousel {
  cursor: pointer;
}

.event-carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  background: rgba(0, 0, 51, 0.78);
  color: #ffffff;
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}

.event-carousel-button.prev {
  left: 8px;
}

.event-carousel-button.next {
  right: 8px;
}

.event-carousel-button:hover,
.event-carousel-button:focus {
  background: #000051;
  border-color: #ffd23f;
}

.event-carousel-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  border-radius: 8px;
  padding: 5px 8px;
  background: rgba(0, 0, 51, 0.82);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 900;
}

.event-card-poster-aside {
  align-self: start;
  grid-column: 1;
  grid-row: 1;
}

.event-card-poster-aside .event-detail-poster {
  width: 142px;
  height: 181px;
  aspect-ratio: auto;
}

.event-card-poster-aside .event-detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-poster-placeholder {
  display: grid;
  place-items: center;
  padding: 10px;
  background: #e8eef6;
  color: #4e5f73;
  font-weight: 950;
  text-align: center;
  border-style: dashed;
}

.event-detail-left-poster {
  display: grid;
  gap: 10px;
  align-self: start;
}
.event-detail-left-poster .emoji-row {
  display: grid;
  gap: 8px;
}
.event-detail-left-poster .emoji-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.event-detail-left-poster .emoji-form .button {
  min-height: 34px;
  padding: 6px;
}
.event-detail-left-poster .tag {
  justify-content: center;
}

.event-detail-left-poster .description {
  margin: 0;
}

.event-detail-message.event-detail-card {
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  padding: 0;
}

.event-detail-content-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  min-width: 0;
}

.event-detail-aside {
  display: grid;
  gap: 10px;
}

.event-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.event-card .event-info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.event-info-grid div {
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  display: grid;
  gap: 7px;
  align-content: start;
}

.event-card .event-info-grid div {
  padding: 9px 10px;
  gap: 5px;
}

.projects-page,
.project-detail-page {
  row-gap: 18px;
}

.project-filter-form {
  grid-template-columns: minmax(320px, 1.4fr) minmax(260px, .8fr) auto;
  align-items: end;
  justify-content: stretch;
  gap: 12px;
}

.project-search-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.projects-sidebar .project-filter-form {
  grid-template-columns: 1fr;
}

.projects-sidebar .project-search-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.project-filter-form .button {
  width: auto;
  white-space: nowrap;
}

.project-print-panel {
  display: grid;
  gap: 12px;
}
.compact-print-panel {
  padding: 0;
  overflow: hidden;
  min-height: 0;
}
.compact-print-panel > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 46px;
  min-height: 46px;
  padding: 0 14px;
  color: #000033;
  font-weight: 900;
  line-height: 46px;
  list-style: none;
  cursor: pointer;
}
.compact-print-panel > summary span {
  display: inline-flex;
  align-items: center;
  height: 46px;
  margin: 0;
  padding: 0;
  line-height: 1;
}
.compact-print-panel > summary span:last-child {
  width: 24px;
  justify-content: center;
  text-align: center;
  font-size: 1.3rem;
}
.compact-print-panel > summary::marker {
  content: "";
}
.compact-print-panel > summary::-webkit-details-marker {
  display: none;
}
.project-update-compose > summary,
.project-create-compose > summary {
  border-top: 2px solid var(--yellow);
  background: var(--gloss), var(--deep-c);
  color: #ffffff;
}
.project-update-compose > summary span:last-child,
.project-create-compose > summary span:last-child {
  color: var(--yellow);
}
.compact-print-panel[open] {
  padding: 0 12px 10px;
}
.compact-print-panel[open] summary {
  margin: 0 -12px 8px;
  border-bottom: 1px solid #d7e0ec;
}
.project-update-compose[open] summary,
.project-create-compose[open] summary {
  border-top: 2px solid var(--yellow);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  background: var(--gloss), var(--deep-c);
  color: #ffffff;
}
.compact-print-panel[open] summary span:last-child {
  transform: rotate(45deg);
}

.content-edit-panel:not([open]) {
  display: none;
}

.content-edit-panel[open] {
  position: fixed;
  z-index: 2601;
  top: 5vh;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translateX(-50%);
  width: min(1100px, calc(100vw - 32px));
  max-height: 90vh;
  overflow: auto;
  padding: 0 18px 18px;
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 20, 0.35);
}

.content-edit-panel[open] > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0 -18px 16px;
  padding: 14px 18px;
  background: var(--gloss), var(--deep-c);
  color: #ffffff;
}

.forum-comment-compose[open],
.forum-topic-compose[open],
.project-comment-compose[open],
.event-comment-compose[open],
.event-create-compose[open],
.project-update-compose[open],
.project-create-compose[open] {
  position: fixed;
  z-index: 2601;
  top: 5vh;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translateX(-50%);
  width: min(1100px, calc(100vw - 32px));
  max-height: 90vh;
  overflow: auto;
  padding: 0 18px 18px;
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 20, 0.35);
}

.forum-comment-compose[open] > summary,
.forum-topic-compose[open] > summary,
.project-comment-compose[open] > summary,
.event-comment-compose[open] > summary,
.event-create-compose[open] > summary,
.project-update-compose[open] > summary,
.project-create-compose[open] > summary {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0 -18px 16px;
  padding: 0 18px;
  background: var(--gloss), var(--deep-c);
  color: #ffffff;
}

.details-modal-backdrop {
  position: fixed;
  z-index: 2600;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 20, 0.66);
  cursor: default;
}

.details-modal-backdrop[hidden] {
  display: none;
}

body.details-overlay-open {
  overflow: hidden;
}
.project-print-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.project-print-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid #cbd6e4;
  border-radius: 8px;
  background: #f8fbff;
  color: #000033;
  font-weight: 800;
  line-height: 1.1;
}
.project-print-options input {
  width: 14px;
  height: 14px;
}
.compact-print-panel > .description {
  margin: 0 0 8px;
}
.compact-print-panel > .button {
  width: auto;
  min-height: 36px;
  margin-top: 8px;
  padding: 8px 14px;
}

.project-list,
.project-update-list,
.project-comments {
  display: grid;
  gap: 14px;
}

.project-create-compose + .project-list,
.panel > .notice + .project-list {
  margin-top: 18px;
}

.project-primary-image-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  border: 1px solid #c8d5e4;
  border-radius: 4px;
  padding: 7px 10px;
  background: #eef5ff;
  color: #000033;
  font-weight: 900;
}

.project-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid #b9c7d8;
  border-left: 5px solid #0072f0;
  border-radius: 4px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #f4f8fd);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background-color 160ms ease;
}

.project-card:hover,
.project-card:focus-within {
  border-color: #0072f0;
  border-left-color: #ffd23f;
  background: #ffffff;
  box-shadow: 0 18px 35px rgba(0, 0, 51, 0.18);
  transform: translateY(-1px);
}

.project-card-main {
  display: grid;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.project-card-thumb {
  width: 92px;
  height: 74px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #c8d5e4;
  border-radius: 4px;
  background: #eef3f9;
  color: #45576c;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}

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

.project-card-compact {
  display: grid;
  gap: 3px;
}

.project-card h3 {
  margin: 0;
  color: #07111f;
  font-size: 1.2rem;
}

.project-card-main:hover h3 {
  color: #003f95;
  text-decoration: underline;
}

.project-card-expanded {
  display: grid;
  gap: 8px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 180ms ease, opacity 160ms ease, margin-top 160ms ease;
}

.project-card:hover .project-card-expanded,
.project-card:focus-within .project-card-expanded {
  max-height: 360px;
  opacity: 1;
  margin-top: 4px;
}

.project-card-meta,
.project-card-dates,
.project-card-stats,
.project-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-card-meta span,
.project-card-dates span,
.project-card-stats span,
.project-facts span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  padding: 5px 9px;
  background: #ffffff;
  color: #34465c;
  font-weight: 800;
}

.project-card-author {
  border-color: #000051 !important;
  background: #000051 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
}

.project-card-dates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card-dates span {
  display: grid;
  align-items: start;
  gap: 3px;
  min-height: 54px;
  background: #eef5ff;
}

.project-card-dates strong {
  color: #000033;
  font-size: 0.86rem;
}

.project-report-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.project-report-header h2 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.project-aspect-form-grid,
.project-aspect-read-grid,
.project-change-form-grid,
.project-change-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.project-state-reports {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.project-state-report {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.project-state-report .section-heading {
  margin-bottom: 0;
}

.forum-main > .panel,
.events-main > .panel,
.projects-overview > .panel,
.project-state-report,
.project-update,
.event-detail-card {
  border-top: 1px solid rgba(255,255,255,0.86);
}

.forum-category-header,
.project-report-header,
.event-detail-header,
.board-topic-panel .section-heading {
  position: relative;
}

.forum-category-header::before,
.project-report-header::before,
.event-detail-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #000051, #aeb8c7 38%, #ffffff 52%, #ffd23f);
}

.project-report-header,
.event-detail-header {
  padding-top: 14px;
}

.project-state-report .project-aspect-read-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-aspect-read-grid div.updated {
  border-color: #0072f0;
  background: #eef5ff;
}

.project-aspect-read-grid div.placeholder {
  border-style: dashed;
  background: #f8fafc;
}

.project-aspect-read-grid small {
  display: block;
  margin-top: 8px;
  color: #003f95;
  font-weight: 900;
  line-height: 1.35;
}

.project-part-history {
  display: grid;
  gap: 10px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.project-part-history li {
  border-top: 1px solid #c8d5e4;
  padding-top: 10px;
}

.project-part-history li:first-child {
  border-top: 0;
  padding-top: 0;
}

.project-part-history a {
  color: #000051;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.project-aspect-form-grid textarea {
  min-height: 96px;
}

.project-aspect-read-grid div,
.project-change-grid div,
.project-change-field,
.project-parts,
.project-update {
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  background: #ffffff;
}

.project-aspect-read-grid div,
.project-change-grid div,
.project-change-field,
.project-parts {
  padding: 12px;
}

.project-aspect-read-grid strong,
.project-change-grid strong,
.project-change-field strong {
  color: #000033;
}

.project-aspect-read-grid p,
.project-change-grid p,
.project-parts p {
  margin: 7px 0 0;
  color: #4e5f73;
}

.project-update {
  overflow: hidden;
}

.project-update.latest-update {
  border-color: #0072f0;
  box-shadow: 0 16px 32px rgba(0, 0, 51, 0.14);
}

.project-update.latest-update > summary {
  background: linear-gradient(90deg, #eef5ff, #fff7cf);
  border-left: 5px solid #ffd23f;
}

.project-update.latest-update > summary::after {
  content: "Nieuwste update";
  display: inline-flex;
  align-items: center;
  order: 2;
  border-radius: 999px;
  padding: 4px 9px;
  background: #000051;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 900;
}

.project-update summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: #eef5ff;
  border-bottom: 1px solid #d8e1ed;
  cursor: pointer;
  list-style: none;
}

.project-update summary::-webkit-details-marker {
  display: none;
}

.project-update summary span:first-child {
  display: grid;
  gap: 3px;
  flex: 1 1 auto;
}

.project-update summary > span:last-child {
  display: inline-grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  order: 3;
  border-radius: 8px;
  line-height: 1;
}

.project-update summary strong {
  color: #000033;
  font-size: 1.12rem;
}

.project-update summary small {
  color: #4e5f73;
  font-weight: 800;
}

.project-status-update {
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  background: #eef5ff;
  box-shadow: none;
  overflow: hidden;
}

.project-status-update-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  background: #eef5ff;
}

.project-status-update-summary > span {
  display: grid;
  gap: 3px;
  flex: 0 0 min(360px, 42%);
  min-width: 0;
}

.project-status-update-summary strong {
  color: #000033;
  font-size: 1.12rem;
  overflow-wrap: anywhere;
}

.project-status-update-summary small {
  color: #4e5f73;
  font-weight: 800;
}

.project-status-update-body {
  flex: 1 1 auto;
  min-width: 0;
  border-left: 1px solid #c8d5e4;
  padding-left: 18px;
  color: #34465c;
  line-height: 1.45;
}

.project-status-update-body p {
  margin: 0;
}

@media (max-width: 720px) {
  .project-status-update-summary {
    display: grid;
    gap: 8px;
  }

  .project-status-update-summary > span {
    flex-basis: auto;
  }

  .project-status-update-body {
    border-left: 0;
    border-top: 1px solid #c8d5e4;
    padding-top: 8px;
    padding-left: 0;
  }
}

.project-update[open] summary > span:last-child {
  transform: rotate(45deg);
}

.project-update header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 2px solid #d8e1ed;
  padding: 14px 16px;
  background: #eef5ff;
}

.project-update header h3 {
  margin: 0;
}

.project-update > .description,
.project-update-description,
.project-update > .project-parts,
.project-update > .project-gallery-section,
.project-update > .project-change-grid {
  margin: 14px 16px;
}

.project-update .project-parts + .project-gallery-section,
.project-update .project-gallery-section + .project-change-grid {
  margin-top: 22px;
}

.project-update .project-message .project-update-description,
.project-update .project-message .project-parts,
.project-update .project-message .project-gallery-section,
.project-update .project-message .project-change-grid {
  margin-left: 0;
  margin-right: 0;
}

.project-update-description {
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  display: block;
  width: auto;
}

.project-update-description > strong,
.project-gallery-section > h3 {
  color: #000033;
}

.project-update-description .description {
  max-width: none;
  width: 100%;
}

.project-change-grid div.changed {
  border-color: #0072f0;
  background: #eef5ff;
}

.project-change-grid div.same {
  background: #f8fafc;
}

.project-change-grid span {
  display: inline-flex;
  margin-top: 6px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef1f5;
  color: #34465c;
  font-size: 0.9rem;
  font-weight: 800;
}

.project-change-grid div.changed span {
  background: #dbeeff;
  color: #003f95;
}

.project-change-field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.project-change-field label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.project-change-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.project-change-options label,
.project-change-field > label {
  min-height: 40px;
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  padding: 7px 9px;
  background: #f8fafc;
  justify-content: center;
}

.project-change-options input,
.project-change-field > label input {
  width: auto;
}

.project-change-field textarea {
  min-height: 72px;
}

.project-gallery-section {
  display: grid;
  gap: 12px;
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.project-gallery-section h3 {
  margin: 0;
  color: #000033;
}

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

.project-display-gallery {
  padding: 10px;
}

.project-display-gallery .project-gallery {
  grid-template-columns: repeat(auto-fill, minmax(104px, 132px));
  gap: 8px;
  align-items: start;
}

.project-display-gallery .project-image-item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 108px;
  overflow: visible;
  background: #eef5ff;
}

.project-display-gallery .project-image-thumb {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0, 0, 51, 0.12);
}

.project-display-gallery .project-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-display-gallery .project-image-item figcaption {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 4;
  display: grid;
  gap: 4px;
  width: min(220px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  padding: 10px 12px;
  border: 1px solid #bfd2ea;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  color: #000033;
  box-shadow: 0 16px 32px rgba(0, 0, 51, 0.18);
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}
.project-display-gallery .project-image-item figcaption::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% - 1px);
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.98);
  border-right: 1px solid #bfd2ea;
  border-bottom: 1px solid #bfd2ea;
  transform: translateX(-50%) rotate(45deg);
}

.project-display-gallery .project-image-item:hover figcaption,
.project-display-gallery .project-image-item:focus-within figcaption {
  opacity: 1;
  transform: translate(-50%, 0);
}

.project-display-gallery .project-image-item figcaption strong,
.project-display-gallery .project-image-item figcaption span {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  border-color: #d6e1ef;
  background: #f3f8ff;
  color: #000033;
}

.existing-project-image-editor {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  align-items: start;
}

.project-image-item.project-image-item-edit {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.project-image-item.project-image-item-edit .project-image-thumb {
  width: 100%;
  height: 150px;
  aspect-ratio: auto;
}

.project-image-item.project-image-item-edit .project-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-image-item.project-image-item-edit figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.existing-image-order-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.existing-image-order-actions .button {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
}

.existing-image-description-field {
  display: grid;
  gap: 6px;
}

.existing-image-description-field input {
  width: 100%;
  min-width: 0;
}

.project-image-item.project-image-item-edit .project-file-aspects-existing {
  grid-template-columns: 1fr;
  gap: 8px;
}

.project-image-item.project-image-item-edit .project-file-aspects-existing label {
  min-width: 0;
  white-space: normal;
  line-height: 1.35;
}

.project-image-item.project-image-item-edit .project-file-aspects-existing label span {
  overflow-wrap: anywhere;
}

.project-image-aspects-details {
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  background: #f8fbff;
  overflow: hidden;
}

.project-image-aspects-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  color: #000033;
  font-weight: 900;
}

.project-image-aspects-details summary::-webkit-details-marker {
  display: none;
}

.project-image-aspects-details summary .expand-indicator {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #e7edf6;
  color: #26364a;
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.project-image-aspects-details[open] summary {
  border-bottom: 1px solid #d8e0ea;
}

.project-image-aspects-details[open] summary .expand-indicator {
  transform: rotate(45deg);
}

.project-image-aspects-details .project-file-aspects-existing {
  padding: 10px 12px 12px;
}

.project-image-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  background: #eef5ff;
  cursor: zoom-in;
}

.project-image-thumb:hover,
.project-image-thumb:focus {
  border-color: #0072f0;
  box-shadow: 0 10px 22px rgba(0, 0, 51, 0.14);
}

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

.project-image-item {
  margin: 0;
  display: grid;
  gap: 7px;
}

.existing-image-manager {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  padding: 12px;
}

.existing-image-manager h3,
.existing-image-manager .field-label {
  margin: 0;
  color: #000033;
  font-weight: 950;
}

.image-delete-form {
  display: flex;
  align-items: center;
}

.image-delete-form .button {
  width: 100%;
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
}

.notification-menu {
  position: relative;
  padding-bottom: 8px;
  margin-bottom: -8px;
}

.notification-button,
.account-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.topbar-icon {
  display: inline-block;
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.topbar-icon-notifications::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 10px;
  height: 12px;
  border-radius: 8px 8px 5px 5px;
  border: 2px solid currentColor;
  border-bottom-width: 3px;
}

.topbar-icon-notifications::after {
  content: "";
  position: absolute;
  left: 7px;
  bottom: 1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.topbar-icon-account::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.topbar-icon-account::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 1px;
  width: 14px;
  height: 8px;
  border-radius: 9px 9px 3px 3px;
  background: currentColor;
}

.notification-button {
  width: 42px;
  min-width: 42px;
  min-height: 40px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 6px;
  background: #000033;
  color: #ffffff;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.notification-badge {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #ffd23f;
  color: #000033;
  font-size: 0.78rem;
  line-height: 1;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% - 1px);
  right: 0;
  z-index: 80;
  display: none;
  width: min(420px, 92vw);
  border: 1px solid #c8d5e4;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(0, 0, 20, 0.24);
  padding: 8px;
}

.notification-menu:hover .notification-dropdown,
.notification-menu:focus-within .notification-dropdown,
.notification-menu.is-open .notification-dropdown {
  display: grid;
  gap: 6px;
}

.notification-dropdown-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 9px;
  border-left: 4px solid transparent;
  border-radius: 4px;
}

.notification-dropdown a {
  display: grid;
  gap: 3px;
  color: #101827;
  text-decoration: none;
}

.notification-dropdown-item.unread {
  border-left-color: #0072ce;
  background: #eef5ff;
}

.notification-dropdown-item:hover,
.notification-dropdown a:hover {
  background: #f4f7fb;
}

.notification-dropdown-item form {
  display: flex;
  align-items: center;
}

.notification-dropdown-item button {
  width: auto;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid #c8d5e4;
  border-radius: 4px;
  background: #ffffff;
  color: #000051;
  font-size: 0.74rem;
  font-weight: 950;
  cursor: pointer;
}

.notification-dropdown-item button:hover {
  border-color: #ffd23f;
  background: #ffd23f;
}

.notification-mark-all-form {
  border-bottom: 1px solid #d7e0ea;
  padding: 4px 4px 8px;
}

.notification-mark-all-form button {
  width: 100%;
  min-height: 30px;
  border: 1px solid #000051;
  border-radius: 4px;
  background: #000051;
  color: #ffffff;
  font-weight: 950;
  cursor: pointer;
}

.notification-dropdown span {
  color: #4e5f73;
  font-size: 0.86rem;
}

.all-notifications-link {
  border-top: 1px solid #d7e0ea;
  font-weight: 950;
}

.notification-list,
.notifications-panel {
  display: grid;
  gap: 10px;
}

.notification-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #c8d5e4;
  border-left: 4px solid #c8d5e4;
  border-radius: 6px;
  background: #ffffff;
  padding: 10px;
}

.notification-item.unread {
  border-left-color: #0072ce;
  background: #f6fbff;
}

.notification-item a {
  color: inherit;
  text-decoration: none;
}

.notification-inbox-list {
  gap: 8px;
}

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

.notification-settings-groups {
  display: grid;
  gap: 12px;
}

.notification-settings-group {
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f6f9fd);
  overflow: hidden;
}

.notification-settings-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  font-weight: 900;
  color: #001b42;
}

.notification-settings-group > summary::-webkit-details-marker {
  display: none;
}

.notification-settings-group-count {
  display: inline-grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef4fb;
  color: #2c486b;
  font-size: 0.84rem;
}

.notification-settings-group-body {
  display: grid;
  gap: 14px;
  padding: 0 14px 14px;
}

.notification-settings-subgroup {
  display: grid;
  gap: 8px;
}

.notification-settings-subgroup h3 {
  margin: 0;
  color: #183052;
  font-size: 1rem;
}

.notification-settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #c8d5e4;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff, #f6f9fd);
}

.notification-settings-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.notification-settings-main strong {
  color: #001b42;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-settings-main span,
.notification-settings-main a {
  font-size: 0.9rem;
}

.notification-settings-check {
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #d3deeb;
  border-radius: 6px;
  background: #ffffff;
  white-space: nowrap;
}

.notification-preferences-form {
  display: grid;
  gap: 14px;
}

.notification-preference-list {
  display: grid;
  gap: 8px;
}

.notification-preference-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #c8d5e4;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff, #f6f9fd);
}

.notification-preferences-actions {
  display: flex;
  justify-content: flex-end;
}

.notification-active-subscriptions {
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f6f9fd);
  overflow: hidden;
}

.notification-active-subscriptions > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  font-weight: 900;
  color: #001b42;
}

.notification-active-subscriptions > summary::-webkit-details-marker {
  display: none;
}

.notification-settings-mode {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #d3deeb;
  border-radius: 999px;
  background: #ffffff;
  color: #284567;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.notification-inbox-item {
  padding: 0 !important;
  overflow: hidden;
}

.notification-inbox-item summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-left: 4px solid #c8d5e4;
  background: linear-gradient(180deg, #ffffff, #eef4fb);
}

.notification-inbox-item.unread summary {
  border-left-color: #0072ce;
  background: #eef5ff;
}

.notification-inbox-item.unread .admin-inbox-summary-main strong,
.contact-thread-item.unread .admin-inbox-summary-main strong {
  font-weight: 950;
  color: #001b42;
}

.notification-inbox-item:not(.unread) .admin-inbox-summary-main strong,
.contact-thread-item:not(.unread) .admin-inbox-summary-main strong {
  font-weight: 750;
  color: #34465c;
}

.notification-inbox-item:not(.unread) summary,
.contact-thread-item:not(.unread) summary {
  border-left-color: #c8d5e4;
}

.notification-inbox-body {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid #d8e0ea;
}

.notification-inline-read-form {
  padding: 0 14px 14px;
}

.notification-conversation-preview {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.notification-message-block {
  padding: 10px 12px;
  border: 1px solid #c8d5e4;
  border-radius: 6px;
  background: #ffffff;
  line-height: 1.5;
}

.notification-message-block span {
  display: block;
  margin-bottom: 4px;
  color: #a40000;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.notification-message-block p {
  margin: 0;
  color: #1d324a;
}

.notification-message-block.original {
  border-left: 4px solid #0072f0;
  background: #f8fbff;
}

.notification-message-block.reply {
  border-left: 4px solid #ffd23f;
  background: #fffdf0;
}

.contact-conversations-panel,
.contact-thread-list,
.contact-thread-body {
  display: grid;
  gap: 12px;
}

.contact-thread-item {
  padding: 0 !important;
  overflow: hidden;
}

.contact-thread-item summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #ffffff, #eef4fb);
  border-left: 4px solid #0072f0;
}

.contact-thread-item.unread summary {
  background: #eef5ff;
  border-left-color: #ffd23f;
}

.contact-thread-body {
  padding: 12px;
}

.contact-thread-item[open] .contact-thread-history {
  max-height: 500px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.contact-thread-history {
  display: grid;
  gap: 12px;
}

.contact-message-bubble {
  max-width: 840px;
  padding: 12px;
  border: 1px solid #c8d5e4;
  border-radius: 6px;
  background: #ffffff;
  line-height: 1.55;
}

.contact-message-bubble.user {
  justify-self: start;
  border-left: 4px solid #0072f0;
}

.contact-message-bubble.admin {
  justify-self: end;
  border-left: 4px solid #ffd23f;
  background: #fffdf0;
}

.contact-thread-reply-form {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid #d8e0ea;
}

.contact-thread-reply-form textarea {
  min-height: 180px;
}

.compact-action-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.compact-action-panel > div:first-child {
  display: grid;
  gap: 3px;
}

.compact-action-panel span {
  color: #4e5f73;
}

.subscription-button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.subscription-toggle {
  margin: 0;
}

.subscription-switch-form {
  display: inline-flex;
}

.subscription-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #c8d5e4;
  border-radius: 6px;
  background: #f8fbff;
  cursor: pointer;
}

.subscription-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.subscription-switch-ui {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #a5b5c8;
  transition: background 0.2s ease;
}

.subscription-switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 30, 0.18);
  transition: transform 0.2s ease;
}

.subscription-switch input:checked + .subscription-switch-ui {
  background: #0072ce;
}

.subscription-switch input:checked + .subscription-switch-ui::after {
  transform: translateX(20px);
}

.subscription-switch-label {
  color: #000033;
  font-weight: 900;
  white-space: nowrap;
}
.subscription-tooltip,
.help-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.subscription-tooltip-icon,
.help-tooltip-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #d9e5f2;
  color: #091a44;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: help;
}
.subscription-tooltip-bubble,
.help-tooltip-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: min(260px, 70vw);
  padding: 9px 10px;
  border-radius: 6px;
  background: #091a44;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 20;
}
.subscription-tooltip-bubble::after,
.help-tooltip-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #091a44;
}
.subscription-tooltip:hover .subscription-tooltip-bubble,
.subscription-tooltip:focus-within .subscription-tooltip-bubble,
.help-tooltip:hover .help-tooltip-bubble,
.help-tooltip:focus-within .help-tooltip-bubble {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}
.checkbox-label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.project-tools-panel {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.project-tools-panel .compact-print-panel,
.project-tools-panel .compact-action-panel {
  border: 1px solid #c8d5e4;
  border-radius: 6px;
  background: #fbfdff;
}

.project-tools-panel .compact-action-panel {
  padding: 10px 12px;
}

.project-tools-panel .compact-print-panel {
  margin: 0;
}
.project-tools-panel .project-owner-management {
  margin: 0;
}

.project-owner-management > summary,
.project-tools-panel .compact-print-panel > summary {
  min-height: 52px;
  padding: 10px 12px;
}

.project-owner-management .form-grid,
.project-tools-panel .project-print-options,
.project-tools-panel .project-print-panel .description,
.project-tools-panel .project-print-panel .button {
  margin: 0 12px 12px;
}

.project-summary-box {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #c8d5e4;
  border-radius: 6px;
  background: #f8fbff;
}

@media (max-width: 900px) {
  .page-hero-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .page-hero-actions {
    max-width: none;
    width: 100%;
    justify-content: flex-start;
  }

  .page-hero-action-groups {
    width: 100%;
    justify-content: flex-start;
  }

  .page-hero-action-row {
    justify-content: flex-start;
  }

  .hero-action-group--buttons .page-hero-action-row {
    display: flex;
    grid-template-rows: none;
    grid-auto-flow: row;
    grid-auto-columns: auto;
  }
}

.project-summary-box strong {
  color: #000033;
}

.project-image-item figcaption,
.project-file-aspects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-image-item figcaption span {
  display: inline-flex;
  border: 1px solid #c8d5e4;
  border-radius: 999px;
  padding: 3px 8px;
  background: #ffffff;
  color: #34465c;
  font-size: 0.85rem;
  font-weight: 800;
}

.selected-file-details {
  display: grid;
  gap: 8px;
}

.project-file-aspects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: stretch;
  width: 100%;
}

.project-file-aspects strong {
  grid-column: 1 / -1;
  color: #000033;
}

.project-file-aspects label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  font-size: 0.9rem;
  font-weight: 800;
  min-height: 44px;
  overflow-wrap: normal;
  word-break: normal;
  white-space: normal;
  line-height: 1.25;
}

.project-file-aspects input {
  width: auto;
  flex: 0 0 auto;
}

.project-selected-files .selected-file {
  align-items: start;
  grid-template-columns: 74px minmax(0, 1fr) auto;
}

.project-message {
  grid-column: 1 / -1;
}

.project-message .message-content {
  min-width: 0;
}

.project-root-message .project-base-report,
.project-root-message .project-gallery-section,
.project-root-message .project-facts {
  margin-top: 16px;
}

.project-author-card .message-avatar {
  justify-self: center;
}

.compact-edit-panel {
  margin-top: 16px;
}
.content-edit-panel:not([open]) {
  display: none;
}
.content-edit-panel > summary {
  display: none;
}

.project-change-form-grid.compact {
  margin-top: 14px;
}

.project-form > .button,
.project-form > button[type="submit"] {
  margin-top: 16px;
}

.project-comments {
  margin-top: 16px;
}

.reaction-settings-table th:first-child {
  min-width: 140px;
}

.reaction-settings-table td label {
  display: grid;
  gap: 6px;
}

.reaction-settings-table td select {
  max-width: 180px;
}

.reaction-settings-help {
  margin-top: 12px;
}

.reaction-bool-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.reaction-bool-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #c8d5e4;
  border-radius: 6px;
  background: #f8fbff;
  font-weight: 700;
  color: #24364c;
}

.reaction-bool-option input {
  width: auto;
  margin: 0;
}

.project-reply-target {
  margin-top: 0;
}

.project-reply-notice {
  grid-column: 1 / -1;
  margin: 0 0 4px;
}

.project-comment-target {
  margin: 0 0 12px;
  width: fit-content;
}

.project-comment-target-description {
  margin: -4px 0 14px;
  border-left: 4px solid #0072f0;
  border-radius: 8px;
  padding: 9px 11px;
  background: #eef5ff;
  color: #34465c;
  font-weight: 700;
}

.event-info-grid div.wide {
  grid-column: span 2;
}

.event-info-grid strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  line-height: 1.25;
}

.event-info-grid div > span {
  color: #4e5f73;
}

.event-details > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  padding: 7px 10px;
  background: #ffffff;
  color: #33465c;
  font-weight: 800;
}

.event-side-panel h3 {
  margin: 0 0 10px;
  color: #000033;
}

.event-side-list {
  display: grid;
  gap: 8px;
}

.event-side-list a {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  background: linear-gradient(180deg, #ffffff, #f4f8fd);
}

.event-side-list a:hover {
  border-color: #0072f0;
}

.event-side-list span {
  color: #4e5f73;
  font-size: 0.92rem;
}

.event-address {
  margin: 0;
  border-top: 1px solid #d8e0ea;
  padding-top: 10px;
  color: #40536a;
}

.poster-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 30, 0.82);
}

.poster-lightbox[hidden] {
  display: none;
}

.poster-lightbox img {
  max-width: min(94vw, 1200px);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  background: #111827;
}

.poster-lightbox button {
  position: fixed;
  top: 18px;
  right: 18px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  background: #ffffff;
  color: #000033;
  font-weight: 900;
  padding: 10px 14px;
  cursor: pointer;
}

.expand-panel summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #000051;
  font-size: 1.2rem;
  font-weight: 900;
}

.expand-panel[open] summary {
  margin-bottom: 18px;
}
.field-label { font-weight: 900; }
.field-help { color: #4e5f73; font-size: 0.92rem; font-weight: 400; line-height: 1.4; }
.checkbox { display: flex; align-items: center; gap: 10px; }
.checkbox input { width: auto; min-height: 0; }
input, select, textarea {
  width: 100%;
  height: auto;
  min-height: 44px;
  border: 1px solid #c9d4e2;
  border-radius: 4px;
  padding: 12px;
  color: #101827;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}
textarea { min-height: 130px; resize: vertical; }
.notice {
  border-left: 5px solid var(--yellow);
  background: #fff9dc;
  color: #201900;
  padding: 14px;
  border-radius: 8px;
  line-height: 1.5;
}
.danger-tag {
  background: #ffe2e2;
  color: #710000;
}
.admin-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  padding: 22px clamp(16px, 4vw, 54px) 28px;
}
.admin-sidebar {
  display: grid;
  gap: 12px;
  align-self: start;
}
.admin-nav-advanced {
  display: grid;
  gap: 8px;
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff, #f5f9ff);
  box-shadow: 0 8px 18px rgba(0, 0, 51, 0.08);
}
.admin-nav-advanced summary {
  list-style: none;
  display: grid;
  gap: 4px;
  padding: 12px;
  cursor: pointer;
}
.admin-nav-advanced summary::-webkit-details-marker {
  display: none;
}
.admin-nav-advanced-summary {
  color: #4c6077;
  font-size: 0.88rem;
  line-height: 1.35;
}
.admin-nav-advanced .side-nav {
  padding: 0 12px 12px;
}
.admin-nav-content {
  gap: 10px;
}
.admin-nav-content-groups {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}
.admin-nav-content-group {
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  background: rgba(248, 251, 255, 0.92);
}
.admin-nav-content-group summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 850;
  color: #000051;
}
.admin-nav-content-group summary::-webkit-details-marker {
  display: none;
}
.admin-nav-content-group .side-nav {
  padding: 0 10px 10px;
}
.admin-density-toggle {
  width: 100%;
  color: #000033;
  background: linear-gradient(180deg, #ffffff, #eef4fb);
  border-color: #c8d5e4;
}
.admin-density-toggle[aria-pressed="true"] {
  background: var(--gloss), var(--yellow);
  color: #000033;
}
.moderation-layout {
  display: grid;
  gap: 18px;
  padding-block: 22px 28px;
}
.moderation-layout .panel.full {
  grid-column: auto;
}
.moderation-layout .admin-row {
  grid-template-columns: 1fr;
}
.moderation-layout .admin-inline-form {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: end;
}
.moderation-layout .admin-inline-form label.textarea-field {
  grid-column: 1 / -1;
}
.admin-layout .panel.full {
  grid-column: auto;
}
.admin-nav {
  grid-column: auto;
  align-self: start;
  position: sticky;
  top: 94px;
}
.admin-nav .side-nav a.active {
  background: var(--yellow);
  color: #080812;
}
.admin-main {
  display: grid;
  gap: 18px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.dashboard-card {
  padding: 18px;
  border: 1px solid #d8e0ea;
  border-radius: 4px;
  background: linear-gradient(180deg, #ffffff, #eef4fb);
  box-shadow: 0 8px 18px rgba(0, 0, 51, 0.1);
}
.dashboard-card strong {
  display: block;
  font-size: 2.2rem;
  color: #003f95;
}
.dashboard-card span {
  color: #4e5f73;
  font-weight: 900;
  text-transform: capitalize;
}
.admin-list {
  display: grid;
  gap: 12px;
}
.admin-list.compact {
  gap: 8px;
}
body.admin-dense .admin-layout {
  gap: 12px;
  padding-block: 14px 18px;
}
body.admin-dense .admin-main,
body.admin-dense .admin-list,
body.admin-dense .moderation-layout {
  gap: 8px;
}
body.admin-dense .panel,
body.admin-dense .admin-row,
body.admin-dense .admin-details,
body.admin-dense .dashboard-card {
  padding: 10px;
}
body.admin-dense .section-heading {
  margin-bottom: 8px;
  padding-top: 8px;
}
body.admin-dense input,
body.admin-dense select,
body.admin-dense textarea,
body.admin-dense .button,
body.admin-dense .side-nav a {
  min-height: 34px;
  padding: 7px 10px;
}
body.admin-dense .admin-inbox-item summary,
body.admin-dense .text-admin-row summary,
body.admin-dense .role-row-header,
body.admin-dense .user-management-row {
  padding: 8px 10px;
}
body.admin-dense .admin-inbox-row {
  margin: 8px;
}
.user-admin-list {
  margin-top: 18px;
}
.admin-user-search-form {
  grid-template-columns: minmax(220px, 520px) auto;
  align-items: end;
  justify-content: start;
}
.admin-user-filter-form {
  margin-top: 12px;
  grid-template-columns: minmax(240px, 380px) minmax(240px, 380px) auto;
  align-items: end;
  justify-content: start;
}
.admin-user-search-form .button,
.admin-user-filter-form .button {
  width: auto;
  white-space: nowrap;
}
.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid #d8e0ea;
  border-radius: 4px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}
.admin-row h3 {
  margin: 0 0 6px;
}
.moderation-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}
.moderation-edit-details summary {
  list-style: none;
}
.moderation-edit-details summary::-webkit-details-marker {
  display: none;
}
.moderation-edit-details[open] {
  padding-top: 10px;
}
.moderation-edit-details form {
  margin-top: 10px;
  border: 1px solid #d8e0ea;
  border-radius: 4px;
  padding: 12px;
  background: #f8fbff;
}
.moderation-actions.compact-moderation-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  justify-items: stretch;
}
.user-management-row {
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 44px;
  padding: 8px 10px;
}
.user-management-row > div:first-child {
  display: grid;
  grid-template-columns: minmax(150px, 230px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.user-management-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.user-management-actions .moderation-logbook-trigger,
.user-management-actions .user-expand-toggle {
  width: auto;
  min-width: 112px;
}
.user-management-row h3 {
  margin: 0;
  min-width: 0;
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-management-row .meta {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-management-row .notice {
  display: none;
}
.user-management-row .user-expand-toggle {
  min-height: 34px;
  padding: 7px 10px;
}
.user-admin-modal .content-modal-panel {
  width: min(980px, 96vw);
}
.user-management-row .user-admin-form[hidden] {
  display: none;
}
.user-management-row.expanded {
  gap: 12px;
  padding: 14px;
}
.user-management-row.expanded > div:first-child {
  grid-template-columns: minmax(0, 1fr) auto;
}
.user-management-row.expanded h3,
.user-management-row.expanded .meta {
  white-space: normal;
}
.user-management-row.expanded .meta,
.user-management-row.expanded .notice {
  grid-column: 1 / -1;
}
.user-management-row.expanded .notice {
  display: block;
}
.admin-inline-form,
.user-admin-form {
  display: grid;
  gap: 14px;
}
.admin-user-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #f8fbff;
}
.admin-user-block h4 {
  margin: 0;
  color: #000051;
}
.admin-user-block .description {
  margin: 0;
}
.admin-flag-list,
.admin-ban-history {
  display: grid;
  gap: 8px;
}
.admin-flag-row {
  display: grid;
  grid-template-columns: minmax(210px, 290px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  background: #ffffff;
}
.admin-flag-meta {
  display: grid;
  gap: 4px;
  color: #4e5f73;
  font-weight: 800;
}
.admin-flag-meta strong {
  color: #101827;
}
.admin-flag-row input[readonly],
.admin-flag-row textarea[readonly] {
  background: #eef4fb;
}
.admin-flag-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: end;
  flex-wrap: wrap;
}
.danger-choice {
  color: #8a0000;
  font-weight: 900;
}
.ban-details .form-grid {
  margin-top: 12px;
}
.admin-ban-history p {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #c8d5e4;
  border-radius: 8px;
  background: #ffffff;
  color: #34465c;
  font-weight: 800;
}
.admin-inline-form textarea {
  min-height: 84px;
}
.admin-details {
  padding: 12px;
  border: 1px solid #d8e0ea;
  border-radius: 4px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}
.admin-details summary {
  cursor: pointer;
  font-weight: 900;
}
.admin-details summary span {
  margin-left: 8px;
  color: #4e5f73;
  font-weight: 700;
}
.admin-inline-advanced {
  display: grid;
  gap: 12px;
}
.admin-inline-advanced summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.admin-inline-advanced-body {
  display: grid;
  gap: 14px;
}
.admin-inbox-panel {
  display: grid;
  align-self: start;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 8px;
}
.admin-inbox-panel .section-heading {
  margin-bottom: 0;
  padding-bottom: 0;
}
.admin-inbox-list {
  align-self: start;
  gap: 6px;
}
.admin-inbox-item.is-focused {
  border-color: #ffd23f;
  box-shadow: 0 0 0 2px rgba(255, 210, 63, 0.35);
}
.admin-inbox-item {
  padding: 0 !important;
  overflow: hidden;
}
.admin-inbox-item summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 0;
  padding: 9px 12px;
  background: linear-gradient(180deg, #ffffff, #eef4fb);
  border-left: 4px solid #0072f0;
}
.admin-inbox-item:not([open]) summary {
  margin: 0;
}
.admin-inbox-item summary span {
  margin-left: 0;
}
.admin-inbox-item[open] summary {
  border-bottom: 1px solid #d8e0ea;
}
.admin-inbox-item.is-open summary {
  border-left-color: #0072f0;
  background: #eef5ff;
}
.admin-inbox-item.is-processing summary {
  border-left-color: #ffd23f;
  background: #fff9dc;
}
.admin-inbox-item.is-processed summary {
  border-left-color: #c8d5e4;
  background: linear-gradient(180deg, #ffffff, #f3f6fa);
}
.admin-inbox-summary-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.admin-inbox-summary-main strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-inbox-item.is-open .admin-inbox-summary-main strong {
  color: #001b42;
  font-weight: 950;
}
.admin-inbox-item.is-processing .admin-inbox-summary-main strong {
  color: #302200;
  font-weight: 900;
}
.admin-inbox-item.is-processed .admin-inbox-summary-main strong {
  color: #4e5f73;
  font-weight: 750;
}
.admin-inbox-kind {
  flex: 0 0 auto;
  min-width: 128px;
  margin-left: 0 !important;
  color: #a40000 !important;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.admin-inbox-summary-meta {
  display: inline-flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
  white-space: nowrap;
}
.admin-inbox-summary-meta time {
  color: #4e5f73;
  font-size: 0.84rem;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 4px 8px;
  border: 1px solid #c8d5e4;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 950;
}
.status-pill.open {
  border-color: #ffd23f;
  background: #fff6c8;
  color: #4d3500;
}
.status-pill.busy {
  border-color: #0072f0;
  background: #e7f1ff;
  color: #003f95;
}
.status-pill.done {
  border-color: #0b7a35;
  background: #e8f7ee;
  color: #0b5c2b;
}
.admin-inbox-row {
  margin: 8px;
}
.admin-inbox-content {
  display: grid;
  gap: 12px;
}
.admin-inbox-content-preview {
  padding: 14px;
  border: 1px solid #c8d5e4;
  border-radius: 4px;
  background: #ffffff;
  color: #102033;
  line-height: 1.55;
}
.registration-review-preview {
  display: grid;
  gap: 8px;
}
.registration-review-preview p {
  margin: 0;
}
.registration-review-preview .quoted-content {
  padding: 10px 12px;
  border: 1px solid #c8d5e4;
  border-left: 4px solid #0072f0;
  border-radius: 4px;
  background: #f8fbff;
}
.registration-ip-flags {
  margin: 0;
}
.registration-ip-flags ul {
  margin: 8px 0 0;
  padding-left: 20px;
}
.registration-ip-flags li + li {
  margin-top: 4px;
}
.admin-contact-thread-body {
  padding: 0;
  max-height: 500px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.admin-contact-thread-body .contact-message-bubble {
  max-width: min(840px, 100%);
}
.role-matrix,
.role-row {
  display: grid;
  gap: 14px;
}
.admin-role-add-form {
  grid-template-columns: minmax(220px, 420px) auto;
  align-items: end;
  justify-content: start;
}
.admin-role-add-form .button {
  width: auto;
  align-self: end;
  white-space: nowrap;
}
.role-admin-list {
  margin-top: 18px;
}
.role-edit-form {
  padding: 14px;
  gap: 18px;
}
.role-edit-form > .field.full {
  margin-bottom: 4px;
}
.role-row-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}
.role-row {
  padding: 14px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #f8fbff;
}
.permission-group {
  display: grid;
  gap: 10px;
  margin: 4px 0 0;
  padding: 12px;
  border: 1px solid #c9d4e2;
  border-radius: 8px;
  background: #ffffff;
}
.permission-group legend {
  padding: 0 6px;
  color: #003f95;
  font-weight: 900;
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px 18px;
  padding-top: 6px;
}
.upload-extension-settings {
  gap: 8px;
}
.upload-extension-settings legend {
  padding: 0 6px;
}
.upload-extension-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 4px;
}
.upload-extension-option {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-width: 96px;
  padding: 7px 10px;
  border: 1px solid #cbd6e3;
  border-radius: 6px;
  background: #f8fbff;
  color: #071123;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.upload-extension-option input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  flex: 0 0 auto;
}
.upload-extension-option span {
  display: inline-block;
}
.permission-table-wrap {
  overflow-x: auto;
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  background: #ffffff;
}
.permission-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}
.permission-table th,
.permission-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #d8e0ea;
  border-right: 1px solid #e4ebf3;
  vertical-align: top;
  text-align: left;
}
.permission-table th:last-child,
.permission-table td:last-child {
  border-right: 0;
}
.permission-table tr:last-child th,
.permission-table tr:last-child td {
  border-bottom: 0;
}
.permission-table thead th {
  background: linear-gradient(180deg, #eef4fb, #e5edf7);
  color: #000033;
  font-size: 0.86rem;
  font-weight: 950;
  text-transform: uppercase;
}
.permission-table tbody th {
  width: 150px;
  background: #f8fbff;
  color: #003f95;
  font-weight: 950;
}
.permission-table td {
  min-width: 145px;
}
.permission-table-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: #07101f;
  font-weight: 850;
  line-height: 1.25;
}
.permission-table-check + .permission-table-check {
  margin-top: 8px;
}
.permission-table-check input {
  flex: 0 0 auto;
  width: auto;
  min-height: 0;
  margin-top: 2px;
}
.permission-table-empty {
  color: #8190a3;
  font-weight: 900;
}
.security-settings-block {
  display: grid;
  gap: 12px;
}
.security-settings-block h3 {
  margin: 0;
  color: #000051;
}
.security-settings-table {
  min-width: 980px;
}
.security-settings-table label {
  display: grid;
  gap: 6px;
  font-weight: 950;
}
.security-settings-table input {
  width: 100%;
  min-height: 38px;
}
.security-settings-table td.muted {
  color: #6d7b8d;
  font-weight: 850;
  background: #f7f9fc;
}
.security-checkbox-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 18px;
}
.security-checkbox-columns .checkbox {
  min-height: 34px;
  align-items: center;
}
.security-integrity-actions {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #d7e0ec;
}
.security-integrity-actions .integrity-check-form {
  display: grid;
  grid-template-columns: minmax(190px, max-content) minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
}
.security-integrity-actions .button.compact {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.92rem;
  white-space: nowrap;
}
.security-integrity-actions .description {
  margin: 0;
}
.migration-health-box {
  display: grid;
  gap: 6px;
  border: 1px solid #c6d4ea;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  background: rgba(239, 245, 255, 0.95);
}
.migration-health-box.success {
  border-color: #6abf69;
  background: rgba(235, 249, 236, 0.96);
}
.migration-health-box.warning {
  border-color: #f0c54d;
  background: rgba(255, 247, 220, 0.97);
}
.migration-health-title {
  margin: 0;
  font-weight: 900;
  color: #000051;
}
.permission-subgroup {
  display: grid;
  gap: 8px;
  padding-top: 6px;
}
.permission-subgroup + .permission-subgroup {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid #d7e0ec;
}
.permission-subgroup h4 {
  margin: 0;
  color: #000033;
}
.role-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.role-delete-note {
  color: #4e5f73;
  font-weight: 800;
}
.forum-management-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 44px;
  padding: 8px 10px;
}
.forum-management-summary,
.management-row {
  display: grid;
  grid-template-columns: minmax(160px, 260px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.management-row {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #ffffff;
}
.forum-management-summary strong,
.forum-management-summary span,
.management-row strong,
.management-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.forum-management-summary span,
.management-row span {
  color: #4e5f73;
  font-weight: 800;
}
.management-row-actions {
  display: flex;
  justify-content: end;
  gap: 8px;
  flex-wrap: wrap;
}
.forum-expand-toggle {
  min-height: 34px;
  padding: 7px 10px;
}
.forum-management-fields[hidden] {
  display: none;
}
.forum-management-row.expanded {
  gap: 12px;
  padding: 14px;
}
.forum-management-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.forum-management-fields .field.full {
  grid-column: 1 / -1;
}
.management-add-toggle {
  width: fit-content;
  margin-bottom: 14px;
}
.management-add-form[hidden],
.management-details summary[hidden] {
  display: none;
}
.management-add-form {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #f8fbff;
}
.management-details {
  border: 0;
  padding: 0;
  background: transparent;
}
.management-details[open] {
  padding: 14px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #f8fbff;
}
.text-admin-list {
  margin-top: 16px;
}
.admin-page-preview-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.admin-page-preview-grid .description {
  grid-column: 1 / -1;
}
.admin-text-preview-default,
.admin-text-preview-full {
  grid-column: 1 / -1;
}
.admin-text-preview-half {
  grid-column: span 6;
}
.admin-text-preview-third {
  grid-column: span 4;
}
.admin-page-preview-grid .text-admin-row[open] {
  grid-column: 1 / -1;
}
.admin-page-preview-grid .text-admin-row summary {
  grid-template-columns: 24px minmax(0, 1fr);
}
.admin-page-preview-grid .text-admin-meta {
  grid-column: 2;
}
.admin-header-info {
  margin-top: 16px;
}
.text-admin-row {
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}
.text-admin-row summary {
  display: grid;
  grid-template-columns: 24px minmax(110px, 150px) minmax(0, 1fr) minmax(220px, 360px);
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
}
.text-admin-row summary::-webkit-details-marker {
  display: none;
}
.text-admin-row summary::before {
  content: ">";
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #c9d4e2;
  border-radius: 8px;
  color: #003f95;
  font-weight: 900;
  grid-column: 1;
  justify-self: start;
  transition: transform 0.15s ease;
}
.text-admin-row[open] summary::before {
  transform: rotate(90deg);
}
.text-page-badge {
  grid-column: 2;
  padding: 5px 8px;
  border-radius: 8px;
  background: #f0f5fb;
  color: #003f95;
  font-weight: 900;
  text-align: center;
}
.text-admin-row summary strong,
.text-admin-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.text-admin-meta {
  color: #4e5f73;
  font-weight: 800;
}
.text-admin-row[open] summary {
  border-bottom: 1px solid #d8e0ea;
  background: #f8fbff;
}
.text-admin-edit-form {
  padding: 14px;
}
.text-advanced-settings {
  grid-column: 1 / -1;
  margin-top: 4px;
}
.text-advanced-settings .form-grid {
  margin-top: 12px;
}
.navigation-admin-list {
  margin-top: 16px;
}
.navigation-admin-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(160px, 1fr) minmax(180px, 1.4fr) 110px auto auto;
  gap: 10px;
  align-items: end;
}
.navigation-active-toggle {
  align-self: center;
  margin-bottom: 10px;
}
.info-module-form {
  margin-top: 12px;
}
.admin-switches {
  margin-top: 18px;
}
.admin-main-switches {
  display: grid;
  gap: 16px;
  margin-top: 22px;
  padding: 18px;
  border: 2px solid #000033;
  border-radius: 8px;
  background: #ffffff;
}
.main-switch-heading {
  margin-bottom: 0;
}
.main-switch-section {
  display: grid;
  gap: 12px;
}
.main-switch-section h3 {
  margin: 0;
  color: #000033;
}
.main-switch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.main-switch-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.main-switch-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 2px solid #d7e0ec;
  border-radius: 8px;
  background: #f8fbff;
}
.main-switch-group-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px solid #d7e0ec;
}
.main-switch-group-title span {
  color: #990000;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.main-switch-group-title small {
  color: #405269;
  font-weight: 800;
  text-align: right;
}
.main-switch-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  min-height: 104px;
  padding: 16px;
  border: 2px solid #c9d4e2;
  border-left-width: 8px;
  border-radius: 8px;
  background: #f8fbff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.main-switch-card:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 51, .14);
  transform: translateY(-1px);
}
.main-switch-card.sub-switch {
  min-height: 86px;
  margin-left: 16px;
  border-left-width: 4px;
}
.main-switch-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.main-switch-card strong {
  display: block;
  color: #000033;
  font-size: 1.05rem;
}
.main-switch-card small {
  display: block;
  margin-top: 4px;
  color: #405269;
  font-weight: 800;
  line-height: 1.4;
}
.main-switch-card.is-on {
  border-color: #1f8f4d;
  background: #f1fff6;
}
.main-switch-card.is-off {
  border-color: #b40000;
  background: #fff5f5;
}
.main-switch-card.maintenance.is-off {
  border-color: #b40000;
  background: #fff8dc;
}
.main-switch-card.maintenance.is-on {
  border-color: #1f8f4d;
  background: #f8fbff;
}
.switch-visual {
  position: relative;
  width: 58px;
  height: 32px;
  border-radius: 999px;
  background: #b40000;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 51, .18);
}
.switch-visual::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 51, .25);
}
.main-switch-card input:checked + .switch-visual {
  background: #1f8f4d;
}
.main-switch-card input:checked + .switch-visual::after {
  transform: translateX(26px);
}
.main-switch-card.maintenance input:checked + .switch-visual {
  background: #b40000;
}
.main-switch-card.maintenance input:not(:checked) + .switch-visual {
  background: #1f8f4d;
}
@media (max-width: 720px) {
  .main-switch-group-title {
    display: grid;
  }
  .main-switch-group-title small {
    text-align: left;
  }
  .main-switch-card.sub-switch {
    margin-left: 0;
  }
}
.search-admin {
  margin-bottom: 20px;
}
.security-list { display: grid; gap: 10px; }
.security-list li { line-height: 1.55; }
.qr-code {
  display: block;
  width: min(100%, 280px);
  height: auto;
  margin: 18px 0;
  border: 8px solid white;
  border-radius: 8px;
}
.danger-details summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #710000;
  font-size: 1.25rem;
  font-weight: 900;
}
.danger-details summary::marker { content: ""; }
.danger-details summary::before {
  content: ">";
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid #710000;
  border-radius: 8px;
  font-size: 1rem;
  transition: transform 0.15s ease;
}
.danger-details[open] summary::before { transform: rotate(90deg); }
.danger-details[open] summary { margin-bottom: 12px; }
.site-footer {
  padding-block: 36px 44px;
  background: #000024;
  border-top: 1px solid var(--line);
  color: #cbd4ee;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.footer-col strong { color: #f4f6ff; }
.footer-text {
  margin-top: 8px;
  color: #cbd4ee;
  line-height: 1.6;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 16px;
  color: #aebbe2;
  font-size: 0.95rem;
}
.footer-bottom a {
  color: var(--ink);
  text-decoration: none;
}
.footer-bottom a:hover,
.footer-bottom a:focus {
  text-decoration: underline;
}
.footer-logo {
  display: block;
  width: min(100%, 270px);
  height: auto;
  border-radius: 8px;
}
.branding-admin-panel {
  gap: 14px;
}
.branding-admin-panel legend {
  padding: 0 6px;
}
.branding-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 12px;
  align-items: start;
}
.branding-admin-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cbd6e4;
  border-radius: 6px;
  background: #f8fbff;
}
.branding-admin-group:first-child {
  grid-row: span 2;
}
.branding-admin-heading {
  display: grid;
  gap: 3px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d8e0ea;
}
.branding-admin-heading h3,
.branding-admin-heading p {
  margin: 0;
}
.branding-choice-grid,
.branding-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.branding-choice-grid .branding-choice-field:first-child {
  grid-column: 1 / -1;
}
.branding-choice-field select,
.branding-upload-grid select,
.branding-upload-grid input {
  min-height: 38px;
}
.branding-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 2px;
}
.branding-preview-card {
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid #cbd6e4;
  border-radius: 4px;
  padding: 10px;
  background: #f6f9fd;
  color: #102033;
}
.branding-preview-card strong {
  display: block;
}
.branding-preview-path {
  display: block;
  margin-top: 2px;
  color: #4e5f73;
  font-size: 0.82rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.branding-preview-card img {
  display: block;
  width: 100%;
  height: 92px;
  object-fit: contain;
  border: 1px solid #d8e0ea;
  border-radius: 4px;
  background: #000033;
}
.branding-preview-card > span {
  display: grid;
  place-items: center;
  min-height: 92px;
  border: 1px dashed #9fb0c4;
  color: #50627a;
  font-weight: 800;
}
.legal-page-body {
  color: #34465c;
  line-height: 1.7;
}
.legal-page-body p:first-child {
  margin-top: 0;
}
.registration-legal a {
  color: #003f95;
}
.registration-legal {
  align-items: flex-start;
}
.registration-legal input {
  margin-top: 3px;
  flex: 0 0 auto;
}
.registration-legal-copy {
  display: inline;
  font-weight: 800;
  line-height: 1.45;
}
.registration-legal-copy a {
  display: inline;
  white-space: normal;
}
.login-state { color: var(--ink); font-weight: 800; }
.flash-section {
  padding-inline: clamp(16px, 4vw, 54px);
}
.flash {
  border-radius: 8px;
  padding: 14px 16px;
  font-weight: 800;
}
.flash + .flash {
  margin-top: 10px;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 22px clamp(16px, 4vw, 54px) 22px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-left: 6px solid var(--yellow);
  border-radius: 8px;
  background: linear-gradient(90deg, var(--deep-c), var(--deep-b));
  color: var(--muted);
  box-shadow: 0 14px 34px rgba(0, 0, 20, 0.26);
}
.breadcrumbs a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}
.breadcrumbs a:hover,
.breadcrumbs a:focus {
  text-decoration: underline;
}
.breadcrumbs strong {
  color: var(--yellow);
}
.breadcrumb-prefix {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--yellow);
  color: #080812;
  font-size: 1.3rem;
  font-weight: 900;
}
.breadcrumb-separator {
  color: var(--yellow);
  font-size: 1.2rem;
  font-weight: 900;
}
.flash.success { background: #ddf8e8; color: #073d1b; }
.flash.error { background: #ffe2e2; color: #710000; }
.flash.warning { background: #fff3c4; color: #4a3100; border: 1px solid #ffd24a; }
.flash.info { background: #eaf2ff; color: #001f5c; border: 1px solid #b9cff5; }

/* Modern visual system pass */
.site-header {
  background:
    linear-gradient(180deg, rgba(9, 16, 68, 0.9), rgba(2, 5, 28, 0.92)),
    rgba(0, 0, 51, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 30px rgba(0, 0, 20, 0.28);
  backdrop-filter: blur(14px);
}

.site-nav a,
.account-button,
.notification-button {
  border-radius: 6px;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}

.account-button,
.notification-button {
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02)), rgba(0, 0, 51, 0.72);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 8px 20px rgba(0, 0, 20, 0.2);
}

.account-button:hover,
.notification-button:hover,
.account-button:focus-visible,
.notification-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 211, 77, 0.65);
}

.button,
.nav-toggle {
  border-radius: 6px;
  border-color: rgba(0, 0, 51, 0.16);
  background: linear-gradient(180deg, #ffe27c, #ffd34d);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 7px 16px rgba(0, 0, 20, 0.12);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.button:hover,
.button:focus-visible,
.nav-toggle:hover,
.nav-toggle:focus-visible {
  filter: none;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 12px 24px rgba(0, 0, 20, 0.18);
}

.button.dark,
.notification-mark-all-form button {
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.03)), #060a39;
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.button.ghost {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.button.ghost.dark,
.page-hero .button.ghost.dark.hero-action-button {
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.03)), #060a39;
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.page-hero .hero-status-button span {
  color: #ffffff;
}

.panel,
.profile-card,
.forum-message,
.event-card,
.project-card,
.useful-link-card,
.home-module-card,
.profile-list-item,
.forum-row,
.post-row,
.forum-main .list > .list-item,
.event-detail-card,
.project-state-report,
.project-update,
.project-gallery-section,
.project-parts,
.project-update-description {
  border-color: var(--surface-line);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,250,255,0.97)),
    var(--surface-raised);
  box-shadow: var(--shadow-soft);
}

.panel,
.project-state-report,
.event-detail-card,
.forum-main > .panel,
.events-main > .panel,
.projects-overview > .panel,
.admin-layout .panel {
  position: relative;
  overflow: hidden;
}

.section-heading,
.forum-category-header,
.project-report-header,
.event-detail-header,
.message-title-band {
  position: relative;
}

.section-heading::before,
.forum-category-header::before,
.project-report-header::before,
.event-detail-header::before {
  background: var(--metal-strip);
  height: 4px;
}

.card-selected,
.event-card:hover,
.event-card:focus-within,
.project-card:hover,
.project-card:focus-within,
.useful-link-card:hover,
.useful-link-card:focus-within,
.home-module-card:hover,
.home-module-card:focus-within,
.profile-list-item:hover,
.profile-list-item:focus-within,
.forum-row:hover,
.forum-row:focus-within,
.post-row:hover,
.post-row:focus-within,
.forum-main .list > .list-item:hover,
.forum-main .list > .list-item:focus-within {
  border-color: var(--accent-blue);
  border-left-color: var(--yellow);
  background:
    linear-gradient(180deg, #ffffff, #f4f9ff),
    var(--surface-selected);
  box-shadow: var(--shadow-selected);
}

.tag,
.role-pill,
.status-pill,
.project-card-meta span,
.project-card-dates span,
.project-card-stats span,
.project-facts span,
.event-detail-summary > span,
.event-info-grid div {
  border-radius: 6px;
  border-color: #c8d6e7;
  background: #f3f7fc;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.breadcrumbs {
  min-height: 42px;
  gap: 7px;
  margin: 18px clamp(16px, 4vw, 54px);
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.18);
  border-left: 4px solid var(--yellow);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
    rgba(5, 8, 32, 0.78);
  color: #d5e1f0;
  box-shadow: 0 10px 24px rgba(0,0,20,0.22);
  backdrop-filter: blur(10px);
}

.breadcrumbs a {
  color: #f5f9ff;
  font-weight: 850;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus {
  color: var(--yellow);
  text-decoration: none;
}

.breadcrumbs strong {
  color: var(--yellow);
}

.breadcrumb-prefix {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 1.05rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

.breadcrumb-separator {
  color: rgba(255, 211, 77, 0.78);
  font-size: 1rem;
}

.forum-message {
  grid-template-columns: 178px minmax(0, 1fr);
  border-radius: 6px;
}

.message-author {
  max-width: 178px;
  padding: 12px 10px;
  gap: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
    linear-gradient(155deg, var(--author-dark-b), var(--author-dark-a));
  border-right: 1px solid rgba(0, 114, 240, 0.28);
  color: #f7fbff;
}

.message-author::before {
  content: "";
  display: block;
  height: 3px;
  margin: -12px -10px 2px;
  background: var(--metal-strip);
}

.message-author > strong,
.message-author-name-link {
  color: #ffffff;
  line-height: 1.25;
}

.message-author span,
.message-author small {
  color: #c9d7e8;
  font-size: 0.86rem;
  line-height: 1.25;
}

.message-avatar {
  width: 82px;
  border-radius: 6px;
  border: 2px solid var(--yellow);
  box-shadow: 0 10px 22px rgba(0,0,20,0.28);
}

.message-author .emoji-row {
  gap: 6px;
  margin-top: 4px;
}

.message-author .emoji-form {
  gap: 5px;
}

.message-author .emoji-form .button,
.message-author .message-tool-link,
.message-author .content-report summary,
.message-author .report-details summary {
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 5px;
}

.message-author .button.dark,
.message-author .button.ghost.dark,
.message-author .message-tool-link {
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02)), rgba(0, 0, 51, 0.74);
  border-color: rgba(255,255,255,0.18);
  color: #ffffff;
}

.message-author .emoji-totals .tag {
  background: rgba(255,255,255,0.96);
  border-color: rgba(255,211,77,0.7);
}

.message-author .moderation-trigger {
  border-radius: 5px;
  background: linear-gradient(180deg, #ffe27c, #ffd23f);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65), 0 8px 16px rgba(0,0,20,0.2);
}

.message-moderation-content {
  border-radius: 6px;
}

.message-content {
  padding: 18px;
}

.message-title-band {
  margin: -18px -18px 18px;
  padding: 16px 18px 14px;
  background: linear-gradient(180deg, #f1f7ff, #e7f0fb);
  border-bottom: 1px solid #c8d6e7;
}

.message-title-band::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--metal-strip);
}

.forum-quote {
  border-left-color: var(--accent-blue);
  background: linear-gradient(180deg, #f7fbff, #eef5ff);
}
.resend-form {
  margin-top: 16px;
  border-top: 1px solid #d8e0ea;
  padding-top: 16px;
}

@media (max-width: 980px) {
  .site-header { grid-template-columns: minmax(0, 1fr) auto auto; }
  .brand { min-width: 0; }
  .partner-logo { display: none; }
  .nav-toggle { display: inline-flex; grid-column: 2; }
  .account-actions { grid-column: 3; display: flex; justify-self: end; }
  .site-nav { grid-column: 1 / -1; display: none; justify-content: start; flex-wrap: wrap; }
  .site-nav.open { display: flex; }
  .cookie-banner-inner { grid-template-columns: 1fr; }
  .cookie-banner-actions { justify-content: start; }
  main > .page-hero + *,
  main > .wide-section,
  main > .content-grid,
  main > .forum-layout,
  main > .events-layout,
  main > .projects-layout,
  main > .admin-layout {
    margin-top: 14px;
  }
  .panel, .panel.half, .panel.third, .admin-text-preview-half, .admin-text-preview-third, .forum-sidebar, .forum-main { grid-column: 1 / -1; }
  .hero-layout { grid-template-columns: 1fr; }
  .hero-title-row { grid-template-columns: 1fr; }
  .forum-message { grid-template-columns: 1fr; }
  .event-detail-message.event-detail-card,
  .event-detail-content-grid {
    grid-template-columns: 1fr;
  }
  .message-author {
    grid-template-columns: auto 1fr;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid #d8e0ea;
    max-width: none;
    padding: 12px;
  }
  .message-author::before {
    grid-column: 1 / -1;
    margin: -12px -12px 0;
  }
  .message-author .moderation-trigger,
  .message-author .emoji-row,
  .message-author .moderation-box,
  .message-author .compact-moderation-box,
  .message-moderation-menu {
    grid-column: 1 / -1;
  }
  .message-avatar { width: 86px; }
  .footer-grid { grid-template-columns: 1fr; }
  .admin-layout {
    grid-template-columns: 1fr;
    padding-inline: clamp(12px, 3vw, 24px);
  }
  .admin-nav {
    position: static;
  }
  .admin-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header { gap: 10px; padding: 10px 12px; }
  .brand-logo-combined { width: min(58vw, 260px); }
  .site-nav {
    gap: 6px;
  }
  .site-nav a {
    width: 100%;
    justify-content: flex-start;
  }
  .hero { min-height: 62vh; padding: 22px 12px; }
  .hero h1, .page-hero h1 { font-size: 1.9rem; line-height: 1.05; }
  .page-hero {
    padding-inline: 14px;
  }
  .panel {
    padding: 14px;
  }
  .section-heading {
    gap: 10px;
  }
  .quick-forum, .forum-row, .post-row, .section-heading { display: grid; }
  .forum-category-header { display: grid; }
  .forum-stats, .form-grid, .admin-role-add-form, .admin-user-search-form, .admin-user-filter-form, .project-filter-form, .project-search-form, .project-sort-form, .mod-grid, .moderation-actions, .permission-grid, .role-actions-grid, .forum-management-summary, .forum-management-fields, .management-row, .text-admin-row summary, .admin-flag-row, .navigation-admin-row, .event-card, .event-detail-card, .event-info-grid, .event-meta-grid, .event-detail-summary, .events-layout, .projects-layout, .project-card, .project-report-header, .project-card-dates, .project-state-reports, .project-state-report .project-aspect-read-grid, .project-aspect-form-grid, .project-aspect-read-grid, .project-change-form-grid, .project-change-grid { grid-template-columns: 1fr; }
  .events-sidebar, .projects-sidebar { position: static; }
  .sidebar-tools-panel {
    padding: 10px 12px;
  }
  .sidebar-tools-panel > summary {
    min-height: 22px;
  }
  .sidebar-tools-summary h2 {
    font-size: 1rem;
  }
  .sidebar-tools-body {
    gap: 10px;
    margin-top: 10px;
  }
  .events-sidebar .compact-form,
  .projects-sidebar .compact-form {
    gap: 10px;
  }
  .event-card {
    padding: 10px;
    gap: 8px;
  }
  .event-card-poster-aside {
    max-width: 82px;
  }
  .event-card-poster-aside .event-detail-poster {
    width: 82px;
    height: 104px;
  }
  .event-card .event-date-cube {
    min-width: 58px;
    min-height: 58px;
    font-size: 0.95rem;
  }
  .event-card .event-detail-header,
  .event-card .event-detail-main {
    gap: 10px;
  }
  .event-card .event-detail-section h3,
  .event-card .event-detail-section h4,
  .event-card-title h3,
  .project-card h3 {
    font-size: 1.05rem;
  }
  .event-card .event-info-grid div {
    padding: 10px;
  }
  .project-card {
    grid-template-columns: 72px minmax(0, 1fr);
    padding: 9px;
    gap: 9px;
  }
  .project-card-thumb {
    width: 72px;
    height: 60px;
  }
  .project-card-compact {
    gap: 4px;
  }
  .project-card-expanded {
    display: none !important;
  }
  .event-card-actions { grid-column: auto; }
  .event-detail-header { align-items: flex-start; }
  .event-date-badge { white-space: normal; }
  .branding-admin-layout,
  .branding-choice-grid,
  .branding-upload-grid {
    grid-template-columns: 1fr;
  }
  .branding-admin-group:first-child {
    grid-row: auto;
  }
  .event-info-grid div.wide { grid-column: auto; }
  .profile-cover,
  .profile-body,
  .activity-grid,
  .profile-fields,
  .social-fields { grid-template-columns: 1fr; }
  .text-page-badge {
    grid-column: 1;
    margin-left: 0;
    text-align: left;
  }
  .admin-inbox-item summary {
    grid-template-columns: 1fr;
  }
  .admin-inbox-summary-main {
    display: grid;
    gap: 6px;
  }
  .admin-inbox-summary-main strong {
    white-space: normal;
  }
  .admin-inbox-summary-meta {
    justify-content: start;
    white-space: normal;
  }
}

@media (max-width: 820px) {
  .profile-body {
    grid-template-columns: 1fr;
  }
  .profile-fields,
  .social-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  main {
    padding-top: 58px;
  }

  .site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1100;
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-height: 58px;
    padding: 7px 12px;
    gap: 8px;
    border-radius: 0;
  }

  .has-admin-bar .site-header {
    top: 28px;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo-combined {
    width: clamp(170px, 34vw, 260px);
    max-height: 44px;
    object-fit: contain;
  }

  .partner-logo {
    display: none;
  }

  .nav-toggle {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    min-height: 40px;
    padding: 0;
    font-size: 0;
    line-height: 1;
    border-radius: 6px;
    background: linear-gradient(180deg, #ffffff, #eaf2fb);
  }

  .account-actions {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }

  .account-button,
  .notification-button,
  .account-actions > .button {
    min-height: 40px;
    padding: 7px 10px;
    border-radius: 6px;
    white-space: nowrap;
  }

  .account-button small {
    display: none;
  }

  .site-nav {
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    z-index: 1090;
    grid-column: auto;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 10px 12px 12px;
    max-height: calc(100vh - 58px);
    overflow: auto;
    background:
      linear-gradient(180deg, rgba(14, 24, 78, 0.98), rgba(2, 5, 28, 0.98));
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 34px rgba(0, 0, 20, 0.32);
  }

  .has-admin-bar .site-nav {
    top: 86px;
    max-height: calc(100vh - 86px);
  }

  .site-nav.open {
    display: grid;
  }

  .site-nav a {
    width: 100%;
    min-height: 38px;
    justify-content: flex-start;
    padding: 8px 10px;
    border-radius: 6px;
  }

  .mobile-auth-links {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }

  .mobile-auth-links .button {
    width: 100%;
  }

  .account-actions.guest-actions {
    display: none;
  }

  .quick-forum,
  .wide-section,
  .content-grid,
  .forum-layout,
  .events-layout,
  .projects-layout,
  .admin-layout {
    padding-inline: clamp(10px, 2.2vw, 22px);
  }

  .page-hero {
    padding: 14px clamp(14px, 2.5vw, 28px);
  }

  .page-hero-inner {
    gap: 12px;
  }

  .page-hero h1 {
    font-size: clamp(1.55rem, 3.4vw, 2.1rem);
    line-height: 1.05;
  }

  .page-hero p,
  .page-hero-subtitle {
    font-size: 1rem;
    line-height: 1.35;
  }

  .panel,
  .forum-main,
  .forum-sidebar,
  .event-card,
  .project-card,
  .profile-card,
  .admin-card {
    padding: 14px;
  }

  main > .page-hero + *,
  main > .wide-section,
  main > .content-grid,
  main > .forum-layout,
  main > .events-layout,
  main > .projects-layout,
  main > .admin-layout {
    margin-top: 12px;
  }

  .forum-message {
    grid-template-columns: 1fr;
  }

  .message-author {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 10px;
    max-width: none;
    min-width: 0;
    padding: 8px 10px;
    border-right: 0;
    border-bottom: 1px solid rgba(200, 214, 231, 0.9);
  }

  .message-author::before {
    grid-column: 1 / -1;
    height: 2px;
    margin: -8px -10px 3px;
  }

  .message-author-name-link,
  .message-author > strong {
    grid-column: 2;
    align-self: end;
    font-size: 0.98rem;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .message-author > span {
    display: none;
  }

  .message-author > small {
    grid-column: 2;
    align-self: start;
    display: block;
    font-size: 0.78rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .message-avatar {
    grid-column: 1;
    grid-row: 2 / span 2;
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-width: 2px;
  }

  .message-author .message-author-avatar-link {
    grid-column: 1;
    grid-row: 2 / span 2;
    display: block;
    width: 46px;
    height: 46px;
  }

  .message-author .message-author-avatar-link .message-avatar {
    grid-row: auto;
  }

  .message-author .emoji-row,
  .message-author .emoji-totals,
  .message-author .emoji-form,
  .message-author .message-tool-link,
  .message-author .content-report,
  .message-author .report-details,
  .message-author .moderation-box,
  .message-author form,
  .message-author details,
  .message-author > .button {
    display: none !important;
  }

  .message-author .message-moderation-menu {
    display: block !important;
    grid-column: 3;
    grid-row: 2 / span 2;
    justify-self: end;
    align-self: center;
    width: auto;
    max-width: none;
    position: relative;
  }

  .message-author .moderation-trigger {
    display: inline-grid !important;
    place-items: center;
    width: 42px;
    min-width: 42px;
    min-height: 38px;
    margin: 0;
    padding: 0;
    border-radius: 6px;
  }

  .moderation-trigger-icon {
    display: block;
  }

  .message-author .message-moderation-menu .moderation-trigger-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .message-author .compact-mod-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .message-author .compact-mod-grid label {
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid rgba(0, 0, 51, 0.18);
    background: #fff7d1;
    color: #000033;
    font-size: 0.94rem;
  }

  .message-author .compact-mod-grid label:has(input:checked) {
    border-color: #000033;
    background: #ffd23f;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 51, 0.1);
  }

  .message-author .compact-mod-grid input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }

  .message-author .compact-moderation-actions {
    grid-template-columns: 1fr;
  }

  .message-author .compact-moderation-actions .button {
    width: 100%;
    min-height: 42px;
  }

  .message-content {
    padding: 14px;
  }

  .message-title-band {
    margin: -14px -14px 14px;
    padding: 12px 14px 10px;
  }
}

@media (max-width: 720px) {
  main {
    padding-top: 54px;
  }

  .site-header {
    min-height: 54px;
    padding: 6px 9px;
  }

  .brand-logo-combined {
    width: clamp(150px, 48vw, 210px);
    max-height: 40px;
  }

  .nav-toggle {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .notification-button {
    font-size: 0;
    width: 40px;
    min-width: 40px;
    justify-content: center;
  }

  .notification-button::before {
    content: "!";
    font-size: 0.9rem;
    font-weight: 900;
  }

  .notification-button .notification-badge {
    font-size: 0.68rem;
    padding: 1px 5px;
  }

  .account-button {
    max-width: 36vw;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-nav {
    top: 54px;
    grid-template-columns: 1fr;
    max-height: calc(100vh - 54px);
  }

  .has-admin-bar .site-nav {
    top: 82px;
    max-height: calc(100vh - 82px);
  }

  .page-hero {
    padding-block: 12px;
  }

  .panel,
  .forum-main,
  .forum-sidebar,
  .event-card,
  .project-card,
  .profile-card,
  .admin-card {
    padding: 12px;
  }

  .mobile-auth-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .admin-bar {
    z-index: 1300;
  }

  .admin-bar-preview {
    z-index: 1400;
  }

  .site-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .brand {
    grid-column: 1;
  }

  .nav-toggle {
    grid-column: 2;
    justify-self: end;
    align-self: center;
    color: #000033;
  }

  .site-nav {
    top: 58px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.12);
  }

  .has-admin-bar .site-nav {
    top: 86px;
  }

  .account-actions {
    grid-column: 3;
  }

  .topbar-icon {
    display: inline-block;
  }

  .notification-button .topbar-label,
  .account-button .account-button-text,
  .account-button .account-role-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .notification-button,
  .account-button {
    width: 42px;
    min-width: 42px;
    min-height: 40px;
    justify-content: center;
    padding: 0;
    color: #ffffff;
  }

  .notification-badge {
    position: absolute;
    top: -5px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    font-size: 0.68rem;
    border: 2px solid #05072f;
  }

  .notification-menu,
  .account-menu {
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .notification-dropdown,
  .account-dropdown {
    position: fixed;
    top: 58px;
    right: 10px;
    z-index: 1450;
    width: min(360px, calc(100vw - 20px));
  }

  .notification-settings-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .notification-preference-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .notification-settings-main strong {
    white-space: normal;
  }

  .has-admin-bar .notification-dropdown,
  .has-admin-bar .account-dropdown {
    top: 86px;
  }

  .page-hero {
    padding: 10px clamp(12px, 3vw, 20px);
    box-shadow: 0 8px 18px rgba(0, 0, 20, 0.12);
  }

  .page-hero-inner {
    display: grid;
    gap: 8px;
  }

  .sidebar-tools-panel {
    padding: 12px 14px;
  }

  .sidebar-tools-panel > summary {
    min-height: 24px;
  }

  .sidebar-tools-summary h2 {
    font-size: 1.1rem;
  }

  .sidebar-tools-body {
    gap: 12px;
    margin-top: 10px;
  }

  .event-card {
    padding: 12px;
  }

  .event-card .event-detail-main,
  .event-card .event-detail-summary {
    gap: 10px;
  }

  .event-card .event-info-grid {
    gap: 10px;
  }

  .event-card .event-info-grid div {
    padding: 10px;
  }

  .project-card {
    padding: 10px;
    gap: 10px;
  }

  .project-card-thumb {
    width: 82px;
    height: 66px;
  }

  .project-card-expanded {
    display: none !important;
  }

  .page-hero-copy {
    flex: initial;
  }

  .page-hero .eyebrow {
    margin-bottom: 4px;
    font-size: 0.78rem;
  }

  .page-hero h1 {
    font-size: clamp(1.45rem, 5vw, 1.9rem);
  }

  .page-hero p {
    margin: 7px 0 0;
    font-size: 0.96rem;
    line-height: 1.35;
  }

  .page-hero-actions {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
  }

  .page-hero-action-groups,
  .page-hero-action-row {
    justify-content: flex-start;
    gap: 6px;
  }

  .hero-action-group {
    padding: 6px 8px;
  }

  .page-hero .hero-action-button,
  .page-hero .hero-status-button,
  .page-hero .subscription-switch {
    min-height: 32px;
    padding: 6px 9px;
    font-size: 0.88rem;
  }

  .message-author .message-moderation-content {
    border: 2px solid #ffd23f;
    background: #f8fbff;
    color: #000033;
    box-shadow: 0 14px 26px rgba(0,0,20,0.18);
  }

  .message-author .compact-moderation-box {
    background: #f8fbff;
    color: #000033;
  }

  .message-author .compact-moderation-box strong,
  .message-author .compact-moderation-box label,
  .message-author .compact-moderation-box span,
  .message-author .compact-moderation-box .field {
    color: #000033 !important;
  }

  .message-author .compact-mod-grid label {
    background: #fff7d1;
    border-color: #c8a82e;
  }

  .message-author .compact-mod-grid label span {
    color: #000033 !important;
  }

  .message-author .compact-mod-grid label:has(input:checked) {
    background: #ffd23f;
    border-color: #000033;
  }
}

@media (max-width: 720px) {
  .site-header {
    grid-template-columns: auto minmax(42px, 1fr) auto;
    gap: 7px;
  }

  .brand-logo-combined {
    width: clamp(138px, 36vw, 180px);
  }

  .account-actions {
    gap: 5px;
  }

  .notification-button,
  .account-button {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .notification-button::before {
    content: none;
  }

  .site-nav {
    top: 54px;
    padding: 6px 9px 10px;
  }

  .has-admin-bar .site-nav {
    top: 82px;
  }

  .notification-dropdown,
  .account-dropdown {
    top: 54px;
  }

  .has-admin-bar .notification-dropdown,
  .has-admin-bar .account-dropdown {
    top: 82px;
  }

  .page-hero {
    padding-block: 9px;
  }

  .page-hero p {
    margin-top: 5px;
  }
}
.account-button {
  width: 42px;
  min-width: 42px;
  min-height: 40px;
  padding: 7px 8px;
}

.account-dropdown-header {
  display: grid;
  gap: 2px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid #d8e0ea;
  margin-bottom: 4px;
}

.account-dropdown-header strong {
  color: #001b42;
}

.account-dropdown-header span {
  font-size: 0.84rem;
  color: #53657b;
}
