/* The frame every /posthog page shares: colours, header, left sidebar, footer.
   The library (posthog/index.html), the help index and all help articles load this one file. */
/* Look and feel follows posthog.com's light theme (colour scheme values from the live site's CSS and the
   Tailwind palette in their website repo): warm off-white page with a tan sidebar, IBM Plex Sans, thin warm-grey
   borders, 6 px corners and the raised orange button. No PostHog logos or artwork are used. */
:root{
  color-scheme:light;
  --side:#EEEFE9;          /* tan / light-2: the sidebar */
  --bg:#FDFDF8;            /* light-1: page body (scheme "primary" --bg 253 253 248) */
  --bar:#E5E7E0;           /* light-3: menu bar, title bars, hovers (scheme --accent 229 231 224) */
  --input:#EEEFE9;         /* scheme --input-bg */
  --border:#BFC1B7;        /* scheme --border 191 193 183 */
  --border-soft:#D2D3CC;   /* light-4 / input border */
  --text:#111111;          /* scheme --text-primary 17 17 17 */
  --text-2:#65675E;        /* scheme --text-secondary 101 103 94 */
  --muted:#73756B;         /* light-9, readable muted */
  --ink:#23251D;           /* light-12 */
  --orange:#EB9D2A;        /* button face */
  --btn-border:#B17816;
  --btn-shadow:#CD8407;
  --red:#F54E00;           /* also the StepByStep video client-style bar */
  --blue:#2F80FA;
  --font:"IBM Plex Sans","IBM Plex Sans Variable",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --mono:"Source Code Pro",Menlo,Consolas,monospace;
  --thumb:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font);font-size:15px;line-height:1.5;
  -webkit-font-smoothing:antialiased;overflow-x:hidden}
