:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-strong: #eef2f6;
  --text: #0b1628;
  --muted: #516072;
  --border: #d9e0ea;
  --navy: #071b34;
  --navy-2: #0b294d;
  --gold: #c99a3b;
  --gold-2: #f0c86a;
  --alert: #c73631;
  --shadow: 0 18px 45px rgba(9, 24, 44, 0.14);
}

:root[data-theme="dark"] {
  --bg: #07101d;
  --surface: #0e1a2a;
  --surface-strong: #132237;
  --text: #f4f7fb;
  --muted: #b9c4d2;
  --border: #26384f;
  --navy: #050b14;
  --navy-2: #0b1a2d;
  --gold: #d3a84e;
  --gold-2: #f0cf78;
  --alert: #ff6b63;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.skip-link,
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.skip-link:focus {
  z-index: 1000;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  background: var(--gold);
  color: #081527;
}

.topbar {
  background: var(--navy);
  color: #eef5ff;
  font-size: 0.92rem;
}

.topbar__inner {
  display: flex;
  gap: 20px;
  align-items: center;
  min-height: 38px;
}

.topbar__item {
  text-decoration: none;
}

.topbar__emergency {
  margin-left: auto;
  color: var(--gold-2);
  font-weight: 700;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

:root[data-theme="dark"] .site-header {
  background: rgba(7, 16, 29, 0.94);
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  min-height: 92px;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold-2);
  font-size: 2rem;
}

.brand__logo img {
  display: block;
  width: 82px;
  height: 82px;
  object-fit: contain;
}

.brand__name {
  display: block;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.4rem, 3vw, 2.45rem);
  font-weight: 800;
  line-height: 1.05;
}

.brand__tagline {
  display: block;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-nav {
  justify-self: end;
}

.primary-nav ul {
  display: flex;
  gap: 4px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 6px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  background: var(--surface-strong);
  color: var(--navy-2);
}

:root[data-theme="dark"] .primary-nav a:hover,
:root[data-theme="dark"] .primary-nav .current-menu-item > a {
  color: var(--gold-2);
}

.primary-nav .sub-menu {
  position: absolute;
  display: none;
  min-width: 220px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.primary-nav li {
  position: relative;
}

.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu {
  display: block;
}

.primary-nav .sub-menu a {
  padding: 10px 12px;
}

.theme-toggle,
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.theme-toggle {
  gap: 10px;
  min-height: 44px;
  padding: 6px 12px;
  font-weight: 800;
}

.theme-toggle__icon {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--navy);
  box-shadow: inset 0 0 0 2px var(--gold);
}

.theme-toggle__icon::after {
  display: block;
  width: 18px;
  height: 18px;
  margin: 3px;
  border-radius: 50%;
  background: var(--gold-2);
  content: "";
  transition: transform 0.2s ease;
}

:root[data-theme="dark"] .theme-toggle__icon::after {
  transform: translateX(18px);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
}

.menu-toggle__bar {
  position: absolute;
  width: 20px;
  height: 2px;
  background: currentColor;
}

.menu-toggle__bar:nth-child(1) {
  transform: translateY(-7px);
}

.menu-toggle__bar:nth-child(3) {
  transform: translateY(7px);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background: linear-gradient(90deg, rgba(4, 17, 34, 0.9), rgba(4, 17, 34, 0.58), rgba(4, 17, 34, 0.18)), var(--hero-image) center / cover;
  color: #fff;
}

:root[data-theme="dark"] .hero {
  background: linear-gradient(90deg, rgba(2, 7, 14, 0.96), rgba(2, 7, 14, 0.78), rgba(2, 7, 14, 0.42)), var(--hero-image) center / cover;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.7fr);
  gap: 34px;
  align-items: end;
  min-height: 620px;
  padding: 72px 0;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 7vw, 5.7rem);
  line-height: 0.98;
}

.hero p {
  max-width: 650px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold-2);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 900;
  text-decoration: none;
}

.button--gold {
  background: var(--gold);
  color: #07101d;
}

.button--ghost {
  border-color: rgba(255, 255, 255, 0.62);
  color: #fff;
}

.hero__panel,
.content-card,
.action-card,
.value-grid > div,
.post-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero__panel {
  padding: 28px;
  background: rgba(7, 16, 29, 0.86);
  border-color: rgba(255, 255, 255, 0.18);
}

.hero__panel h2 {
  margin-top: 0;
  color: var(--gold-2);
}

.quick-actions {
  margin-top: -58px;
  position: relative;
  z-index: 2;
}

