/* Prestage Docs. Brand: Midnight Green ink on bone, Inter for everything, Krona One only for
   the PRESTAGE wordmark (0.22em tracking). No decorative rules: space separates; lines that
   carry meaning stay (table rows, the box round a figure). Tokens follow the Prestage artifact
   base, so pages read as one family with prestage.com.au. */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-300-700.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Krona One";
  src: url("fonts/krona-one-wordmark.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

:root {
  --surface: #EFEEEB;
  --card: #E7E5E0;
  --primary: #1A3830;
  --secondary: #2B3B36;
  --muted: #5F6E69;
  --accent: #1A3830;
  --link: #23514A;
  --accent-soft: #DDE6E1;
  --pattern: #D4D7D2;
  --pattern-strong: #9FB5AE;
  --green: #1A3830;
  --bone: #EFEEEB;
  --bone-dim: #9FB5AE;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mark: "Krona One", Inter, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #16302A; --card: #1A3830;
    --primary: #EFEEEB; --secondary: #D6DCD8; --muted: #9FB5AE;
    --accent: #8FC4AE; --link: #8FC4AE; --accent-soft: #22443B;
    --pattern: #2C4A42; --pattern-strong: #3E6158;
    --green: #102620;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --surface: #16302A; --card: #1A3830;
  --primary: #EFEEEB; --secondary: #D6DCD8; --muted: #9FB5AE;
  --accent: #8FC4AE; --link: #8FC4AE; --accent-soft: #22443B;
  --pattern: #2C4A42; --pattern-strong: #3E6158;
  --green: #102620;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--secondary);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--link); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
strong { color: var(--primary); font-weight: 600; }
code {
  font-family: var(--mono);
  font-size: .86em;
  background: var(--card);
  padding: 1px 5px;
  border-radius: 3px;
  overflow-wrap: anywhere;
}
kbd {
  font-family: var(--sans);
  font-size: .82em;
  font-weight: 500;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--pattern-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 5px;
  white-space: nowrap;
}
p, li, td, th, figcaption { text-wrap: pretty; }
h1, h2, h3 { color: var(--primary); font-weight: 700; margin: 0; text-wrap: balance; }

.skip {
  position: absolute; left: 16px; top: -48px;
  background: var(--primary); color: var(--surface);
  padding: 8px 12px; border-radius: 4px; z-index: 10;
}
.skip:focus { top: 12px; }

/* ---- the band ---- */
.band { background: var(--green); }
.band-inner {
  max-width: 1160px; margin: 0 auto;
  padding: 18px 16px;
  display: flex; align-items: center;
}
.home { display: inline-flex; align-items: baseline; gap: 14px; color: var(--bone); text-decoration: none; }
.wordmark {
  font-family: var(--mark);
  font-size: 15px;
  letter-spacing: .22em;
  margin-right: -.22em;
  text-transform: uppercase;
  color: var(--bone);
}
.home .docs { font-size: 15px; font-weight: 500; color: var(--bone-dim); letter-spacing: .02em; }

/* ---- layout ---- */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px 64px; }
.crumbs { font-size: .84rem; color: var(--muted); padding: 20px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs .sep { margin: 0 8px; opacity: .7; }
.layout { display: block; }
main { min-width: 0; max-width: 74ch; }
.side { display: none; }

@media (min-width: 980px) {
  .wrap { padding: 0 32px 88px; }
  .band-inner { padding: 20px 32px; }
  .layout.has-side { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; }
  .side {
    display: block;
    position: sticky; top: 24px; align-self: start;
    max-height: calc(100vh - 48px); overflow-y: auto;
    padding-top: 44px;
    font-size: .875rem;
  }
  .toc-mobile { display: none; }
}

.side .navhead { font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.side .navhead + .pages, .side ol { margin-bottom: 28px; }
.side ul, .side ol { list-style: none; margin: 0; padding: 0; }
.side li { margin: 0; }
.side a { display: block; padding: 4px 0 4px 12px; color: var(--secondary); text-decoration: none; border-left: 2px solid transparent; line-height: 1.4; }
.side a:hover { color: var(--primary); border-left-color: var(--pattern-strong); }
.side a[aria-current="page"] { color: var(--primary); font-weight: 600; border-left-color: var(--accent); }

/* ---- page head ---- */
header.page { padding: 36px 0 8px; }
.kicker { font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
h1 { font-size: clamp(1.85rem, 4.6vw, 2.5rem); line-height: 1.1; letter-spacing: -.02em; }
.lede { font-size: 1.125rem; line-height: 1.55; color: var(--secondary); margin: 16px 0 0; }

.toc-mobile { margin: 24px 0 0; background: var(--card); border-radius: 6px; padding: 10px 16px; font-size: .9rem; }
.toc-mobile summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.toc-mobile ol { margin: 10px 0 4px; padding-left: 20px; }
.toc-mobile li { margin: 4px 0; }

/* ---- content ---- */
section { margin-top: 52px; }
h2 { font-size: 1.4rem; line-height: 1.2; letter-spacing: -.01em; margin-bottom: 14px; }
h3 { font-size: 1.05rem; font-weight: 600; margin: 30px 0 8px; }
p { margin: 0 0 .9em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin: .35em 0; }
li::marker { color: var(--muted); }
.label { font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 22px 0 6px; }

.note {
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 14px 18px;
  margin: 0 0 1.1em;
  color: var(--secondary);
}

/* ---- tables ---- */
.tablewrap { overflow-x: auto; border: 1px solid var(--pattern); border-radius: 6px; margin: 0 0 1.2em; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 9px 14px; border-bottom: 1px solid var(--pattern); }
thead th {
  font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); background: var(--card); border-bottom: 1px solid var(--pattern-strong);
  white-space: nowrap;
}
tbody th { font-weight: 600; color: var(--primary); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
  /* Rows stack: each becomes a small card with its label on top. */
  table.cols-2 thead, table.cols-3 thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.cols-2 tr, table.cols-3 tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--pattern); }
  table.cols-2 tbody tr:last-child, table.cols-3 tbody tr:last-child { border-bottom: 0; }
  table.cols-2 th, table.cols-2 td, table.cols-3 th, table.cols-3 td { display: block; padding: 2px 0; border: 0; }
  table.cols-3 td::before { content: attr(data-label); display: block; font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
}

/* ---- screenshots ---- */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin: 8px 0 1.4em; }
.shots-1 { grid-template-columns: minmax(0, 300px); }
.shots figure { margin: 0; }
.zoom { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; cursor: zoom-in; border-radius: 8px; }
.zoom:hover img { border-color: var(--accent); box-shadow: 0 4px 18px rgb(0 0 0 / .12); }
.shots img {
  display: block; width: 100%; height: auto; max-width: 350px;
  border: 1px solid var(--pattern-strong); border-radius: 8px;
  background: #fff;
}
.shots figcaption { font-size: .84rem; color: var(--muted); margin-top: 8px; line-height: 1.45; }

/* ---- the enlarged screenshot: a popover over the page, no script ---- */
.lightbox {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; overflow: auto;
  background: rgb(10 22 18 / .94); color: #EFEEEB;
}
.lightbox::backdrop { background: transparent; }
.lb-close {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 100%; padding: 24px 16px; margin: 0;
  border: 0; background: none; color: inherit; font: inherit; cursor: zoom-out;
}
/* Pane screenshots are tall and narrow: fitting them to the screen's height would make them
   smaller than the thumbnail. Show them at a readable width and let the dimmed view scroll. */
.lb-close img {
  display: block; width: min(560px, 100%); height: auto; max-width: none; max-height: none;
  border: 0; border-radius: 10px; background: #fff;
  box-shadow: 0 12px 48px rgb(0 0 0 / .45);
}
.lb-cap { font-size: .9rem; color: #D6DCD8; text-align: center; max-width: 60ch; }
.lb-x {
  position: fixed; top: 14px; right: 18px;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 26px; line-height: 1; color: #EFEEEB; background: rgb(255 255 255 / .12);
}
.lb-close:hover .lb-x { background: rgb(255 255 255 / .22); }
.lb-close:focus-visible { outline: none; }
.lb-close:focus-visible .lb-x { outline: 2px solid #8FC4AE; outline-offset: 2px; }
html:has(.lightbox:popover-open) { overflow: hidden; }

/* ---- footer ---- */
.foot { margin-top: 88px; font-size: .84rem; color: var(--muted); }
.foot a { color: var(--muted); }
.foot p { margin: 0 0 10px; }
.endmark { display: flex; align-items: baseline; gap: 12px; margin-top: 18px; }
.endmark .wordmark { font-size: 11px; color: var(--muted); }

@media print {
  .band { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .side, .toc-mobile, .skip, .crumbs, .lightbox { display: none !important; }
  .layout.has-side { display: block; }
  body { font-size: 11pt; }
  section { break-inside: auto; }
  h2, h3 { break-after: avoid; }
  .shots { grid-template-columns: repeat(3, 1fr); }
  .shots figure, table, .note { break-inside: avoid; }
  a { color: inherit; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
