* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-150%); padding: 9px 13px; color: white; background: var(--green-dark); border-radius: 8px; }
.skip-link:focus { transform: translateY(0); }

.site-header { position: relative; z-index: 10; background: rgba(247, 245, 239, .92); border-bottom: 1px solid rgba(217, 222, 216, .9); backdrop-filter: blur(12px); }
.header-inner { min-height: 72px; display: flex; align-items: center; gap: 34px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 18px; font-weight: 850; letter-spacing: -.035em; }
.brand-mark { width: 32px; height: 32px; fill: none; stroke: var(--green); stroke-width: 2; }
.main-nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.main-nav a, .site-footer nav a { color: var(--ink-soft); text-decoration: none; font-size: 13px; font-weight: 680; }
.main-nav a:hover, .main-nav a.active, .site-footer nav a:hover { color: var(--green); }
.header-action { margin-left: 6px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 20px; border: 1px solid transparent; border-radius: 10px; font-weight: 780; font-size: 14px; text-decoration: none; transition: transform .18s ease, background .18s ease, color .18s ease; }
.button:hover { transform: translateY(-2px); }
.button-small { min-height: 39px; padding-inline: 15px; font-size: 12px; }
.button-primary { color: white; background: var(--green); box-shadow: 0 12px 28px rgba(30, 106, 85, .18); }
.button-primary:hover { background: var(--green-dark); }
.button-outline { color: var(--green-dark); border-color: #aebeb6; }
.button-outline:hover { background: var(--green-light); }
.text-link { color: var(--green-dark); font-size: 14px; font-weight: 780; text-decoration: none; border-bottom: 1px solid rgba(30, 106, 85, .35); }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; color: var(--green); font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow span { width: 22px; height: 2px; background: var(--green); }

.hero { position: relative; overflow: hidden; padding: 84px 0 96px; }
.hero::before { position: absolute; inset: 0; content: ''; pointer-events: none; background: radial-gradient(circle at 80% 35%, rgba(215, 231, 106, .20), transparent 32%), radial-gradient(circle at 10% 5%, rgba(30, 106, 85, .08), transparent 26%); }
.hero-grid { position: relative; display: grid; grid-template-columns: .88fr 1.12fr; gap: 70px; align-items: center; }
.hero-copy h1 { max-width: 650px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(46px, 5.4vw, 72px); font-weight: 500; line-height: .99; letter-spacing: -.045em; }
.hero-copy h1 em { color: var(--green); font-weight: inherit; }
.hero-lead { max-width: 610px; margin: 28px 0 0; color: var(--ink-soft); font-size: 18px; line-height: 1.65; }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 34px; }
.hero-note { display: flex; align-items: center; gap: 8px; margin: 22px 0 0; color: var(--muted); font-size: 12px; }
.hero-note span { display: grid; width: 20px; height: 20px; place-items: center; color: var(--green-dark); background: var(--green-light); border-radius: 50%; }

