* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #eef6ff;
  background: #07182c;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --ink: #eef6ff;
  --muted: #9ab4d2;
  --blue: #70b6ff;
  --blue-bright: #39a0ff;
  --line: rgb(134 190 255 / 16%);
  --panel: rgb(6 25 48 / 76%);
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #0b2747;
}

body::before {
  position: fixed;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgb(33 105 177 / 22%), transparent 58%),
    linear-gradient(180deg, rgb(3 17 34 / 34%), rgb(3 17 34 / 10%) 45%, rgb(3 17 34 / 62%));
  content: "";
  inset: 0;
  pointer-events: none;
}

body.home-theme {
  background:
    #07182c url("home-background.png") center / cover fixed no-repeat;
}

body.home-theme::before {
  background:
    linear-gradient(180deg, rgb(3 12 23 / 28%), rgb(3 12 23 / 24%) 46%, rgb(3 12 23 / 40%));
}

body.home-theme .site-header {
  border-bottom-color: rgb(71 201 183 / 24%);
  background: rgb(5 20 31 / 91%);
}

body.home-theme .brand img {
  filter: drop-shadow(0 0 12px rgb(52 220 195 / 36%));
}

body.home-theme .main-nav a,
body.home-theme .staff-link {
  color: #a7bec7;
}

body.home-theme .main-nav a:hover,
body.home-theme .main-nav a:focus-visible,
body.home-theme .main-nav a.active,
body.home-theme .staff-link:hover,
body.home-theme .staff-link:focus-visible,
body.home-theme .staff-link.active {
  color: #eafffa;
  text-shadow: 0 0 16px rgb(64 224 197 / 44%);
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 10px clamp(22px, 5vw, 76px);
  border-bottom: 1px solid rgb(59 145 236 / 34%);
  background: rgb(4 24 48 / 88%);
  box-shadow: 0 12px 40px rgb(1 11 25 / 22%);
  backdrop-filter: blur(18px);
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.brand img {
  display: block;
  width: 62px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgb(53 152 255 / 34%));
  transition: transform 220ms ease, filter 220ms ease;
}

.brand:hover img {
  transform: scale(1.07);
  filter: drop-shadow(0 0 20px rgb(53 152 255 / 62%));
}

.main-nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 42px);
}

.main-nav a,
.staff-link {
  position: relative;
  color: #8eafd3;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease, text-shadow 180ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.active,
.staff-link:hover,
.staff-link:focus-visible,
.staff-link.active {
  color: #fff;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.active,
.staff-link:hover,
.staff-link:focus-visible,
.staff-link.active {
  text-shadow: 0 0 16px rgb(87 169 255 / 75%);
}

.staff-link {
  flex: 0 0 auto;
  color: #8fc5ff;
  font-size: 11px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgb(35 91 146 / 25%);
  color: var(--ink);
  cursor: pointer;
  font-size: 20px;
}

.home-main {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
}

.hero {
  position: relative;
  display: grid;
  min-height: min(620px, calc(100vh - 82px));
  grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.85fr);
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
  padding: 54px 0 60px;
}

.hero-copy-block {
  animation: rise-in 760ms both;
}

.hero-badge,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #9cc9f7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-badge {
  padding: 10px 14px;
  border: 1px solid rgb(112 182 255 / 25%);
  border-radius: 99px;
  background: rgb(6 31 60 / 65%);
  box-shadow: 0 0 30px rgb(31 128 224 / 12%);
}

body.home-theme .hero-badge {
  border-color: rgb(81 212 190 / 30%);
  background: rgb(8 35 43 / 76%);
  box-shadow: inset 0 1px rgb(255 255 255 / 4%);
  color: #a5e8dc;
  letter-spacing: 0.16em;
}

.hero-badge::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #57ddc2;
  box-shadow: 0 0 12px #57ddc2;
  content: "";
}

.hero h1 {
  max-width: 650px;
  margin: 23px 0 18px;
  color: #f3f8ff;
  font-size: clamp(46px, 6.5vw, 78px);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 1.02;
  text-wrap: balance;
}

