@import url("/assets/fonts.css");

/* ============================================================ Grundlagen */

:root {
  --green: #afca0b;
  --green-ink: #5b7000;
  --green-deep: #7e9406;
  --green-soft: #f2f6d9;
  --ink: #1d2124;
  --ink-soft: #33393e;
  --body: #414850;
  --muted: #6d757c;
  --line: #e3e7d6;
  --line-strong: #d3d9bf;
  --paper: #ffffff;
  --sand: #f7f8f1;
  --sand-deep: #eef1e2;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(29, 33, 36, 0.04), 0 12px 32px -18px rgba(29, 33, 36, 0.28);
  --shadow-hover: 0 2px 4px rgba(29, 33, 36, 0.05), 0 22px 44px -22px rgba(29, 33, 36, 0.35);
  --shell: 1240px;
  --header-h: 84px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(1rem, 0.96rem + 0.16vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

button {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
}

::selection {
  background: var(--green);
  color: #1d2124;
}

:focus-visible {
  outline: 3px solid var(--green-deep);
  outline-offset: 3px;
  border-radius: 3px;
}

.shell {
  width: min(100% - 48px, var(--shell));
  margin-inline: auto;
}

.sr-only {
  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 {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--ink);
  color: #fff;
  border-radius: 0 0 8px 8px;
  font-size: 0.9rem;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 0;
}

.icon {
  flex: none;
}

/* ============================================================ Kopfzeile */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--green);
  color: #fff;
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  text-decoration: none;
}

.brand img {
  width: auto;
  height: 46px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 13px;
  border-radius: 6px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.16s var(--ease);
}

.nav-link:hover,
.nav-item:focus-within > .nav-link {
  background: rgba(255, 255, 255, 0.16);
}

.nav-link[aria-current="page"] {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 -2px 0 #fff;
}

.sub-toggle {
  display: none;
}

.submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  padding: 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 48px -20px rgba(20, 24, 28, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease), visibility 0.16s;
}

.nav-item:hover > .submenu,
.nav-item:focus-within > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu ul {
  list-style: none;
}

.submenu a {
  display: block;
  padding: 9px 12px;
  border-radius: 7px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}

.submenu a:hover {
  background: var(--sand-deep);
  color: var(--ink);
}

.header-social,
.nav-social {
  display: flex;
  align-items: center;
  gap: 2px;
}

.header-social {
  margin-left: 14px;
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
}

.social-link,
.header-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  transition: background 0.16s var(--ease);
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.18);
}

.nav-social {
  display: none;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-toggle span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-toggle .nav-toggle-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-close {
  display: inline-flex;
}

/* ============================================================ Bausteine */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--green-ink);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--green);
}

.eyebrow-light {
  color: #fff;
}

.eyebrow-light::before {
  background: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease), border-color 0.18s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}

.btn-dark:hover {
  background: #000;
}

.btn-light {
  background: #fff;
  color: var(--ink);
}

.btn-light:hover {
  background: var(--sand);
}

.btn-outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-outline:hover {
  border-color: var(--ink);
  background: #fff;
}

.btn-block {
  width: 100%;
}

.kicker {
  color: var(--green-ink);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.kicker a {
  text-decoration: none;
}

.kicker a:hover {
  text-decoration: underline;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green-ink);
  font-weight: 500;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* ============================================================ Hero */

.hero {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(175, 202, 11, 0.13) 0%, rgba(175, 202, 11, 0) 58%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: clamp(48px, 6vw, 84px) 0 clamp(44px, 5.5vw, 76px);
}

.hero h1 {
  font-size: clamp(2.15rem, 1.6rem + 2.5vw, 3.55rem);
  line-height: 1.06;
  max-width: 15ch;
}

.hero-sub {
  margin-top: 22px;
  color: var(--green-ink);
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.3rem);
  font-weight: 400;
  line-height: 1.5;
  max-width: 46ch;
}

.hero-text {
  margin-top: 18px;
  max-width: 52ch;
  color: var(--body);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 34px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  list-style: none;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stats strong {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

/* Aufmacherkarte */

.featured {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.featured-media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--sand-deep);
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.featured:hover .featured-media img {
  transform: scale(1.035);
}

.featured-body {
  padding: 26px 28px 28px;
}

.featured-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--green-soft);
  border-radius: 999px;
  color: var(--green-ink);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.featured-title {
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.55rem);
  line-height: 1.25;
}

