:root {
  --bg: #f5f1e8;
  --paper: #fffaf2;
  --paper-strong: #f0e8db;
  --ink: #19211d;
  --muted: #5b675f;
  --line: rgba(25, 33, 29, 0.14);
  --accent: #c76f2e;
  --forest: #18352c;
  --forest-soft: #23483d;
  --shadow: 0 18px 48px rgba(25, 33, 29, 0.08);
  --max: 1240px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  line-height: 1.65;
  background:
    radial-gradient(circle at top right, rgba(199, 111, 46, 0.12), transparent 26%),
    linear-gradient(180deg, #f7f4ed 0%, #f1ebdf 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(25, 33, 29, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 33, 29, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.3;
}

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--forest);
  color: #fffaf2;
  font-weight: 700;
}

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

.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;
}

.site-frame {
  width: min(100%, calc(var(--max) + 40px));
  margin: 0 auto;
  padding: 18px 20px 44px;
}

.topbar,
.content-block,
.footer,
.route-board,
.stage-copy {
  border: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.86);
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  margin-bottom: 18px;
  backdrop-filter: blur(12px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.wordmark-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--forest);
  color: #f7f2e8;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.wordmark strong,
.footer strong {
  display: block;
  font-size: 0.96rem;
}

.wordmark small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.main-nav,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.main-nav a,
.footer-links a,
.text-link {
  color: var(--forest);
  font-weight: 600;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.chip:hover,
.chip:focus-visible,
.category-card:hover,
.category-card:focus-visible,
.text-link:hover,
.text-link:focus-visible {
  transform: translateY(-1px);
}

.chip-dark {
  background: var(--forest);
  color: #f7f2e8;
}

.chip-accent {
  background: var(--accent);
  color: #fffaf3;
}

.chip-light {
  border-color: var(--line);
  background: var(--paper);
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  min-height: calc(100svh - 128px);
}

.stage-copy,
.route-board {
  padding: clamp(24px, 4vw, 42px);
}

.stage-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(255, 251, 245, 0.92), rgba(240, 232, 219, 0.9)),
    var(--paper);
}

.kicker,
.guide-type,
.timeline span,
.category-card span {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.02;
}

h1,
h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.03em;
}

h1 {
  max-width: 11ch;
  font-size: clamp(4rem, 8vw, 7rem);
}

h2 {
  max-width: 14ch;
  font-size: clamp(2.8rem, 5vw, 4.8rem);
}

h3 {
  font-size: 1.28rem;
}

.lead,
.section-head p,
.guide-card p,
.timeline p,
.editorial-columns p,
.faq-list p,
.footer p,
.route-empty,
.category-card em {
  color: var(--muted);
}

.lead {
  max-width: 60ch;
  margin: 20px 0 0;
  font-size: 1.08rem;
}

.stage-actions,
.signal-list {
  margin-top: 28px;
}

.stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.signal-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.signal-list li {
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: rgba(24, 53, 44, 0.04);
}

.route-board {
  background: linear-gradient(180deg, var(--forest) 0%, var(--forest-soft) 100%);
  color: #f7f2e8;
}

.route-board .kicker,
.route-link small,
.route-empty {
  color: rgba(247, 242, 232, 0.72);
}

