:root {
  color-scheme: light;
  --bg: #f7f8f4;
  --surface: #ffffff;
  --surface-muted: #eef3ec;
  --ink: #17201b;
  --muted: #5d685f;
  --line: #dfe6dc;
  --accent: #1f6b52;
  --accent-dark: #154737;
  --amber: #b86424;
  --blue: #315f85;
  --shadow: 0 16px 48px rgba(23, 32, 27, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: white;
  padding: 0.5rem 0.75rem;
  z-index: 20;
}

.skip-link:focus {
  top: 1rem;
}

.topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}

.topbar-inner,
.footer-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.main-nav,
.footer nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.main-nav a,
.footer a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.94rem;
}

.site-shell {
  max-width: 1380px;
  margin: 0 auto;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 270px;
  gap: 1.25rem;
  align-items: start;
}

.content {
  min-width: 0;
}

.rail {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 1rem;
}

.rail-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.rail-block h2 {
  font-size: 0.92rem;
  margin: 0 0 0.65rem;
}

.rail-block a:not(.button) {
  display: block;
  color: var(--ink);
  text-decoration: none;
  padding: 0.44rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.94rem;
}

.rail-block a:first-of-type {
  border-top: 0;
}

.rail-block p,
.rail-block li {
  color: var(--muted);
  font-size: 0.92rem;
}

.rail-block ul {
  padding-left: 1.1rem;
  margin: 0;
}

.highlight {
  border-color: #c9dccf;
  background: #fbfdf9;
}

.button,
.cta-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.65rem 0.9rem;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: 750;
}

.hero {
  min-height: 470px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: grid;
  align-items: end;
  background: #23352d;
  box-shadow: var(--shadow);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 20, 15, 0.78), rgba(10, 20, 15, 0.32) 58%, rgba(10, 20, 15, 0.08));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 710px;
  padding: clamp(1.25rem, 4vw, 3rem);
  color: white;
}

.eyebrow {
  color: var(--amber);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.78rem;
  margin: 0 0 0.5rem;
}

.hero .eyebrow {
  color: #ffd39a;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.9rem);
  max-width: 12ch;
}

.hero p {
  font-size: 1.1rem;
  max-width: 62ch;
}

.section {
  margin: 1.25rem 0;
  padding: clamp(1rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.section.unframed {
  background: transparent;
  border: 0;
  padding: 0;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 1rem;
  min-height: 190px;
}

.card h3 {
  margin-top: 0;
}

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

.article-list {
  display: grid;
  gap: 0.8rem;
}

.article-row {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
}

.article-row span {
  color: var(--muted);
}

.breadcrumb {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(1.2rem, 4vw, 3rem);
  box-shadow: var(--shadow);
}

.article-header h1 {
  color: var(--ink);
  font-size: clamp(2rem, 4.2vw, 4rem);
  max-width: 15ch;
}

.lead {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 68ch;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 0;
  margin: 1.4rem 0;
}

.article-body {
  max-width: 790px;
}

.article-body h2 {
  margin-top: 2rem;
  font-size: 1.65rem;
}

.article-body p,
.article-body li {
  color: #303a33;
}

.article-body blockquote {
  margin: 1.5rem 0;
  border-left: 4px solid var(--accent);
  padding: 0.3rem 0 0.3rem 1rem;
  color: var(--muted);
  background: var(--surface-muted);
}

.notice {
  border-left: 4px solid var(--blue);
  background: #f2f7fb;
  padding: 1rem;
  border-radius: 6px;
}

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: 2rem;
}

.footer p {
  color: var(--muted);
  margin: 0.25rem 0 0;
}

@media (max-width: 1120px) {
  .site-shell {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .left-rail {
    display: none;
  }
}

@media (max-width: 820px) {
  .topbar-inner,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-shell {
    grid-template-columns: 1fr;
    padding: 0.85rem;
  }

  .rail {
    position: static;
  }

  .right-rail {
    order: 2;
  }

  .hero {
    min-height: 430px;
  }

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