/* pgtc help — shared styles. No external resources: the help works offline. */
:root {
  --bg: #ffffff; --panel: #f4f6f9; --text: #1d2430; --muted: #5b6676;
  --line: #d6dbe3; --accent: #1f5fbf; --code-bg: #eef1f6; --kbd-bg: #ffffff;
  --note-bg: #eef5ff; --note-line: #1f5fbf; --warn-bg: #fff6e0; --warn-line: #b7791f;
  --tip-bg: #ecf8ef; --tip-line: #2f8f4e; --here: #dfe8f7;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171a21; --panel: #1e222b; --text: #dfe3ea; --muted: #98a2b3;
    --line: #333a47; --accent: #7fb0ff; --code-bg: #242a35; --kbd-bg: #2a303c;
    --note-bg: #1c2740; --note-line: #7fb0ff; --warn-bg: #33290f; --warn-line: #e0b050;
    --tip-bg: #15291c; --tip-line: #58b878; --here: #2a3550;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 12px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

#layout { display: flex; align-items: flex-start; }
nav#side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; flex: 0 0 280px;
  background: var(--panel); border-right: 1px solid var(--line); padding: 18px 14px 30px;
}
nav#side .brand { font-weight: 700; font-size: 1.25rem; margin: 0 0 2px; }
nav#side .brand a { color: var(--text); }
nav#side .sub { color: var(--muted); font-size: .85rem; margin: 0 0 14px; }
nav#side ol { list-style: none; margin: 0; padding: 0; }
nav#side li a {
  display: block; padding: 4px 8px; border-radius: 4px; color: var(--text); font-size: .93rem;
}
nav#side li a:hover { background: var(--code-bg); text-decoration: none; }
nav#side li.here > a { background: var(--here); font-weight: 600; }
nav#side ol.sections { margin: 2px 0 8px 12px; border-left: 2px solid var(--line); }
nav#side ol.sections a { font-size: .85rem; color: var(--muted); padding: 2px 8px; }

main { flex: 1 1 auto; min-width: 0; max-width: 1040px; padding: 26px 44px 80px; }
h1 { font-size: 2rem; margin: 0 0 6px; line-height: 1.25; }
h2 {
  font-size: 1.45rem; margin: 46px 0 12px; padding-bottom: 6px;
  border-bottom: 2px solid var(--line);
}
h3 { font-size: 1.15rem; margin: 30px 0 8px; }
h4 { font-size: 1rem; margin: 22px 0 6px; }
p { margin: 9px 0; }
ul, ol { margin: 9px 0; padding-left: 26px; }
li { margin: 4px 0; }
.lead { color: var(--muted); font-size: 1.08rem; margin-bottom: 18px; }
.crumb { color: var(--muted); font-size: .85rem; margin: 0 0 6px; }

code, pre, kbd, samp { font-family: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace; }
code, samp { background: var(--code-bg); padding: 1px 5px; border-radius: 4px; font-size: .88em; }
pre {
  background: var(--code-bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 11px 14px; overflow-x: auto; font-size: .85rem; line-height: 1.45;
}
pre code { background: none; padding: 0; font-size: inherit; }
kbd {
  display: inline-block; background: var(--kbd-bg); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: .82em;
  line-height: 1.5; white-space: nowrap;
}
.menu { font-style: italic; white-space: nowrap; }
.ui { font-weight: 600; }

table { border-collapse: collapse; width: 100%; margin: 10px 0 16px; font-size: .93rem; }
th, td { border: 1px solid var(--line); padding: 5px 9px; text-align: left; vertical-align: top; }
th { background: var(--panel); font-weight: 600; }
td.k { white-space: nowrap; }
.tablewrap { overflow-x: auto; }

.note, .warn, .tip {
  border-left: 4px solid var(--note-line); background: var(--note-bg);
  padding: 9px 14px; margin: 14px 0; border-radius: 0 6px 6px 0;
}
.warn { border-left-color: var(--warn-line); background: var(--warn-bg); }
.tip { border-left-color: var(--tip-line); background: var(--tip-bg); }
.note > :first-child, .warn > :first-child, .tip > :first-child { margin-top: 0; }
.note > :last-child, .warn > :last-child, .tip > :last-child { margin-bottom: 0; }

ol.steps { counter-reset: step; list-style: none; padding-left: 0; }
ol.steps > li { counter-increment: step; position: relative; padding-left: 38px; margin: 10px 0; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 1px; width: 26px; height: 26px;
  border-radius: 50%; background: var(--accent); color: var(--bg); font-weight: 700;
  font-size: .85rem; text-align: center; line-height: 26px;
}

figure { margin: 18px 0 22px; }
figure img {
  max-width: 100%; height: auto; display: block; border: 1px solid var(--line);
  border-radius: 6px; cursor: zoom-in;
}
figure.small img { max-width: min(100%, 620px); }
figure.mid img { max-width: min(100%, 820px); }
figcaption { color: var(--muted); font-size: .87rem; margin-top: 5px; }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.shots figure { margin: 6px 0; }

#zoom {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .86); display: none;
  align-items: center; justify-content: center; z-index: 10; cursor: zoom-out; padding: 14px;
}
#zoom.on { display: flex; }
#zoom img { max-width: 100%; max-height: 100%; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 14px 0; }
.cards a {
  display: block; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
  background: var(--panel); color: var(--text);
}
.cards a:hover { border-color: var(--accent); text-decoration: none; }
.cards b { display: block; margin-bottom: 3px; color: var(--accent); }
.cards span { font-size: .88rem; color: var(--muted); }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 14px; border-top: 1px solid var(--line); }
.pager a { max-width: 48%; }
footer { margin-top: 18px; color: var(--muted); font-size: .86rem; }

@media (max-width: 900px) {
  #layout { display: block; }
  nav#side { position: static; height: auto; max-height: 40vh; border-right: 0; border-bottom: 1px solid var(--line); }
  main { padding: 18px 16px 60px; }
  .shots { grid-template-columns: 1fr; }
}
@media print {
  nav#side, .pager, #zoom { display: none; }
  main { max-width: none; padding: 0; }
  h2 { break-after: avoid; }
  pre, table, figure { break-inside: avoid; }
}