.route-board h2 {
  max-width: 10ch;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.route-input-wrap input {
  width: 100%;
  min-height: 56px;
  margin: 22px 0 14px;
  padding: 0 18px;
  border: 1px solid rgba(247, 242, 232, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fffaf3;
  font: inherit;
}

.route-input-wrap input::placeholder {
  color: rgba(247, 242, 232, 0.54);
}

.route-results {
  display: grid;
  gap: 10px;
  min-height: 228px;
}

.route-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(247, 242, 232, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.route-link strong {
  display: block;
}

.route-link small {
  display: block;
}

.strip {
  display: flex;
  align-items: center;
  gap: 20px;
  overflow: hidden;
  padding: 18px 0 6px;
}

.strip p {
  margin: 0;
  white-space: nowrap;
  color: var(--forest);
  font-weight: 700;
}

.strip-track {
  display: flex;
  gap: 28px;
  min-width: max-content;
  color: var(--muted);
  animation: slide 24s linear infinite;
}

@keyframes slide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.content-block,
.footer {
  margin-top: 18px;
  padding: clamp(22px, 4vw, 36px);
}

.intent-block {
  background:
    linear-gradient(135deg, rgba(24, 53, 44, 0.05), rgba(199, 111, 46, 0.08)),
    rgba(255, 250, 242, 0.9);
}

.section-head {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.section-head-wide {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  align-items: end;
}

.section-head p {
  margin: 0;
}

.category-grid,
.intent-grid,
.guide-grid,
.timeline,
.editorial-columns {
  display: grid;
  gap: 14px;
}

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

.intent-card {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 251, 245, 0.94), rgba(240, 232, 219, 0.84));
}

.intent-index {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.intent-card p:not(.intent-index) {
  margin: 0;
  color: var(--muted);
}

.intent-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  padding-top: 4px;
}

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

.category-card {
  display: grid;
  gap: 8px;
  min-height: 180px;
  padding: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 250, 244, 0.95), rgba(240, 232, 219, 0.82));
  transition: transform 180ms ease, border-color 180ms ease;
}

.category-card strong {
  font-size: 1.2rem;
}

.category-card em {
  font-style: normal;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: auto;
  padding-top: 10px;
}

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

.guide-card {
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
}

.guide-card p {
  margin: 10px 0 0;
}

.text-link {
  display: inline-block;
  margin-top: 18px;
}

.workflow-block {
  background: linear-gradient(180deg, rgba(24, 53, 44, 0.03), rgba(24, 53, 44, 0.08));
}

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

.timeline article {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.timeline p,
.editorial-columns p,
.faq-list p {
  margin: 10px 0 0;
}

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

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: rgba(255, 251, 245, 0.76);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
}

.footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.footer-intro {
  max-width: 34ch;
}

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

.footer-label {
  margin: 0 0 10px;
  color: var(--forest);
  font-weight: 800;
}

.footer p {
  max-width: 58ch;
  margin: 8px 0 0;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  gap: 18px;
}

.article-sidebar,
.article-main {
  border: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.86);
  box-shadow: var(--shadow);
}

.article-sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 22px;
}

.article-sidebar p,
.article-sidebar li,
.article-main p,
.article-main li {
  color: var(--muted);
}

.article-sidebar ul {
  padding-left: 18px;
  margin: 14px 0 0;
}

.article-main {
  padding: clamp(24px, 4vw, 40px);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

.article-meta span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 0.9rem;
}

.article-main section + section {
  margin-top: 30px;
}

.related-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin-top: 18px;
}

.related-links a {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.article-main h1 {
  max-width: 12ch;
  font-size: clamp(3.5rem, 7vw, 5.8rem);
}

.article-main h2 {
  max-width: 15ch;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
}

.article-main ul {
  padding-left: 20px;
}

.article-main li + li {
  margin-top: 8px;
}

.cta-panel {
  margin-top: 30px;
  padding: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(24, 53, 44, 0.06), rgba(199, 111, 46, 0.08));
}

@media (max-width: 1080px) {
  .stage,
  .section-head-wide,
  .category-grid,
  .intent-grid,
  .guide-grid,
  .timeline,
  .editorial-columns,
  .article-layout,
  .related-links,
  .footer {
    grid-template-columns: 1fr;
  }

  .footer {
    display: grid;
  }

  .footer-columns {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-frame {
    padding: 12px 12px 28px;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    max-width: none;
    font-size: clamp(3.1rem, 14vw, 4.6rem);
  }

  h2,
  .article-main h2 {
    max-width: none;
    font-size: clamp(2.2rem, 10vw, 3.1rem);
  }

  .main-nav {
    gap: 12px 16px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
