/* Shared styles for the redesigned public site (guides, articles, index, legal). The landing page inlines the same tokens. */
:root {
  --ink: #050605;
  --ink-2: #0c0f0d;
  --bone: #f1ece2;
  --bone-dim: rgba(241, 236, 226, 0.64);
  --bone-faint: rgba(241, 236, 226, 0.14);
  --green: #2ee86a;
  --green-deep: #17a373;
  --gold: #f5c518;
  --accent: var(--green);
  --accent-font: "Poppins", "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; }
html { background: var(--ink); color: var(--bone); -webkit-font-smoothing: antialiased; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; font-family: var(--sans); background: var(--ink); overflow-x: hidden; }
::selection { background: var(--green); color: var(--ink); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.035em; }
.hl { font-family: var(--accent-font); font-style: italic; font-weight: 700; letter-spacing: -0.04em; color: var(--green); }
.wrap { width: min(1320px, 100% - 2 * var(--gutter)); margin: 0 auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bone-dim); }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.split-line { overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }

.grain { position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: 0.07; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 8s steps(10) infinite; }
@keyframes grain { 0%,100% { transform: translate(0,0); } 20% { transform: translate(-5%,4%); } 40% { transform: translate(4%,-6%); } 60% { transform: translate(-3%,7%); } 80% { transform: translate(6%,-2%); } }

.cursor, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 95; pointer-events: none; border-radius: 50%; opacity: 0; }
.cursor { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--green); }
.cursor-ring { width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1px solid rgba(46, 232, 106, 0.5); transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background-color .35s, border-color .35s; }
.cursor-ring.is-hover { width: 72px; height: 72px; margin: -36px 0 0 -36px; background: rgba(46, 232, 106, 0.1); border-color: var(--green); }
@media (hover: hover) and (pointer: fine) { .cursor, .cursor-ring { opacity: 1; } body.has-cursor, body.has-cursor a, body.has-cursor button, body.has-cursor summary { cursor: none; } }

.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 70; background: var(--green); transform-origin: left; transform: scaleX(0); }

.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; padding: 18px var(--gutter); transition: transform .5s var(--ease), background-color .4s; }
.nav.is-scrolled { background: rgba(5, 6, 5, 0.7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.nav.is-hidden { transform: translateY(-110%); }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); font-size: 14px; font-weight: 500; color: var(--bone-dim); }
.nav-links a:not(.btn) { position: relative; transition: color .3s; }
.nav-links a:not(.btn):hover, .nav-links a[aria-current] { color: var(--bone); }
.nav-links a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--green); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.nav-links a:not(.btn):hover::after, .nav-links a[aria-current]::after { transform: scaleX(1); transform-origin: left; }
@media (max-width: 760px) { .nav-links a.hide-sm { display: none; } }

.btn { position: relative; display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 999px; font-weight: 600; font-size: 15px; line-height: 1; overflow: hidden; isolation: isolate; will-change: transform; }
.btn-primary { background: var(--green); color: var(--ink); }
.btn-primary::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bone); border-radius: inherit; transform: translateY(101%); transition: transform .55s var(--ease); }
.btn-primary:hover::before { transform: translateY(0); }
.btn-ghost { border: 1px solid var(--bone-faint); color: var(--bone); }
.btn-ghost:hover { border-color: var(--bone-dim); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-sm { padding: 10px 16px; font-size: 13px; }
.as-badge { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px 8px 14px; border-radius: 12px; background: #000; color: #fff; border: 1px solid rgba(241,236,226,.28); transition: border-color .3s, box-shadow .3s; will-change: transform; }
.as-badge:hover { border-color: var(--green); box-shadow: 0 16px 40px -10px rgba(46,232,106,.35); }
.as-badge svg { width: 24px; height: 28px; flex: none; }
.as-badge span { display: grid; gap: 2px; line-height: 1; text-align: left; }
.as-badge small { font-size: 10px; font-weight: 600; opacity: .85; }
.as-badge strong { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }

/* Page hero (guides, index, legal) */
.page-hero { position: relative; padding: clamp(130px, 16vw, 200px) 0 clamp(60px, 8vw, 110px); overflow: hidden; border-bottom: 1px solid var(--bone-faint); }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 85% 10%, rgba(46, 232, 106, 0.14), transparent 60%); pointer-events: none; }
.page-hero .ghost-piece { position: absolute; right: -2vw; bottom: -0.16em; font-size: clamp(260px, 38vw, 620px); line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(46, 232, 106, 0.16); pointer-events: none; user-select: none; }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--bone-dim); text-transform: uppercase; }
.crumbs a:hover { color: var(--green); }
.crumbs span[aria-hidden] { opacity: .4; }
.page-hero h1 { position: relative; margin-top: 30px; font-size: clamp(44px, 7.2vw, 120px); line-height: 0.95; max-width: 15ch; }
.byline { position: relative; margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--bone-dim); text-transform: uppercase; }
.byline b { color: var(--bone); font-weight: 500; }
.hero-lede { position: relative; margin: 30px 0 0; max-width: 40ch; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; color: var(--bone-dim); }

