:root {
  --bg: #f6f3ee;
  --text: #1e1e1c;
  --accent: #4a3526;
  --accent-dark: #3b2a1e;
  --border: #d7d0c7;
  --surface: #fbf8f3;
  --surface-alt: #f1ebe2;
  --muted: rgba(30, 30, 28, 0.72);
  --max-width: 68rem;
  --copy-width: 46rem;
  --radius: 18px;
  --radius-small: 14px;
  --shadow-soft: 0 1px 0 rgba(30, 30, 28, 0.04);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Serif 4", Georgia, serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

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

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: "Outfit", sans-serif;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.page-shell {
  width: min(calc(100% - 1.5rem), var(--max-width));
  margin: 0 auto;
}

.copy-shell {
  width: min(100%, var(--copy-width));
  margin: 0 auto;
}

.dark-wrap {
  background: var(--text);
  color: #fff;
}

.site-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.wordmark {
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.btn {
  padding: 0.75rem 1.2rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  outline: none;
}

.ghost-link {
  padding: 0.7rem 1rem;
  color: rgba(255, 255, 255, 0.8);
}

.ghost-link:hover,
.ghost-link:focus-visible {
  color: #fff;
  outline: none;
}

.hero {
  padding: clamp(3rem, 7vw, 5rem) 0 3rem;
}

.eyebrow {
  margin-bottom: 0.85rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.article-title,
.archive-title {
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900;
}

.archive-title {
  width: min(100%, 40rem);
}

.lead {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.02rem, 2vw, 1.14rem);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 1.25rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.94rem;
}

.article-layout {
  padding: 3rem 0 4.5rem;
}

.article-body,
.archive-grid,
.archive-empty,
.cta-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.article-body {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.prose > * + * {
  margin-top: 1.15rem;
}

.prose h2,
.prose h3,
.prose h4 {
  margin-top: 2rem;
}

.prose h2 {
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  font-weight: 800;
}

.prose h3 {
  font-size: 1.35rem;
  font-weight: 700;
}

.prose h4 {
  font-size: 1.1rem;
  font-weight: 700;
}

.prose p,
.prose li,
.prose blockquote,
.prose td,
.prose th {
  font-size: 1.3125rem;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

.prose li + li {
  margin-top: 0.45rem;
}

.prose a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
}

.prose code {
  padding: 0.15rem 0.38rem;
  border-radius: 8px;
  background: var(--surface-alt);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}

.prose pre {
  overflow-x: auto;
  padding: 1rem;
  border-radius: var(--radius-small);
  background: #191816;
  color: #f7f0e9;
}

.prose pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.prose blockquote {
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background: var(--surface-alt);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: #fff;
}

.prose th,
.prose td {
  padding: 0.8rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.prose thead th {
  background: var(--surface-alt);
}

.prose img {
  border-radius: var(--radius-small);
}

.inline-cta {
  margin: 2.5rem 0;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--text);
}

.inline-cta__text {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
  line-height: 1.6;
}

.inline-cta__fields {
  display: grid;
  gap: 0.65rem;
}

.inline-cta__input {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  transition: border-color 180ms ease;
}

.inline-cta__input::placeholder { color: rgba(255, 255, 255, 0.45); }

.inline-cta__input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
}

.inline-cta__btn {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.75rem 1.2rem;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 180ms ease;
}

.inline-cta__btn:hover,
.inline-cta__btn:focus-visible {
  background: rgba(255, 255, 255, 0.88);
  outline: none;
}

.article-signup {
  margin-top: 2.5rem;
  padding: 2rem;
  border-top: 1px solid var(--border);
}

.article-signup__heading {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
}

.article-signup__sub {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1rem;
}

.article-signup__fields {
  display: grid;
  gap: 0.65rem;
}

.article-signup__note {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.article-tags,
.article-nav,
.archive-actions,
.related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.article-tags {
  margin-top: 1.5rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 600;
}

.article-nav {
  margin-top: 2rem;
}

.text-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

.section-block {
  padding: 0 0 4.5rem;
}

.section-heading {
  display: grid;
  gap: 0.9rem;
  width: min(100%, 40rem);
  margin: 0 auto 1.5rem;
  text-align: center;
}

.section-intro,
.archive-empty p,
.cta-copy {
  color: var(--muted);
}

.archive-grid {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.article-card-link {
  text-decoration: none;
}

.article-card {
  display: grid;
  gap: 0.7rem;
  height: 100%;
  padding: 1.2rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: #fff;
}

.article-card__meta {
  color: rgba(30, 30, 28, 0.6);
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-card__title {
  font-size: 1.25rem;
  font-weight: 700;
}

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

.archive-empty,
.cta-panel {
  padding: 1.25rem;
}

.cta-panel {
  margin-top: 2rem;
}

.cta-title {
  font-size: 1.35rem;
  font-weight: 800;
}

.cta-copy {
  margin-top: 0.55rem;
}

.final-cta {
  padding: 4rem 0;
  background: var(--text);
  color: #fff;
}

.final-cta h2 {
  color: #fff;
}

.final-cta .section-intro {
  color: rgba(255, 255, 255, 0.82);
}

.signup-card {
  width: min(100%, 42rem);
  margin-inline: auto;
  padding: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.signup-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #fff;
}

.signup-note {
  margin-top: 0.45rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.97rem;
}

.newsletter-form {
  margin-top: 1rem;
}

.newsletter-hp {
  display: none;
}

.newsletter-fields {
  display: grid;
  gap: 0.75rem;
}

.newsletter-input {
  width: 100%;
  min-height: 3rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font: inherit;
  line-height: 1.4;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.newsletter-input::placeholder {
  color: rgba(30, 30, 28, 0.58);
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 53, 38, 0.12);
}

.newsletter-submit {
  width: 100%;
  min-height: 3rem;
}

.signup-support {
  margin-top: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.96rem;
}

.site-footer {
  padding: 2.5rem 0;
}

.footer-box {
  width: min(100%, var(--copy-width));
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}

.footer-title {
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.footer-copy {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.94rem;
}

@media (min-width: 46rem) {
  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 34rem) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-links {
    width: 100%;
    justify-content: space-between;
  }
}

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

  .btn {
    transition: none;
  }
}
