:root {
  --bg: #f4fbf8;
  --surface: #ffffff;
  --surface-strong: #e9f7ef;
  --text: #12312b;
  --muted: #4f6b64;
  --primary: #078f68;
  --primary-dark: #05624e;
  --secondary: #0ea5a3;
  --accent: #f5b642;
  --footer: #231534;
  --border: #cfe5dc;
  --shadow: 0 18px 45px rgba(17, 52, 45, 0.12);
  --radius: 8px;
  --content: min(1120px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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.72;
  letter-spacing: 0;
}

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

a {
  color: var(--primary-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--accent);
  color: #1e1a0c;
}

.skip-link:focus {
  top: 16px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 251, 248, 0.94);
  border-bottom: 1px solid rgba(207, 229, 220, 0.8);
  backdrop-filter: blur(14px);
}

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

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

.site-branding img,
.custom-logo,
.custom-logo-link img,
.brand-logo-img,
.brand-link img,
.site-footer .custom-logo,
.site-footer .brand-logo-img {
  width: auto;
  max-width: 156px;
  max-height: 48px;
  object-fit: contain;
}

.brand-text-logo,
.custom-logo-link,
.brand-logo-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary-dark);
  font-size: 1.42rem;
  font-weight: 800;
  text-decoration: none;
}

.site-branding__label {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.primary-menu,
.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.primary-menu a,
.footer-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

.primary-menu a:hover,
.primary-menu a:focus-visible,
.footer-menu a:hover,
.footer-menu a:focus-visible {
  background: var(--surface-strong);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.menu-toggle__bar,
.menu-toggle::before,
.menu-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

.hero {
  width: var(--content);
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(300px, 0.86fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  min-height: 540px;
  padding: clamp(28px, 5vw, 54px);
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(7, 143, 104, 0.96), rgba(14, 165, 163, 0.92)),
    radial-gradient(circle at 80% 18%, rgba(245, 182, 66, 0.35), transparent 34%);
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.9rem;
  font-weight: 750;
}

.hero h1,
.page-hero h1,
.archive-hero h1 {
  margin: 0;
  color: inherit;
  font-size: clamp(2.05rem, 4vw, 4.2rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.hero__intro {
  max-width: 680px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 24px;
  padding: 13px 20px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #1e1a0c;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(44, 31, 8, 0.18);
}

.primary-action:hover,
.primary-action:focus-visible {
  color: #1e1a0c;
  transform: translateY(-1px);
}

.hero__signals {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.hero__signals span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.92rem;
}

.hero__visual {
  align-self: stretch;
  display: flex;
  align-items: center;
}

.hero__image {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.content-shell {
  width: min(920px, calc(100vw - 32px));
  margin: 28px auto 56px;
  padding: clamp(24px, 4vw, 42px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.homepage-content {
  margin-top: 24px;
}

.page-hero {
  width: min(920px, calc(100vw - 32px));
  margin: 28px auto 0;
  padding: clamp(28px, 5vw, 46px);
  background: linear-gradient(135deg, #ffffff, #eaf8f2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.page-hero .eyebrow {
  color: var(--primary-dark);
}

.page-hero h1,
.archive-hero h1 {
  color: var(--text);
  font-size: clamp(1.9rem, 3.3vw, 3.2rem);
}

.page-content {
  margin-top: 18px;
}

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

.content-shell h2 {
  margin: 36px 0 12px;
  color: #0b4b3b;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.22;
}

.content-shell h3 {
  margin: 26px 0 10px;
  color: #173f36;
  font-size: 1.16rem;
  line-height: 1.3;
}

.content-shell p,
.content-shell li {
  color: #243f39;
}

.content-shell ul,
.content-shell ol {
  padding-left: 1.35rem;
}

.content-shell figure {
  margin: 28px 0;
}

.content-shell .wp-block-image img,
.content-shell figure img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.content-shell figcaption {
  color: var(--muted);
  font-size: 0.92rem;
  text-align: left;
}

.wp-block-group.is-style-bet3999-note,
.guide-note,
.toc-panel {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f2fbf7;
}

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

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fbfffd;
}

.faq-item h3 {
  margin-top: 0;
}

.archive-hero {
  width: var(--content);
  margin: 28px auto;
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.post-list {
  width: var(--content);
  margin: 0 auto 56px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.post-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.search-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search-field {
  min-height: 44px;
  width: min(320px, 100%);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.search-form button {
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: #ffffff;
  font-weight: 750;
}

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

.site-footer__inner {
  width: var(--content);
  margin: 0 auto;
  padding: 38px 0;
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1fr;
  gap: 28px;
}

.site-footer p,
.site-footer a,
.site-footer strong {
  color: #f8f5ff;
}

.footer-menu {
  align-items: flex-start;
  flex-direction: column;
}

.footer-menu a {
  color: #f8f5ff;
}

.responsible-note {
  color: #f7d88a;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 860px) {
  .site-header__inner {
    min-height: 66px;
  }

  .menu-toggle {
    display: block;
  }

  .primary-nav {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

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

  .primary-menu {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-menu a {
    width: 100%;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 24px;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 10vw, 2.7rem);
  }

  .primary-action {
    width: 100%;
  }

  .hero__visual {
    order: -1;
  }

  .hero__image {
    max-height: 280px;
  }

  .toc-panel ul,
  .post-list,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .site-branding__label {
    display: none;
  }
}

@media (max-width: 520px) {
  :root {
    --content: min(100vw - 22px, 1120px);
  }

  body {
    font-size: 15.5px;
  }

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

  .site-branding img,
  .custom-logo,
  .custom-logo-link img,
  .brand-logo-img,
  .site-footer .custom-logo,
  .site-footer .brand-logo-img {
    max-width: 132px;
    max-height: 42px;
  }
}

