/* User guide (guide/*.html). Same tokens and font as the app, so it can live inside it later. */
:root{
  --canvas:#F4F6F9; --surface:#FFFFFF; --ink:#0B1A33; --muted:#5F6B7F; --faint:#98A2B3; --line:#E3E7EE;
  --data:#2563EB; --accent:#F08A24; --up:#0B7F6B; --down:#C2335F;
  --shot:0 18px 44px -24px rgba(11,26,51,.32),0 1px 3px rgba(11,26,51,.06);
  color-scheme:light;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --canvas:#0B111C; --surface:#121A28; --ink:#E7ECF4; --muted:#8C97AA; --faint:#5E6A80; --line:#222D40;
    --data:#6E9BFF; --accent:#F7A04B; --up:#34C3A8; --down:#F472A6;
    --shot:0 18px 44px -24px rgba(0,0,0,.7),0 0 0 1px #222D40;
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --canvas:#0B111C; --surface:#121A28; --ink:#E7ECF4; --muted:#8C97AA; --faint:#5E6A80; --line:#222D40;
  --data:#6E9BFF; --accent:#F7A04B; --up:#34C3A8; --down:#F472A6;
  --shot:0 18px 44px -24px rgba(0,0,0,.7),0 0 0 1px #222D40;
  color-scheme:dark;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:24px}
body{margin:0;background:var(--canvas);color:var(--ink);font:16px/1.6 "Instrument Sans",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;-webkit-font-smoothing:antialiased}
a{color:var(--data);text-underline-offset:2px}
:focus-visible{outline:2px solid var(--data);outline-offset:2px;border-radius:4px}

/* layout: contents on the left (wide screens), the guide on the right */
.g{display:grid;grid-template-columns:260px minmax(0,1fr);max-width:1240px;margin:0 auto}
.toc{position:sticky;top:0;height:100vh;overflow:auto;padding:32px 20px 32px 24px;border-right:1px solid var(--line)}
.toc .brand{display:flex;flex-direction:column;align-items:flex-start;gap:6px;margin-bottom:26px}
.toc .brand img{height:22px;width:auto}
.toc .brand span{font-weight:700;font-size:14px;padding-bottom:6px;background:linear-gradient(var(--accent),var(--accent)) left bottom/18px 2px no-repeat}
.toc .langs{display:inline-flex;align-items:center;gap:2px;margin:-8px 0 24px;padding:3px 3px 3px 9px;border-radius:9px;background:color-mix(in srgb,var(--ink) 7%,transparent);font-size:13px}
.toc .langs svg{width:15px;height:15px;color:var(--muted);margin-right:5px;flex:none}
.toc .langs a,.toc .langs span{padding:4px 11px;border-radius:7px;line-height:1.3}
.toc .langs a{margin:0;color:var(--muted);text-decoration:none;font-weight:500}
.toc .langs a:hover{background:none;color:var(--ink)}
.toc .langs span{background:var(--surface);color:var(--ink);font-weight:600;box-shadow:0 1px 2px rgba(11,26,51,.16),0 0 0 1px color-mix(in srgb,var(--ink) 8%,transparent)}
.toc b{display:block;font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--faint);margin:0 0 8px}
.toc ol{list-style:none;margin:0;padding:0;counter-reset:s}
.toc li{margin:0}
.toc a{display:block;padding:5px 10px;margin:0 -10px;border-radius:8px;color:var(--muted);text-decoration:none;font-size:14.5px;line-height:1.35}
.toc a:hover{background:color-mix(in srgb,var(--ink) 6%,transparent);color:var(--ink)}
.toc ol ol{margin:2px 0 6px 12px}
.toc ol ol a{font-size:13.5px;padding:3px 10px}
main{padding:48px 56px 96px;min-width:0}
.doc{max-width:860px}

