:root {
  color-scheme: dark;
  --void: #020e1d;
  --hull: #071a30;
  --depth: #164578;
  --text: #e8f1fa;
  --muted: #9aaec4;
  --port-blue: #1e9bff;
  --remote: #5cb8ff;
  --cyan: #0be2fd;
  --amber: #ffb12b;
  --flare: #ff7a1a;
  --border: #16324f;
  --beam: linear-gradient(90deg, #0052de, #1e9bff, #0be2fd, #fff1c9, #ffb12b, #ff7a1a, #ff5a3c);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--void); color: var(--text); font: 17px/1.65 system-ui, sans-serif; }
main { max-width: 1000px; margin: 0 auto; padding: 56px 24px 32px; }
h1 { margin: 0; font-size: clamp(2.2rem, 7vw, 3.2rem); line-height: 1.1; letter-spacing: -.03em; }
h2 { margin: 0 0 14px; font-size: 1.5rem; line-height: 1.3; }
h3 { margin: 0; font-size: 1.05rem; }
p { margin: 10px 0 18px; }
.badge { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 10px; border-radius: 999px; background: var(--hull); border: 1px solid var(--cyan); color: var(--cyan); font-size: .9rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.local { color: var(--amber); }
.remote { color: var(--remote); }
.hero { display: block; width: 100%; height: auto; margin: 36px 0 0; border-radius: 16px; }
.intro { margin: 32px auto; font-size: 1.1rem; max-width: 70ch; text-align: center; }

section { position: relative; margin-bottom: 36px; padding: 30px 28px 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--hull); overflow: hidden; }
section::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--beam); }

figure { margin: 0; }
figure img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; }
figcaption { margin-top: 10px; color: var(--muted); font-size: .92rem; }
.shot { margin-bottom: 40px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 28px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.features li { margin: 0; padding: 18px 20px 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--void); }
.features h3 { color: var(--cyan); }

.steps { margin: 24px 0 0; padding-left: 24px; }
.steps li { padding-left: 8px; margin-bottom: 28px; }
.steps li:last-child { margin-bottom: 0; }
.steps li::marker { color: var(--amber); font-weight: 700; }
ul { padding-left: 24px; }
ul li { margin-bottom: 10px; }

a { color: var(--remote); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.button { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 8px; background: var(--flare); color: var(--void); font-weight: 700; text-decoration: none; }
.button:hover { background: var(--amber); }
.icon { width: 20px; height: 20px; flex-shrink: 0; }

/* Native dialog keeps focus within the gallery and restores it on close. */
body:has(.lightbox[open]) { overflow: hidden; }
figure a { display: block; border-radius: 10px; cursor: zoom-in; }
.lightbox { width: min(1400px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--void); color: var(--text); box-shadow: 0 24px 80px #0008; }
.lightbox::backdrop { background: rgb(2 14 29 / 88%); }
.lightbox-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; color: var(--muted); font-size: .9rem; }
.gallery-control { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--hull); color: var(--text); cursor: pointer; }
.gallery-control:hover { background: var(--depth); }
.lightbox-stage { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 12px; }
.lightbox-image { display: block; width: 100%; max-height: calc(100dvh - 230px); object-fit: contain; }
#gallery-caption { margin: 16px 56px 4px; color: var(--muted); font-size: .92rem; text-align: center; }
code, kbd, pre { font-family: ui-monospace, "DejaVu Sans Mono", "Cascadia Mono", Menlo, monospace; }
code { font-size: .88em; overflow-wrap: anywhere; color: var(--text); }
kbd { display: inline-block; padding: 0 6px; border-radius: 4px; background: var(--flare); color: var(--void); font-size: .85em; font-weight: 700; line-height: 1.5; }
pre { overflow-x: auto; padding: 16px 18px; border: 1px solid var(--border); border-radius: 8px; background: var(--void); line-height: 1.7; }
pre code { overflow-wrap: normal; }
footer { color: var(--muted); font-size: .85rem; }
.copyright { margin-top: 24px; }

/* Generated changelog page. */
.page section h3 { margin-top: 18px; color: var(--cyan); }

@media (max-width: 520px) {
  main { padding: 32px 16px 24px; }
  section { padding: 24px 16px 18px; }
  .gallery { grid-template-columns: 1fr; }
  .button { padding: 10px 12px; }
  .lightbox { padding: 12px; }
  .lightbox-stage { grid-template-columns: 1fr 1fr; gap: 16px; }
  .lightbox-image { grid-column: 1 / -1; grid-row: 1; max-height: calc(100dvh - 300px); }
  .lightbox-stage [data-next] { justify-self: end; }
  #gallery-caption { margin: 16px 0 4px; }
}
