/* ASC Pulse site: shared styles for index.html and analytics.html.
   Theme: follows the system until the visitor picks one with the header toggle
   (site.js sets <html data-theme="light|dark">). */

/* Fallback face sized like Inter, so the swap to the web font doesn't reflow the page. */
@font-face{font-family:"Inter Fallback";src:local("Arial");size-adjust:107.1%;ascent-override:90.4%;descent-override:22.5%;line-gap-override:0%}

:root{
  color-scheme:light;
  --bg:#ffffff; --bg2:#f5f5f7; --card:#ffffff; --header:rgba(255,255,255,.82);
  --text:#1d1d1f; --text2:#5f5f66; --text3:#77777d;
  --line:#e5e5ea; --line2:#d2d2d7;
  --accent:#0066d6; --accent-soft:#e8f1fd;
  --red:#d70015; --orange:#9a5a00; --green:#248a3d;
  --red-bg:#ffe5e3; --orange-bg:#fff1dc; --green-bg:#e3f5e8;
  --shot-shadow:0 30px 80px -20px rgba(0,0,0,.25),0 0 0 1px rgba(0,0,0,.08);
  --pop-shadow:0 12px 40px rgba(0,0,0,.16);
  --focus:0 0 0 3px rgba(0,102,214,.4);
  --font:Inter,"Inter Fallback",-apple-system,BlinkMacSystemFont,"Helvetica Neue",sans-serif;
  --mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  --header-h:64px;
}
/* dark tokens: once for the system setting (unless the visitor chose light), once for an explicit choice */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    color-scheme:dark;
    --bg:#0d0d0f; --bg2:#161618; --card:#1c1c1e; --header:rgba(13,13,15,.8);
    --text:#f5f5f7; --text2:#a1a1a6; --text3:#8e8e93;
    --line:#2c2c2e; --line2:#3a3a3c;
    --accent:#4da3ff; --accent-soft:#132a45;
    --red:#ff6961; --orange:#ffb340; --green:#4cd964;
    --red-bg:#3a1a19; --orange-bg:#3a2a10; --green-bg:#16301e;
    --shot-shadow:0 30px 80px -20px rgba(0,0,0,.8),0 0 0 1px rgba(255,255,255,.1);
    --pop-shadow:0 12px 40px rgba(0,0,0,.6);
    --focus:0 0 0 3px rgba(77,163,255,.5);
  }
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0d0d0f; --bg2:#161618; --card:#1c1c1e; --header:rgba(13,13,15,.8);
  --text:#f5f5f7; --text2:#a1a1a6; --text3:#8e8e93;
  --line:#2c2c2e; --line2:#3a3a3c;
  --accent:#4da3ff; --accent-soft:#132a45;
  --red:#ff6961; --orange:#ffb340; --green:#4cd964;
  --red-bg:#3a1a19; --orange-bg:#3a2a10; --green-bg:#16301e;
  --shot-shadow:0 30px 80px -20px rgba(0,0,0,.8),0 0 0 1px rgba(255,255,255,.1);
  --pop-shadow:0 12px 40px rgba(0,0,0,.6);
  --focus:0 0 0 3px rgba(77,163,255,.5);
}

/* light/dark screenshots: both are in the page, only the one for the current theme shows */
.only-dark{display:none!important}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .only-light{display:none!important}
  :root:not([data-theme="light"]) .only-dark{display:block!important}
}
:root[data-theme="dark"] .only-light{display:none!important}
:root[data-theme="dark"] .only-dark{display:block!important}

*{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;scroll-padding-top:calc(var(--header-h) + 16px)}
body{margin:0;background:var(--bg);color:var(--text);font:17px/1.55 var(--font);-webkit-font-smoothing:antialiased;overflow-x:clip}
img{max-width:100%;height:auto;display:block}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
:focus-visible{outline:none;box-shadow:var(--focus);border-radius:8px}
h1,h2,h3{margin:0;letter-spacing:-.022em;line-height:1.1;text-wrap:balance}
p{margin:0}
.wrap{max-width:1120px;margin:0 auto;padding:0 24px}
.eyebrow{font-family:var(--mono);font-size:13px;font-weight:500;color:var(--text3);text-transform:uppercase;letter-spacing:.08em}
section{padding:112px 0}
.alt{background:var(--bg2)}
.center{text-align:center}
.center h2{font-size:clamp(32px,4.6vw,48px);font-weight:700}
.center .sub{color:var(--text2);font-size:19px;margin:20px auto 0;max-width:640px}
.skip{position:absolute;left:-9999px}.skip:focus{left:16px;top:16px;z-index:100;background:var(--card);padding:8px 12px}
@media (max-width:720px){section{padding:80px 0}.wrap{padding:0 16px}}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 20px;border-radius:999px;font-weight:600;font-size:16px;border:1px solid transparent;cursor:pointer;transition:background-color .2s,border-color .2s,transform .2s;text-decoration:none!important;white-space:nowrap;font-family:inherit}
.btn-primary{background:var(--text);color:var(--bg)}
.btn-primary:hover{transform:translateY(-1px)}
.btn-secondary{border-color:var(--line2);color:var(--text);background:transparent}
.btn-secondary:hover{background:var(--bg2)}
.btn svg{width:18px;height:18px;flex:none}
.btn-row{display:flex;gap:12px;flex-wrap:wrap;justify-content:center}

