/* Article/listing styles only. Site header/footer come from the shared public chrome
   (src/layouts/public-chrome) and must not be styled here; rules stay scoped to #main
   or blog-specific classes so neither side leaks into the other. */
:root{--blue:#161aff;--blue-d:#0a0db8;--tint:#eef0ff;--text:#222939;--muted:#60739f;--border:#e5e9f0;--bg:#ffffff;--r:12px}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;scroll-padding-top:80px}
body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;font-size:17px;line-height:1.7;overflow-x:hidden}
img{max-width:100%;height:auto;display:block}
:where(#main) a{color:var(--blue)}
:where(#main) a:focus-visible,:where(#main) summary:focus-visible,.table-wrap:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:4px}
.wrap{max-width:1152px;margin:0 auto;padding:0 20px}
.skip{position:absolute;left:-9999px}.skip:focus{left:12px;top:12px;z-index:100;background:#fff;padding:8px 12px;border-radius:8px}
.btn{display:inline-flex;align-items:center;gap:6px;background:var(--blue);color:#fff;text-decoration:none;font-weight:600;font-size:14px;padding:9px 16px;border-radius:8px;line-height:1.2;white-space:nowrap;transition:background .15s}
.btn:hover{background:var(--blue-d)}
.btn.ghost{background:#fff;color:var(--text);border:1px solid var(--border)}.btn.ghost:hover{background:var(--tint)}
.btn.white{background:#fff;color:var(--blue)}.btn.white:hover{background:var(--tint)}
/* hero */
.hero{background:var(--tint);padding:56px 0 48px;position:relative;overflow:hidden}
.hero::after{content:"»";position:absolute;right:-20px;bottom:-110px;font-size:360px;font-weight:700;color:var(--blue);opacity:.06;line-height:1;pointer-events:none}
.eyebrow{font-size:13px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--blue);margin:0 0 10px}
.hero h1{font-size:clamp(34px,6vw,56px);line-height:1.08;letter-spacing:-.03em;margin:0 0 14px;max-width:720px}
.hero p.sub{font-size:18px;color:var(--muted);max-width:600px;margin:0}
.hero.hero-dark{background:linear-gradient(120deg,#080d32,#11185b);color:#fff}
.hero.hero-dark .eyebrow{color:#b6bdff}
.hero.hero-dark p.sub{color:#d0d5ee}
.hero.hero-dark::after{color:#8188ff;opacity:.14}
.hero-links{display:flex;flex-wrap:wrap;gap:6px 20px;margin:18px 0 0;font-size:14px;font-weight:600}
:where(#main) .hero-links a{color:inherit;text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1px;opacity:.85}
:where(#main) .hero-links a:hover{opacity:1}
/* filters */
.filters{display:flex;flex-wrap:wrap;gap:8px;margin:32px 0 28px;padding:0;list-style:none}
.filters a{display:inline-block;font-size:14px;font-weight:600;color:var(--text);text-decoration:none;border:1px solid var(--border);padding:7px 14px;border-radius:999px;background:#fff}
.filters a:hover{border-color:var(--blue);color:var(--blue)}
.filters a[aria-current="page"]{background:var(--blue);border-color:var(--blue);color:#fff}
:where(#main) .grid{display:grid;grid-template-columns:1fr;gap:24px;padding-bottom:64px}
@media(min-width:700px){:where(#main) .grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1000px){:where(#main) .grid{grid-template-columns:repeat(3,1fr)}}
.card{border:1px solid var(--border);border-radius:16px;overflow:hidden;background:#fff;transition:transform .2s,box-shadow .2s}
.card:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(22,26,255,.08)}
.card-link{display:block;color:inherit;text-decoration:none}
.card img{width:100%;aspect-ratio:1200/630;object-fit:cover;background:var(--tint)}
.card-body{padding:18px 20px 20px}
.card-cat{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--blue);margin:0 0 6px}
.card h3{font-size:19px;line-height:1.3;margin:0 0 8px;letter-spacing:-.01em}
.card-desc{color:var(--muted);font-size:15px;line-height:1.55;margin:0 0 12px}
.card-meta{font-size:13px;color:var(--muted);margin:0}
.empty{border:1px dashed var(--border);border-radius:16px;padding:48px 24px;text-align:center;margin-bottom:64px;background:linear-gradient(180deg,#fff,var(--tint))}
.empty .big{font-size:56px;font-weight:700;color:var(--blue);line-height:1;margin:0 0 8px}
.empty h2{font-size:22px;margin:0 0 6px}.empty p{color:var(--muted);margin:0 auto 18px;max-width:440px}
.drafts{border:2px dashed #e0a100;background:#fff8e6;border-radius:12px;padding:16px 20px;margin:24px 0 0}
.drafts strong{display:block;font-size:13px;letter-spacing:.06em;text-transform:uppercase;color:#8a5a00}
.drafts ul{margin:8px 0 0;padding-left:18px}
.draft-banner{background:#fff8e6;color:#8a5a00;border-bottom:2px dashed #e0a100;text-align:center;font-weight:600;font-size:14px;padding:8px 16px}
/* article */
.article{max-width:720px;margin:0 auto;padding:28px 20px 0}
.crumbs ol{list-style:none;display:flex;flex-wrap:wrap;gap:6px;padding:0;margin:0 0 20px;font-size:14px;color:var(--muted)}
.crumbs li+li::before{content:"›";margin-right:6px}
.crumbs a{color:var(--muted);text-decoration:none}.crumbs a:hover{color:var(--blue)}
.pill{display:inline-block;background:var(--tint);color:var(--blue);font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:5px 12px;border-radius:999px;text-decoration:none}
.article h1{font-size:clamp(30px,5.4vw,44px);line-height:1.12;letter-spacing:-.025em;margin:14px 0 12px}
.meta{color:var(--muted);font-size:15px;margin:0 0 24px}
.hero-img{border-radius:16px;width:100%;margin-bottom:32px;background:var(--tint)}
.prose h2{font-size:28px;line-height:1.25;letter-spacing:-.02em;margin:44px 0 12px}
.prose h3{font-size:21px;line-height:1.35;margin:30px 0 8px}
.prose p,.prose ul,.prose ol{margin:0 0 18px}
.prose li{margin:4px 0}
.prose blockquote{margin:24px 0;padding:4px 20px;border-left:4px solid var(--border);color:var(--muted)}
.prose blockquote.key-takeaways{background:var(--tint);border-left:4px solid var(--blue);border-radius:0 12px 12px 0;padding:18px 22px;color:var(--text)}
.prose blockquote.key-takeaways>p:first-child{font-weight:700;color:var(--blue);margin-bottom:8px}
.prose blockquote.key-takeaways ul{margin-bottom:0}
.toc{border:1px solid var(--border);border-radius:12px;padding:18px 22px;margin:24px 0 32px}
.toc-title{font-size:13px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:0 0 8px!important}
.toc ol{margin:0!important;padding-left:20px}.toc li::marker{color:var(--blue);font-weight:700}
.toc a{text-decoration:none;color:var(--text)}.toc a:hover{color:var(--blue)}
.table-wrap{overflow-x:auto;margin:0 0 24px;border:1px solid var(--border);border-radius:12px}
.prose table{border-collapse:collapse;width:100%;min-width:480px;font-size:15px}
.prose th{background:var(--tint);text-align:left;font-weight:600;color:var(--text)}
.prose th,.prose td{padding:10px 14px;border-bottom:1px solid var(--border)}
.prose tr:last-child td{border-bottom:0}
.prose ul.contains-task-list{list-style:none;padding-left:4px}
.prose .task-list-item input{accent-color:var(--blue);margin-right:10px;width:16px;height:16px;vertical-align:-2px}
.prose code{background:var(--tint);padding:2px 6px;border-radius:6px;font-size:.9em}
.prose img{border-radius:12px}
.faq{margin-top:48px;border-top:1px solid var(--border);padding-top:8px}
.faq h2{font-size:28px;letter-spacing:-.02em;margin:32px 0 8px}
.faq h3{font-size:19px;margin:24px 0 6px}
.faq p{margin:0;color:var(--text)}
.tags{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:40px 0 0}
.tags li{font-size:13px;color:var(--muted);border:1px solid var(--border);border-radius:999px;padding:4px 12px}
.cta{background:var(--blue);color:#fff;border-radius:16px;padding:36px 28px;margin:48px 0;position:relative;overflow:hidden}
.cta::after{content:"»";position:absolute;right:-8px;top:-70px;font-size:240px;font-weight:700;opacity:.1;line-height:1;pointer-events:none}
.cta-eyebrow{font-weight:700;opacity:.85;margin:0 0 6px}
.cta-title{font-size:30px;font-weight:700;letter-spacing:-.02em;line-height:1.15;margin:0 0 10px}
.cta-text{margin:0 0 22px;opacity:.92;max-width:520px}
.related{border-top:1px solid var(--border);padding-top:40px;margin-top:16px}
.related h2{font-size:24px;margin:0 0 20px}
/* about */
.stages{list-style:none;padding:0;margin:20px 0 28px;display:flex;flex-wrap:wrap;gap:8px;counter-reset:s}
.stages li{counter-increment:s;background:var(--tint);border-radius:10px;padding:8px 12px;font-weight:600;font-size:15px}
.stages li::before{content:counter(s);color:var(--blue);font-weight:700;margin-right:8px}
.stages li:not(:last-child)::after{content:"»";color:var(--blue);margin-left:10px}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.card{transition:none}.card:hover{transform:none}}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.flow-figure{margin:28px 0 32px}
.flow-figure img{width:100%;border:1px solid var(--border);border-radius:12px}
.flow{list-style:none;display:flex;flex-wrap:wrap;gap:8px 6px;padding:0;margin:14px 0 8px!important;counter-reset:f}
.flow li{counter-increment:f;position:relative;background:var(--blue);color:#fff;font-weight:600;font-size:14px;line-height:1.3;padding:7px 11px;border-radius:8px;margin:0}
.flow li::before{content:counter(f) " ";opacity:.7;font-weight:700}
.flow li.leak-after::after{content:"";position:absolute;right:-7px;top:-4px;width:10px;height:10px;border-radius:50%;background:#e5313b;border:2px solid #fff}
.flow-legend{font-size:14px;color:var(--muted);margin:0!important;display:flex;align-items:center;gap:8px}
.flow-legend .dot{width:10px;height:10px;border-radius:50%;background:#e5313b;flex:none}