.hero h1 span {
  display: block;
  color: #78b9ff;
  text-shadow: 0 0 36px rgb(64 150 243 / 30%);
}

body.home-theme .hero h1 {
  color: #effbf8;
}

body.home-theme .hero h1 span {
  color: #58d7c1;
  text-shadow: 0 0 34px rgb(64 224 197 / 20%);
}

.hero-copy {
  max-width: 510px;
  margin: 0;
  color: #b5c7cf;
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 49px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  border: 1px solid rgb(115 184 255 / 42%);
  border-radius: 7px;
  background: linear-gradient(135deg, #287fce, #16559a);
  box-shadow: 0 8px 26px rgb(12 95 179 / 25%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

body.home-theme .button {
  border-color: rgb(112 231 211 / 40%);
  background: linear-gradient(135deg, #158b83, #11665f);
  box-shadow: 0 10px 30px rgb(14 142 129 / 22%);
}

body.home-theme .button:hover {
  border-color: #9af4e5;
  box-shadow: 0 12px 34px rgb(20 180 159 / 33%);
}

body.home-theme .button.secondary {
  border-color: rgb(149 190 194 / 24%);
  background: rgb(7 28 37 / 68%);
  color: #c8dfdc;
}

.button:hover {
  transform: translateY(-3px);
  border-color: #9bd0ff;
  box-shadow: 0 12px 34px rgb(20 124 220 / 36%);
}

.button.secondary {
  border-color: var(--line);
  background: rgb(5 26 49 / 65%);
  box-shadow: none;
  color: #c5dcf4;
}

.hero-visual {
  position: relative;
  display: grid;
  min-height: 340px;
  place-items: center;
  animation: rise-in 850ms 120ms both;
}

.hero-logo {
  z-index: 1;
  width: min(220px, 23vw);
  height: auto;
  filter: drop-shadow(0 0 18px rgb(44 145 255 / 55%)) drop-shadow(0 0 40px rgb(18 101 216 / 33%));
  animation: float 4s ease-in-out infinite;
}

body.home-theme .hero-logo {
  filter: drop-shadow(0 0 20px rgb(51 218 194 / 52%)) drop-shadow(0 0 50px rgb(35 171 164 / 28%));
}

.visual-chip {
  position: absolute;
  z-index: 2;
  padding: 11px 15px;
  border: 1px solid rgb(137 192 245 / 22%);
  border-radius: 10px;
  background: rgb(5 25 48 / 80%);
  box-shadow: 0 12px 35px rgb(0 11 27 / 32%);
  color: #d7eaff;
  font-size: 12px;
  font-weight: 650;
  backdrop-filter: blur(12px);
  animation: float 4.5s ease-in-out infinite;
}

body.home-theme .visual-chip {
  border-color: rgb(100 209 193 / 24%);
  background: rgb(5 25 32 / 88%);
  color: #c5e8e2;
}

.visual-chip.top {
  top: 12%;
  right: 0;
}

.visual-chip.bottom {
  bottom: 13%;
  left: 0;
  animation-delay: -1.5s;
}

.section-wrap {
  width: min(1120px, calc(100% - 44px));
  margin: 0 auto;
  padding: 28px 0 78px;
}

body.home-theme .section-wrap {
  width: min(1080px, calc(100% - 44px));
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 9px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.045em;
}

.section-heading p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
}

.feature-card,
.content-panel,
.team-card,
.info-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgb(8 35 66 / 87%), rgb(5 23 44 / 76%));
  box-shadow: 0 18px 55px rgb(0 11 28 / 20%);
  backdrop-filter: blur(12px);
}

body.home-theme .feature-card,
body.home-theme .content-panel,
body.home-theme .team-card,
body.home-theme .info-card {
  border-color: rgb(124 195 184 / 17%);
  background: linear-gradient(145deg, rgb(9 36 44 / 91%), rgb(6 25 34 / 88%));
  box-shadow: 0 18px 50px rgb(1 14 20 / 30%);
}

.feature-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 26px;
  border-radius: 12px;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

body.home-theme .feature-card {
  min-height: 190px;
  border-radius: 10px;
}

.feature-card::after {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgb(45 135 222 / 12%);
  content: "";
  filter: blur(4px);
  transition: transform 250ms ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgb(111 182 255 / 44%);
  box-shadow: 0 22px 55px rgb(0 11 28 / 32%), 0 0 30px rgb(38 122 210 / 11%);
}

body.home-theme .feature-card:hover {
  border-color: rgb(88 218 195 / 42%);
  box-shadow: 0 22px 55px rgb(1 14 20 / 35%), 0 0 25px rgb(38 177 157 / 10%);
}

.feature-card:hover::after {
  transform: scale(1.4);
}

.card-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 21px;
  place-items: center;
  border: 1px solid rgb(101 176 249 / 29%);
  border-radius: 11px;
  background: rgb(44 126 202 / 16%);
  color: #a7d2ff;
  font-size: 19px;
}

