:root {
  --ink: #332630;
  --ink-2: #5b4d55;
  --rust: #a84f35;
  --rust-dark: #7d3828;
  --paper: #fbf7f1;
  --paper-2: #f4ede5;
  --paper-3: #fffdf9;
  --line: #d9cbbf;
  --line-dark: #bba99c;
  --white: #ffffff;
  --green: #47685a;
  --max: 1160px;
  --reading: 740px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--rust-dark); text-underline-offset: 0.18em; }
a:hover { color: var(--rust); }
:focus-visible { outline: 3px solid #c96c4c; outline-offset: 3px; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: var(--white);
  padding: 9px 12px;
  z-index: 999;
}
.skip-link:focus { left: 8px; }

/* Editorial masthead: deliberately not a floating SaaS nav. */
.site-header {
  background: var(--paper);
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.wordmark {
  display: inline-flex;
  align-items: baseline;
  color: var(--ink);
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.wordmark span { color: var(--rust); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 19px; }
.nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 650;
}
.nav a[aria-current="page"] { color: var(--rust-dark); }
.nav a:hover { color: var(--rust); }

main { overflow: hidden; }
.shell { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }
.reading { width: min(100%, var(--reading)); }

/* Homepage */
.hero {
  padding: 64px 0 0;
  background: var(--paper-3);
  border-bottom: 1px solid var(--line);
}
.hero-copy {
  max-width: 840px;
  padding-bottom: 44px;
}
.hero-mark {
  margin: 0 0 18px;
  color: var(--rust-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .98rem;
  font-style: italic;
}
.hero h1 {
  max-width: 820px;
  margin: 0 0 22px;
  font-size: clamp(2.65rem, 4.65vw, 4.15rem);
}
.hero .lede {
  max-width: 760px;
  font-size: clamp(1.06rem, 1.55vw, 1.18rem);
  line-height: 1.68;
}
.hero-meta {
  margin-top: 25px;
  color: var(--ink-2);
  font-size: .84rem;
}
.guide-index {
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  padding: 0;
}
.guide-index-title {
  padding: 15px 0 11px;
  color: var(--ink-2);
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.guide-index-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.guide-index a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  min-height: 94px;
  padding: 19px 26px 21px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.guide-index a + a {
  border-left: 1px solid var(--line);
  padding-left: 26px;
}
.guide-index a:hover { color: var(--rust-dark); }
.guide-index .index-no {
  display: block;
  padding-top: 3px;
  color: var(--rust-dark);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.guide-index strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.28;
  font-weight: 700;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.025em;
}
h1 { margin: 0 0 22px; font-size: clamp(2.6rem, 5vw, 4.45rem); max-width: 920px; }
h2 { margin: 0 0 18px; font-size: clamp(1.9rem, 3vw, 2.75rem); }
h3 { margin: 28px 0 11px; font-size: 1.38rem; }
.lede { margin: 0; max-width: 790px; color: var(--ink-2); font-size: clamp(1.04rem, 1.8vw, 1.2rem); }

/* Small labels are now editorial annotations, not repeated startup eyebrows. */
.eyebrow {
  margin: 0 0 12px;
  color: var(--rust-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .98rem;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}
.kicker {
  color: var(--rust-dark);
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.section { padding: 68px 0; }
.section.alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.section-header { max-width: 790px; margin-bottom: 32px; }
.section-header p { color: var(--ink-2); font-size: 1.04rem; }
.section-heading-line {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 32px;
}
.section-no {
  padding-top: 8px;
  border-top: 2px solid var(--rust);
  color: var(--rust-dark);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.section-heading-line .section-header { margin: 0; }

.editorial-triad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}
.editorial-item {
  padding: 27px 30px 30px 0;
}
.editorial-item + .editorial-item {
  border-left: 1px solid var(--line);
  padding-left: 30px;
}
.editorial-item h3 { margin: 6px 0 10px; font-size: 1.35rem; }
.editorial-item p { margin-bottom: 0; color: var(--ink-2); }
.editorial-item .ordinal {
  color: var(--rust-dark);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
}

/* Legacy grids on interior pages remain clean and square rather than card-heavy. */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0; border-block: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0; border-block: 1px solid var(--line); }
.card { padding: 25px 28px 25px 0; background: transparent; border: 0; border-radius: 0; }
.card + .card { border-left: 1px solid var(--line); padding-left: 28px; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.callout {
  padding: 22px 0 22px 24px;
  margin: 34px 0;
  background: transparent;
  border: 0;
  border-left: 3px solid var(--rust);
  border-radius: 0;
  color: var(--ink-2);
}
.callout strong { color: var(--ink); }
.callout.green { border-left-color: var(--green); background: transparent; }

/* Links behave like editorial references, not conversion buttons. */
.actions { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 27px; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: auto;
  padding: 0 0 3px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--rust-dark);
  text-decoration: none;
  font-weight: 750;
}
.button::after { content: " →"; margin-left: 5px; }
.button:hover { background: transparent; color: var(--rust); }
.button.secondary { background: transparent; color: var(--ink); border: 0; border-bottom: 1px solid currentColor; }
.button.secondary:hover { background: transparent; color: var(--rust-dark); }

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 28px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line-dark);
  background: transparent;
}
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; vertical-align: top; padding: 15px 16px; border-bottom: 1px solid var(--line); }
th { background: transparent; color: var(--ink); font-size: .77rem; text-transform: uppercase; letter-spacing: .06em; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(168, 79, 53, .035); }

/* Numbered workflow reads like a reference diagram, not five UI cards. */
.workflow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 28px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line-dark);
}
.step {
  min-height: 0;
  padding: 20px 21px 22px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.step + .step { border-left: 1px solid var(--line); padding-left: 21px; }
.step .num { color: var(--rust-dark); font-size: .72rem; font-weight: 850; letter-spacing: .08em; }
.step strong { display: block; margin: 8px 0 6px; font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; }
.step p { margin: 0; font-size: .9rem; color: var(--ink-2); }

/* Editorial feature instead of split hero + card. */
.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 66px;
  align-items: start;
}
.feature-copy { max-width: 720px; }
.feature-copy h2 { max-width: 690px; }
.feature-note {
  margin-top: 8px;
  padding: 5px 0 5px 25px;
  border-left: 1px solid var(--line-dark);
}
.feature-note h3 { margin: 7px 0 12px; font-size: 1.35rem; }
.feature-note p { color: var(--ink-2); }
.feature-note .note { margin-bottom: 0; }

