:root {
  --paper: #f7f3ec;
  --surface: #ffffff;
  --ink: #24312d;
  --muted: #6d766f;
  --line: #d8cec2;
  --teal: #1c7c89;
  --leaf: #6a994e;
  --brick: #d95d39;
  --soft: #efe7db;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
}

h1, h2, h3, h4, .brand-mark, .site-title {
  font-family: Fraunces, Georgia, serif;
  color: var(--ink);
  letter-spacing: 0;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  color: var(--brick);
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: .5rem .75rem;
  background: var(--surface);
  color: var(--brick);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.94);
  color: var(--ink);
  border-bottom: 2px solid var(--leaf);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 22px rgba(36,49,45,.08);
}
.nav-shell {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 68px;
}
.brand-mark {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}
.brand-mark:hover,
.brand-mark:focus {
  color: var(--teal);
}
.primary-nav {
  flex: 1 1 auto;
  min-width: 0;
}
.primary-nav .menu {
  display: flex;
  justify-content: flex-end;
  gap: .25rem .75rem;
  flex-wrap: wrap;
  margin: 0;
}
.primary-nav .menu a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  padding: .45rem .25rem;
}
.primary-nav .menu a:hover,
.primary-nav .menu a:focus {
  color: var(--teal);
}
.has-dropdown { position: relative; }
.primary-nav .nested {
  display: none;
  position: absolute;
  min-width: 220px;
  top: 100%;
  right: 0;
  padding: .5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(36,49,45,.12);
}
.has-dropdown:hover .nested,
.has-dropdown:focus-within .nested {
  display: block;
}
.nav-search {
  display: flex;
  align-items: center;
  flex: 0 0 230px;
  gap: .35rem;
}
.nav-search input,
.search-panel input {
  width: 100%;
  min-width: 0;
  height: 40px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}
.nav-search button,
.search-panel button {
  height: 40px;
  margin: 0;
  padding: 0 .85rem;
  border: 1px solid var(--brick);
  border-radius: 4px;
  background: var(--teal);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.nav-search button:hover,
.search-panel button:hover {
  background: var(--brick);
  transform: translateY(-1px);
}

.masthead,
.home-hero,
.page-hero {
  background-size: cover;
  background-position: center;
}
.home-hero {
  min-height: 520px;
  display: flex;
  align-items: center;
  background-color: var(--leaf);
}
.hero-copy {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}
.home-hero h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(3rem, 7vw, 5.7rem);
  line-height: .98;
  text-shadow: 0 2px 18px rgba(36,49,45,.35);
}
.home-hero .lead {
  max-width: 760px;
  margin: 1.1rem auto 1.8rem;
  color: rgba(255,255,255,.92);
  font-size: 1.18rem;
}
.eyebrow,
.post-kicker {
  margin: 0 0 .75rem;
  color: var(--teal);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
.home-hero .eyebrow {
  color: #ffffff;
}
.hero-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .7rem 1.1rem;
  border: 1px solid var(--brick);
  border-radius: 4px;
  background: var(--teal);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}
.hero-action:hover,
.hero-action:focus {
  background: var(--brick);
  color: #ffffff;
}

.page-hero {
  padding: 3.25rem 0;
  background-color: var(--soft);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
}
.page-hero.compact { padding: 2.4rem 0; }
.page-hero .lead {
  max-width: 820px;
  color: #47564f;
}

.page-section {
  padding: 4rem 0;
}
.home-shell {
  padding-top: 4.5rem;
}
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, .85fr);
  gap: 2rem;
  align-items: start;
}
.feed-column {
  min-width: 0;
}
.section-heading {
  margin-bottom: 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--line);
}
.section-heading h2 {
  margin: 0;
  font-size: 2rem;
}

.content-surface {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 3rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.editorial-prose p,
.editorial-prose li {
  color: #2e3b36;
}
.editorial-prose a,
.content-surface a,
.story-card-body a,
.category-card a {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: rgba(28,124,137,.35);
}
.editorial-prose a:hover,
.content-surface a:hover,
.story-card-body a:hover,
.category-card a:hover {
  color: var(--brick);
  text-decoration-color: currentColor;
}

.content-heading {
  margin-top: 2rem;
  margin-bottom: .85rem;
}
.content-image {
  margin: 1.5rem 0;
}
.content-image img,
.gallery-grid img,
.story-card img,
.category-card img {
  width: 100%;
  border-radius: 8px;
}
.content-image figcaption,
.gallery-grid figcaption {
  margin-top: .45rem;
  color: var(--muted);
  font-size: .9rem;
}
.lead-image {
  float: right;
  max-width: 33%;
  margin: 0 0 1rem 1.5rem;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--leaf);
  background: #f2f7ee;
}