.featured-title a,
.card-title a {
  text-decoration: none;
}

.featured-title a:hover,
.card-title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: var(--green);
}

.featured-text {
  margin-top: 10px;
  color: var(--body);
  font-size: 0.94rem;
  line-height: 1.62;
}

.featured-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

/* ============================================================ Archiv */

.archive {
  padding: clamp(44px, 5.5vw, 76px) 0;
  background: var(--sand);
  border-bottom: 1px solid var(--line);
}

.archive-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.archive-head h2 {
  font-size: clamp(1.7rem, 1.4rem + 1vw, 2.3rem);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(100%, 380px);
}

.search > .icon {
  position: absolute;
  left: 16px;
  color: var(--muted);
  pointer-events: none;
}

.search input {
  width: 100%;
  padding: 13px 44px 13px 46px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.search input::placeholder {
  color: #8b939a;
}

.search input:focus {
  outline: none;
  border-color: var(--green-deep);
  box-shadow: 0 0 0 4px rgba(175, 202, 11, 0.22);
}

.search-clear {
  position: absolute;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--sand-deep);
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
}

.filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: 26px 0 30px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease);
}

.pill span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
}

.pill:hover {
  border-color: var(--ink);
  background: #fff;
}

.pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.pill.is-active span {
  color: rgba(255, 255, 255, 0.7);
}

.result-count {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

/* Raster und Karten */

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

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

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-hover);
}

.card-media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--sand-deep);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.card:hover .card-media img {
  transform: scale(1.04);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 22px 22px;
}

.card-kicker {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.card-date {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.card-title {
  font-size: 1.14rem;
  line-height: 1.32;
  letter-spacing: -0.012em;
}

.card-text {
  margin-top: 9px;
  color: var(--body);
  font-size: 0.89rem;
  line-height: 1.6;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.76rem;
}

.card-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 500;
  transition: gap 0.2s var(--ease);
}

.card:hover .card-more {
  gap: 10px;
}

.js .card[data-hidden="true"] {
  display: none;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 38px;
}

.empty-state {
  padding: 56px 24px;
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
}

.empty-title {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 600;
}

.empty-state p + p {
  margin-top: 8px;
}

.empty-state .btn {
  margin-top: 22px;
}

/* Themenband */

.topics-section {
  padding: clamp(52px, 6vw, 88px) 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 1.4rem + 1vw, 2.3rem);
}

.section-lead {
  margin-top: 14px;
  color: var(--body);
}

.topics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.topic {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px 22px 24px;
  background: #fff;
  text-decoration: none;
  transition: background 0.18s var(--ease);
}

.topic:hover {
  background: var(--sand);
}

.topic-index {
  color: var(--green-deep);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.topic h3 {
  font-size: 1.02rem;
  line-height: 1.3;
}

.topic p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
  flex: 1;
}

.topic-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--green-ink);
  font-size: 0.78rem;
  font-weight: 500;
}

/* CTA-Band */

.cta-band {
  background: #f1f2f3;
  color: var(--ink);
  border-top: 1px solid var(--line);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: clamp(40px, 5vw, 64px) 0;
}

.cta-inner h2 {
  color: var(--ink);
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.15rem);
}

.cta-inner p {
  max-width: 56ch;
  margin-top: 10px;
  color: var(--body);
  font-size: 0.96rem;
}

.cta-inner .btn {
  flex: none;
}

/* ============================================================ Fußzeile */

.site-footer {
  background: var(--green);
  color: #fff;
  font-weight: 300;
}

.footer-inner {
  padding: 50px 0 20px;
}

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

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

.footer-brand img {
  width: 264px;
  max-width: 100%;
  height: auto;
}

.footer-claim {
  color: #fff;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: 1px;
  text-align: center;
}

.footer-links {
  padding: 20px;
}

.footer-links-title {
  margin-bottom: 10px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 1px;
  line-height: 1.2;
  text-transform: uppercase;
  opacity: 0.8;
}

.footer-links-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  list-style: none;
}

.footer-links-list a {
  display: inline-block;
  padding: 3px 0;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.5;
  text-decoration: none;
}