/* header */
header.site{position:sticky;top:0;z-index:50;height:var(--header-h);background:var(--header);backdrop-filter:saturate(180%) blur(16px);-webkit-backdrop-filter:saturate(180%) blur(16px);border-bottom:1px solid transparent;transition:border-color .2s}
header.site.scrolled{border-bottom-color:var(--line)}
.nav{display:flex;align-items:center;justify-content:space-between;gap:16px;height:100%}
.brand{display:flex;align-items:center;gap:10px;font-weight:600;color:var(--text)!important;text-decoration:none!important;font-size:16px;white-space:nowrap}
.brand img{width:28px;height:28px;border-radius:7px}
.nav ul{display:flex;gap:26px;list-style:none;margin:0;padding:0}
.nav ul a{color:var(--text2);font-size:15px}
.nav ul a:hover,.nav ul a[aria-current="page"]{color:var(--text);text-decoration:none}
.nav ul a[aria-current="page"]{font-weight:600}
.nav .right{display:flex;align-items:center;gap:8px}
.nav .btn{min-height:38px;padding:0 16px;font-size:15px}
.theme-btn{width:40px;height:40px;border-radius:999px;border:1px solid var(--line2);background:transparent;color:var(--text);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color .2s}
.theme-btn:hover{background:var(--bg2)}
.theme-btn svg{width:18px;height:18px}
.theme-btn .moon{display:none}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .theme-btn .sun{display:none}:root:not([data-theme="light"]) .theme-btn .moon{display:block}}
:root[data-theme="dark"] .theme-btn .sun{display:none}
:root[data-theme="dark"] .theme-btn .moon{display:block}
@media (max-width:900px){.nav ul{display:none}}

/* screenshots */
.shot{border-radius:14px;overflow:hidden;box-shadow:var(--shot-shadow);background:var(--bg2);aspect-ratio:8/5}
.shot img{width:100%;height:100%;object-fit:cover}

/* ticks */
.ticks{list-style:none;padding:0;margin:24px 0 0;display:grid;gap:12px;text-align:left}
.ticks li{display:flex;gap:12px;font-size:16px;color:var(--text)}
.ticks svg{width:20px;height:20px;flex:none;margin-top:3px;color:var(--green)}

/* tiles */
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:56px;text-align:left}
.tile{border:1px solid var(--line);border-radius:16px;padding:24px;background:var(--bg)}
.alt .tile{background:var(--card)}
.tile>svg{width:24px;height:24px;color:var(--accent)}
.tile h3{font-size:17px;margin:16px 0 6px;letter-spacing:-.01em}
.tile p{color:var(--text2);font-size:15px}
@media (max-width:900px){.grid3{grid-template-columns:1fr 1fr}}
@media (max-width:560px){.grid3{grid-template-columns:1fr}}

/* link cards (analytics sections) */
.links{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:40px;text-align:left}
.lcard{display:flex;flex-direction:column;gap:6px;padding:20px;border:1px solid var(--line);border-radius:14px;background:var(--card);color:var(--text)!important;text-decoration:none!important;transition:border-color .2s,transform .2s;min-height:44px}
.lcard:hover{border-color:var(--accent);transform:translateY(-2px)}
.lcard .t{display:flex;align-items:center;gap:10px;font-weight:600}
.lcard .t svg{width:20px;height:20px;color:var(--accent);flex:none}
.lcard .t .go{margin-left:auto;width:16px;height:16px;color:var(--text3);transition:transform .2s}
.lcard:hover .t .go{transform:translateX(3px);color:var(--accent)}
.lcard p{color:var(--text2);font-size:14px;line-height:1.45}
@media (max-width:900px){.links{grid-template-columns:1fr 1fr}}
@media (max-width:520px){.links{grid-template-columns:1fr}}

