:root {
  --bg: #041712;
  --bg-deep: #020d0a;
  --surface: #0a241d;
  --surface-2: #0d3028;
  --surface-3: #123b31;
  --border: rgba(199, 241, 220, 0.16);
  --border-strong: rgba(245, 185, 66, 0.38);
  --text: #f5fff9;
  --muted: #bfd2c9;
  --soft: #89a99a;
  --gold: #f5c542;
  --gold-2: #ffdd78;
  --warning: #f0a23a;
  --danger: #d96b5f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius: 8px;
  --radius-sm: 6px;
  --container: min(1160px, calc(100vw - 40px));
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(20, 184, 166, 0.16), transparent 34rem),
    linear-gradient(180deg, #062019 0%, var(--bg) 45%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: var(--gold-2);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: #fff3be;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

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

.skip-link:focus {
  top: 12px;
  left: 12px;
  z-index: 1000;
  width: auto;
  height: auto;
  padding: 10px 14px;
  overflow: visible;
  clip: auto;
  background: var(--gold);
  color: #151006;
  border-radius: var(--radius-sm);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(2, 17, 13, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  width: var(--container);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.site-wordmark,
.custom-logo-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.site-wordmark img,
.custom-logo {
  display: block;
  width: auto;
  max-width: 116px;
  max-height: 42px;
  object-fit: contain;
}

.site-branding__text {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.site-branding__name {
  font-weight: 900;
  font-size: 18px;
  color: var(--text);
}

.site-branding__tag {
  margin-top: 2px;
  color: var(--soft);
  font-size: 12px;
  white-space: nowrap;
}

.primary-navigation {
  display: flex;
  align-items: center;
}

.primary-navigation ul,
.footer-navigation ul {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-navigation a {
  display: inline-flex;
  padding: 8px 2px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a {
  color: var(--gold);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.menu-toggle span:not(.screen-reader-text) {
  width: 18px;
  height: 2px;
  background: var(--gold);
  border-radius: 999px;
}

.site-main {
  width: var(--container);
  margin: 0 auto;
}

.hero-app {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  gap: 28px;
  align-items: stretch;
  padding: 34px 0 28px;
}

.hero-app__content,
.hero-app__visual,
.intro-strip,
.content-shell,
.archive-hero,
.post-card,
.not-found {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(13, 48, 40, 0.92), rgba(7, 29, 23, 0.92));
  box-shadow: var(--shadow);
}

.hero-app__content {
  padding: clamp(24px, 4vw, 42px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.app-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 18px;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(245, 197, 66, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.app-kicker img {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 14px;
  color: var(--text);
  line-height: 1.18;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 950;
}

h2 {
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 900;
}

h3 {
  font-size: clamp(20px, 2.2vw, 25px);
  font-weight: 850;
}

p {
  margin: 0 0 18px;
}

.hero-lead {
  max-width: 64ch;
  color: var(--muted);
  font-size: 19px;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 24px;
}

.hero-meta div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(2, 17, 13, 0.38);
}

.hero-meta span,
.section-label,
.post-card__meta {
  display: block;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-meta strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.button,
.wp-block-button__link,
.search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
.wp-block-button__link:hover,
.search-submit:hover {
  transform: translateY(-1px);
}

.button-primary,
.wp-block-button__link {
  width: fit-content;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1d1605;
  border: 1px solid rgba(255, 238, 178, 0.8);
  box-shadow: 0 12px 32px rgba(245, 197, 66, 0.18);
}

.button-primary:hover,
.wp-block-button__link:hover {
  color: #120e04;
}

.button-secondary {
  background: rgba(10, 36, 29, 0.72);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.hero-primary-action {
  margin-bottom: 16px;
}

.hero-note {
  max-width: 64ch;
  color: #d6e8dd;
  font-size: 14px;
}

.hero-app__visual {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(20, 184, 166, 0.18), transparent 52%),
    #09231c;
}

.hero-app__visual img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  display: block;
}

.hero-app__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 13, 10, 0.76));
  pointer-events: none;
}

.visual-status {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(245, 197, 66, 0.28);
  border-radius: var(--radius-sm);
  background: rgba(2, 17, 13, 0.76);
}

.visual-status span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.visual-status strong {
  font-size: 15px;
}

.intro-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 28px;
  overflow: hidden;
  background: var(--border);
}

.intro-strip div {
  padding: 20px;
  background: rgba(10, 36, 29, 0.95);
}

.intro-strip span {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.intro-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.content-shell,
.archive-hero {
  width: min(920px, 100%);
  margin: 0 auto 32px;
  padding: clamp(22px, 4vw, 42px);
}

.front-article {
  width: min(960px, 100%);
}

.entry-content {
  color: #e7f4ee;
}

.entry-content > * {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.entry-content > .alignwide,
.entry-content > figure,
.entry-content > .wp-block-image,
.entry-content > .wp-block-table,
.entry-content > .wp-block-group {
  max-width: 100%;
}

.entry-content h1 {
  font-size: clamp(30px, 4vw, 45px);
}

.entry-content h2 {
  position: relative;
  margin-top: 38px;
  padding-top: 18px;
}

.entry-content h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 62px;
  height: 3px;
  border-radius: 999px;
  background: var(--gold);
}

.entry-content h3 {
  margin-top: 28px;
  color: #fff7d1;
}

.entry-content p,
.entry-content li {
  color: #dcebe4;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.25rem;
}

.entry-content li + li {
  margin-top: 8px;
}

.entry-content strong {
  color: var(--text);
}

.entry-content blockquote {
  max-width: 780px;
  margin: 24px auto;
  padding: 18px 20px;
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  background: rgba(245, 197, 66, 0.08);
  color: #fff5ce;
}

.wp-block-group,
.toc-box,
.note-panel {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(2, 17, 13, 0.42);
}

.toc-box {
  border-color: rgba(245, 197, 66, 0.24);
}

.toc-box h2 {
  margin-top: 0;
  padding-top: 0;
  font-size: 22px;
}

.toc-box h2::before {
  display: none;
}

.toc-box ol {
  margin-bottom: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.wp-block-image img,
.featured-media img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.wp-element-caption,
.wp-block-image figcaption {
  margin-top: 8px;
  color: var(--soft);
  font-size: 13px;
  text-align: left;
}

.wp-block-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 18px;
  margin-bottom: 24px;
  border-radius: var(--radius-sm);
}

.wp-block-table table,
.entry-content table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  table-layout: auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.wp-block-table th,
.wp-block-table td,
.entry-content th,
.entry-content td {
  padding: 13px 14px;
  border: 1px solid var(--border);
  color: #dfeee7;
  text-align: left;
  vertical-align: top;
  min-width: 150px;
  word-break: normal;
  overflow-wrap: anywhere;
}

.wp-block-table th,
.entry-content th {
  background: rgba(245, 197, 66, 0.12);
  color: #fff7d1;
  font-weight: 900;
}

.wp-block-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.wp-block-button__link {
  text-decoration: none;
}

.wp-block-yoast-faq-block,
.faq-fallback {
  display: grid;
  gap: 12px;
  max-width: 780px;
}

.schema-faq-section,
.faq-fallback .faq-item {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(10, 36, 29, 0.72);
}

.schema-faq-question,
.faq-fallback h3 {
  display: block;
  margin: 0 0 8px;
  color: var(--gold-2);
  font-size: 17px;
  font-weight: 900;
}

.schema-faq-answer p,
.faq-fallback p {
  margin-bottom: 0;
}

.compact-page-header {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.section-label {
  margin: 0 0 8px;
  color: var(--gold);
}

.archive-main {
  padding-top: 34px;
}

.archive-hero {
  width: 100%;
}

.archive-hero p {
  max-width: 68ch;
  color: var(--muted);
}

.post-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 36px;
}

.post-card {
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 197, 66, 0.38);
}

.post-card__thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
}

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

.post-card__body {
  padding: 18px;
}

.post-card h2 {
  margin-bottom: 8px;
  font-size: 21px;
}

.post-card h2 a {
  color: var(--text);
}

.post-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.navigation.pagination {
  margin: 28px 0 40px;
}

.nav-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-numbers {
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
}

.page-numbers.current {
  background: var(--gold);
  color: #161006;
}

.search-form {
  display: flex;
  gap: 10px;
  width: 100%;
}

.search-field {
  min-height: 48px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #061a15;
  color: var(--text);
}

.search-submit {
  cursor: pointer;
  background: var(--gold);
  color: #151006;
  border: 0;
}

.site-footer {
  margin-top: 46px;
  background: #020d0a;
  border-top: 1px solid var(--border);
}

.site-footer__inner {
  width: var(--container);
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.footer-brand strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 24px;
}

.footer-brand p,
.footer-disclaimer p,
.footer-copy,
.footer-contact {
  color: var(--muted);
  font-size: 14px;
}

.footer-navigation ul {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-navigation a {
  color: #dcebe4;
  font-size: 14px;
  font-weight: 700;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-disclaimer {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.age-pill {
  display: inline-flex;
  min-width: 42px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(240, 162, 58, 0.54);
  border-radius: var(--radius-sm);
  color: #ffe0a6;
  font-weight: 950;
  background: rgba(240, 162, 58, 0.1);
}

.footer-copy {
  grid-column: 1 / -1;
  margin: 0;
}

@media (max-width: 980px) {
  :root {
    --container: min(100vw - 28px, 760px);
  }

  .hero-app {
    grid-template-columns: 1fr;
  }

  .hero-app__visual,
  .hero-app__visual img {
    min-height: 320px;
  }

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

  .intro-strip,
  .post-list,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .footer-navigation ul {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .site-header__inner {
    min-height: 64px;
  }

  .site-branding__tag {
    display: none;
  }

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

  .primary-navigation {
    position: fixed;
    top: 64px;
    left: 14px;
    right: 14px;
    display: none;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(2, 17, 13, 0.98);
    box-shadow: var(--shadow);
  }

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

  .primary-navigation ul {
    display: grid;
    gap: 4px;
  }

  .primary-navigation a {
    min-height: 42px;
    align-items: center;
    padding: 8px 10px;
  }

  .hero-app {
    padding-top: 20px;
    gap: 16px;
  }

  .hero-app__content,
  .content-shell,
  .archive-hero {
    padding: 20px;
  }

  .app-kicker {
    border-radius: var(--radius);
    font-size: 12px;
  }

  h1 {
    font-size: 32px;
  }

  .hero-lead {
    font-size: 17px;
  }

  .hero-meta {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .hero-meta div {
    padding: 10px;
  }

  .hero-primary-action,
  .button-primary,
  .wp-block-button__link {
    width: 100%;
  }

  .intro-strip div {
    padding: 16px;
  }

  .toc-box ol {
    grid-template-columns: 1fr;
  }

  .entry-content h2 {
    margin-top: 32px;
  }

  .visual-status {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-disclaimer {
    display: grid;
  }

  .search-form {
    display: grid;
  }
}

@media (max-width: 420px) {
  :root {
    --container: calc(100vw - 22px);
  }

  .site-wordmark img,
  .custom-logo {
    max-width: 96px;
  }

  .site-branding__name {
    font-size: 16px;
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }

  .hero-app__visual,
  .hero-app__visual img {
    min-height: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