body.home-theme .card-icon {
  border-color: rgb(81 212 190 / 30%);
  background: rgb(24 125 112 / 19%);
  color: #89e7d6;
}

.feature-card h3,
.info-card h2 {
  margin: 0 0 9px;
  color: #eaf4ff;
  font-size: 19px;
}

.feature-card p,
.info-card p {
  margin: 0;
  color: #a9bfd8;
  font-size: 14px;
  line-height: 1.7;
}

body.home-theme .feature-card h3 {
  color: #e6f8f4;
}

body.home-theme .feature-card p {
  color: #a9c2c0;
}

.cta-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  margin: 12px auto 80px;
  padding: clamp(26px, 5vw, 48px);
  border: 1px solid rgb(114 182 255 / 25%);
  border-radius: 14px;
  background: linear-gradient(110deg, rgb(14 68 119 / 78%), rgb(6 30 57 / 88%));
  box-shadow: 0 20px 60px rgb(0 10 24 / 25%);
}

body.home-theme .cta-panel {
  border-color: rgb(102 216 196 / 22%);
  background: linear-gradient(110deg, rgb(13 68 70 / 78%), rgb(6 31 39 / 90%));
}

.cta-panel h2 {
  margin: 0 0 9px;
  font-size: clamp(23px, 3vw, 32px);
}

.cta-panel p {
  margin: 0;
  color: #bbd0e7;
  line-height: 1.65;
}

.feature-grid > .info-card {
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.feature-grid > .info-card:hover {
  transform: translateY(-6px);
  border-color: rgb(111 182 255 / 44%);
  box-shadow: 0 22px 55px rgb(0 11 28 / 32%), 0 0 30px rgb(38 122 210 / 11%);
}

.feature-grid > .cta-panel {
  grid-column: 1 / -1;
  margin: 0;
}

.page-main {
  width: min(1000px, calc(100% - 44px));
  min-height: calc(100vh - 180px);
  margin: 0 auto;
  padding: clamp(52px, 8vw, 100px) 0;
  animation: rise-in 600ms both;
}

.content-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 5vw, 56px);
  border-radius: 14px;
}

.content-panel > * {
  position: relative;
}

.content-panel h1 {
  margin: 12px 0 15px;
  color: #f0f7ff;
  font-size: clamp(36px, 6vw, 58px);
  letter-spacing: -0.055em;
}

.page-intro {
  max-width: 720px;
  margin: 0 0 32px;
  color: #b5cbe3;
  font-size: 17px;
  line-height: 1.8;
}

.content-section {
  padding: 23px 0;
  border-top: 1px solid var(--line);
}

.content-section h2 {
  margin: 0 0 9px;
  color: #94c8ff;
  font-size: 19px;
}

.content-section p {
  margin: 0;
  color: #c1d2e6;
  line-height: 1.8;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.member-table-wrap {
  overflow-x: auto;
  margin: 28px 0 8px;
  border: 1px solid rgb(102 161 222 / 25%);
  border-radius: 9px;
  background: rgb(5 24 46 / 72%);
}

.member-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.member-table th,
.member-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgb(134 190 255 / 13%);
}

.member-table tr:last-child td {
  border-bottom: 0;
}

.member-table th {
  color: #8fb9e5;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.member-table td {
  color: #d7e5f4;
  font-size: 14px;
}

