/* Shared Kanga docs chrome, from piterbus-admin-guide */

  @font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/Inter-Regular.woff2") format("woff2"); }
  @font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/Inter-Medium.woff2") format("woff2"); }
  @font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/Inter-SemiBold.woff2") format("woff2"); }
  @font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/Inter-Bold.woff2") format("woff2"); }
  @font-face { font-family: InterDisplay; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/InterDisplay-Medium.woff2") format("woff2"); }
  @font-face { font-family: InterDisplay; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/InterDisplay-SemiBold.woff2") format("woff2"); }
  @font-face { font-family: InterDisplay; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/InterDisplay-Bold.woff2") format("woff2"); }
  :root {
    --bg-page: #ffffff;
    --bg-app: #f7f7f7;
    --bg-surface: #fbfbfb;
    --bg-surface-2: #f3f3f3;
    --fg: #1b1b1b;
    --fg-soft: #545454;
    --fg-muted: #8b8b8b;
    --brand: #f26522;
    --brand-hover: #d0531a;
    --brand-soft: #fbefeb;
    --brand-contrast: #ae4213;
    --border: #eaeaea;
    --border-soft: #d0d0d0;
    --success: #085c1d;
    --success-bg: #e6fae8;
    --warning: #6e4416;
    --warning-bg: #fff4d6;
    --info: #03367e;
    --info-bg: #ecf2fb;
    --error: #760b09;
    --error-bg: #ffeceb;
    --inverted: #0d0d0d;
    --on-inverted: #ffffff;
    --on-inverted-soft: rgba(255,255,255,.75);
    --radius-s: 8px;
    --radius-m: 12px;
    --font: Inter, sans-serif;
    --display: InterDisplay, Inter, sans-serif;
    --side: 280px;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    color: var(--fg);
    background: var(--bg-app);
    font: 400 16px/24px var(--font);
  }
  a { color: var(--brand); }
  a:hover { color: var(--brand-hover); }
  .layout { display: flex; min-height: 100vh; }
  nav.toc {
    width: var(--side);
    flex: 0 0 var(--side);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
    background: var(--inverted);
    color: var(--on-inverted-soft);
    padding: 28px 16px 40px;
  }
  nav.toc .brand {
    color: var(--on-inverted);
    font-family: var(--display);
    font-weight: 600;
    letter-spacing: -0.4px;
    margin: 0 8px 4px;
    font-size: 18px;
    line-height: 24px;
  }
  nav.toc .brand span {
    display: block;
    font-family: var(--font);
    font-weight: 400;
    letter-spacing: 0;
    color: var(--on-inverted-soft);
    font-size: 12px;
    line-height: 16px;
    margin-top: 4px;
  }
  nav.toc ol { list-style: none; margin: 18px 0 0; padding: 0; }
  nav.toc ol ol { margin: 0 0 6px; }
  nav.toc a {
    display: block;
    color: var(--on-inverted-soft);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: var(--radius-s);
    font-size: 14px;
    line-height: 20px;
  }
  nav.toc ol ol a {
    padding: 4px 10px 4px 22px;
    font-size: 13px;
    line-height: 18px;
  }
  nav.toc a:hover { background: rgba(242,101,34,.18); color: #fff; }
  nav.toc .print-btn {
    display: block;
    margin: 22px 8px 0;
    background: var(--brand);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border: 0;
    width: calc(100% - 16px);
    border-radius: var(--radius-s);
    height: 40px;
    padding: 0 12px;
    font: 500 14px/40px var(--font);
    cursor: pointer;
  }
  nav.toc .print-btn:hover { background: var(--brand-hover); }
  main { flex: 1; min-width: 0; padding: 36px 48px 80px; max-width: 980px; }
  header.cover {
    background: var(--bg-page);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    padding: 32px 36px 28px;
    margin-bottom: 28px;
  }
  header.cover p { margin: 0; }
  header.cover .kicker {
    color: var(--brand);
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  header.cover h1 {
    margin: 8px 0 12px;
    font-family: var(--display);
    font-weight: 600;
    font-size: 40px;
    line-height: 48px;
    letter-spacing: -0.88px;
  }
  header.cover .lead { color: var(--fg-soft); max-width: 62ch; font-size: 16px; line-height: 24px; }
  .meta { display: flex; gap: 18px; margin-top: 20px; font-size: 12px; line-height: 16px; color: var(--fg-muted); }
  h2 {
    font-family: var(--display);
    font-weight: 600;
    font-size: 28px;
    line-height: 32px;
    letter-spacing: -0.62px;
    margin: 40px 0 12px;
    scroll-margin-top: 18px;
  }
  h3 {
    font-family: var(--display);
    font-weight: 600;
    font-size: 20px;
    line-height: 24px;
    letter-spacing: -0.44px;
    margin: 28px 0 8px;
    scroll-margin-top: 18px;
  }
  h4 { font-size: 16px; line-height: 20px; font-weight: 600; margin: 18px 0 6px; }
  p { margin: 0 0 12px; }
  ul, ol { margin: 0 0 14px; padding-left: 1.25em; }
  li { margin: 4px 0; }
  .card, .note, .shot, table, .steps {
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
  }
  .card { padding: 16px 18px; margin: 14px 0; }
  .note { padding: 14px 16px; margin: 14px 0; }
  .note strong { display: block; margin-bottom: 4px; font-weight: 600; }
  .note.warn { background: var(--warning-bg); border-color: #fce9b8; }
  .note.warn strong { color: var(--warning); }
  .note.ok { background: var(--success-bg); border-color: #c3f1c9; }
  .note.ok strong { color: var(--success); }
  .note.info { background: var(--info-bg); border-color: #c6ddfb; }
  .note.info strong { color: var(--info); }
  .note.accent { background: var(--brand-soft); border-color: #fad5c9; }
  .note.accent strong { color: var(--brand-contrast); }
  table { width: 100%; border-collapse: collapse; margin: 14px 0 18px; overflow: hidden; }
  th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 14px; line-height: 20px; }
  th { background: var(--bg-surface); font-weight: 600; color: var(--fg); }
  tr:last-child td { border-bottom: 0; }
  code, .kbd {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: .92em;
    background: var(--bg-surface-2);
    color: var(--fg);
    border-radius: 6px;
    padding: 1px 6px;
  }
  .steps { padding: 8px 18px 12px; margin: 12px 0 16px; }
  .steps li { margin: 8px 0; }
  figure.shot { margin: 16px 0 8px; padding: 14px; }
  figure.shot a.shot-open { display: block; cursor: zoom-in; text-decoration: none; }
  figure.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius-s); }
  figure.shot figcaption { margin-top: 10px; color: var(--fg-muted); font-size: 12px; line-height: 16px; }
  figure.shot.buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
  figure.shot.buttons a.shot-open { display: inline-block; width: auto; }
  figure.shot.buttons img { width: auto; max-width: 100%; height: auto; }
  figure.shot.buttons figcaption { flex-basis: 100%; margin-top: 2px; }
  figure.shot.pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px 14px;
    align-items: center;
  }
  figure.shot.pair .pair-side { min-width: 0; }
  figure.shot.pair .pair-label {
    margin: 8px 0 0;
    color: var(--fg-soft);
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
  }
  figure.shot.pair .pair-arrow {
    color: var(--brand);
    font-size: 32px;
    line-height: 1;
    font-weight: 700;
  }
  figure.shot.pair figcaption { grid-column: 1 / -1; margin-top: 2px; }
  .shot-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px 24px;
    background: rgba(27, 27, 27, .9);
    cursor: zoom-out;
  }
  .shot-lightbox img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-s);
    background: #fff;
    cursor: default;
  }
  .shot-lightbox button {
    position: absolute;
    top: 12px;
    right: 12px;
    height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: var(--radius-s);
    background: #fff;
    color: var(--fg);
    font: 500 14px/36px var(--font);
    cursor: pointer;
  }
  .win { border: 1px solid var(--border-soft); border-radius: var(--radius-m); overflow: hidden; background: #fff; font-size: 13px; }
  .win-bar { background: var(--bg-surface); color: var(--fg-muted); padding: 7px 12px; border-bottom: 1px solid var(--border); display: flex; gap: 6px; align-items: center; }
  .dot { width: 8px; height: 8px; border-radius: 50%; background: #d0d0d0; display: inline-block; }
  .win-body { display: flex; min-height: 210px; }
  .win-side { width: 168px; background: var(--inverted); color: var(--on-inverted-soft); padding: 12px 8px; }
  .win-side .item { padding: 6px 8px; border-radius: 6px; margin-bottom: 2px; }
  .win-side .item.on { background: rgba(242,101,34,.22); color: #fff; }
  .win-main { flex: 1; padding: 12px 14px; }
  .tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
  .tabs span { padding: 6px 8px; color: var(--fg-muted); font-size: 12px; }
  .tabs span.on { color: var(--fg); border-bottom: 2px solid var(--brand); font-weight: 600; }
  .field { margin: 0 0 8px; }
  .field label { display: block; font-size: 12px; line-height: 16px; color: var(--fg-soft); margin-bottom: 3px; }
  .fake { border: 1px solid var(--border-soft); border-radius: var(--radius-s); min-height: 32px; padding: 6px 10px; color: var(--fg-muted); background: #fff; }
  .fake.on { color: var(--fg); }
  .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .switch { display: inline-flex; align-items: center; gap: 8px; }
  .sw { width: 34px; height: 18px; border-radius: 99px; background: #d0d0d0; position: relative; display: inline-block; }
  .sw.on { background: var(--brand); }
  .sw i { width: 14px; height: 14px; border-radius: 50%; background: #fff; position: absolute; top: 2px; left: 2px; }
  .sw.on i { left: 18px; }
  .btn { display: inline-block; background: var(--brand); color: #fff; border-radius: var(--radius-s); padding: 6px 12px; font-size: 12px; font-weight: 500; line-height: 16px; }
  .btn.ghost { background: #fff; color: var(--fg); border: 1px solid var(--border-soft); }
  .block { border: 1px solid var(--border); border-radius: var(--radius-s); padding: 8px; margin-bottom: 8px; background: var(--bg-surface); }
  .block .head { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 6px; }
  .cols { display: grid; grid-template-columns: 1.4fr .8fr; gap: 16px; }
  .small { color: var(--fg-muted); font-size: 14px; line-height: 20px; }
  .tag { display: inline-block; background: var(--bg-surface-2); border-radius: 99px; padding: 1px 8px; font-size: 12px; }
  footer.page-end { margin-top: 48px; color: var(--fg-muted); font-size: 14px; line-height: 20px; }
  pre {
    overflow: auto;
    padding: 14px 16px;
    margin: 0 0 16px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    font-size: 13px;
    line-height: 20px;
  }
  pre code { background: none; padding: 0; }
  nav.toc .toc-home {
    display: block;
    margin: 0 8px 16px;
    color: var(--on-inverted-soft);
    font-size: 13px;
    text-decoration: none;
  }
  nav.toc .toc-home:hover { color: #fff; }
  @media (max-width: 980px) {
    .layout { display: block; }
    nav.toc { position: relative; width: auto; height: auto; }
    main { padding: 24px 16px 64px; }
    .cols, .row2 { grid-template-columns: 1fr; }
    header.cover h1 { font-size: 32px; line-height: 36px; letter-spacing: -0.7px; }
  }
  @page { size: A4; margin: 14mm 14mm 16mm; }
  @media print {
    nav.toc, .print-btn, .no-print { display: none !important; }
    body { background: #fff; font-size: 11pt; }
    main { max-width: none; padding: 0; }
    header.cover { break-after: avoid; }
    h2 { break-before: page; }
    h2:first-of-type { break-before: auto; }
    figure.shot, table, .note, .steps, .card { break-inside: avoid; }
    .shot-lightbox { display: none !important; }
    a { color: inherit; text-decoration: none; }
  }