.quick-actions__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.action-card {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 118px;
  padding: 20px;
  color: var(--text);
  text-decoration: none;
}

.action-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.action-card__icon {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--gold);
  font-size: 1.35rem;
  font-weight: 900;
}

.action-card strong,
.action-card small {
  display: block;
}

.action-card small {
  color: var(--muted);
}

.action-card--alert .action-card__icon {
  color: var(--alert);
}

.section {
  padding: 76px 0;
}

.section--split {
  padding-top: 100px;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 42px;
  align-items: start;
}

.split-grid h2 {
  margin: 0 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.05;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.value-grid > div {
  padding: 22px;
}

.value-grid strong,
.value-grid span {
  display: block;
}

.value-grid strong {
  color: var(--gold);
  font-size: 1.15rem;
}

.value-grid span {
  color: var(--muted);
}

.main-content {
  min-height: 55vh;
}

.page-hero {
  padding: 64px 0;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff;
}

.page-hero p {
  max-width: 760px;
}

.content-card {
  margin-top: 38px;
  padding: clamp(22px, 4vw, 44px);
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content a {
  color: var(--navy-2);
  font-weight: 800;
}

:root[data-theme="dark"] .entry-content a {
  color: var(--gold-2);
}

:root[data-theme="dark"] .entry-content [style*="color"],
:root[data-theme="dark"] .content-card [style*="color"] {
  color: var(--text) !important;
}

.entry-content .wp-block-table {
  overflow-x: auto;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  color: var(--text);
}

.entry-content th,
.entry-content td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.entry-content th {
  background: var(--navy);
  color: #fff;
  font-weight: 800;
}

.entry-content tr:nth-child(even) td {
  background: var(--surface-strong);
}

.entry-content figcaption,
.entry-content .wp-element-caption {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 700;
}

:root[data-theme="dark"] .entry-content table,
:root[data-theme="dark"] .entry-content tbody,
:root[data-theme="dark"] .entry-content tr,
:root[data-theme="dark"] .entry-content td,
:root[data-theme="dark"] .entry-content th {
  color: var(--text);
}

:root[data-theme="dark"] .entry-content table {
  background: #0b1625;
  border-color: var(--border);
}

:root[data-theme="dark"] .entry-content tr:first-child td,
:root[data-theme="dark"] .entry-content th {
  background: #050b14;
  color: #fff;
}

:root[data-theme="dark"] .entry-content td,
:root[data-theme="dark"] .entry-content th {
  border-color: #33445c;
}

:root[data-theme="dark"] .entry-content tr:nth-child(odd) td {
  background: #0c1726;
}

:root[data-theme="dark"] .entry-content tr:nth-child(even) td {
  background: #132237;
}

:root[data-theme="dark"] .entry-content figcaption,
:root[data-theme="dark"] .entry-content .wp-element-caption {
  color: var(--muted);
}

.featured-image {
  margin: 0 0 28px;
}

.featured-image img {
  border-radius: 8px;
}

.post-list {
  padding: 48px 0 78px;
}

.post-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  margin-bottom: 22px;
  overflow: hidden;
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__body {
  padding: 24px;
}

.post-card h2 {
  margin: 0 0 8px;
}

.post-card h2 a {
  text-decoration: none;
}

.post-card__meta {
  color: var(--muted);
  font-weight: 700;
}

.site-footer {
  background: var(--navy);
  color: #eaf1fa;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 48px 0;
}

.site-footer h2 {
  margin-top: 0;
  color: var(--gold-2);
  font-size: 1.1rem;
}

.site-footer a {
  color: #fff;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #b9c4d2;
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .site-header__inner {
    grid-template-columns: 1fr auto auto;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    width: 100%;
    padding: 14px 16px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav ul,
  .primary-nav .sub-menu {
    position: static;
    display: block;
    box-shadow: none;
  }

  .primary-nav a {
    padding: 12px;
  }

  .hero__inner,
  .split-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .post-card,
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    padding: 8px 0;
  }

  .topbar__emergency {
    margin-left: 0;
  }

  .site-header__inner {
    min-height: 82px;
    gap: 10px;
  }

  .brand__mark {
    width: 48px;
    height: 48px;
    font-size: 1.45rem;
  }

  .brand__logo img {
    width: 56px;
    height: 56px;
  }

  .brand__tagline,
  .theme-toggle__label {
    display: none;
  }

  .hero,
  .hero__inner {
    min-height: 560px;
  }

  .hero__inner {
    padding: 48px 0 90px;
  }

  .quick-actions {
    margin-top: -68px;
  }

  .quick-actions__grid,
  .value-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 54px 0;
  }
}