.member-name {
  font-weight: 600;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 10px;
  border: 1px solid currentColor;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.role-admin {
  color: #ff777e;
  background: rgb(255 91 103 / 9%);
}

.role-developer {
  color: #77aaff;
  background: rgb(93 141 255 / 9%);
}

.role-moderator {
  color: #ffc15d;
  background: rgb(255 180 56 / 9%);
}

.role-member {
  color: #9ab4d2;
  background: rgb(146 170 198 / 8%);
}

.news-list {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.news-item {
  display: grid;
  grid-template-columns: minmax(100px, 145px) 1fr;
  gap: 20px;
  padding: 21px 22px;
  border: 1px solid rgb(102 161 222 / 25%);
  border-left: 3px solid #438bd2;
  border-radius: 8px;
  background: rgb(5 24 46 / 78%);
  transition: border-color 180ms ease, background 180ms ease;
}

.news-item:hover {
  border-color: rgb(102 161 222 / 52%);
  border-left-color: #69b1ff;
  background: rgb(8 34 62 / 88%);
}

.news-date {
  color: #82b8ed;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.news-content h2 {
  margin: 0 0 7px;
  color: #eff6ff;
  font-size: 17px;
}

.news-content p {
  margin: 0;
  color: #b6cbe2;
  font-size: 14px;
  line-height: 1.7;
}

.team-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 12px;
  transition: transform 200ms ease, border-color 200ms ease;
}

.team-card:hover {
  transform: translateY(-5px);
  border-color: rgb(111 182 255 / 44%);
}

.team-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 20px;
  place-items: center;
  border: 1px solid rgb(112 182 255 / 35%);
  border-radius: 18px;
  background: linear-gradient(145deg, rgb(55 143 224 / 32%), rgb(19 62 106 / 42%));
  color: #c6e2ff;
  font-size: 22px;
}

.team-card h2 {
  margin: 0 0 5px;
  font-size: 18px;
}

.team-card p {
  margin: 0;
  color: #9fb8d5;
  font-size: 14px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.info-card {
  padding: 23px;
  border-radius: 11px;
}

.info-card h2 {
  color: #a4d0ff;
  font-size: 17px;
}

.rule-list {
  display: grid;
  gap: 12px;
  margin: 25px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: rules;
}

.rule-list li {
  position: relative;
  min-height: 66px;
  padding: 18px 20px 18px 58px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgb(6 28 53 / 55%);
  color: #d1e0f1;
  line-height: 1.6;
  counter-increment: rules;
}

.rule-list li::before {
  position: absolute;
  top: 17px;
  left: 18px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 7px;
  background: rgb(49 126 201 / 25%);
  color: #99caff;
  content: counter(rules, decimal-leading-zero);
  font-size: 11px;
  font-weight: 700;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(22px, 5vw, 76px);
  border-top: 1px solid var(--line);
  background: rgb(4 22 42 / 72%);
  color: #829cb9;
  font-size: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: #a7bed8;
  text-decoration: none;
  transition: color 160ms ease;
}

.footer-links a:hover {
  color: #fff;
}

.editor-main {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(42px, 6vw, 72px) 0;
}

.editor-heading {
  max-width: 760px;
  margin-bottom: 32px;
}

.editor-heading h1 {
  margin: 11px 0 10px;
  font-size: clamp(36px, 6vw, 54px);
  letter-spacing: -0.055em;
}

.editor-heading > p,
.editor-sidebar-heading > span,
.blocks-heading p {
  color: var(--muted);
  line-height: 1.7;
}

.editor-notice {
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid rgb(250 190 90 / 27%);
  border-radius: 9px;
  background: rgb(107 72 22 / 20%);
  color: #f0d7a8;
  font-size: 13px;
  line-height: 1.65;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(0, 2fr);
  align-items: start;
  gap: 20px;
}

.editor-sidebar,
.editor-workspace,
.editor-preview {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgb(5 24 46 / 86%);
  box-shadow: 0 18px 55px rgb(0 11 28 / 22%);
  backdrop-filter: blur(12px);
}

.editor-sidebar {
  position: sticky;
  top: 105px;
  overflow: hidden;
}

.editor-sidebar-heading {
  padding: 21px 20px 14px;
}

.editor-sidebar-heading h2,
.workspace-top h2,
.preview-heading h2 {
  margin: 0 0 5px;
  font-size: 20px;
}

.editor-sidebar-heading > span {
  font-size: 12px;
}

.editor-page-list {
  display: grid;
  gap: 4px;
  padding: 0 10px 18px;
}

.editor-page {
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #b6cbe2;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.editor-page:hover,
.editor-page.active {
  border-color: rgb(106 177 247 / 24%);
  background: rgb(45 113 179 / 20%);
  color: #fff;
}

.new-page {
  display: grid;
  gap: 10px;
  padding: 17px 18px 20px;
  border-top: 1px solid var(--line);
}

.editor-workspace {
  min-width: 0;
  padding: clamp(18px, 3vw, 30px);
}

.workspace-top,
.blocks-heading,
.editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.workspace-top {
  margin-bottom: 24px;
}

.editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--line);
}