/* text */
header.hero{margin-bottom:40px}
.kicker{display:inline-flex;gap:8px;align-items:center;font-size:13px;font-weight:600;color:var(--muted);background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:4px 12px;margin-bottom:16px}
.kicker i{width:8px;height:8px;border-radius:50%;background:var(--accent)}
h1{font-size:40px;line-height:1.1;letter-spacing:-.025em;margin:0 0 14px}
.lead{font-size:19px;color:var(--muted);margin:0;max-width:700px}
h2{font-size:28px;letter-spacing:-.02em;line-height:1.2;margin:72px 0 12px;padding-top:28px;border-top:1px solid var(--line)}
h2 .n{color:var(--accent);margin-right:10px}
h3{font-size:20px;letter-spacing:-.01em;margin:40px 0 8px}
h4{font-size:16px;margin:24px 0 4px}
p{margin:0 0 14px}
ul,ol{margin:0 0 16px;padding-left:22px}
li{margin:4px 0}
li::marker{color:var(--faint)}
.ui{font-weight:600;white-space:nowrap;background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:1px 7px;font-size:.92em}
.num{font-variant-numeric:tabular-nums}

/* boxes */
.tip,.note,.int{border-radius:12px;padding:14px 18px;margin:20px 0;font-size:15px}
.tip{background:color-mix(in srgb,var(--data) 8%,var(--surface));border:1px solid color-mix(in srgb,var(--data) 22%,transparent)}
.note{background:var(--surface);border:1px solid var(--line)}
.int{background:color-mix(in srgb,var(--accent) 9%,var(--surface));border:1px solid color-mix(in srgb,var(--accent) 35%,transparent)}
.tip>b:first-child,.note>b:first-child,.int>b:first-child{display:block;margin-bottom:2px}
.tip p:last-child,.note p:last-child,.int p:last-child,.tip ul:last-child,.note ul:last-child{margin-bottom:0}
.badge{display:inline-block;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;padding:2px 8px;border-radius:999px;vertical-align:3px;margin-left:8px;
  color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,transparent)}

/* screenshots */
figure{margin:24px 0 28px}
figure img{display:block;max-width:100%;height:auto;border-radius:12px;box-shadow:var(--shot);background:var(--surface)}
figure.s img{max-width:min(100%,420px)}
figure.m img{max-width:min(100%,640px)}
figcaption{font-size:13.5px;color:var(--muted);margin-top:10px}
.pair{display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:start}
.pair figure{margin:0}
/* numbered marks over a screenshot, explained in the list below it */
.marks{position:relative;display:block;max-width:100%}
.marks i{position:absolute;transform:translate(-50%,-50%);width:26px;height:26px;border-radius:50%;background:var(--accent);color:#fff;
  font:700 13px/26px "Instrument Sans",system-ui,sans-serif;font-style:normal;text-align:center;box-shadow:0 0 0 3px var(--surface),0 4px 10px rgba(0,0,0,.25)}
ol.legend{list-style:none;padding:0;counter-reset:m}
ol.legend li{position:relative;padding-left:38px;margin:10px 0}
ol.legend li b.k{position:absolute;left:0;top:1px;width:26px;height:26px;border-radius:50%;background:var(--accent);color:#fff;font-size:13px;line-height:26px;text-align:center}

/* tables */
table{width:100%;border-collapse:collapse;margin:12px 0 24px;font-size:15px;background:var(--surface);border:1px solid var(--line);border-radius:12px;overflow:hidden}
th,td{text-align:left;vertical-align:top;padding:10px 14px;border-bottom:1px solid var(--line)}
th{font-size:13px;font-weight:600;color:var(--muted);background:color-mix(in srgb,var(--ink) 3%,var(--surface))}
tr:last-child td{border-bottom:0}
td:first-child{font-weight:600;white-space:nowrap}
.dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:6px;vertical-align:1px}

footer.end{margin-top:72px;padding-top:20px;border-top:1px solid var(--line);color:var(--faint);font-size:13.5px}

/* tablets and phones: contents become a block at the top */
@media (max-width:1000px){
  .g{display:block}
  .toc{position:static;height:auto;border-right:0;border-bottom:1px solid var(--line);padding:24px 16px}
  .toc ol ol{display:none}
  .toc>ol{columns:2;column-gap:24px}
  main{padding:32px 16px 72px}
  h1{font-size:32px}
  .pair{grid-template-columns:1fr}
}
@media (max-width:560px){
  .toc>ol{columns:1}
  h2{font-size:24px}
  .lead{font-size:17px}
  .marks i{width:20px;height:20px;font-size:11px;line-height:20px}
  table{display:block;overflow-x:auto}
}
@media print{
  .toc{display:none}
  .g{display:block}
  main{padding:0}
  figure,table,.tip,.note,.int{break-inside:avoid}
}
