:root {
  --ink: #183127;
  --muted: #617268;
  --forest: #245f49;
  --forest-dark: #174634;
  --leaf: #7da76d;
  --mint: #e7f1e9;
  --cream: #fbfaf5;
  --paper: #ffffff;
  --line: #d9e4dc;
  --accent: #e6a85c;
  --shadow: 0 18px 48px rgba(25, 61, 45, 0.09);
  --radius-lg: 28px;
  --radius-md: 18px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--cream);
}

body {
  min-width: 280px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(125, 167, 109, 0.13), transparent 25rem),
    var(--cream);
  font: 17px/1.72 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
textarea {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img,
video,
iframe,
object,
embed {
  max-width: 100%;
  height: auto;
}

img {
  display: block;
}

a {
  color: var(--forest);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}

a:hover {
  color: var(--forest-dark);
  text-decoration-thickness: 2px;
}

p,
ul,
ol,
blockquote,
table,
figure {
  margin-top: 0;
  margin-bottom: 1.15em;
}

h1,
h2,
h3,
h4 {
  margin: 1.45em 0 0.58em;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.16;
  text-wrap: balance;
}

h1 {
  margin-top: 0;
  font-size: clamp(2rem, 4.2vw, 3.85rem);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.55rem, 2.5vw, 2.25rem);
}

h3 {
  font-size: clamp(1.22rem, 1.8vw, 1.55rem);
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}

th,
td {
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--mint);
}

blockquote {
  margin-left: 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--leaf);
  border-radius: 0 12px 12px 0;
  background: #f4f8f4;
}

pre,
code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.7rem 1rem;
  transform: translateY(-150%);
  border-radius: 10px;
  color: #fff;
  background: var(--forest-dark);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid rgba(36, 95, 73, 0.13);
  background: rgba(251, 250, 245, 0.93);
  backdrop-filter: blur(16px);
}

