/* Scissor manual — a modern multi-page documentation stylesheet. */
:root {
  color-scheme: dark light;
  --bg: #ffffff;
  --panel: #f6f7f9;
  --panel-2: #eef0f4;
  --ink: #16181d;
  --dim: #5b616e;
  --line: #e4e6ec;
  --accent: #1d4ed8;
  --accent-strong: #1e40af;
  --accent-soft: rgba(29, 78, 216, 0.10);
  --kbd-bg: #eceef3;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 28px rgba(16, 24, 40, 0.06);
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171a;
    --panel: #1e2024;
    --panel-2: #24262c;
    --ink: #e9eaee;
    --dim: #a3a8b4;
    --line: #2e3138;
    --accent: #8098c8;
    --accent-strong: #aebfe0;
    --accent-soft: rgba(128, 152, 200, 0.14);
    --kbd-bg: #2b2e35;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.68 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 40; background: var(--panel); padding: 8px 14px; border-radius: 8px; }

/* header */
.top {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-in { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 20px; padding: 13px 22px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 19px; letter-spacing: -0.02em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { display: block; width: 30px; height: 30px; border-radius: 8px; box-shadow: var(--shadow); }
.brand b { font-weight: 800; }
.brand span { color: var(--accent); }
.top-links { margin-left: auto; display: flex; align-items: center; gap: 20px; font-size: 15px; }
.top-links a { color: var(--dim); }
.top-links a:hover { color: var(--ink); text-decoration: none; }
.top-links .cta {
  color: #fff; background: var(--accent); padding: 8px 15px; border-radius: 9px; font-weight: 600;
}
@media (prefers-color-scheme: dark) { .top-links .cta { color: #10151f; } }
.top-links .cta:hover { text-decoration: none; filter: brightness(1.06); }

/* shell: sidebar + content */
.shell { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 44px; padding: 0 22px; }
.side { position: relative; }
.side-nav { position: sticky; top: 74px; padding: 26px 0 48px; max-height: calc(100vh - 74px); overflow-y: auto; }
.nav-group { margin: 20px 0 7px; padding: 0 12px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--dim); }
.nav-group:first-child { margin-top: 4px; }
.side-nav a { display: block; padding: 7px 12px; margin: 1px 0; border-radius: 8px; border-left: 2px solid transparent; color: var(--dim); font-size: 14.5px; line-height: 1.35; }
.side-nav a:hover { color: var(--ink); background: var(--accent-soft); text-decoration: none; }
.side-nav a.here { color: var(--accent-strong); background: var(--accent-soft); border-left-color: var(--accent); font-weight: 600; }

main { padding: 26px 0 60px; min-width: 0; max-width: 820px; }
.crumb { font-size: 13.5px; color: var(--dim); margin: 4px 0 18px; }
.crumb a { color: var(--dim); }
.crumb a:hover { color: var(--ink); }
.crumb span { color: var(--line); margin: 0 2px; }
.crumb span[aria-current] { color: var(--dim); margin: 0; }

h1 { font-size: 38px; line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.025em; }
.lede { color: var(--dim); font-size: 19px; line-height: 1.55; margin: 0 0 26px; }
h2 { font-size: 25px; margin: 44px 0 12px; padding-top: 16px; border-top: 1px solid var(--line); letter-spacing: -0.015em; scroll-margin-top: 84px; }
main > section:first-of-type > h2:first-child, main > h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 6px; }
h3 { font-size: 18px; margin: 30px 0 8px; letter-spacing: -0.01em; scroll-margin-top: 84px; }
p, li { color: var(--ink); }
ul, ol { padding-left: 22px; }
li { margin: 5px 0; }
strong { font-weight: 650; }
code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; font: 500 13.5px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
kbd { font: 600 13px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--kbd-bg); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
dl { margin: 14px 0; }
dt { font-weight: 650; margin-top: 14px; }
dd { margin: 4px 0 0; color: var(--ink); }

table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14.5px; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--dim); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em; }
tbody tr:hover { background: var(--panel); }

/* figures / screenshots / gifs */
figure.shot { margin: 24px 0 28px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); box-shadow: var(--shadow); }
figure.shot img { display: block; width: 100%; height: auto; }
figure.shot figcaption { padding: 12px 16px; font-size: 13.5px; color: var(--dim); border-top: 1px solid var(--line); background: var(--bg); }
figure.hero { margin: 6px 0 30px; }

/* index hero + cards */
.hero-wrap { margin: 8px 0 34px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; margin: 8px 0 20px; }
.card { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow); transition: border-color 0.15s, transform 0.15s; }
.card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.card b { display: block; font-size: 16px; letter-spacing: -0.01em; margin-bottom: 3px; }
.card span { color: var(--dim); font-size: 13.5px; line-height: 1.5; }

/* prev / next */
.pnav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 46px 0 8px; padding-top: 22px; border-top: 1px solid var(--line); }
.pnav a { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--ink); background: var(--panel); }
.pnav a:hover { border-color: var(--accent); text-decoration: none; }
.pnav a span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); margin-bottom: 3px; }
.pnav .next { text-align: right; }

.foot { margin-top: 46px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; display: flex; flex-wrap: wrap; gap: 18px; }
.foot a { color: var(--dim); }
.foot a:hover { color: var(--ink); }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; gap: 0; }
  .side-nav { position: static; max-height: none; padding: 14px 0 6px; display: flex; flex-wrap: wrap; gap: 4px 6px; border-bottom: 1px solid var(--line); }
  .nav-group { width: 100%; margin: 12px 0 2px; padding: 0; }
  .side-nav a { border-left: 0; }
  h1 { font-size: 31px; }
  .pnav { grid-template-columns: 1fr; }
}