/* Interior articles */
.article-hero {
  padding: 58px 0 38px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-3);
}
.article-hero h1 { font-size: clamp(2.45rem, 4.7vw, 4rem); max-width: 900px; }
.article-hero .lede { max-width: 790px; }
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--ink-2);
  font-size: .86rem;
  margin-top: 22px;
}
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 235px; gap: 76px; align-items: start; }
.article { max-width: var(--reading); }
.article p, .article li { font-size: 1.02rem; }
.article h2 {
  margin-top: 58px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: clamp(1.75rem, 2.7vw, 2.35rem);
}
.article h3 { margin-top: 34px; }
.article ul, .article ol { padding-left: 1.35rem; }
.article li + li { margin-top: 9px; }
.toc {
  position: sticky;
  top: 28px;
  border-top: 2px solid var(--ink);
  padding-top: 13px;
  font-size: .86rem;
}
.toc strong { display:block; margin-bottom: 8px; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
.toc a { display: block; color: var(--ink-2); text-decoration: none; padding: 4px 0; }
.toc a:hover { color: var(--rust); }

.evidencekeep-box {
  margin-top: 42px;
  padding: 26px 0 4px 25px;
  background: transparent;
  border: 0;
  border-left: 3px solid var(--green);
  border-radius: 0;
}
.evidencekeep-box .label { color: var(--green); text-transform: uppercase; font-size: .75rem; letter-spacing: .1em; font-weight: 850; }
.evidencekeep-box h2 { font-size: 1.85rem; margin-top: 8px; border-top: 0; padding-top: 0; }
.ek-promise {
  margin: 24px 0 22px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -.02em;
}
.ek-benefits {
  margin: 27px 0;
  border-top: 1px solid var(--line-dark);
}
.ek-benefits p {
  margin: 0;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.ek-benefits strong { color: var(--ink); }
.disclosure { color: var(--ink-2); font-size: .9rem; }

.faq { border-top: 2px solid var(--ink); }
details { border-bottom: 1px solid var(--line); padding: 17px 0; }
summary { cursor: pointer; font-weight: 750; color: var(--ink); }
details p { margin-bottom: 0; max-width: 760px; color: var(--ink-2); }

.source-list { padding-left: 0; list-style: none; border-top: 2px solid var(--ink); }
.source-list li { padding: 19px 0; border-bottom: 1px solid var(--line); }
.source-list strong { display: block; margin-bottom: 4px; }
.source-list p { margin: 6px 0 0; color: var(--ink-2); }

.site-footer { border-top: 1px solid var(--line-dark); padding: 40px 0; background: #f2e9df; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 42px; }
.footer-grid p { color: var(--ink-2); max-width: 560px; font-size: .94rem; }
.footer-nav { display: grid; gap: 7px; align-content: start; font-size: .9rem; }
.footer-nav strong { margin-bottom: 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.footer-nav a { color: var(--ink-2); text-decoration: none; }
.footer-nav a:hover { color: var(--rust); }
.legal { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .82rem; }

.note { color: var(--ink-2); font-size: .88rem; }
.tag { display:inline-block; border-bottom:1px solid var(--line-dark); padding:2px 0; margin:0 12px 7px 0; font-size:.8rem; background:transparent; }

/* Old class remains harmless if an older page fragment still uses it. */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 64px; align-items: center; }
.hero-card {
  padding: 24px 0 24px 25px;
  border: 0;
  border-left: 1px solid var(--line-dark);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.hero-card h2 { font-size: 1.3rem; margin-bottom: 14px; }
.hero-card ol { padding-left: 20px; margin-bottom: 0; }
.hero-card li + li { margin-top: 9px; }

@media (max-width: 920px) {
  .article-layout, .footer-grid, .feature-grid { grid-template-columns: 1fr; }
  .toc { position: static; order: -1; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; }
  .toc a { display: inline-block; margin-right: 12px; }
  .guide-index-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guide-index a { padding-right: 18px; }
  .guide-index a + a { padding-left: 18px; }
  .editorial-triad, .grid-3 { grid-template-columns: 1fr; }
  .editorial-item, .card { padding: 22px 0; }
  .editorial-item + .editorial-item, .card + .card { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .workflow { grid-template-columns: 1fr 1fr; }
  .step:nth-child(3), .step:nth-child(5) { border-left: 0; }
  .step:nth-child(n+3) { border-top: 1px solid var(--line); }
  .feature-note { padding-left: 0; border-left: 0; border-top: 1px solid var(--line-dark); padding-top: 22px; }
  .hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .header-inner { align-items: flex-start; flex-direction: column; padding: 14px 0 15px; gap: 9px; }
  .nav { gap: 8px 13px; }
  .nav a { font-size: .84rem; }
  .hero { padding-top: 52px; }
  .hero-copy { padding-bottom: 38px; }
  .guide-index-links { grid-template-columns: 1fr; }
  .guide-index-title { padding: 14px 0 8px; }
  .guide-index a, .guide-index a + a { min-height: 0; border-left: 0; border-top: 1px solid var(--line); padding: 16px 0; }
  .section { padding: 52px 0; }
  .section-heading-line { grid-template-columns: 42px minmax(0, 1fr); gap: 14px; }
  .workflow, .grid-2 { grid-template-columns: 1fr; }
  .step, .step + .step, .step:nth-child(3), .step:nth-child(5) { border-left: 0; border-top: 1px solid var(--line); padding: 18px 0; }
  .step:first-child { border-top: 0; }
  .article-hero { padding-top: 46px; }
  .article h2 { margin-top: 44px; }
  h1, .hero h1 { font-size: clamp(2.45rem, 12vw, 3.5rem); }
}
@media print {
  .site-header, .toc, .actions, .guide-index { display:none; }
  body { background:white; color:black; }
  .article { max-width:none; }
  a { color:black; }
}

/* ---------------------------------------------------------
   V5 homepage refinement
   Keep the article pages unchanged. The homepage uses a calmer,
   less diagrammatic editorial rhythm with fewer rules and less bolding.
   --------------------------------------------------------- */
.home-page .hero {
  padding-bottom: 48px;
}

.home-page .hero h1 {
  max-width: 760px;
  font-size: clamp(2.75rem, 4.6vw, 4.05rem);
  line-height: 1.08;
}

.home-page .hero .lede {
  max-width: 760px;
}

.home-page .guide-index {
  margin-top: 42px;
  padding-top: 20px;
  border-top: 1px solid rgba(115, 83, 73, .24);
  border-bottom: 0;
}

.home-page .guide-index-title {
  padding: 0;
  margin: 0 0 14px;
  border: 0;
  color: var(--ink-2);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.home-page .guide-index-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 34px;
}

.home-page .guide-index a,
.home-page .guide-index a + a {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  min-height: 0;
  padding: 0;
  border: 0;
  color: var(--ink-2);
  text-decoration: none;
}

.home-page .guide-index a:hover {
  color: var(--rust-dark);
  background: transparent;
}

.home-page .guide-index .index-no {
  padding: 0;
  color: var(--rust-dark);
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .055em;
}

.home-page .guide-index .index-label {
  font-family: inherit;
  font-size: .98rem;
  line-height: 1.4;
  font-weight: 500;
}

.home-page .section {
  padding: 62px 0;
}

.home-page .section.alt {
  border-block: 0;
}

.home-page .section-heading-line {
  display: block;
  margin-bottom: 30px;
}

.home-page .section-no {
  display: inline-block;
  padding: 0;
  margin: 0 0 10px;
  border: 0;
  color: var(--rust-dark);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
}

.home-page .section-header {
  max-width: 820px;
}

.home-page .section-header h2 {
  max-width: 760px;
  font-size: clamp(1.9rem, 2.6vw, 2.45rem);
}

.home-page .section-header p {
  max-width: 780px;
}

.home-page .editorial-triad {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 42px;
  border: 0;
}

.home-page .editorial-item,
.home-page .editorial-item + .editorial-item {
  padding: 0;
  border: 0;
}

.home-page .editorial-item .ordinal {
  font-weight: 600;
}

.home-page .editorial-item h3 {
  margin: 7px 0 9px;
  font-size: 1.2rem;
  line-height: 1.25;
  font-weight: 600;
}

.home-page .callout {
  margin: 36px 0 0;
  padding: 20px 24px;
  border: 0;
  background: rgba(255, 255, 255, .38);
  color: var(--ink-2);
}

.home-page .callout.green {
  border: 0;
  background: rgba(41, 104, 91, .055);
}

.home-page .callout strong {
  font-weight: 650;
}

.home-page .workflow {
  border-top: 0;
  border-bottom: 0;
  gap: 24px;
}

.home-page .step,
.home-page .step + .step {
  padding: 0;
  border: 0;
}

.home-page .step .num {
  font-weight: 600;
}

.home-page .step strong {
  font-weight: 600;
}

.home-page .feature-note {
  border-left-color: rgba(115, 83, 73, .28);
}

@media (max-width: 760px) {
  .home-page .guide-index-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .home-page .guide-index a,
  .home-page .guide-index a + a {
    padding: 0;
    border: 0;
  }
  .home-page .editorial-triad {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* V8: clearer related-project handoffs without turning the resource into a SaaS landing page. */
.evidencekeep-box {
  margin: 52px 0 50px;
  padding: 34px 36px 31px;
  background: #fbf7f1;
  border: 1px solid var(--line-dark);
  border-top: 4px solid var(--green);
  border-radius: 10px;
  box-shadow: 0 13px 34px rgba(54, 39, 47, .08);
}
.evidencekeep-box .label {
  display: inline-block;
  color: var(--green);
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .1em;
  font-weight: 800;
}
.evidencekeep-box h2 {
  margin-top: 10px;
  padding-top: 0;
  border-top: 0;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}
.evidencekeep-box .ek-benefits {
  border-top-color: var(--line-dark);
}

.related-project-box {
  margin: 30px 0 46px;
  padding: 25px 28px 27px;
  background: #fbf7f1;
  border: 1px solid var(--line-dark);
  border-top: 3px solid var(--green);
  border-radius: 8px;
  box-shadow: 0 9px 25px rgba(54, 39, 47, .06);
}
.related-project-box .label {
  color: var(--green);
  text-transform: uppercase;
  font-size: .7rem;
  letter-spacing: .1em;
  font-weight: 800;
}
.related-project-box h3 {
  margin: 7px 0 11px;
  font-size: 1.5rem;
}
.related-project-box p {
  margin-bottom: 18px;
  color: var(--ink-2);
}
.related-project-box .button { margin-top: 2px; }

@media (max-width: 680px) {
  .evidencekeep-box { padding: 27px 23px 25px; border-radius: 7px; }
  .related-project-box { padding: 22px 21px 24px; }
}
