:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f0f3f6;
  --text: #15181c;
  --muted: #66707a;
  --line: #dfe4ea;
  --accent: #1f6f5f;
  --accent-2: #164f44;
  --accent-soft: #eaf5f1;
  --warning: #8a5a19;
  --warning-soft: #fff6e8;
  --danger: #8a3541;
  --danger-soft: #fff0f2;
  --shadow: 0 12px 30px rgba(25, 35, 45, .08);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
a { color: inherit; }
.wrap { width: min(1120px, calc(100% - 36px)); margin: 0 auto; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247,248,250,.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(223,228,234,.9);
}
.nav { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font-weight: 800; letter-spacing: -.03em; text-decoration: none; font-size: 1.15rem; }
.navlinks { display: flex; gap: 18px; align-items: center; color: var(--muted); font-size: .95rem; }
.navlinks a { text-decoration: none; }
.navlinks a:hover { color: var(--text); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 12px; padding: 11px 16px;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  transition: .18s ease;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn-secondary { background: white; border-color: var(--line); }
.btn-secondary:hover { border-color: #b8c1ca; }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.hero { padding: 76px 0 56px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--accent); font-size: .78rem; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.035em; margin-top: 0; }
h1 { font-size: clamp(2.65rem, 6.2vw, 4.9rem); max-width: 900px; margin-bottom: 22px; }
h2 { font-size: clamp(2rem, 4vw, 3.3rem); margin-bottom: 18px; }
h3 { font-size: 1.25rem; }
.lead { font-size: clamp(1.12rem, 2vw, 1.35rem); max-width: 760px; color: var(--muted); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.micro { color: var(--muted); font-size: .9rem; margin-top: 12px; }
.section { padding: 68px 0; }
.section-tight { padding: 40px 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: 0 1px 0 rgba(25,35,45,.02);
}
.card-soft { background: var(--surface-2); border-color: transparent; }
.card-accent { background: var(--accent-soft); border-color: #cce6dd; }
.kicker { color: var(--muted); font-size: .95rem; }
.value-word { font-weight: 850; letter-spacing: .03em; font-size: .82rem; color: var(--accent); margin-bottom: 10px; }
.big-quote {
  font-size: clamp(1.8rem, 4vw, 3.5rem); font-weight: 800; letter-spacing: -.045em;
  max-width: 900px; margin: 0;
}
.muted { color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 30px 0; }
.list-clean { list-style: none; margin: 0; padding: 0; }
.list-clean li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.footer { border-top: 1px solid var(--line); color: var(--muted); padding: 36px 0 60px; font-size: .92rem; }
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* Audit */
.audit-shell { padding: 54px 0 80px; }
.audit-head { max-width: 760px; margin: 0 auto 26px; }
.progress { height: 6px; background: #e3e8ed; border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); width: 25%; transition: width .2s ease; }
.audit-card { max-width: 820px; margin: 18px auto 0; background: white; border: 1px solid var(--line); border-radius: 22px; padding: clamp(22px,4vw,40px); box-shadow: var(--shadow); }
.question { margin: 30px 0; }
.question:first-child { margin-top: 0; }
.question-title { font-weight: 800; font-size: 1.12rem; margin-bottom: 12px; }
.options { display: grid; gap: 10px; }
.options.cols-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.option {
  border: 1px solid var(--line); background: white; border-radius: 14px; padding: 14px 16px;
  cursor: pointer; display: flex; align-items: flex-start; gap: 10px; transition: .15s ease;
}
.option:hover { border-color: #aab6c0; }
.option.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.option input { margin-top: 4px; }
.option strong { display:block; }
.option small { color: var(--muted); display:block; margin-top:2px; }
.audit-actions { display:flex; justify-content:space-between; gap:12px; margin-top:34px; }
.tool-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.tool-card { border:1px solid var(--line); border-radius:14px; padding:14px; cursor:pointer; background:white; }
.tool-card.selected { border-color:var(--accent); background:var(--accent-soft); }
.tool-name { font-weight:800; }
.tool-state { display:flex; gap:6px; margin-top:10px; }
.tool-state button { padding:6px 9px; border-radius:8px; border:1px solid var(--line); background:white; cursor:pointer; font-size:.83rem; }
.tool-state button.active { border-color:var(--accent); background:var(--accent); color:#fff; }
.hidden { display:none !important; }
.validation { color: var(--danger); font-size:.9rem; margin-top: 10px; }

/* Results */
.result-hero { border: 1px solid #cce6dd; background: var(--accent-soft); border-radius: 22px; padding: 30px; margin-bottom: 22px; }
.result-label { text-transform:uppercase; letter-spacing:.1em; font-size:.76rem; font-weight:850; color:var(--accent); }
.result-title { font-size:clamp(1.9rem,4vw,3rem); margin:8px 0 12px; }
.reason-chips { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.chip { background:white; border:1px solid #cfe0da; border-radius:999px; padding:6px 10px; font-size:.82rem; color:#405148; }
.stack-section { margin-top:22px; }
.stack-section h3 { display:flex; align-items:center; gap:8px; }
.stack-item { border-top:1px solid var(--line); padding:16px 0; }
.stack-item:first-of-type { border-top:0; }
.stack-item strong { display:block; margin-bottom:4px; }
.status-pill { display:inline-block; border-radius:999px; padding:4px 8px; font-size:.73rem; font-weight:850; letter-spacing:.04em; margin-right:8px; }
.keep { background:#edf7f1; color:#236442; }
.replace { background:#fff6e8; color:#7c551d; }
.add { background:#edf3ff; color:#365fa0; }
.skip { background:#f3f4f5; color:#5d646c; }
.disclosure { font-size:.82rem; color:var(--muted); margin-top:8px; }

/* Editorial */
.article { max-width: 760px; margin: 0 auto; padding: 68px 0 90px; }
.article h1 { font-size: clamp(2.5rem,6vw,4.5rem); }
.article h2 { margin-top: 46px; font-size: 2rem; }
.article p, .article li { font-size: 1.05rem; }
.article-meta { color:var(--muted); margin: 12px 0 28px; }
.callout { padding:20px 22px; border-radius:16px; background:var(--accent-soft); border:1px solid #cce6dd; margin:28px 0; }
.compare-table { width:100%; border-collapse:collapse; background:white; border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.compare-table th,.compare-table td { text-align:left; padding:12px; border-bottom:1px solid var(--line); }
.compare-table th { background:var(--surface-2); }

@media (max-width: 800px) {
  .grid-4,.grid-3,.grid-2,.tool-grid,.options.cols-2 { grid-template-columns:1fr; }
  .navlinks a:not(.btn) { display:none; }
  .hero { padding-top:64px; }
  .audit-card { padding:20px; }
}

/* V1.1 audit refinements */
.audit-title { font-size:clamp(2.2rem,5vw,3.7rem); margin-bottom:18px; }
.audit-shell.is-result { padding-top:38px; }
.audit-shell.is-result .audit-title { font-size:clamp(1.9rem,3.5vw,2.8rem); }
.selected-stack-summary { margin:14px 0 18px; padding:10px 12px; border-radius:12px; background:var(--surface-2); font-size:.9rem; }
.text-input { width:100%; padding:13px 14px; border:1px solid var(--line); border-radius:12px; font:inherit; background:#fff; }
.workflow-summary { max-width:100%; margin:0 0 16px; padding:14px 16px; border:1px solid var(--line); background:#fff; border-radius:16px; }
.workflow-summary-label { text-transform:uppercase; letter-spacing:.1em; font-size:.72rem; font-weight:850; color:var(--muted); margin-bottom:8px; }
.workflow-summary-chips { display:flex; flex-wrap:wrap; gap:7px; }
.workflow-summary-chips span { background:var(--surface-2); border-radius:999px; padding:5px 9px; font-size:.8rem; color:#4e5963; }
.result-grid .stack-section { align-self:start; }
.brand-principle { margin-top:22px; }
.brand-principle .big-quote { font-size:clamp(1.65rem,3vw,2rem); }
@media (max-width:800px){
  .workflow-summary-chips { gap:6px; }
  .audit-shell.is-result { padding-top:28px; }
}

/* V1.2 spacing + result refinements */
.brand-quote-section { padding: 44px 0 22px; }
.principles-section { padding: 26px 0 52px; }
.result-grid:has(.stack-section:nth-child(1):last-child) { grid-template-columns: 1fr; }
.result-grid .stack-section { min-height: 0; }
.disclosure { max-width: 680px; }
@media (max-width:800px){
  .brand-quote-section { padding: 34px 0 16px; }
  .principles-section { padding: 18px 0 42px; }
}

/* V1.3 editorial content engine */
.article-topline { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin:12px 0 26px; color:var(--muted); font-size:.9rem; }
.article-topline span { background:var(--surface-2); border-radius:999px; padding:5px 9px; }
.decision-box { margin:28px 0 34px; padding:22px; border:1px solid #cce6dd; background:var(--accent-soft); border-radius:18px; }
.decision-box h2 { margin:0 0 12px; font-size:1.45rem; }
.decision-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.decision-item { background:#fff; border:1px solid #dce9e4; border-radius:14px; padding:14px 16px; }
.decision-item strong { display:block; margin-bottom:4px; }
.article-note { margin:26px 0; padding:16px 18px; border-left:4px solid var(--accent); background:var(--surface-2); border-radius:0 12px 12px 0; }
.article ul { padding-left:1.25rem; }
.article li { margin:.45rem 0; }
.article .mini-heading { font-size:.8rem; text-transform:uppercase; letter-spacing:.1em; color:var(--accent); font-weight:850; margin-bottom:6px; }
.article-related { margin-top:44px; padding-top:28px; border-top:1px solid var(--line); }
.article-related a {
  display:block;
  font-weight:700;
}

.article-related a + a {
  margin-top:10px;
}
.intent-card { border:1px solid var(--line); border-radius:16px; padding:18px; background:#fff; margin:18px 0; }
.intent-card h3 { margin-bottom:8px; }
.faq { margin-top:46px; }
.faq details { border-top:1px solid var(--line); padding:16px 0; }
.faq summary { cursor:pointer; font-weight:800; }
.faq details p { color:var(--muted); }
@media (max-width:800px){ .decision-grid { grid-template-columns:1fr; } }
