/* ---------------------------------------------------------------
   The Wild West section (content/wild-west, layouts/wild-west).
   Loaded only on those pages via layouts/partials/wild-west/head.html.

   Direction: a clean, contemporary page with an understated Western
   identity — slab-serif headings (wood-type lineage), a warm desert
   palette used sparingly, a faint grain on the hero, and thin
   line-drawn accents.
   --------------------------------------------------------------- */

:root {
  --ww-bg: #faf7f2;          /* warm off-white page */
  --ww-surface: #ffffff;
  --ww-sand: #efe6d8;        /* soft fills */
  --ww-line: #e2d6c4;        /* hairlines */
  --ww-ink: #2a221d;         /* text */
  --ww-muted: #6e6156;       /* secondary text */
  --ww-accent: #9a4b2f;      /* muted rust */
  --ww-accent-dark: #7a3a24;
  --ww-sage: #5f6f52;        /* "active" state */
  --ww-night: #201a16;       /* hero + code */
  --ww-cream: #f3ead9;

  --ww-head: 'Zilla Slab', 'Rockwell', Georgia, serif;
  --ww-body: 'Source Serif 4', Georgia, serif;
  --ww-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ww-radius: 10px;
  --ww-shadow: 0 1px 2px rgba(42, 34, 29, .05), 0 6px 20px rgba(42, 34, 29, .06);
  --ww-shadow-hover: 0 2px 4px rgba(42, 34, 29, .06), 0 14px 32px rgba(42, 34, 29, .10);
}

body:has(.ww-page) { background: var(--ww-bg); }
main:has(.ww-page) { padding-bottom: 0 !important; }

.ww-page {
  background: var(--ww-bg);
  color: var(--ww-ink);
  font-family: var(--ww-body);
  padding: 3.5rem 16px 4rem;
}
.ww-wrap { max-width: 720px; margin: 0 auto; }
.ww-wrap-wide { max-width: 1040px; margin: 0 auto; }

/* ---------------- Hero ---------------- */
.ww-hero {
  position: relative;
  overflow: hidden;
  background-color: var(--ww-night);
  background-image:
    radial-gradient(ellipse 80% 70% at 50% 110%, rgba(154, 75, 47, .28), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .88 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ww-cream);
  padding-bottom: 96px;
}
.ww-hero > nav { position: relative; z-index: 2; }
.ww-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  padding: 3.25rem 16px 0;
  text-align: center;
}
.ww-crumb {
  font-family: var(--ww-ui);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #d9b48f;
  text-decoration: none;
}
a.ww-crumb:hover { color: #fff; }
.ww-crumb-sep { color: rgba(243, 234, 217, .35); margin: 0 .6rem; font-family: var(--ww-ui); font-size: .8rem; }
.ww-crumb-current { color: rgba(243, 234, 217, .7); }
.ww-title {
  font-family: var(--ww-head);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  margin: .9rem 0 1rem;
  color: #fbf5ea;
}
.ww-lede {
  font-family: var(--ww-body);
  font-size: clamp(1.05rem, 2.2vw, 1.22rem);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
  color: rgba(243, 234, 217, .82);
}
.ww-tagline {
  font-family: var(--ww-ui);
  font-size: .9rem;
  letter-spacing: .04em;
  color: #d9b48f;
  margin: 1.5rem 0 0;
}
.ww-horizon {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 90px;
  color: rgba(217, 180, 143, .35);
  z-index: 1;
}

/* ---------------- Labels & pills ---------------- */
.ww-eyebrow {
  display: block;
  font-family: var(--ww-ui);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ww-accent);
}
.ww-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--ww-ui);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1;
  padding: .4rem .7rem;
  border-radius: 999px;
  background: var(--ww-sand);
  color: var(--ww-muted);
  white-space: nowrap;
}
.ww-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.ww-pill-active { background: #e6ebe0; color: var(--ww-sage); }
.ww-pill-in-progress { background: #f5e6d9; color: var(--ww-accent); }
.ww-pill-hero {
  margin-top: 1.5rem;
  background: rgba(243, 234, 217, .08);
  border: 1px solid rgba(243, 234, 217, .18);
  color: #e8cfb2;
}
.ww-pill-hero.ww-pill-active { color: #b9c9a6; }

/* ---------------- Section heads ---------------- */
.ww-section-head { text-align: center; margin-bottom: 1.75rem; }
.ww-section-title {
  font-family: var(--ww-head);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.5vw, 2rem);
  color: var(--ww-ink);
  margin: .35rem 0 0;
}

/* ---------------- Cards ---------------- */
.ww-tools { margin-bottom: 4rem; }
.ww-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
}
.ww-card {
  display: flex;
  flex-direction: column;
  background: var(--ww-surface);
  border: 1px solid var(--ww-line);
  border-radius: var(--ww-radius);
  padding: 1.5rem 1.5rem 1.35rem;
  color: var(--ww-ink);
  text-decoration: none;
  box-shadow: var(--ww-shadow);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.ww-card:hover,
.ww-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--ww-shadow-hover);
  border-color: #d3c2aa;
}
.ww-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.ww-card-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ww-sand);
  color: var(--ww-accent);
}
.ww-icon { width: 22px; height: 22px; }
.ww-card-title {
  font-family: var(--ww-head);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: .35rem 0 .5rem;
  color: var(--ww-ink);
}
.ww-card-desc {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 1.25rem;
  color: var(--ww-muted);
  flex: 1;
}
.ww-card-more {
  font-family: var(--ww-ui);
  font-size: .85rem;
  font-weight: 500;
  color: var(--ww-accent);
}
.ww-card:hover .ww-card-more span { margin-left: .2rem; }
.ww-card-more span { transition: margin .2s ease; }

