:root {
  --bg: #f7f8f4;
  --surface: #ffffff;
  --ink: #17201c;
  --muted: #5d6762;
  --line: #dfe4df;
  --green: #1f7a6d;
  --green-dark: #145b52;
  --coral: #d64f2f;
  --gold: #e9ba3f;
  --blue: #376f9f;
  --shadow: 0 18px 50px rgba(23, 32, 28, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(223, 228, 223, 0.9);
  background: rgba(247, 248, 244, 0.92);
  backdrop-filter: blur(16px);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand__mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--gold);
  font-weight: 800;
}

.brand__text {
  display: grid;
  line-height: 1.1;
}

.brand__text small,
.post-card__meta,
.post-meta,
.eyebrow {
  color: var(--muted);
}

.brand__text small,
.post-card__meta,
.post-meta {
  font-size: 0.86rem;
}

.site-nav,
.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
}

.site-nav a,
.footer-links a,
.read-more {
  color: var(--green-dark);
  font-weight: 700;
}

.site-nav a:hover,
.footer-links a:hover,
.read-more:hover {
  color: var(--coral);
}

.hero {
  min-height: min(720px, calc(100vh - 74px));
  display: grid;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(12, 18, 16, 0.88), rgba(12, 18, 16, 0.58), rgba(12, 18, 16, 0.22)),
    var(--hero-image) center / cover;
  color: #fff;
}

.hero__inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 78px;
}

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

.hero .eyebrow {
  color: var(--gold);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

h1 {
  max-width: 840px;
  font-size: clamp(2.35rem, 6vw, 5.6rem);
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 3.1rem);
  text-wrap: balance;
}

h3 {
  font-size: 1.25rem;
}

.hero__deck,
.post-description,
.page-head p,
.section-heading p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.12rem;
}

.section-heading p,
.page-head p,
.post-description {
  color: var(--muted);
}

.post-hero .post-meta,
.post-hero .post-description {
  color: rgba(255, 255, 255, 0.78);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
}

.button--primary {
  background: var(--green);
  color: #fff;
}

.button--primary:hover {
  background: var(--green-dark);
}

.button--secondary {
  border-color: rgba(255, 255, 255, 0.56);
  color: #fff;
}

.button--secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.content-band {
  padding: 58px 0 70px;
}

.section-heading {
  margin-bottom: 26px;
}

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

.post-list {
  display: grid;
  gap: 18px;
}

.post-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(23, 32, 28, 0.06);
}

.post-list .post-card {
  display: grid;
  grid-template-columns: 260px 1fr;
}

.post-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e7ece8;
}

.post-list .post-card__media {
  aspect-ratio: auto;
  min-height: 100%;
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.post-card:hover .post-card__media img {
  transform: scale(1.03);
}

.post-card__body {
  padding: 20px;
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.post-card__meta span::before {
  content: "/";
  margin-right: 8px;
  color: var(--line);
}

.post-card h3 a:hover {
  color: var(--green);
}

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

.ad-slot {
  width: min(900px, calc(100% - 32px));
  margin: 26px auto;
  padding: 20px;
  border: 1px dashed #a8b5ac;
  border-radius: 8px;
  background: #fff;
  text-align: center;
  color: var(--muted);
}

.ad-slot span {
  display: block;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ad-slot strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
}

.ad-slot p {
  margin: 6px auto 0;
  max-width: 560px;
  overflow-wrap: anywhere;
}

.post-hero,
.page-head {
  background:
    linear-gradient(90deg, rgba(12, 18, 16, 0.88), rgba(12, 18, 16, 0.58), rgba(12, 18, 16, 0.22)),
    var(--post-image, none) center / cover;
  color: #fff;
}

.page-head {
  background: #18231f;
}

.post-hero__inner,
.page-head .container {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 82px 0 72px;
}

.post-hero h1 {
  font-size: clamp(2.1rem, 5vw, 4.4rem);
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 42px;
  align-items: start;
  padding: 28px 0 60px;
}

.post-content {
  min-width: 0;
  color: #27312d;
  font-size: 1.05rem;
}

.post-content > * {
  width: min(100%, 760px);
  max-width: 760px;
}

.post-content h2,
.post-content h3 {
  margin-top: 34px;
  color: var(--ink);
}

.post-content p,
.post-content ul,
.post-content ol {
  margin: 18px 0;
}

.post-content a {
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.post-content blockquote {
  margin: 28px 0;
  padding: 8px 0 8px 18px;
  border-left: 4px solid var(--gold);
  color: var(--muted);
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
}

.post-content th,
.post-content td {
  padding: 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.post-content th {
  background: #eef3ef;
}

.post-aside {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}

.note-box,
.sponsored-cta {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.note-box p {
  margin: 0;
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list a {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--green-dark);
  font-size: 0.9rem;
  font-weight: 700;
}

.sponsored-cta {
  margin-top: 34px;
  position: relative;
  overflow: hidden;
  border-color: rgba(31, 122, 109, 0.36);
  background:
    linear-gradient(135deg, rgba(31, 122, 109, 0.1), rgba(233, 186, 63, 0.16)),
    #fff;
}

.sponsored-cta p {
  margin-top: 0;
  color: var(--muted);
}

.sponsored-cta__label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(214, 79, 47, 0.1);
  color: var(--coral) !important;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sponsored-button {
  width: min(100%, 340px);
  min-height: 52px;
  margin-top: 4px;
  background: var(--coral);
  color: #fff !important;
  box-shadow: 0 14px 30px rgba(214, 79, 47, 0.22);
  text-decoration: none !important;
}

.sponsored-button:hover {
  background: #b93f24;
  transform: translateY(-1px);
}

.sponsored-button::after {
  content: ">";
  margin-left: 10px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

code {
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: #eef3ef;
  color: #1d322d;
}

@media (max-width: 860px) {
  .header-inner,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 14px 0;
  }

  .site-nav,
  .footer-links {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
  }

  .hero__inner {
    padding: 72px 0 58px;
  }

  .post-grid,
  .post-layout {
    grid-template-columns: 1fr;
  }

  .post-list .post-card {
    grid-template-columns: 1fr;
  }

  .post-aside {
    position: static;
  }
}

@media (max-width: 560px) {
  .container,
  .hero__inner,
  .post-hero__inner,
  .page-head .container {
    width: min(1120px, calc(100% - 24px));
  }

  .brand__text small {
    display: none;
  }

  .site-nav {
    gap: 8px 12px;
    font-size: 0.94rem;
  }

  .hero h1 {
    max-width: 10ch;
    font-size: 2.05rem;
  }

  .post-hero h1 {
    font-size: 2.05rem;
  }

  .hero__deck,
  .post-description {
    max-width: 31ch;
    font-size: 1rem;
  }

  .section-heading h2 {
    max-width: 15ch;
    font-size: 1.72rem;
  }

  .section-heading p,
  .post-card p,
  .post-card h3 {
    max-width: 32ch;
  }

  .hero__actions,
  .button {
    width: 100%;
  }

  .ad-slot {
    width: calc(100% - 24px);
    padding: 16px 12px;
  }

  .ad-slot code {
    word-break: break-all;
  }

  .post-card__body,
  .note-box,
  .sponsored-cta {
    padding: 16px;
  }

  .post-content {
    font-size: 1rem;
  }

  .post-content > * {
    width: 100%;
    max-width: 100%;
  }

  .post-content table {
    display: block;
    overflow-x: auto;
  }
}