.footer-links-list a:hover {
  text-decoration: underline;
}

.footer-social-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 20px;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  transition: background 0.16s var(--ease);
}

.footer-social a:hover {
  background: rgba(255, 255, 255, 0.16);
}

.footer-social .icon {
  width: auto;
  height: 25px;
}

.footer-legal {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.footer-legal ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  list-style: none;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 300;
  line-height: 1.125rem;
  letter-spacing: 1px;
}

.footer-legal a {
  color: #fff;
  text-decoration: none;
}

.footer-legal a:hover {
  text-decoration: underline;
}

.footer-sep {
  margin: 0 2px;
  opacity: 0.9;
}

@media (min-width: 901px) {
  .footer-social-wrap {
    padding-right: 84px;
  }
}

/* ============================================================ Seitenkopf */
/* ============================================================ Seitenkopf */

.page-hero {
  padding: clamp(40px, 5vw, 64px) 0 clamp(32px, 4vw, 48px);
  background:
    radial-gradient(100% 80% at 100% 0%, rgba(175, 202, 11, 0.12), rgba(175, 202, 11, 0) 60%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(2rem, 1.6rem + 2vw, 3.1rem);
  max-width: 20ch;
}

.page-lead {
  max-width: 62ch;
  margin-top: 16px;
  color: var(--body);
  font-size: 1.06rem;
}

.page-meta {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.82rem;
}

.breadcrumbs {
  margin-bottom: 26px;
}

.breadcrumbs ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  color: var(--muted);
  font-size: 0.78rem;
}

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

.breadcrumbs a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.crumb-sep {
  display: inline-flex;
  color: #a7ae9b;
  transform: rotate(-90deg);
}

.other-topics {
  margin-top: 44px;
}

.other-topics .pills {
  margin-top: 12px;
}

/* ============================================================ Artikel */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  width: 100%;
  height: 3px;
  background: transparent;
  pointer-events: none;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--green);
  transition: width 0.1s linear;
}

.article-shell {
  width: min(100% - 48px, 1100px);
  padding-top: 30px;
}

.article-head {
  max-width: 100%;
}

.article-head h1 {
  margin-top: 12px;
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3.15rem);
  line-height: 1.1;
}

.article-lead {
  max-width: 68ch;
  margin-top: 18px;
  color: var(--body);
  font-size: clamp(1.02rem, 0.98rem + 0.25vw, 1.16rem);
  font-weight: 300;
  line-height: 1.62;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.byline {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.byline img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.byline span {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.byline strong {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
}

.byline small {
  color: var(--muted);
  font-size: 0.72rem;
}

.meta-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-sep {
  width: 3px;
  height: 3px;
  background: var(--line-strong);
  border-radius: 50%;
}

.share {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease);
}

.share-btn:hover {
  background: var(--sand);
  border-color: var(--ink);
}

.share-btn.is-done {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green-ink);
}

.article-cover {
  margin: 36px auto 0;
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--sand-deep);
  aspect-ratio: 2 / 1;
}

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

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
  padding: clamp(36px, 4vw, 56px) 0 20px;
  max-width: 100%;
}

.article-body {
  max-width: 740px;
  font-size: 1.12rem;
  line-height: 1.8;
  color: var(--ink-soft);
}

.article-body p {
  margin: 0 0 1.15em;
}