/* ---------------- Article ---------------- */
.ww-dateline {
  font-family: var(--ww-ui);
  font-size: .82rem;
  color: var(--ww-muted);
  padding-bottom: 1.25rem;
  margin: 0 0 2rem;
  border-bottom: 1px solid var(--ww-line);
}
.ww-prose {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--ww-ink);
}
.ww-prose > :first-child { margin-top: 0; }
.ww-prose p { margin: 0 0 1.2rem; }
.ww-prose h2 {
  font-family: var(--ww-head);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.5vw, 1.95rem);
  line-height: 1.25;
  color: var(--ww-ink);
  margin: 3.25rem 0 1rem;
}
.ww-prose h2::before {            /* small rust rule above section headings */
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  background: var(--ww-accent);
  margin-bottom: .9rem;
}
.ww-prose > h2:first-child,
.ww-dateline + h2 { margin-top: 0; }
.ww-prose h3 {
  font-family: var(--ww-head);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--ww-ink);
  margin: 2.25rem 0 .6rem;
}
.ww-prose a {
  color: var(--ww-accent);
  text-decoration: underline;
  text-decoration-color: rgba(154, 75, 47, .35);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.ww-prose a:hover { color: var(--ww-accent-dark); text-decoration-color: currentColor; }
.ww-prose strong { font-weight: 600; }
.ww-prose ul, .ww-prose ol { padding-left: 1.35rem; margin: 0 0 1.4rem; }
.ww-prose li { margin-bottom: .5rem; padding-left: .2rem; }
.ww-prose ul li::marker { color: var(--ww-accent); }

.ww-prose hr { border: 0; height: auto; margin: 3rem 0; text-align: center; }
.ww-prose hr::after { content: "✦"; color: var(--ww-line); font-size: .9rem; }

.ww-prose blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--ww-surface);
  border: 1px solid var(--ww-line);
  border-left: 3px solid var(--ww-accent);
  border-radius: 0 var(--ww-radius) var(--ww-radius) 0;
  font-size: 1.05rem;
}
.ww-prose blockquote p:last-child { margin-bottom: 0; }

.ww-prose code {
  font-size: .88em;
  background: var(--ww-sand);
  padding: .12em .35em;
  border-radius: 4px;
}
.ww-prose pre {
  background: var(--ww-night);
  color: #eadbc4;
  padding: 1.2rem 1.35rem;
  overflow-x: auto;
  border-radius: var(--ww-radius);
  font-size: .85rem;
  line-height: 1.65;
  margin: 0 0 1.6rem;
}
.ww-prose pre code { background: none; padding: 0; color: inherit; }

.ww-prose table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: .5rem 0 2rem;
  font-size: .97rem;
  line-height: 1.55;
}
.ww-prose th {
  font-family: var(--ww-ui);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: left;
  color: var(--ww-muted);
  padding: .7rem .9rem;
  border-bottom: 2px solid var(--ww-ink);
}
.ww-prose td {
  padding: .75rem .9rem;
  border-bottom: 1px solid var(--ww-line);
  vertical-align: top;
}
.ww-prose td:first-child, .ww-prose th:first-child { padding-left: 0; }

/* ---------------- Specialist vs generalist ---------------- */
.ww-versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 1rem;
  margin: 2.25rem 0;
}
.ww-versus-card {
  background: var(--ww-surface);
  border: 1px solid var(--ww-line);
  border-radius: var(--ww-radius);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--ww-shadow);
}
.ww-versus-card .ww-label {
  font-family: var(--ww-ui);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ww-muted);
}
.ww-prose .ww-versus-card h3 { margin: .4rem 0 .4rem; font-size: 1.25rem; color: var(--ww-accent); }
.ww-versus-card p { font-size: .98rem; line-height: 1.55; margin: 0; color: var(--ww-muted); }
.ww-versus-vs {
  align-self: center;
  font-family: var(--ww-ui);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ww-muted);
}

/* ---------------- The loop ---------------- */
.ww-prose ol.ww-trail {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .5rem 0;
  padding: 1.1rem 1rem;
  margin: 2rem 0;
  border-top: 1px solid var(--ww-line);
  border-bottom: 1px solid var(--ww-line);
}
.ww-trail li {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  margin: 0;
  padding: 0;
  font-family: var(--ww-head);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--ww-ink);
}
.ww-trail li span {
  font-family: var(--ww-ui);
  font-size: .72rem;
  font-weight: 600;
  color: var(--ww-accent);
}
.ww-trail li + li::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--ww-line);
  margin: 0 .9rem;
  align-self: center;
}
.ww-trail li.ww-trail-repeat { color: var(--ww-accent); }

/* ---------------- Back link ---------------- */
.ww-more { margin-top: 4.5rem; padding-top: 3rem; border-top: 1px solid var(--ww-line); }
.ww-back { text-align: center; font-family: var(--ww-ui); font-size: .9rem; margin: 2rem 0 0; }
.ww-back a { color: var(--ww-accent); text-decoration: none; }
.ww-back a:hover { text-decoration: underline; }

/* ---------------- Small screens ---------------- */
@media (max-width: 640px) {
  .ww-page { padding-top: 2.5rem; }
  .ww-hero { padding-bottom: 72px; }
  .ww-horizon { height: 64px; }
  .ww-prose { font-size: 1.06rem; }
  .ww-versus { grid-template-columns: 1fr; }
  .ww-versus-vs { text-align: center; }
  .ww-trail li + li::before { width: 14px; margin: 0 .5rem; }
}