/* Short answer */
.answer { position: relative; margin-top: clamp(40px, 5vw, 64px); max-width: 880px; padding: clamp(24px, 3vw, 36px); border-radius: 28px; background: linear-gradient(135deg, rgba(46,232,106,.12), rgba(46,232,106,.03)); border: 1px solid rgba(46,232,106,.28); }
.answer small { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--green); }
.answer p { margin: 14px 0 0; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.5; color: var(--bone); }

/* Article layout */
.article-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(30px, 6vw, 110px); padding: clamp(70px, 9vw, 130px) 0; }
.toc { position: sticky; top: 110px; align-self: start; }
.toc > small { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--bone-dim); }
.toc ol { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 4px; counter-reset: toc; }
.toc ol a { display: grid; grid-template-columns: 28px 1fr; gap: 6px; padding: 8px 0; font-size: 14px; line-height: 1.35; color: var(--bone-dim); transition: color .3s; }
.toc ol a::before { counter-increment: toc; content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: 11px; padding-top: 2px; color: rgba(241,236,226,.35); transition: color .3s; }
.toc ol a:hover, .toc ol a.is-active { color: var(--bone); }
.toc ol a.is-active::before { color: var(--green); }
.toc .toc-cta { margin-top: 30px; }
.prose { max-width: 720px; }
.prose section + section { margin-top: clamp(56px, 7vw, 90px); }
.prose .sec-num { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; color: var(--green); }
.prose h2 { margin-top: 14px; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.02; }
.prose p { margin: 22px 0 0; font-size: 19px; line-height: 1.7; color: rgba(241,236,226,.8); }
.prose ul { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.prose li { position: relative; padding: 16px 18px 16px 52px; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--bone-faint); font-size: 17px; line-height: 1.5; color: var(--bone); }
.prose li::before { content: "→"; position: absolute; left: 20px; top: 15px; color: var(--green); font-family: var(--mono); }
.prose .source { margin-top: 20px; font-family: var(--mono); font-size: 13px; color: var(--bone-dim); }
.prose .source a { color: var(--green); border-bottom: 1px solid rgba(46,232,106,.4); }
.prose .disclaimer { margin-top: 64px; padding: 22px 24px; border-radius: 18px; border: 1px dashed var(--bone-faint); font-size: 15px; line-height: 1.6; color: var(--bone-dim); }
.prose .disclaimer strong { display: block; margin-bottom: 6px; color: var(--bone); font-size: 13px; font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; }
@media (max-width: 960px) { .article-grid { grid-template-columns: 1fr; } .toc { position: static; } .toc ol { display: none; } .toc > small { display: none; } .toc .toc-cta { margin-top: 0; } }

/* Takeaways */
.takeaways { padding: clamp(80px, 10vw, 140px) 0; border-top: 1px solid var(--bone-faint); }
.take-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 50px; }
.take { padding: 28px; border-radius: 26px; background: var(--ink-2); border: 1px solid var(--bone-faint); min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; transition: border-color .4s, transform .5s var(--ease); }
.take:hover { border-color: rgba(46,232,106,.5); transform: translateY(-4px); }
.take span { font-family: var(--mono); font-size: 40px; font-weight: 700; color: var(--green); letter-spacing: -0.05em; }
.take p { margin: 0; font-size: 19px; line-height: 1.4; font-weight: 600; letter-spacing: -0.015em; }