a{color:inherit}
button{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:4px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---- top menu bar (posthog.com's OS-style bar, with our name) ---- */
.menubar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:12px;height:44px;padding:0 16px;
  background:rgba(229,231,224,.92);backdrop-filter:saturate(1.2) blur(8px);-webkit-backdrop-filter:saturate(1.2) blur(8px);
  border-bottom:1px solid var(--border)}
.brand{display:inline-flex;align-items:center;gap:8px;font-weight:700;font-size:14px;text-decoration:none;white-space:nowrap}
.brand svg{width:18px;height:18px;color:#5FE38C} /* StepByStep's own green, same as assets/favicon.svg */
.menubar .right{margin-left:auto;display:flex;align-items:center;gap:10px}
.tag{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;padding:2px 8px;border:1px solid var(--border);
  border-radius:6px;background:var(--bg);color:var(--text-2);white-space:nowrap}
.tag i{width:6px;height:6px;border-radius:50%;background:var(--orange);display:inline-block}

/* ---- the raised orange button (posthog.com style) ---- */
.btn{display:inline-flex;border:1.5px solid var(--btn-border);border-radius:6px;background:var(--btn-shadow);
  text-decoration:none;cursor:pointer;padding:0;flex:none}
.btn > span{display:flex;align-items:center;gap:6px;margin:-1.5px;padding:5px 12px;border:1.5px solid var(--btn-border);
  border-radius:6px;background:var(--orange);color:#000;font-weight:700;font-size:13px;line-height:1.4;
  transform:translateY(-2px);transition:transform .1s;white-space:nowrap}
.btn:hover > span{transform:translateY(-3px)}
.btn:active > span{transform:translateY(-1px)}
.btn.secondary{background:#C8CAC1;border-color:#9EA096}
.btn.secondary > span{background:var(--bg);border-color:#9EA096}
.btn.big > span{font-size:15px;padding:8px 16px}

/* ---- page layout: sidebar against the left edge, content beside it (44px = height of the menu bar) ---- */
.layout{display:grid;grid-template-columns:248px minmax(0,1fr);min-height:calc(100vh - 44px)}
.side{position:sticky;top:44px;align-self:start;height:calc(100vh - 44px);height:calc(100dvh - 44px);overflow-y:auto;
  padding:18px 8px;background:var(--side);border-right:1px solid var(--border)}
.content{display:flex;flex-direction:column;min-width:0}
.side h2{margin:0 8px 8px;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.topics{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.topic{display:flex;align-items:center;gap:9px;width:100%;padding:6px 8px;border:1px solid transparent;border-radius:6px;background:none;
  text-align:left;cursor:pointer;text-decoration:none;font-size:14px;font-weight:500;color:var(--text-2)}
.topic:hover{background:var(--bar);color:var(--text)}
.topic[aria-pressed="true"],.topic[aria-current]{background:var(--bg);border-color:var(--border);color:var(--text);font-weight:600;box-shadow:0 1px 0 var(--border)}
.topic .ico{width:20px;height:20px;flex:none;border-radius:5px;display:grid;place-items:center;color:#fff}
.topic .ico svg{width:12px;height:12px}
.topic .n{margin-left:auto;font-family:var(--mono);font-size:12px;color:var(--muted)}
.side .help{margin:20px 8px 0;padding:12px;border:1px dashed var(--border);border-radius:6px;font-size:13px;color:var(--text-2)}
.side .help b{color:var(--text)}
.topics + h2{margin-top:22px}
/* help articles in the sidebar: one fold per collection */
.hcols{margin:2px 0 0}
.hcol summary{display:flex;align-items:center;gap:6px;padding:5px 8px;border-radius:6px;cursor:pointer;font-size:13.5px;font-weight:500;color:var(--text-2);list-style:none}
.hcol summary::-webkit-details-marker{display:none}
.hcol summary::before{content:"";width:6px;height:6px;flex:none;margin:0 4px 0 2px;border-right:1.5px solid var(--muted);border-bottom:1.5px solid var(--muted);transform:rotate(-45deg);transition:transform .1s}
.hcol[open] summary::before{transform:rotate(45deg)}
.hcol summary:hover{background:var(--bar);color:var(--text)}
.hcol summary .n{margin-left:auto;font-family:var(--mono);font-size:12px;color:var(--muted)}
.hcol ul{list-style:none;margin:2px 0 6px;padding:0 0 0 18px}
.hcol li a{display:block;padding:4px 8px;border:1px solid transparent;border-radius:6px;font-size:13px;line-height:1.35;text-decoration:none;color:var(--text-2)}
.hcol li a:hover{background:var(--bar);color:var(--text)}
.hcol li a[aria-current]{background:var(--bg);border-color:var(--border);color:var(--text);font-weight:600}
main,footer{width:100%;max-width:1280px;margin-left:auto;margin-right:auto}
main{padding:28px 32px 40px;scroll-margin-top:44px}
.eyebrow{font-size:13px;font-weight:600;color:var(--text-2);margin:0 0 6px}
h1{margin:0;font-size:40px;line-height:1.1;font-weight:700;letter-spacing:-.02em;color:var(--text)}
h1 em{font-style:normal;color:var(--red)}
.lede{margin:10px 0 0;max-width:620px;font-size:17px;color:var(--text-2)}
.lede strong{color:var(--text);font-weight:600}
.ghead{display:flex;align-items:baseline;gap:10px;margin-bottom:4px}
.ghead h2{margin:0;font-size:22px;line-height:1.25;font-weight:700;letter-spacing:-.01em}
.ghead .n{font-family:var(--mono);font-size:12px;color:var(--muted)}
.gdesc{margin:0 0 14px;font-size:14px;color:var(--text-2)}
/* ---- help articles ---- */
.articles{padding-top:34px;margin-top:30px;border-top:1px solid var(--border-soft);scroll-margin-top:60px}
.acols{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:18px}
.acol{border:1px solid var(--border-soft);border-radius:6px;background:var(--bg);overflow:hidden}
.acol h3{margin:0;padding:9px 12px;font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);background:var(--bar);border-bottom:1px solid var(--border-soft)}
.acol ul{list-style:none;margin:0;padding:0}
.acol li + li{border-top:1px solid var(--border-soft)}
.acol a{display:block;padding:10px 12px;text-decoration:none}
.acol a:hover{background:var(--bar)}
.acol a b{display:block;font-size:14.5px;font-weight:600;line-height:1.35}
.acol a span{display:block;margin-top:2px;font-size:13px;line-height:1.45;color:var(--text-2)}
/* ---- footer ---- */
footer{margin-top:auto;padding:0 32px 40px;font-size:13px;color:var(--text-2)}
.foot-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:24px;padding-top:20px;border-top:1px solid var(--border)}
footer h2{margin:0 0 6px;font-size:14px;font-weight:700;color:var(--text)}
footer p{margin:0 0 8px;max-width:640px}
footer a{text-decoration:underline;text-underline-offset:2px}

/* ---- frame: phones and small tablets ---- */
@media (max-width:900px){
  .layout{grid-template-columns:minmax(0,1fr)}
  .side{display:none}
}
@media (max-width:640px){
  main{padding:20px 16px 32px}
  footer{padding:0 16px 40px}
  h1{font-size:30px}
  .lede{font-size:16px}
  .foot-grid{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:359px){
  .menubar .btn{display:none}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}
