:root {
  color-scheme: dark;
  --bg: #111214;
  --deep: #090a0c;
  --panel: #1b1d21;
  --raised: #24272c;
  --line: rgba(255, 255, 255, .1);
  --line-strong: rgba(255, 255, 255, .18);
  --text: #f5f6f7;
  --muted: #a7adb8;
  --quiet: #747b87;
  --amber: #e3a044;
  --blue: #69a8ff;
  --purple: #c975ff;
  --green: #52d68a;
  --cyan: #56cfe6;
  --red: #ff6b73;
  --side: 274px;
  --toc: 210px;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.62 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, sans-serif;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
img { max-width: 100%; }
::selection { background: #e3a0444c; }

.skip {
  position: fixed;
  z-index: 100;
  top: -80px;
  left: 14px;
  padding: 11px 15px;
  border-radius: 10px;
  background: var(--amber);
  color: #17120b;
  font-weight: 800;
}
.skip:focus { top: 12px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(220px, var(--side)) minmax(300px, 650px) 1fr;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--line);
  background: #111214ed;
  backdrop-filter: blur(22px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img { width: 42px; height: 42px; border-radius: 12px; }
.brand span { display: grid; line-height: 1.1; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  color: var(--muted);
}
.search:focus-within { border-color: #e3a04488; box-shadow: 0 0 0 3px #e3a04418; }
.search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; }
.search input::placeholder { color: var(--quiet); }
kbd {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--quiet);
  font-size: 11px;
}
.home-link { justify-self: end; color: var(--muted); font-size: 13px; text-decoration: none; }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 16px; }
.language-switch { display: flex; align-items: center; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.language-switch a, .language-switch span { display: grid; place-items: center; min-width: 44px; min-height: 44px; border-radius: 6px; color: var(--muted); font-size: 11px; font-weight: 850; text-decoration: none; }
.language-switch [aria-current="page"] { background: var(--amber); color: #17120b; }
.nav-toggle, .side-head button { display: none; border: 0; background: transparent; }
.side-head button { min-width: 44px; min-height: 44px; }

.results {
  position: fixed;
  z-index: 80;
  top: 66px;
  left: calc(var(--side) + 46px);
  width: min(650px, calc(100vw - var(--side) - 90px));
  max-height: 65vh;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: #1a1c20fa;
  box-shadow: 0 24px 80px #0008;
}
.results a { display: block; padding: 11px 13px; border-radius: 10px; text-decoration: none; }
.results a:hover { background: var(--raised); }
.results b { display: block; }
.results span { color: var(--muted); font-size: 13px; }
.results p { padding: 10px; color: var(--muted); }

.layout {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 840px) var(--toc);
  justify-content: center;
  gap: 50px;
  width: min(1500px, 100%);
  margin: auto;
  padding: 0 28px;
}
.sidebar {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow: auto;
  padding: 30px 16px 22px 0;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
}
.side-head {
  display: flex;
  justify-content: space-between;
  margin: 0 13px 15px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.sidebar nav { display: grid; }
.sidebar nav p {
  margin: 22px 12px 7px;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
}
.sidebar a {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 7px;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.sidebar a i { color: var(--quiet); font: 700 10px/1 ui-monospace, monospace; font-style: normal; }
.sidebar a:hover { background: #ffffff08; color: var(--text); }
.sidebar a.active { background: #e3a04423; color: var(--amber); }
.sidebar footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 28px 12px;
  color: var(--quiet);
  font-size: 11px;
}
.sidebar footer span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px #52d68a88;
}

main { min-width: 0; padding: 72px 0 110px; }
.chapter { padding: 30px 0 76px; border-bottom: 1px solid var(--line); }
.hero { padding-top: 15px; }
.kicker {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .16em;
}
.kicker.blue, .blue { color: var(--blue) !important; }
.kicker.purple, .purple { color: var(--purple) !important; }
.kicker.green { color: var(--green); }
.kicker.cyan { color: var(--cyan); }
.kicker.red { color: var(--red); }

h1, h2, h3 { line-height: 1.17; letter-spacing: -.025em; }
h1 { max-width: 720px; margin: 0 0 20px; font-size: clamp(40px, 5.2vw, 62px); }
h2 { margin: 0 0 14px; font-size: clamp(32px, 3.7vw, 45px); }
h3 { margin: 38px 0 12px; font-size: 21px; }
.lead { max-width: 730px; color: var(--muted); font-size: 18px; }
.hero .lead { font-size: clamp(18px, 2vw, 22px); }
.intro { color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.actions a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel);
  font-weight: 800;
  text-decoration: none;
}
.actions .primary { border-color: var(--amber); background: var(--amber); color: #17120b; }

.start-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 34px 0 16px;
}
.start-grid a {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  text-decoration: none;
}
.start-grid a:hover { border-color: #e3a04466; background: var(--raised); }
.start-grid b { display: block; margin-bottom: 3px; }
.start-grid span { color: var(--muted); font-size: 13px; }

.path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 24px 0;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
}
.path b { color: var(--amber); }
.ui-label {
  display: inline;
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--raised);
  color: var(--text);
  font-size: .91em;
  font-weight: 750;
  white-space: nowrap;
}

.note {
  margin: 26px 0;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 12px;
  background: var(--panel);
}
.note.warning { border-left-color: var(--amber); }
.note p { margin: 4px 0 0; color: var(--muted); }
.result {
  margin: 25px 0;
  padding: 15px 18px;
  border: 1px solid #52d68a55;
  border-radius: 11px;
  background: #52d68a12;
  color: var(--muted);
}
.result b { margin-right: 8px; color: var(--green); }

.steps {
  counter-reset: step;
  display: grid;
  gap: 1px;
  margin: 26px 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  list-style: none;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 15px;
  margin: 0;
  padding: 18px;
  background: var(--panel);
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e3a04422;
  color: var(--amber);
  font-weight: 900;
}
.steps b { display: block; }
.steps p { margin: 3px 0 0; color: var(--muted); }
.steps.compact li { padding-block: 14px; }

figure.shot {
  margin: 30px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--deep);
  box-shadow: 0 24px 70px #0005;
}
.shot-frame { position: relative; overflow: hidden; background: var(--deep); }
.shot img { display: block; width: 100%; height: auto; }
.shot.wide img { aspect-ratio: auto; }
.shot.narrow-shot { width: min(520px, 100%); margin-inline: auto; }
.shot.narrow-shot .shot-frame { max-height: 500px; }
.shot.compact-shot .shot-frame { background: #101114; }
.shot figcaption {
  padding: 13px 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.shot figcaption > ol { display: grid; gap: 5px; margin: 0; padding-left: 24px; }
.shot figcaption li { margin: 0; }
.callout {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--amber);
  color: #17120b;
  box-shadow: 0 3px 16px #000b;
  font-size: 13px;
  font-weight: 950;
  transform: translate(-50%, -50%);
}

details {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
}
summary { padding: 15px 18px; cursor: pointer; font-weight: 800; }
details > p, details > ol { margin: 0 18px 18px; color: var(--muted); }
ol, ul { padding-left: 24px; }
li + li { margin-top: 7px; }
li::marker { color: var(--amber); font-weight: 800; }

.table {
  margin: 25px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.table p {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  margin: 0;
  padding: 13px 17px;
  background: var(--panel);
}
.table p + p { border-top: 1px solid var(--line); }
.table span { color: var(--muted); }

.legend { display: flex; flex-wrap: wrap; gap: 9px; padding: 0; list-style: none; }
.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}
.legend i { width: 9px; height: 9px; border-radius: 50%; }
.legend .fx { background: var(--purple); }
.legend .faderfx { background: #e4aeff; }
.legend .timeline { background: var(--green); }
.legend .sequence { background: var(--cyan); }

.automation-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 25px 0;
  padding: 14px;
  border: 1px solid #c975ff55;
  border-radius: 12px;
  background: #c975ff10;
}
.automation-flow span {
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--panel);
  font-size: 13px;
  font-weight: 750;
}
.automation-flow b { color: var(--purple); }

.permission-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 20px 0;
}
.permission-grid span {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.stack { display: grid; gap: 5px; margin: 27px 0; }
.stack p {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  margin: 0;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
}
.stack b {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 8px;
  background: #e3a04423;
  color: var(--amber);
}
.stack p:nth-child(2) { margin-inline: 7px; }
.stack p:nth-child(3) { margin-inline: 14px; }
.stack p:nth-child(4) { margin-inline: 21px; }
.stack p:nth-child(5) { margin-inline: 28px; }
.stack p:nth-child(6) { margin-inline: 35px; }
.stack p:nth-child(7) { margin-inline: 42px; }
.trouble details { border-left: 3px solid var(--red); }

.guide-footer {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 22px;
  align-items: center;
  padding-top: 48px;
  color: var(--muted);
  font-size: 13px;
}
.guide-footer div { display: flex; align-items: center; gap: 10px; }
.guide-footer img { width: 36px; height: 36px; border-radius: 9px; }
.guide-footer p { margin: 0; }
.guide-footer a { color: var(--amber); }

.toc {
  position: sticky;
  top: 102px;
  align-self: start;
  padding-top: 30px;
  color: var(--muted);
  font-size: 12px;
}
.toc nav { display: grid; margin: 12px 0 20px; }
.toc nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 5px 0 5px 10px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
}
.toc button {
  min-height: 44px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}
