/* ISPilot docs. The same palette and fonts as the marketing site (legal.css). */
:root {
  color-scheme: dark;
  --obsidian: #0B0E14;
  --surface: #151926;
  --surface-2: #1b2030;
  --border: rgba(244, 242, 250, 0.09);
  --border-strong: rgba(244, 242, 250, 0.16);
  --violet: #6D5EF5;
  --violet-light: #A79BFF;
  --amber: #FFB020;
  --green: #46C98B;
  --text: #F4F2FA;
  --muted: rgba(244, 242, 250, 0.74);
  --muted-2: rgba(244, 242, 250, 0.56);
  --top-h: 60px;
}
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 20px); }
body { margin: 0; background: var(--obsidian); color: var(--text); font: 400 16px/1.7 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--violet-light); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 30; background: var(--surface); padding: 8px 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.top { position: sticky; top: 0; z-index: 20; height: var(--top-h); display: flex; align-items: center; gap: 16px; padding: 0 24px; background: rgba(11, 14, 20, 0.9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font: 800 19px 'Bricolage Grotesque', sans-serif; }
.brand span { color: var(--muted-2); font-weight: 700; }
.top-links { margin-left: auto; display: flex; align-items: center; gap: 20px; font-size: 14px; font-weight: 700; }
.top-links a { color: var(--muted); text-decoration: none; }
.top-links a:hover { color: var(--text); }
.top-links .top-cta { color: #fff; background: var(--violet); padding: 7px 14px; border-radius: 8px; }
.top-links .top-cta:hover { background: #5b4ce0; color: #fff; }
.menu-btn { display: none; min-height: 40px; padding: 0 14px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; font: 700 14px 'Manrope', sans-serif; cursor: pointer; }

.layout { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 272px minmax(0, 1fr) 216px; gap: 44px; padding: 0 24px; }
.sidebar { position: sticky; top: var(--top-h); align-self: start; max-height: calc(100vh - var(--top-h)); overflow-y: auto; padding: 24px 6px 40px 0; font-size: 14px; }
.find input { width: 100%; padding: 9px 12px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; font: 500 14px 'Manrope', sans-serif; }
.find input::placeholder { color: var(--muted-2); }
.nav-group p { margin: 22px 0 6px; padding: 0 10px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-group a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; font-weight: 600; line-height: 1.45; }
.nav-group a:hover { color: var(--text); background: var(--surface); }
.nav-group a[aria-current] { color: #fff; background: rgba(109, 94, 245, 0.28); box-shadow: inset 2px 0 0 var(--violet-light); }
.no-match { padding: 14px 10px; color: var(--muted-2); }

main { min-width: 0; max-width: 780px; padding: 40px 0 60px; }
.crumb { margin: 0 0 8px; color: var(--amber); font-size: 13px; font-weight: 800; }
h1, h2, h3 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
h1 { margin: 0 0 12px; font-size: clamp(32px, 4.4vw, 44px); }
.lede { margin: 0 0 30px; color: var(--muted); font-size: 18.5px; line-height: 1.55; }
h2 { margin: 44px 0 12px; font-size: 25px; }
h3 { margin: 28px 0 8px; font-size: 18.5px; letter-spacing: -0.01em; }
main p, main li { color: rgba(244, 242, 250, 0.86); }
main p { margin: 0 0 14px; }
main ul, main ol { margin: 0 0 16px; padding-left: 22px; }
main li { margin: 5px 0; }
main strong { color: var(--text); font-weight: 700; }
code { padding: 1px 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; font: 0.88em ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
pre { margin: 0 0 18px; padding: 14px 16px; overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: 13.5px; line-height: 1.6; }
pre code { padding: 0; background: none; border: 0; overflow-wrap: normal; }
.path { color: var(--text); font-weight: 700; white-space: nowrap; }

ol.steps { list-style: none; counter-reset: step; padding: 0; }
ol.steps > li { position: relative; counter-increment: step; margin: 0; padding: 0 0 18px 44px; }
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 50%; color: var(--amber); font-size: 13px; font-weight: 800; }
ol.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 32px; bottom: 4px; width: 1px; background: var(--border-strong); }

.note, .warn, .tip { margin: 20px 0; padding: 12px 16px; border-left: 3px solid var(--violet-light); background: rgba(109, 94, 245, 0.1); border-radius: 0 8px 8px 0; font-size: 15px; }
.warn { border-color: var(--amber); background: rgba(255, 176, 32, 0.09); }
.tip { border-color: var(--green); background: rgba(70, 201, 139, 0.08); }
.note p:last-child, .warn p:last-child, .tip p:last-child { margin: 0; }

.table { margin: 0 0 20px; overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { background: var(--surface); color: var(--text); font-weight: 800; }
tr:last-child td { border-bottom: 0; }

figure { margin: 22px 0 26px; }
figure img { display: block; width: 100%; height: auto; border: 1px solid var(--border-strong); border-radius: 10px; }
figure.phone img { width: min(280px, 100%); }
figcaption { margin-top: 8px; color: var(--muted-2); font-size: 13.5px; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 30px; }
.card { display: block; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.card:hover { border-color: var(--violet-light); transform: translateY(-1px); }
.card strong { display: block; margin-bottom: 2px; font: 800 17px 'Bricolage Grotesque', sans-serif; }
.card span { color: var(--muted); font-size: 14px; line-height: 1.5; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 52px; }
.pager a { display: block; padding: 12px 16px; border: 1px solid var(--border-strong); border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px; }
.pager a:hover { border-color: var(--violet-light); }
.pager span { display: block; color: var(--muted-2); font-size: 12.5px; font-weight: 600; }
.pager-next { text-align: right; }

.on-page { position: sticky; top: var(--top-h); align-self: start; padding: 42px 0 20px; font-size: 13.5px; }
.on-page p { margin: 0 0 8px; color: var(--muted-2); font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.on-page ul { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 1px solid var(--border-strong); }
.on-page li { margin: 6px 0; }
.on-page a { color: var(--muted); text-decoration: none; }
.on-page a:hover { color: var(--text); }
.foot { padding: 20px 24px; border-top: 1px solid var(--border); color: var(--muted-2); font-size: 13px; text-align: center; }
.foot a { margin-left: 10px; color: var(--muted); }

@media (max-width: 1180px) { .layout { grid-template-columns: 260px minmax(0, 1fr); } .on-page { display: none; } }
@media (max-width: 860px) {
  .top { padding: 0 16px; }
  .top-links { display: none; }
  .menu-btn { display: block; margin-left: auto; }
  .layout { display: block; padding: 0 16px; }
  .sidebar { display: none; position: static; max-height: none; padding-top: 14px; border-bottom: 1px solid var(--border); }
  .sidebar.open { display: block; }
  main { padding-top: 28px; }
  .cards, .pager { grid-template-columns: 1fr; }
  .path { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card { transition: none; } .card:hover { transform: none; } }

/* ---------- How-to videos ---------- */
.doc-video { margin: 22px 0 30px; }
.doc-video figcaption { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.vid-tag { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #211200; background: var(--amber); padding: 3px 8px; border-radius: 6px; }
.vid-len { margin-left: auto; color: var(--muted-2); font-weight: 600; font-size: 13px; }
.vid-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--border-strong);
  box-shadow: 0 24px 60px -24px rgba(0,0,0,.8); }
.vid-frame video { width: 100%; height: 100%; display: block; background: #000; }
.vid-chapters { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.vid-chapters button { font: inherit; font-size: 12.5px; font-weight: 700; color: var(--muted); background: rgba(244,242,250,.05); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 12px; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.vid-chapters button:hover, .vid-chapters button.on { color: var(--text); border-color: rgba(255,176,32,.6); background: rgba(255,176,32,.1); }
.vid-chapters button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.vid-chapters button span { color: var(--amber); margin-right: 6px; font-variant-numeric: tabular-nums; }
.vid-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 16px 0 8px; }
.vid-card { display: block; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 8px 8px 12px;
  transition: transform .25s cubic-bezier(.16,1,.3,1), border-color .2s; }
.vid-card:hover { transform: translateY(-3px); border-color: rgba(167,155,255,.6); }
.vid-card:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.vid-card .thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: #000; margin-bottom: 9px; }
.vid-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid-card .thumb em { position: absolute; right: 6px; bottom: 6px; font-style: normal; font-size: 11px; font-weight: 800; background: rgba(11,14,20,.82); padding: 2px 6px; border-radius: 5px; }
.vid-card .thumb::after { content: ""; position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  background: rgba(255,176,32,.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6v12l9-6z' fill='%23211200'/%3E%3C/svg%3E") center/18px no-repeat;
  opacity: .9; transition: transform .2s; }
.vid-card:hover .thumb::after { transform: scale(1.1); }
.vid-card b { display: block; font-size: 14px; padding: 0 4px; }
.vid-card small { display: block; color: var(--muted-2); font-size: 12px; padding: 2px 4px 0; }

/* ---------- Scroll reveal ---------- */
.motion-ok .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1); }
.motion-ok .reveal.in { opacity: 1; transform: none; }