/* finding line */
.finding{display:inline-flex;gap:10px;align-items:baseline;margin-top:24px;padding:12px 16px;border-radius:12px;background:var(--accent-soft);color:var(--text);font-size:15px;text-align:left}
.finding .eyebrow{color:var(--accent);font-size:11px;flex:none}

/* terminal */
.term{margin:48px auto 0;max-width:760px;text-align:left;border-radius:14px;background:#1c1c1e;color:#e5e5ea;box-shadow:var(--shot-shadow);overflow:hidden}
.term .bar{display:flex;gap:8px;padding:12px 14px;border-bottom:1px solid #2c2c2e}
.term .bar i{width:12px;height:12px;border-radius:50%;background:#3a3a3c}
.term pre{margin:0;padding:20px;font:14px/1.7 var(--mono);white-space:pre-wrap;word-break:break-word}
.term .c{color:#8e8e93}.term .g{color:#4cd964}.term .b{color:#64a8ff}

/* tables */
.table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:14px;background:var(--card);margin-top:20px;-webkit-overflow-scrolling:touch}
table{width:100%;border-collapse:collapse;font-size:15px;text-align:left}
th,td{padding:12px 16px;border-bottom:1px solid var(--line);vertical-align:top}
tr:last-child td{border-bottom:0}
th{font-size:13px;font-weight:600;color:var(--text3);white-space:nowrap}
td:first-child{font-weight:600;white-space:nowrap}
td .src{font-family:var(--mono);font-size:12px;color:var(--text3)}
td.muted{color:var(--text2)}

/* faq */
.faq{max-width:760px;margin:48px auto 0;text-align:left}
.faq details{border-bottom:1px solid var(--line)}
.faq summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:22px 0;font-weight:600;font-size:18px;min-height:44px}
.faq summary::-webkit-details-marker{display:none}
.faq summary svg{width:20px;height:20px;flex:none;color:var(--text3);transition:transform .25s}
.faq details[open] summary svg{transform:rotate(45deg)}
.faq details p{color:var(--text2);padding:0 0 22px;max-width:680px}

/* cta + footer */
.cta{text-align:center;padding:140px 0}
.cta img{width:88px;height:88px;border-radius:20px;margin:0 auto 28px}
.cta h2{font-size:clamp(36px,5.4vw,60px);font-weight:700;margin-bottom:20px}
.cta p{color:var(--text2);font-size:19px;margin-bottom:36px}
footer{border-top:1px solid var(--line);padding:40px 0;color:var(--text3);font-size:14px}
footer .wrap{display:flex;justify-content:space-between;gap:24px;flex-wrap:wrap}
footer ul{display:flex;gap:24px;list-style:none;margin:0;padding:0;flex-wrap:wrap}
footer a{color:var(--text2)}

/* motion: content is visible without JS; site.js adds .js to opt in to the fade */
.js .reveal{opacity:0;transform:translateY(14px);transition:opacity .5s ease-out,transform .5s ease-out}
.js .reveal.in{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .js .reveal{opacity:1;transform:none;transition:none}
  .btn,.lcard,.faq summary svg,.theme-btn{transition:none}
}

.vh{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (max-width:420px){.brand{font-size:15px;gap:8px}.nav{gap:8px}.nav .right{gap:6px}.nav .btn{padding:0 12px;font-size:14px}.theme-btn{width:38px;height:38px}}

/* legal and thanks pages */
.legal{max-width:720px;margin:0 auto;padding:72px 24px 96px}
.legal h1{font-size:clamp(34px,5vw,48px);font-weight:700}
.legal .updated{color:var(--text3);font-size:14px;margin-top:12px}
.legal h2{font-size:22px;margin:40px 0 10px}
.legal p,.legal li{color:var(--text2)}
.legal p+p{margin-top:12px}
.legal ul{padding-left:20px;margin:12px 0 0;display:grid;gap:8px}
.legal strong{color:var(--text)}
.thanks .failed{display:none}
.thanks[data-state="failed"] .ok{display:none}
.thanks[data-state="failed"] .failed{display:block}
.thanks .btn-row{justify-content:flex-start;margin-top:32px}
@media (max-width:720px){.legal{padding:48px 16px 72px}}