.toc > div { height: 2px; margin-top: 17px; background: var(--line); }
.toc > div span { display: block; width: 0; height: 100%; background: var(--amber); }

:focus-visible { outline: 3px solid #e3a044aa; outline-offset: 3px; }

@media (max-width: 1180px) {
  .layout { grid-template-columns: var(--side) minmax(0, 820px); gap: 36px; }
  .toc { display: none; }
}
@media (max-width: 820px) {
  html { scroll-padding-top: 118px; }
  .topbar { grid-template-columns: 44px 1fr; gap: 8px; min-height: 64px; padding: 8px 14px; }
  .nav-toggle { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: var(--panel); }
  .brand img { width: 36px; height: 36px; }
  .brand small { display: none; }
  kbd { display: none; }
  .search { grid-column: 1 / -1; }
  .top-actions { position: absolute; top: 8px; right: 14px; }
  .language-switch { padding: 0; }
  .home-link { display: none; }
  .results { top: 116px; left: 14px; width: calc(100vw - 28px); }
  .layout { display: block; padding: 0 20px; }
  .sidebar {
    position: fixed;
    z-index: 90;
    inset: 0 auto 0 0;
    width: min(330px, 88vw);
    height: 100vh;
    padding: 20px 14px;
    border-right: 1px solid var(--line-strong);
    background: #111214fc;
    box-shadow: 0 20px 80px #000a;
    transform: translateX(-104%);
    transition: transform .24s;
  }
  .sidebar.open { transform: translateX(0); }
  .side-head button { display: grid; place-items: center; width: 44px; height: 44px; font-size: 24px; }
  .scrim { position: fixed; z-index: 85; inset: 0; background: #0009; }
  main { padding-top: 42px; }
  .permission-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-footer { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .layout { padding: 0 16px; }
  .chapter { padding-bottom: 56px; }
  .start-grid { grid-template-columns: 1fr; }
  .steps li { grid-template-columns: 34px 1fr; gap: 11px; padding: 15px; }
  .table p { grid-template-columns: 1fr; gap: 3px; }
  figure.shot { margin-inline: -6px; border-radius: 13px; }
  .shot figcaption { padding: 11px 13px; }
  .automation-flow { display: grid; grid-template-columns: 1fr; }
  .automation-flow b { transform: rotate(90deg); text-align: center; }
  .stack p { margin-inline: 0 !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media print {
  .topbar, .sidebar, .toc, .actions, .results { display: none !important; }
  .layout { display: block; width: auto; padding: 0; }
  main { padding: 0; }
  .chapter { break-inside: avoid; }
  figure.shot { box-shadow: none; }
}