.article-body h2 {
  margin: 1.9em 0 0.55em;
  font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.7rem);
  line-height: 1.25;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.article-body h3 {
  margin: 1.6em 0 0.45em;
  font-size: clamp(1.12rem, 1.05rem + 0.3vw, 1.3rem);
  line-height: 1.32;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.article-body h4 {
  margin: 1.4em 0 0.4em;
  font-size: 1.05rem;
}

.heading-anchor {
  margin-left: 10px;
  color: var(--line-strong);
  font-weight: 400;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.16s var(--ease), color 0.16s var(--ease);
}

.article-body h2:hover .heading-anchor,
.article-body h3:hover .heading-anchor,
.heading-anchor:focus {
  opacity: 1;
  color: var(--green-deep);
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.2em;
  padding-left: 1.35em;
}

.article-body li {
  margin-bottom: 0.45em;
}

.article-body li::marker {
  color: var(--green-deep);
}

.article-body a {
  color: var(--green-ink);
  text-decoration: underline;
  text-decoration-color: rgba(91, 112, 0, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.article-body a:hover {
  text-decoration-color: var(--green-ink);
  text-decoration-thickness: 2px;
}

.article-body strong {
  color: var(--ink);
  font-weight: 600;
}

.article-body blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--green);
  color: var(--ink);
  font-size: 1.06em;
  font-style: italic;
}

.article-body img {
  margin: 1.6em 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.article-body hr {
  margin: 2.2em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.article-body sup {
  font-size: 0.68em;
  line-height: 0;
}

.table-wrap {
  margin: 1.6em 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.table-wrap th,
.table-wrap td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table-wrap th {
  background: var(--sand);
  font-weight: 600;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 40px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.tag {
  padding: 6px 12px;
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.author-box {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 22px;
  margin-top: 34px;
  padding: 26px;
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.author-box img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 600;
}

.author-role {
  margin: 2px 0 8px;
  color: var(--green-ink);
  font-size: 0.78rem;
}

.author-box p:not(.author-name):not(.author-role) {
  font-size: 0.9rem;
  line-height: 1.6;
}

.author-box .text-link {
  margin-top: 10px;
  font-size: 0.85rem;
}

.article-aside {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: grid;
  gap: 20px;
}

.toc {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.toc-title {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.toc ol {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  list-style: decimal;
}

.toc li {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.toc li.is-sub {
  margin-left: 14px;
  list-style: none;
}

.toc a.is-active {
  color: var(--green-ink);
  font-weight: 500;
}

.toc a {
  color: var(--ink-soft);
  text-decoration: none;
}

.toc a:hover {
  color: var(--green-ink);
  text-decoration: underline;
}

.aside-card {
  padding: 22px;
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.aside-book {
  background: #fff;
  border-color: #e1e5d3;
  box-shadow: 0 12px 30px rgba(24, 32, 16, 0.07);
}

.book-teaser {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 12px 0 14px;
}

.book-teaser img {
  flex: none;
  width: 74px;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 8px 18px rgba(10, 24, 60, 0.22);
}

.book-title {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.25;
}

.book-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.aside-book .aside-text {
  margin-bottom: 16px;
}

.aside-product {
  background: #fff;
  border-color: #dfe4cf;
}

.aside-product .aside-kicker {
  color: var(--muted);
}

.product-teaser {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0 14px;
}

.product-teaser > img {
  flex: none;
  width: 86px;
  height: 86px;
  padding: 6px;
  object-fit: contain;
  background: var(--sand);
  border-radius: 8px;
}

.product-brand {
  margin: 0 0 2px;
  color: var(--green-ink);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.product-name {
  margin: 0 0 2px;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
}

.product-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.product-rec {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--ink-soft, #5a6154);
  font-size: 0.76rem;
  line-height: 1.3;
}

.product-rec img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.aside-product .aside-text {
  margin-bottom: 14px;
}

.article-body ol a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(156, 181, 0, 0.5);
}

.article-body ol a:hover {
  text-decoration-color: var(--green);
}

.aside-kicker {
  color: var(--green-ink);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.aside-title {
  margin-top: 8px;
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.3;
}

.aside-text {
  margin: 8px 0 16px;
  color: var(--body);
  font-size: 0.84rem;
  line-height: 1.55;
}

.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 34px 0 8px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.pager-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.pager-item:hover {
  background: var(--sand);
  border-color: var(--line-strong);
}

.pager-item span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.pager-item strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
}

.pager-prev .icon {
  transform: rotate(180deg);
}

.pager-next {
  text-align: right;
  align-items: flex-end;
}

.pager-next span {
  flex-direction: row-reverse;
}

.related {
  padding: clamp(44px, 5vw, 68px) 0;
  background: var(--sand);
  border-top: 1px solid var(--line);
}

.related .shell {
  max-width: 1240px;
}

.related-head {
  margin-bottom: 28px;
}

.related-head h2 {
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
}

.article + .cta-band {
  margin-top: 0;
}

.notfound {
  padding: 90px 0 110px;
}

.notfound-actions {
  margin-top: 28px;
}

/* ============================================================ Responsive */

@media (max-width: 1180px) {
  .header-social {
    display: none;
  }

  .nav {
    gap: 10px;
  }

  .nav-link {
    padding: 10px 9px;
    font-size: 0.72rem;
  }

  .grid {
    gap: 22px;
  }
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-links {
    padding: 10px 24px 20px;
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }

  .footer-links-title {
    text-align: center;
  }

  .footer-links-list a {
    font-size: 0.8125rem;
  }

  .footer-brand {
    gap: 4px;
  }

  .footer-brand img {
    width: 210px;
  }

  .footer-social-wrap {
    justify-content: center;
    padding-right: 20px;
  }

  .footer-inner {
    padding-top: 50px;
  }
}

@media (max-width: 1024px) {
  :root {
    --header-h: 76px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .hero h1 {
    max-width: 18ch;
  }

  .featured {
    max-width: 720px;
  }

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

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

  .topic:last-child {
    grid-column: span 2;
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-aside {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toc {
    display: none;
  }

  .article-body {
    max-width: 100%;
  }

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

  .nav {
    position: fixed;
    inset: var(--header-h) 0 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 18px 24px 40px;
    overflow-y: auto;
    background: var(--green);
    color: #fff;
  }

  .nav.is-open {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  }

  .nav-link {
    padding: 15px 2px;
    font-size: 0.86rem;
    letter-spacing: 0.08em;
  }

  .nav-link[aria-current="page"] {
    background: transparent;
    box-shadow: none;
    text-decoration: underline;
    text-underline-offset: 6px;
  }

  .sub-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
  }

  .sub-toggle[aria-expanded="true"] .icon {
    transform: rotate(180deg);
  }

  .submenu {
    position: static;
    grid-column: 1 / -1;
    display: none;
    min-width: 0;
    margin: 0 0 14px;
    padding: 8px;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
  }

  .nav-item.is-open .submenu {
    display: block;
  }

  .submenu a {
    padding: 11px 12px;
    font-size: 0.88rem;
  }

  .nav-social {
    display: flex;
    gap: 6px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.28);
  }

  .nav-social .social-link {
    width: 40px;
    height: 40px;
  }

  body.nav-open {
    overflow: hidden;
  }
}

@media (max-width: 720px) {
  .shell,
  .article-shell {
    width: min(100% - 36px, var(--shell));
  }

  .hero-grid {
    padding-top: 38px;
  }

  .hero h1 {
    font-size: clamp(1.9rem, 1.5rem + 2.4vw, 2.6rem);
    max-width: none;
  }

  .hero-stats {
    gap: 14px 24px;
  }

  .hero-stats li:nth-child(3) {
    display: none;
  }

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

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

  .topic:last-child {
    grid-column: auto;
  }

  .archive-head {
    align-items: flex-start;
  }

  .search {
    width: 100%;
  }

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

  .pills {
    gap: 6px;
  }

  .pill {
    padding: 8px 13px;
    font-size: 0.8rem;
  }

  .featured-body {
    padding: 22px;
  }

  .article-shell {
    padding-top: 22px;
  }

  .article-meta {
    gap: 14px;
  }

  .share {
    margin-left: 0;
    width: 100%;
  }

  .share-btn span {
    display: none;
  }

  .share-btn {
    width: 40px;
    height: 40px;
    justify-content: center;
    padding: 0;
  }

  .article-cover {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius);
  }

  .article-body {
    font-size: 1.04rem;
  }

  .article-aside {
    grid-template-columns: minmax(0, 1fr);
  }

  .author-box {
    grid-template-columns: minmax(0, 1fr);
    text-align: left;
  }

  .author-box img {
    width: 72px;
    height: 72px;
  }

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

  .pager-next {
    text-align: left;
    align-items: flex-start;
  }

  .pager-next span {
    flex-direction: row;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .footer-legal {
    flex-wrap: wrap;
    gap: 12px;
  }
}

@media (max-width: 420px) {
  .brand img {
    height: 38px;
  }

  .nav-toggle span {
    font-size: 0.72rem;
  }

  .footer-cols {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

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

@media print {
  .site-header,
  .site-footer,
  .article-aside,
  .share,
  .pager,
  .related,
  .cta-band,
  .progress,
  .breadcrumbs {
    display: none !important;
  }

  .article-layout {
    display: block;
  }

  body {
    font-size: 11pt;
  }
}
