:root{
  --ink:#12151A; --paper:#FFFFFF; --bg:#F5F6F3; --line:#E1E4DF; --muted:#5B6259;
  --green:#128A4E; --amber:#D98B1F; --teal:#1C7C9C; --violet:#7B5EC7;
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{ margin:0; background:var(--bg); color:var(--ink); font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif; font-size:16px; line-height:1.65; -webkit-font-smoothing:antialiased; }
h1,h2,h3{ font-family:'Space Grotesk',sans-serif; font-weight:600; margin:0; letter-spacing:-0.01em; }
.mono{ font-family:'JetBrains Mono', monospace; }
a{ color:var(--green); }
.wrap{ max-width:1040px; margin:0 auto; padding:0 24px; }

.topbar{ padding:22px 0; border-bottom:1px solid var(--line); }
.topbar .wrap{ display:flex; align-items:center; justify-content:space-between; }
.brand{ display:flex; align-items:center; gap:10px; font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:15px; }
.brand .mark{ width:22px; height:22px; border-radius:5px; background:var(--ink); position:relative; flex:none; }
.brand .mark::before, .brand .mark::after{ content:""; position:absolute; width:6px; height:6px; background:var(--paper); }
.brand .mark::before{ top:4px; left:4px; }
.brand .mark::after{ bottom:4px; right:4px; }
.topnav{ display:flex; gap:22px; font-size:14px; color:var(--muted); }
.topnav a{ color:var(--muted); text-decoration:none; }
.topnav a:hover{ color:var(--ink); }

/* ---- generator hero ---- */
.gen-hero{ padding:56px 0 20px; text-align:center; }
.gen-hero h1{ font-size:38px; line-height:1.15; max-width:20ch; margin:0 auto; }
.gen-hero p.lede{ margin:16px auto 0; color:var(--muted); max-width:52ch; font-size:16px; }

/* 3-step lede */
.lede-steps{
  display:flex; align-items:center; justify-content:center;
  gap:0; margin:28px auto 0; max-width:600px; flex-wrap:wrap;
}
.lede-step{
  display:flex; flex-direction:column; align-items:center; gap:10px;
  padding:20px 28px; background:var(--paper);
  border:1.5px solid var(--line); border-radius:14px;
  min-width:148px; flex:1; max-width:180px;
  transition:box-shadow .2s, border-color .2s;
}
.lede-step:hover{ border-color:var(--green); box-shadow:0 4px 18px rgba(18,138,78,.10); }
.step-num{
  width:36px; height:36px; border-radius:50%;
  background:var(--ink); color:#fff;
  font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:15px;
  display:flex; align-items:center; justify-content:center; flex:none;
}
.step-text{
  font-size:13.5px; font-weight:600; color:var(--ink);
  line-height:1.3; text-align:center;
}
.step-opt{
  display:block; font-size:11px; font-weight:500;
  color:var(--muted); margin-top:2px;
}
.lede-arrow{
  font-size:18px; color:var(--line); padding:0 6px; flex:none;
  margin-top:-8px; /* nudge to optically center with cards */
}

.trust-badges{ margin:22px auto 0; display:flex; justify-content:center; gap:22px; flex-wrap:wrap; font-size:13px; color:var(--muted); }
.trust-badges span{ display:flex; align-items:center; gap:7px; }
.trust-badges .dot{ width:7px; height:7px; border-radius:50%; background:var(--green); }

/* ---- two-sided generator card ---- */
#generator{ padding:36px 0 56px; }
.card{ background:var(--paper); border:1px solid var(--line); border-radius:16px; padding:32px; max-width:880px; margin:0 auto; }
.two-col{ display:grid; grid-template-columns:340px 1fr; gap:36px; align-items:start; }

.preview-col{ display:flex; flex-direction:column; }
.canvas-shell{ position:relative; }
.ec-pill{ position:absolute; top:10px; left:10px; z-index:2; background:rgba(18,21,26,0.82); color:#fff; font-size:11px; font-weight:600; padding:5px 10px; border-radius:999px; letter-spacing:.01em; }
#canvas-container{ display:flex; justify-content:center; align-items:center; min-height:300px; background:var(--bg); border:1.5px dashed var(--line); border-radius:12px; overflow:hidden; }
#canvas-container.checkerboard{
  background-image:
    linear-gradient(45deg, #e2e5df 25%, transparent 25%),
    linear-gradient(-45deg, #e2e5df 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e2e5df 75%),
    linear-gradient(-45deg, transparent 75%, #e2e5df 75%);
  background-size:16px 16px;
  background-position:0 0, 0 8px, 8px -8px, -8px 0px;
  background-color:#fafbf9;
}
.button-group{ display:flex; gap:10px; margin-top:16px; }
button{ color:#fff; border:none; padding:13px 18px; font-size:14px; font-weight:600; font-family:'Inter',sans-serif; border-radius:8px; cursor:pointer; transition:background .15s; flex:1; }
#download-btn{ background:var(--ink); }
#download-btn:hover{ background:#000; }
#copy-btn{ background:var(--green); }
#copy-btn:hover{ background:#0e6f3f; }
.toast{ display:none; margin-top:12px; color:var(--green); font-weight:600; font-size:13px; text-align:center; }

.controls-col{ display:flex; flex-direction:column; gap:18px; }
.input-group{ text-align:left; }
label{ font-size:13px; font-weight:600; color:var(--ink); display:block; margin-bottom:6px; }
input[type="text"]{ width:100%; padding:12px; border:1px solid var(--line); border-radius:8px; box-sizing:border-box; font-size:15px; font-family:'Inter',sans-serif; background:var(--bg); }
input[type="text"]:focus{ outline:2px solid var(--green); outline-offset:1px; }
input[type="file"]{ width:100%; padding:10px; background:var(--bg); border:1px solid var(--line); border-radius:8px; box-sizing:border-box; cursor:pointer; font-size:13px; }

.pill-row{ display:flex; flex-wrap:wrap; gap:8px; }
.pill{ display:flex; align-items:center; gap:7px; padding:7px 12px; border-radius:999px; border:1.5px solid var(--line); background:var(--bg); font-size:13px; font-weight:500; color:var(--muted); cursor:pointer; font-family:'Inter',sans-serif; transition:border-color .15s, color .15s; }
.pill:hover{ border-color:#c7cbc2; }
.pill.active{ border-color:var(--ink); color:var(--ink); background:var(--paper); }
.pill .swatch{ width:12px; height:12px; border-radius:50%; flex:none; border:1px solid rgba(0,0,0,.08); }
.pill.ec-pill-btn{ padding:7px 14px; }

details.advanced{ text-align:left; border:1px solid var(--line); border-radius:10px; padding:2px 16px; }
details.advanced summary{ cursor:pointer; font-weight:600; font-size:13.5px; color:var(--ink); padding:12px 0; list-style:none; }
details.advanced summary::-webkit-details-marker{ display:none; }
details.advanced summary:before{ content:"▸ "; color:var(--green); }
details.advanced[open] summary:before{ content:"▾ "; }
.adv-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:15px; }
.adv-row label{ margin-bottom:0; font-weight:400; font-size:13px; flex:1; color:var(--muted); }
.adv-row select{ padding:7px; border-radius:6px; border:1px solid var(--line); font-family:'Inter',sans-serif; background:var(--paper); }
.adv-row input[type="color"]{ width:38px; height:30px; border:none; padding:0; cursor:pointer; background:none; }
.adv-row input[type="range"]{ flex:1; accent-color:var(--green); }
.adv-row .range-val{ font-size:12px; color:var(--muted); width:32px; text-align:right; }
.gradient-block{ background:var(--bg); border-radius:8px; padding:12px 12px 2px; margin:-4px 0 15px; }
.gradient-block .adv-row{ margin-bottom:12px; }

.stats-panel{ margin:24px auto 0; text-align:left; background:var(--paper); border:1px solid var(--line); border-radius:12px; padding:16px 22px; max-width:880px; }
.stats-panel h4{ margin:0 0 12px 0; font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; font-weight:600; }
.stats-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px 10px; }
.stat-item{ font-size:13.5px; color:var(--ink); }
.stat-item span.stat-label{ color:var(--muted); display:block; font-size:11px; margin-bottom:2px; }
@media (max-width:640px){ .stats-grid{ grid-template-columns:1fr 1fr; } }

/* ---- shared article sections (below generator) ---- */
section{ padding:56px 0; border-top:1px solid var(--line); }
section > .wrap > h2{ font-size:28px; margin-bottom:6px; }
section > .wrap > p.section-intro{ color:var(--muted); max-width:60ch; margin-top:12px; margin-bottom:36px; }

.timeline{ position:relative; padding-left:28px; max-width:680px; }
.timeline::before{ content:""; position:absolute; left:5px; top:6px; bottom:6px; width:2px; background:var(--line); }
.tl-item{ position:relative; padding-bottom:30px; }
.tl-item:last-child{ padding-bottom:0; }
.tl-item::before{ content:""; position:absolute; left:-28px; top:4px; width:12px; height:12px; border-radius:50%; background:var(--paper); border:2px solid var(--green); }
.tl-year{ font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:14px; color:var(--green); }
.tl-item p{ margin:4px 0 0; color:var(--ink); }

.modes{ display:grid; grid-template-columns:repeat(4,1fr); gap:0; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.mode{ padding:22px 20px; border-left:1px solid var(--line); }
.mode:first-child{ border-left:none; }
.mode .swatch{ width:26px; height:26px; border-radius:6px; margin-bottom:14px; }
.mode h3{ font-size:16px; margin-bottom:6px; }
.mode p{ font-size:13.5px; color:var(--muted); margin:0; }
.mode .cap{ margin-top:10px; font-size:12px; }
.mode .cap b{ font-family:'JetBrains Mono',monospace; font-weight:500; }
.modes-note{ margin-top:16px; font-size:13px; color:var(--muted); }
@media (max-width:760px){ .modes{ grid-template-columns:1fr 1fr; } .mode:nth-child(3){ border-left:none; } .mode{ border-bottom:1px solid var(--line); } }

.anatomy-layout{ display:grid; grid-template-columns:auto 1fr; gap:48px; align-items:start; }
.anatomy-layout svg{ width:340px; height:auto; }
.legend{ display:flex; flex-direction:column; gap:16px; }
.legend-item{ display:flex; gap:14px; align-items:flex-start; }
.legend-item .swatch{ width:16px; height:16px; border-radius:4px; flex:none; margin-top:3px; }
.legend-item h3{ font-size:15px; margin-bottom:3px; }
.legend-item p{ font-size:13.5px; color:var(--muted); margin:0; }
.modcount{ margin-top:36px; padding:18px 20px; background:var(--paper); border:1px solid var(--line); border-radius:10px; font-size:14px; color:var(--muted); }
.modcount b{ color:var(--ink); }
@media (max-width:760px){ .anatomy-layout{ grid-template-columns:1fr; } .anatomy-layout svg{ width:100%; max-width:320px; margin:0 auto; } }

.ec-list{ display:flex; flex-direction:column; gap:22px; max-width:680px; }
.ec-row{ display:grid; grid-template-columns:64px 1fr; gap:18px; align-items:center; }
.ec-label{ font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:15px; }
.ec-bar-track{ height:10px; background:var(--line); border-radius:6px; overflow:hidden; }
.ec-bar-fill{ height:100%; border-radius:6px; }
.ec-desc{ grid-column:2; font-size:13.5px; color:var(--muted); margin-top:6px; }

.compare-cards{ display:grid; grid-template-columns:1fr 1fr; gap:0; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.compare-card{ padding:24px 24px 26px; }
.compare-card + .compare-card{ border-left:1px solid var(--line); }
.compare-card .tag{ display:inline-flex; align-items:center; gap:7px; font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.03em; margin-bottom:14px; }
.compare-card .tag .dot{ width:8px; height:8px; border-radius:50%; }
.compare-card dl{ margin:0; display:flex; flex-direction:column; gap:12px; }
.compare-card dt{ font-size:12px; color:var(--muted); margin-bottom:2px; }
.compare-card dd{ margin:0; font-size:14px; }
@media (max-width:760px){ .compare-cards{ grid-template-columns:1fr; } .compare-card + .compare-card{ border-left:none; border-top:1px solid var(--line); } }

.trap-callout{ margin-top:28px; border-left:3px solid var(--amber); background:var(--amber-soft, rgba(217,139,31,0.07)); border-radius:0 10px 10px 0; padding:22px 26px; }
.trap-callout h3{ font-size:16px; margin-bottom:8px; }
.trap-callout p{ font-size:14px; color:var(--muted); margin:0 0 14px; max-width:68ch; }
.trap-callout ul{ margin:0; padding-left:18px; display:flex; flex-direction:column; gap:6px; }
.trap-callout li{ font-size:13.5px; color:var(--ink); }

.guidance-cols{ display:grid; grid-template-columns:1fr 1fr; gap:28px; margin-top:28px; }
.guidance-col h3{ font-size:14.5px; margin-bottom:10px; }
.guidance-col ul{ margin:0; padding-left:18px; display:flex; flex-direction:column; gap:7px; }
.guidance-col li{ font-size:13.5px; color:var(--muted); }
@media (max-width:760px){ .guidance-cols{ grid-template-columns:1fr; } }

.practices{ display:grid; grid-template-columns:1fr 1fr; gap:0 40px; }
.practice{ padding:20px 0 20px 18px; border-left:2px solid var(--green); margin-bottom:6px; }
.practice h3{ font-size:15px; margin-bottom:5px; }
.practice p{ font-size:13.5px; color:var(--muted); margin:0; }
@media (max-width:760px){ .practices{ grid-template-columns:1fr; } }

.facts{ display:flex; flex-direction:column; }
.fact{ display:grid; grid-template-columns:40px 1fr; gap:18px; padding:18px 0; border-top:1px solid var(--line); }
.fact:first-child{ border-top:none; }
.fact .num{ font-family:'JetBrains Mono',monospace; font-size:13px; color:var(--muted); padding-top:2px; }
.fact p{ margin:0; font-size:14.5px; }

.faq{ display:flex; flex-direction:column; max-width:760px; }
.faq-item{ padding:20px 0; border-top:1px solid var(--line); }
.faq-item:first-child{ border-top:none; }
.faq-item h3{ font-size:15.5px; margin-bottom:6px; }
.faq-item p{ margin:0; font-size:14px; color:var(--muted); }

.closing{ text-align:left; }
.closing .box{ background:var(--ink); color:var(--paper); border-radius:14px; padding:40px 44px; display:flex; align-items:center; justify-content:space-between; gap:30px; flex-wrap:wrap; }
.closing h2{ color:var(--paper); font-size:24px; max-width:34ch; }
.closing p{ color:#B9BEB6; margin-top:8px; max-width:44ch; font-size:14.5px; }
.closing .btn{ background:var(--green); color:var(--paper); text-decoration:none; font-weight:600; font-size:14px; padding:13px 22px; border-radius:8px; white-space:nowrap; flex:none; }
.closing .btn:hover{ background:#0e6f3f; }

footer{ padding:34px 0 60px; text-align:left; color:var(--muted); font-size:13px; border-top:1px solid var(--line); }
footer p{ max-width:70ch; margin:0 0 8px; }
footer .sig{ font-size:12px; margin-top:14px; color:#8A9086; }

@media (max-width:760px){
  .gen-hero h1{ font-size:28px; }
  .card{ padding:22px; }
  .two-col{ grid-template-columns:1fr; gap:26px; }
  .closing .box{ padding:30px; }
}