.header-inner,
.page-shell,
.footer-inner {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  min-height: 84px;
  align-items: center;
  gap: 1.4rem;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.72rem;
  color: var(--forest-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px 14px 14px 5px;
  color: #fff;
  background: linear-gradient(145deg, var(--leaf), var(--forest));
  box-shadow: 0 8px 18px rgba(36, 95, 73, 0.2);
  font-family: system-ui, sans-serif;
  font-size: 1.25rem;
}

.desktop-nav {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 0.16rem;
}

.desktop-nav a {
  padding: 0.62rem 0.74rem;
  border-radius: 10px;
  color: #30483d;
  font-size: 0.94rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] {
  color: var(--forest-dark);
  background: var(--mint);
}

.mobile-nav {
  display: none;
  margin-left: auto;
}

.mobile-nav summary {
  padding: 0.64rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav-links {
  position: absolute;
  top: calc(100% - 0.3rem);
  right: 16px;
  left: 16px;
  display: grid;
  gap: 0.3rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.mobile-nav-links a {
  padding: 0.7rem 0.8rem;
  border-radius: 9px;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}

.mobile-nav-links a:hover {
  background: var(--mint);
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 282px;
  gap: 30px;
  padding-top: clamp(28px, 5vw, 64px);
  padding-bottom: clamp(42px, 6vw, 78px);
}

.page-shell-wide {
  grid-template-columns: minmax(0, 1fr);
}

.content-card,
.sidebar-card,
.category-card,
.legal-nav {
  border: 1px solid rgba(36, 95, 73, 0.14);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.content-card {
  min-width: 0;
  padding: clamp(24px, 4.5vw, 58px);
  border-radius: var(--radius-lg);
}

.article-meta,
.eyebrow {
  color: var(--forest);
  font-size: 0.85rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-bottom: 1rem;
}

.article-body {
  min-width: 0;
  overflow-wrap: anywhere;
}

.article-body > :first-child {
  margin-top: 0;
}

.article-body img {
  width: auto;
  max-width: 100%;
  max-height: 520px;
  margin: 1.5rem auto;
  border-radius: 15px;
  object-fit: contain;
}

.article-body .hero-img,
.compact-hero {
  width: 100%;
  max-height: 290px;
  object-fit: cover;
}

.article-body a {
  font-weight: 560;
}

.article-body ul,
.article-body ol {
  padding-left: 1.35rem;
}

.article-body li + li {
  margin-top: 0.35rem;
}

.article-body table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article-body th,
.article-body td {
  min-width: 130px;
  overflow-wrap: anywhere;
}

.breadcrumbs {
  margin-bottom: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: var(--muted);
}

.lead {
  max-width: 48rem;
  color: #3b5046;
  font-size: clamp(1.08rem, 1.7vw, 1.26rem);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  align-items: center;
  gap: clamp(24px, 5vw, 58px);
}

.home-hero h1 {
  max-width: 13ch;
}

.hero-illustration {
  width: 100%;
  max-height: 290px;
  object-fit: contain;
  filter: drop-shadow(0 20px 28px rgba(36, 95, 73, 0.16));
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.15rem;
  border: 1px solid var(--forest);
  border-radius: 12px;
  color: #fff;
  background: var(--forest);
  font-weight: 750;
  text-decoration: none;
}

.button:hover {
  color: #fff;
  background: var(--forest-dark);
}

.button.secondary {
  color: var(--forest-dark);
  background: transparent;
}

.category-grid,
.article-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 1.35rem 0 2rem;
}

.category-card {
  display: block;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius-md);
  color: var(--ink);
  text-decoration: none;
  box-shadow: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  color: var(--ink);
  box-shadow: 0 14px 28px rgba(25, 61, 45, 0.1);
}

.category-card strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--forest-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.category-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.note {
  margin: 1.5rem 0;
  padding: 1.1rem 1.2rem;
  border: 1px solid #cddfce;
  border-radius: 14px;
  background: #f1f7f1;
}

.sidebar {
  align-self: start;
  position: sticky;
  top: 22px;
}

.sidebar-card {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(25, 61, 45, 0.07);
}

.sidebar-card + .sidebar-card {
  margin-top: 16px;
}

.sidebar-card h2 {
  margin: 0 0 0.8rem;
  font-size: 1.18rem;
}

.sidebar-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-card li + li {
  border-top: 1px solid var(--line);
}

.sidebar-card a {
  display: block;
  padding: 0.62rem 0;
  color: #30483d;
  font-size: 0.93rem;
  font-weight: 650;
  text-decoration: none;
}

.sidebar-card a:hover {
  color: var(--forest);
}

.legal-nav {
  padding: 1rem 1.2rem;
  border-radius: 14px;
  background: #f4f8f4;
  box-shadow: none;
}

.legal-nav ul {
  margin-bottom: 0;
}

.site-footer {
  color: #eaf3ed;
  background: #173d2f;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px 60px;
  padding-top: 44px;
  padding-bottom: 34px;
}

.footer-title {
  margin: 0 0 0.6rem;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
}

.footer-text {
  max-width: 34rem;
  margin: 0;
  color: #cfe0d6;
  font-size: 0.94rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1rem;
}

.footer-links a,
.footer-contact a {
  color: #f1f7f3;
}

.footer-contact {
  margin-top: 0.9rem;
  color: #cfe0d6;
}

.footer-bottom {
  grid-column: 1 / -1;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #b9cfc2;
  font-size: 0.86rem;
}

@media (max-width: 1040px) {
  .desktop-nav a:nth-child(5),
  .desktop-nav a:nth-child(6) {
    display: none;
  }

  .page-shell {
    grid-template-columns: minmax(0, 1fr) 245px;
    gap: 22px;
  }
}

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .header-inner {
    min-height: 72px;
  }

  .page-shell {
    display: block;
    padding-top: 26px;
  }

  .sidebar {
    position: static;
    margin-top: 20px;
  }

  .sidebar-card ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
  }

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

  .home-hero h1 {
    max-width: none;
  }

  .hero-illustration {
    max-height: 235px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
    line-height: 1.66;
  }

  .header-inner,
  .page-shell,
  .footer-inner {
    width: min(calc(100% - 24px), var(--container));
  }

  .brand {
    font-size: 1.28rem;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .content-card {
    padding: 22px 18px;
    border-radius: 20px;
  }

  h1 {
    font-size: clamp(1.78rem, 9.4vw, 2.45rem);
  }

  .category-grid,
  .article-links,
  .sidebar-card ul,
  .footer-links,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .sidebar-card li + li {
    border-top: 1px solid var(--line);
  }

  .footer-inner {
    gap: 24px;
  }

  .footer-bottom {
    grid-column: 1;
  }

  .article-body img,
  .article-body .hero-img,
  .compact-hero {
    max-height: 230px;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