.r-preview { overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); transform: rotate(1deg); }
.preview-top { height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 780; }
.preview-top small { padding: 5px 9px; color: var(--green-dark); background: var(--green-light); border-radius: 999px; font-size: 9px; text-transform: uppercase; }
.r-preview > svg { display: block; width: 100%; height: auto; background: #f5f7f3; }
#previewGrid circle { fill: #c9d2cc; }
#previewArrow path { fill: #344a42; }
.preview-lines { fill: none; stroke: #344a42; stroke-width: 2; }
.preview-actions { fill: var(--green-dark); font-size: 10px; font-weight: 720; text-anchor: middle; }
.preview-states rect { fill: var(--white); stroke: #5b7168; stroke-width: 1.7; filter: drop-shadow(0 5px 6px rgba(22, 52, 43, .10)); }
.preview-states rect:first-child { fill: #e2eee7; }
.preview-states rect:nth-child(3) { fill: #f6f2dc; stroke: #746d42; }
.preview-states .inner { fill: none; stroke: #746d42; stroke-width: 1; }
.preview-labels { fill: #6b8078; font-size: 8px; font-weight: 850; letter-spacing: .12em; text-anchor: middle; }
.preview-labels .name { fill: var(--ink); font-size: 11px; letter-spacing: 0; }
.preview-diagnostic { display: flex; align-items: center; gap: 11px; margin: -34px 18px 18px auto; width: min(380px, calc(100% - 36px)); padding: 12px 14px; position: relative; color: var(--ink-soft); background: rgba(255, 254, 250, .95); border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 10px 25px rgba(23, 52, 43, .11); }
.preview-diagnostic > span { display: grid; flex: 0 0 28px; height: 28px; place-items: center; color: white; background: var(--green); border-radius: 50%; }
.preview-diagnostic div { display: grid; gap: 2px; }
.preview-diagnostic strong { font-size: 12px; }
.preview-diagnostic small { color: var(--muted); font-size: 9px; }

.capabilities-section { padding: 90px 0 105px; background: var(--white); border-block: 1px solid var(--line); }
.section-heading { max-width: 720px; }
.section-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(36px, 4vw, 54px); font-weight: 500; letter-spacing: -.035em; }
.section-heading > p:last-child { margin: 20px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 46px; }
.feature-grid article { min-height: 235px; padding: 25px; background: #f5f7f3; border: 1px solid var(--line); border-radius: 14px; }
.feature-grid article > span { display: inline-flex; margin-bottom: 45px; color: var(--green); font: 700 12px ui-monospace, monospace; }
.feature-grid h3 { margin: 0 0 11px; font-size: 17px; }
.feature-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.final-cta { padding: 75px 0; color: white; background: var(--green-dark); }
.final-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 50px; }
.final-cta .eyebrow { color: var(--lime); }
.final-cta .eyebrow span { background: var(--lime); }
.final-cta h2 { margin: 0; font: 500 clamp(36px, 4vw, 54px)/1.05 Georgia, serif; letter-spacing: -.035em; }
.final-cta p:last-child { margin: 13px 0 0; color: #bed0c8; }
.final-cta .button-primary { color: var(--green-dark); background: var(--lime); }

.site-footer { padding: 28px 0; background: #102b23; color: white; }
.footer-inner { display: flex; align-items: center; gap: 35px; }
.site-footer .brand { color: white; }
.site-footer p { margin: 0; color: #9db2aa; font-size: 12px; }
.site-footer nav { display: flex; gap: 22px; margin-left: auto; }
.site-footer nav a { color: #c0d0ca; }

/* Public guide and methodology pages */
.docs-header { background: var(--white); }
.docs-hero { padding: 54px 0 45px; background: linear-gradient(135deg, #e4eee8, #f7f5ef 58%); border-bottom: 1px solid var(--line); }
.docs-hero-inner { display: flex; align-items: end; justify-content: space-between; gap: 45px; }
.breadcrumb { display: flex; gap: 8px; margin: 0 0 15px; color: var(--muted); font-size: 11px; }
.breadcrumb a { text-decoration: none; }
.docs-hero h1 { max-width: 820px; margin: 0; font: 500 clamp(38px, 5vw, 61px)/1.02 Georgia, serif; letter-spacing: -.04em; }
.docs-intro { max-width: 370px; margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.65; }
.docs-layout { display: grid; grid-template-columns: 235px minmax(0, 760px); gap: 62px; align-items: start; padding-block: 54px 90px; }
.docs-aside { position: sticky; top: 20px; }
.docs-toc > p { margin: 0 0 14px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.docs-toc ol { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.docs-toc a { display: grid; grid-template-columns: 28px 1fr; gap: 7px; padding: 8px 5px; color: var(--ink-soft); text-decoration: none; font-size: 12px; line-height: 1.35; border-radius: 7px; }
.docs-toc a:hover { color: var(--green-dark); background: var(--green-light); }
.docs-toc a span { color: #91a19b; font: 700 10px ui-monospace, monospace; }
.guide-content { min-width: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.72; }
.guide-content h2 { margin: 52px 0 17px; color: var(--ink); font: 500 34px/1.15 Georgia, serif; letter-spacing: -.025em; scroll-margin-top: 20px; }
.guide-content h2:first-child { margin-top: 0; }
.guide-content h3 { margin: 31px 0 12px; color: var(--ink); font-size: 20px; }
.guide-content p { margin: 0 0 17px; }
.guide-content ul, .guide-content ol { margin: 0 0 20px; padding-left: 22px; }
.guide-content li { margin: 7px 0; }
.guide-content code { padding: 2px 5px; color: #174f3e; background: #e8eee9; border-radius: 4px; font: 12px ui-monospace, SFMono-Regular, Consolas, monospace; }
.guide-content pre { overflow: auto; margin: 22px 0; padding: 18px; color: #e8f1ed; background: #15362c; border-radius: 11px; }
.guide-content pre code { padding: 0; color: inherit; background: transparent; }
.guide-table-wrap { overflow-x: auto; margin: 22px 0; border: 1px solid var(--line); border-radius: 10px; }
.guide-content table { width: 100%; border-collapse: collapse; }
.guide-content th, .guide-content td { padding: 11px 13px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: 12px; }
.guide-content th { color: var(--ink); background: #edf2ee; }
.guide-content tr:last-child td { border-bottom: 0; }

.method-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 25px 0; }
.method-card { padding: 20px; background: #f5f7f3; border: 1px solid var(--line); border-radius: 12px; }
.method-card strong { display: block; margin-bottom: 7px; color: var(--ink); }
.method-card p { margin: 0; font-size: 13px; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { max-width: 760px; }
  .r-preview { max-width: 780px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-aside { position: static; }
  .docs-toc ol { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 28px, 1180px); }
  .header-inner { gap: 14px; }
  .main-nav { display: none; }
  .header-action { margin-left: auto; }
  .hero { padding: 58px 0 70px; }
  .hero-grid { gap: 44px; }
  .hero-copy h1 { font-size: 45px; }
  .hero-lead { font-size: 16px; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid article { min-height: 190px; }
  .feature-grid article > span { margin-bottom: 25px; }
  .final-cta-inner, .footer-inner, .docs-hero-inner { align-items: flex-start; flex-direction: column; }
  .site-footer nav { margin-left: 0; }
  .docs-toc ol, .method-grid { grid-template-columns: 1fr; }
}