.story-grid,
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.story-card,
.category-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.story-card:hover,
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(36,49,45,.10);
}
.story-media {
  display: block;
  overflow: hidden;
  background: var(--soft);
}
.story-media img {
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform .5s ease;
}
.story-card:hover .story-media img {
  transform: scale(1.04);
}
.story-card-body,
.category-card-body,
.category-card > div {
  padding: clamp(1rem, 3vw, 2rem);
}
.story-card h2,
.category-card h2 {
  margin: 0 0 .75rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.18;
}
.story-card p {
  color: #3e484a;
}
.featured-card {
  margin-bottom: 2rem;
}
.featured-card .story-media img {
  aspect-ratio: 16 / 9;
}
.split-card {
  display: grid;
  grid-template-columns: minmax(210px, 42%) 1fr;
  margin-bottom: 1.35rem;
}
.split-card:nth-of-type(odd) .story-media {
  order: 2;
}
.split-card h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
}
.split-card .story-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.post-kicker {
  display: inline-block;
  width: fit-content;
  padding-bottom: .15rem;
  border-bottom: 2px solid var(--leaf);
}
.read-more {
  display: inline-flex;
  align-items: center;
  margin-top: .45rem;
  color: var(--brick);
  font-weight: 800;
  text-decoration: none;
}
.read-more:hover,
.read-more:focus {
  color: var(--teal);
  text-decoration: underline;
}
.meta-line {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
}

.pagination-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 2rem;
}
.pagination-row a,
.pagination-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: .4rem .7rem;
  border: 1px solid var(--teal);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 800;
}
.pagination-row .current {
  background: var(--teal);
  color: #ffffff;
}
.pagination-row a {
  color: var(--teal);
  background: var(--surface);
}
.pagination-row a:hover {
  background: var(--teal);
  color: #ffffff;
}

.home-sidebar {
  display: grid;
  gap: 1.25rem;
}
.sidebar-panel {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.sidebar-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}
.search-panel form {
  display: flex;
  gap: .5rem;
}
.about-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.about-row img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}
.popular-list {
  margin: 0;
  padding-left: 1.4rem;
}
.popular-list li + li {
  margin-top: .75rem;
}
.popular-list a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.popular-list a:hover {
  color: var(--teal);
}
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.category-pills a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: .25rem .65rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--soft);
  color: var(--ink);
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
}
.category-pills a:hover {
  background: var(--teal);
  color: #ffffff;
}
.insta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}
.insta-grid img {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
}

.category-card.horizontal {
  display: grid;
  grid-template-columns: minmax(160px, 34%) 1fr;
  gap: 1rem;
  padding: 1rem;
}
.category-card.minimal {
  padding: 1rem;
}
.toc-panel {
  margin: 1rem 0 2rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: #fbf8f2;
  border-radius: 8px;
}
.toc-panel ul { margin: 0; }

.table-scroll {
  overflow-x: auto;
}
.content-list {
  padding-left: 1.25rem;
}
.content-separator {
  margin: 2rem 0;
  border-color: var(--line);
}

.outlink-band {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
.outlink-band ul {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin: 0;
  list-style: none;
}
.outlink-band a {
  color: var(--teal);
  font-size: .9rem;
}

.site-footer {
  margin: 0;
  padding: 3rem 0;
  background: var(--ink);
  color: #f7f3ec;
  border: 0;
}
.site-footer h2,
.site-footer h3 {
  color: #ffffff;
}
.site-footer p {
  color: rgba(247,243,236,.78);
}
.site-footer a {
  color: #e5f2f4;
  text-decoration: underline;
  text-decoration-color: rgba(229,242,244,.35);
}
.site-footer a:hover {
  color: #ffffff;
}

@media (max-width: 980px) {
  .nav-shell {
    flex-wrap: wrap;
    padding-block: .85rem;
  }
  .primary-nav {
    order: 3;
    flex-basis: 100%;
  }
  .primary-nav .menu {
    justify-content: flex-start;
  }
  .nav-search {
    flex: 1 1 260px;
  }
  .home-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .home-hero {
    min-height: 420px;
  }
  .home-hero h1 {
    font-size: 3rem;
  }
  .split-card,
  .category-card.horizontal {
    display: block;
  }
  .split-card:nth-of-type(odd) .story-media {
    order: initial;
  }
  .search-panel form {
    display: block;
  }
  .search-panel button {
    width: 100%;
    margin-top: .5rem;
  }
  .lead-image {
    float: none;
    max-width: none;
    margin: 1rem 0;
  }
}