/* Section heads */
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; flex-wrap: wrap; }
.sec-head h2 { margin-top: 22px; font-size: clamp(38px, 5.4vw, 84px); line-height: 0.96; }

/* FAQ */
.faq-sec { padding: clamp(80px, 10vw, 140px) 0; border-top: 1px solid var(--bone-faint); }
.faq { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 6vw; }
details { border-bottom: 1px solid var(--bone-faint); }
summary { list-style: none; display: flex; justify-content: space-between; gap: 20px; padding: 24px 0; font-size: clamp(18px, 1.6vw, 22px); font-weight: 600; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--green); transition: transform .4s var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
.faq-body { overflow: hidden; }
details p { margin: 0 0 24px; color: var(--bone-dim); line-height: 1.6; max-width: 60ch; font-size: 17px; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } }

/* Guide rows */
.rows { padding: clamp(80px, 10vw, 140px) 0; border-top: 1px solid var(--bone-faint); }
.guide-list { margin-top: 50px; border-top: 1px solid var(--bone-faint); }
.guide-item { position: relative; display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--bone-faint); overflow: hidden; }
.guide-item::before { content: ""; position: absolute; inset: 0; background: var(--green); transform: translateY(101%); transition: transform .55s var(--ease); z-index: 0; }
.guide-item:hover::before { transform: translateY(0); }
.guide-item > * { position: relative; z-index: 1; transition: color .4s; }
.guide-item:hover > *, .guide-item:hover .t b { color: var(--ink) !important; }
.guide-item:hover .t small { color: rgba(5, 6, 5, 0.72) !important; }
.guide-item .n { font-family: var(--mono); font-size: 13px; color: var(--bone-dim); }
.guide-item .t b { display: block; font-size: clamp(22px, 2.6vw, 38px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
.guide-item .t small { display: block; margin-top: 8px; max-width: 70ch; font-size: 15px; line-height: 1.5; color: var(--bone-dim); }
.guide-item i { font-style: normal; font-size: 28px; transition: transform .5s var(--ease), color .4s; }
.guide-item:hover i { transform: translateX(-10px) rotate(-45deg); }
.hub + .hub { margin-top: clamp(90px, 11vw, 150px); }
.hub-count { font-family: var(--mono); font-size: 13px; color: var(--bone-dim); }
@media (max-width: 860px) { .guide-item { grid-template-columns: 34px 1fr auto; } .guide-item .t small { display: none; } }

/* CTA band */
.cta-band { position: relative; padding: clamp(110px, 14vw, 200px) 0; text-align: center; overflow: hidden; border-top: 1px solid var(--bone-faint); }
.cta-band .ghost { position: absolute; left: 50%; bottom: -0.132em; transform: translateX(-50%); font-size: min(60vw, 700px); line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(46,232,106,.16); pointer-events: none; }
.cta-band h2 { position: relative; font-size: clamp(64px, 12vw, 200px); line-height: 0.85; letter-spacing: -0.06em; }
.cta-band p { position: relative; margin: 26px auto 0; max-width: 40ch; font-size: 19px; line-height: 1.5; color: var(--bone-dim); }
.cta-band .as-badge { position: relative; margin-top: 34px; }

/* Legal */
.legal { padding: clamp(60px, 8vw, 110px) 0 clamp(90px, 10vw, 140px); }
.legal .prose h2 { font-size: clamp(24px, 2.4vw, 34px); margin-top: 56px; }
.legal .prose h2:first-child { margin-top: 0; }
.legal .prose p, .legal .prose li { font-size: 17px; }
.legal .prose li { padding: 12px 16px 12px 46px; }
.legal .prose li::before { top: 11px; left: 18px; }
.legal .prose a { color: var(--green); border-bottom: 1px solid rgba(46,232,106,.4); }

footer { border-top: 1px solid var(--bone-faint); padding: 40px 0 50px; font-size: 13px; color: var(--bone-dim); }
.foot { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot a:hover, .foot-link:hover { color: var(--bone); }
.foot-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
/* TOC badge must not inherit list-link styles */
.toc .toc-cta a::before { content: none; }

@media (prefers-reduced-motion: reduce) { .grain { animation: none; } }