.editor-label {
  display: grid;
  gap: 7px;
  color: #bad0e8;
  font-size: 12px;
  font-weight: 650;
}

.editor-label.wide {
  grid-column: 1 / -1;
}

.editor-input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgb(129 180 231 / 22%);
  border-radius: 7px;
  outline: none;
  background: rgb(2 16 32 / 76%);
  color: #eff7ff;
  font: inherit;
  font-size: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.editor-input:focus {
  border-color: #59a8f4;
  box-shadow: 0 0 0 3px rgb(57 160 255 / 14%);
}

.editor-textarea {
  min-height: 86px;
  resize: vertical;
  line-height: 1.55;
}

.blocks-heading {
  align-items: end;
  margin: 23px 0 14px;
}

.blocks-heading h3 {
  margin: 0 0 5px;
  font-size: 17px;
}

.blocks-heading p {
  margin: 0;
  font-size: 12px;
}

.add-block-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.add-block-controls select {
  width: auto;
}

.blocks-editor {
  display: grid;
  gap: 12px;
}

.editor-block {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid rgb(129 180 231 / 18%);
  border-radius: 9px;
  background: rgb(13 39 68 / 56%);
}

.editor-block legend {
  padding: 0 7px;
  color: #95c7fb;
  font-size: 12px;
  font-weight: 700;
}

.editor-block .editor-label + .editor-input {
  margin: 7px 0 12px;
}

.block-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 5px;
}

.small-button,
.editor-button {
  display: inline-flex;
  min-height: 37px;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid rgb(127 180 235 / 25%);
  border-radius: 7px;
  background: rgb(22 57 93 / 62%);
  color: #d3e6fb;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.small-button:hover,
.editor-button:hover {
  transform: translateY(-1px);
  border-color: rgb(115 184 255 / 60%);
  background: rgb(33 88 143 / 75%);
}

.small-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
  transform: none;
}

.editor-button.primary {
  border-color: #368ddd;
  background: linear-gradient(135deg, #287fce, #16559a);
  color: #fff;
}

.editor-button.danger,
.small-button.danger {
  border-color: rgb(255 121 131 / 26%);
  color: #ffafb5;
}

.editor-button.danger:hover,
.small-button.danger:hover {
  background: rgb(114 39 52 / 42%);
}

.editor-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.save-status {
  flex: 1 1 100%;
  min-height: 20px;
  margin: 0;
  color: #8eddb7;
  font-size: 13px;
}

.save-status.error {
  color: #ffafb5;
}

.preview-wrap {
  margin-top: 38px;
}

.preview-heading {
  margin-bottom: 14px;
}

.editor-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 18px;
}

.editor-preview > h3,
.editor-preview > p {
  grid-column: 1 / -1;
}

.editor-preview > h3 {
  margin: 0;
  color: #eff7ff;
  font-size: 22px;
}

.editor-preview > p {
  margin: 0 0 4px;
  color: #b5cbe3;
  line-height: 1.6;
}

.preview-block {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgb(13 39 68 / 56%);
  color: #c6d9ed;
  font-size: 13px;
  line-height: 1.6;
}

.preview-block strong {
  color: #a4d0ff;
}

.preview-block p {
  margin: 6px 0 0;
}

.preview-button {
  display: inline-block;
  margin-top: 9px;
  padding: 5px 9px;
  border-radius: 5px;
  background: #1762a7;
  color: white;
  font-size: 11px;
}

.visually-hidden {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 850px) {
  .site-header {
    gap: 18px;
    padding-right: 22px;
    padding-left: 22px;
  }

  .main-nav {
    gap: 17px;
  }

  .main-nav a {
    font-size: 11px;
    letter-spacing: 0.06em;
  }

  .brand img {
    width: 52px;
    height: 48px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.7fr);
    gap: 20px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 70px;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 18px;
  }

  .brand img {
    width: 48px;
    height: 44px;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .staff-link {
    font-size: 10px;
  }

  .main-nav {
    display: none;
    order: 4;
    flex: 0 0 100%;
    align-items: stretch;
    gap: 0;
    padding: 4px 0 9px;
  }

  .main-nav.open {
    display: flex;
    flex-direction: column;
  }

  .main-nav a {
    padding: 13px 10px;
    border-top: 1px solid var(--line);
    font-size: 12px;
  }

  .main-nav a.active,
  .main-nav a:hover,
  .main-nav a:focus-visible {
    color: #fff;
    text-shadow: 0 0 16px rgb(87 169 255 / 75%);
  }

  .home-main,
  .section-wrap {
    width: min(100% - 36px, 520px);
  }

  .hero {
    min-height: unset;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 74px 0 34px;
  }

  .hero h1 {
    font-size: clamp(52px, 14vw, 82px);
  }

  .hero-visual {
    min-height: 290px;
    grid-row: 1;
  }

  .hero-logo {
    width: min(165px, 42vw);
  }

  .visual-chip.top {
    top: 5%;
    right: 3%;
  }

  .visual-chip.bottom {
    bottom: 5%;
    left: 3%;
  }

  .section-wrap {
    padding: 40px 0 55px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .feature-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px;
  }

  .feature-card {
    min-height: 180px;
  }

  .cta-panel {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 52px;
  }

  .page-main {
    width: calc(100% - 32px);
    min-height: calc(100vh - 155px);
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px 18px;
  }

  .editor-main {
    width: calc(100% - 30px);
  }

  .editor-layout {
    grid-template-columns: 1fr;
  }

  .editor-sidebar {
    position: static;
  }

  .editor-page-list {
    grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  }

  .editor-fields {
    grid-template-columns: 1fr;
  }

  .editor-label.wide {
    grid-column: auto;
  }

  .blocks-heading,
  .workspace-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .add-block-controls {
    width: 100%;
  }

  .add-block-controls select {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Flat, high-contrast palette */
body {
  background: #07182c;
}

body.home-theme {
  background: #07182c url("home-background.png") center / cover fixed no-repeat;
}

body::before {
  display: none;
}

.site-header,
body.home-theme .site-header {
  border-bottom: 1px solid #24517f;
  background: #050d18;
  box-shadow: none;
  backdrop-filter: none;
}

.brand img,
.brand:hover img {
  filter: none;
}

.main-nav a,
.staff-link,
body.home-theme .main-nav a,
body.home-theme .staff-link {
  color: #b8cce0;
  text-shadow: none;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.active,
.staff-link:hover,
.staff-link:focus-visible,
.staff-link.active,
body.home-theme .main-nav a:hover,
body.home-theme .main-nav a:focus-visible,
body.home-theme .main-nav a.active,
body.home-theme .staff-link:hover,
body.home-theme .staff-link:focus-visible,
body.home-theme .staff-link.active {
  color: #fff;
  text-shadow: none;
}

.hero-badge,
body.home-theme .hero-badge {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
}

.hero-badge::before {
  background: #2f80ed;
  box-shadow: none;
}

.hero h1,
.hero h1 span,
body.home-theme .hero h1,
body.home-theme .hero h1 span {
  color: #fff;
  text-shadow: none;
}

.hero-copy,
body.home-theme .hero-copy {
  color: #d3deeb;
}

.button,
body.home-theme .button {
  border: 1px solid #2f80ed;
  border-radius: 5px;
  background: #1769c2;
  box-shadow: none;
  color: #fff;
}

.button:hover,
body.home-theme .button:hover {
  transform: none;
  border-color: #75b4ff;
  background: #2f80ed;
  box-shadow: none;
}

.button.secondary,
body.home-theme .button.secondary {
  border-color: #55708d;
  background: #0b1c2f;
  box-shadow: none;
  color: #fff;
}

.hero-logo,
body.home-theme .hero-logo {
  filter: none;
  animation: none;
}

.visual-chip,
body.home-theme .visual-chip {
  border: 1px solid #315779;
  border-radius: 5px;
  background: #07182c;
  box-shadow: none;
  color: #fff;
  backdrop-filter: none;
  animation: none;
}

.feature-card,
.content-panel,
.team-card,
.info-card,
body.home-theme .feature-card,
body.home-theme .content-panel,
body.home-theme .team-card,
body.home-theme .info-card {
  border: 1px solid #29415e;
  border-radius: 7px;
  background: #0b1c2f;
  box-shadow: none;
  backdrop-filter: none;
}

.feature-card,
.team-card,
.feature-grid > .info-card {
  transition: border-color 160ms ease;
}

.feature-card:hover,
.team-card:hover,
.feature-grid > .info-card:hover,
body.home-theme .feature-card:hover {
  transform: none;
  border-color: #2f80ed;
  box-shadow: none;
}

.feature-card::after {
  display: none;
}

.card-icon,
body.home-theme .card-icon,
.team-avatar {
  border: 1px solid #2f80ed;
  border-radius: 5px;
  background: #0b1c2f;
  color: #fff;
}

.feature-card h3,
.feature-card p,
.info-card h2,
.info-card p,
body.home-theme .feature-card h3,
body.home-theme .feature-card p {
  color: #fff;
}

.cta-panel,
body.home-theme .cta-panel {
  border: 1px solid #29415e;
  border-radius: 7px;
  background: #0b1c2f;
  box-shadow: none;
}

.cta-panel p,
.section-heading p {
  color: #d3deeb;
}

.content-panel h1,
.content-panel h2,
.content-section h2,
.team-card h2,
.news-content h2,
.section-heading h2 {
  color: #fff;
}

.page-intro,
.content-section p,
.team-card p,
.news-content p {
  color: #d3deeb;
}

.member-table-wrap {
  border: 1px solid #29415e;
  border-radius: 5px;
  background: #07182c;
}

.member-table th {
  color: #fff;
}

.member-table th,
.member-table td {
  border-bottom: 1px solid #26384e;
}

.member-table td,
.member-name {
  color: #fff;
}

.role-badge,
.role-admin,
.role-developer,
.role-moderator,
.role-member {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
}

.news-item {
  border: 1px solid #29415e;
  border-left: 3px solid #2f80ed;
  border-radius: 5px;
  background: #07182c;
}

.news-item:hover {
  border-color: #426588;
  border-left-color: #2f80ed;
  background: #07182c;
}

.news-date,
.section-kicker,
.eyebrow {
  color: #83b9f5;
}

.rule-list li {
  border: 1px solid #29415e;
  border-radius: 5px;
  background: #07182c;
  color: #fff;
}

.rule-list li::before {
  border-radius: 3px;
  background: #1769c2;
  color: #fff;
}

.page-intro {
  white-space: pre-line;
}

.content-panel > .rule-accordion {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #29415e;
  border-radius: 6px;
  background: #07182c;
}

.rule-accordion summary {
  position: relative;
  padding: 18px 56px 18px 20px;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  list-style: none;
}

.rule-accordion summary::-webkit-details-marker {
  display: none;
}

.rule-accordion summary::after {
  position: absolute;
  top: 50%;
  right: 20px;
  color: #83b9f5;
  content: "+";
  font-size: 24px;
  font-weight: 400;
  transform: translateY(-50%);
}

.rule-accordion[open] summary {
  border-bottom: 1px solid #29415e;
  color: #83b9f5;
}

.rule-accordion[open] summary::after {
  content: "−";
}

.rule-accordion summary:focus-visible {
  outline: 2px solid #2f80ed;
  outline-offset: -3px;
}

.rule-accordion-content {
  padding: 18px 20px 20px;
  color: #d3deeb;
  line-height: 1.8;
  white-space: pre-line;
}

.site-footer {
  border-top: 1px solid #24517f;
  background: #050d18;
  color: #d3deeb;
}

.editor-sidebar,
.editor-workspace,
.editor-preview {
  border: 1px solid #29415e;
  border-radius: 7px;
  background: #0b1c2f;
  box-shadow: none;
  backdrop-filter: none;
}

.editor-page:hover,
.editor-page.active {
  border-color: #2f80ed;
  background: #102c4a;
  color: #fff;
}

.editor-input,
.editor-block,
.preview-block {
  border-color: #31506e;
  border-radius: 5px;
  background: #07182c;
  color: #fff;
}

.editor-input:focus {
  border-color: #2f80ed;
  box-shadow: 0 0 0 2px #2f80ed;
}

.small-button,
.editor-button {
  border-color: #315779;
  border-radius: 5px;
  background: #102c4a;
  color: #fff;
}

.small-button:hover,
.editor-button:hover {
  transform: none;
  border-color: #2f80ed;
  background: #173a60;
}

.editor-button.primary {
  border-color: #2f80ed;
  background: #1769c2;
}

.editor-button.danger,
.small-button.danger {
  border-color: #55708d;
  color: #fff;
}

.preview-button {
  border-radius: 3px;
  background: #1769c2;
  color: #fff;
}

@media (max-width: 640px) {
  .main-nav a.active,
  .main-nav a:hover,
  .main-nav a:focus-visible {
    color: #fff;
    text-shadow: none;
  }
}

body.home-theme .home-main {
  display: grid;
  width: min(1480px, calc(100% - 96px));
  min-height: max(680px, calc(100svh - 154px));
  align-items: center;
}

body.home-theme .hero {
  min-height: min(760px, calc(100svh - 190px));
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(72px, 9vw, 180px);
  padding: 48px 3.5%;
}

body.home-theme .hero-visual {
  display: none;
}

body.home-theme .hero h1 {
  max-width: 760px;
  font-size: clamp(64px, 5.2vw, 96px);
  line-height: 1.08;
}

body.home-theme .hero-actions {
  margin-top: 40px;
}

body.home-theme .hero-visual {
  min-height: 480px;
}

body.home-theme .hero-logo {
  width: clamp(260px, 21vw, 390px);
}

.home-content-blocks {
  display: grid;
  width: min(1180px, calc(100% - 44px));
  gap: 18px;
  margin: 0 auto 64px;
}

.home-content-blocks .info-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.staff-login {
  width: min(520px, 100%);
  margin: clamp(28px, 7vh, 76px) auto;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(5 23 43 / 94%);
  box-shadow: 0 24px 70px rgb(0 8 20 / 35%);
}

.staff-login h1 {
  margin: 14px 0 8px;
  font-size: clamp(30px, 5vw, 42px);
}

.staff-login > p {
  color: var(--muted);
}

.staff-login-form {
  display: grid;
  gap: 18px;
  margin: 26px 0;
}

.staff-login-form .editor-button {
  width: 100%;
}

.staff-login .editor-notice {
  margin-top: 24px;
}

.staff-logout {
  margin-top: 24px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  body.home-theme .home-main {
    width: min(100% - 36px, 560px);
    min-height: calc(100svh - 140px);
  }

  body.home-theme .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 48px 0 28px;
    text-align: center;
  }

  body.home-theme .hero h1 {
    margin-inline: auto;
    font-size: clamp(42px, 11vw, 68px);
  }

  body.home-theme .hero-actions {
    justify-content: center;
    margin-top: 28px;
  }

  body.home-theme .hero-visual {
    min-height: 270px;
  }

  body.home-theme .hero-logo {
    width: min(220px, 58vw);
  }
}
