/* Colours and component styles follow the application's own UI (src/ui/styles.css). */
:root {
  --bg: #14191f;
  --header: #182029;
  --toolbar: #1b232c;
  --panel: #192129;
  --map: #263139;
  --card: #1b252e;
  --line: #303b46;
  --line-strong: #415262;
  --text: #e7e9ed;
  --text-soft: #b9c8d2;
  --muted: #95a2af;
  --button: #202933;
  --button-hover: #2b3743;
  --button-line: #4a5664;
  --active: #543325;
  --active-line: #bc6a47;
  --primary: #a55036;
  --primary-line: #d67555;
  --gold: #dcc87e;
  --gold-strong: #dcba64;
  --blue-card: #203541;
  --blue-line: #4b7286;
  --link: #9fc3d6;
  font-family: Inter, ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; line-height: 1.6; font-size: 16px; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
a { color: var(--link); }
a:hover { color: #c4dfec; }
img { max-width: 100%; height: auto; display: block; }

/* Banner, like the application header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
  padding: 13px 24px; min-height: 82px;
  background: var(--header); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; }
.brand img { flex: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.25; }
.eyebrow { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; }
.brand-title { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.site-nav { display: flex; flex-wrap: wrap; gap: 7px; }
.site-nav a, .button {
  display: inline-block; border: 1px solid var(--button-line); border-radius: 5px;
  background: var(--button); color: var(--text); padding: 8px 14px; text-decoration: none; cursor: pointer; font-size: 15px;
}
.site-nav a:hover, .button:hover { background: var(--button-hover); color: var(--text); }
.site-nav a[aria-current="page"] { border-color: var(--active-line); background: var(--active); }
.button.primary { background: var(--primary); border-color: var(--primary-line); }
.button.primary:hover { background: #b85a3d; }
.button.large { padding: 13px 24px; font-size: 17px; }

/* Page */
.page { width: min(1120px, 100%); margin: 0 auto; padding: 40px 24px 64px; }
.page > * + * { margin-top: 56px; }
.page h1 { font-size: 34px; letter-spacing: -.02em; line-height: 1.2; }
.page h2 {
  font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--gold);
  padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 20px;
}
.page h1 + p { margin-top: 12px; }
.page h3 { font-size: 18px; margin: 28px 0 8px; }
.page p, .page li { color: var(--text-soft); max-width: 74ch; }
.page p + p { margin-top: 14px; }
.page ul, .page ol { padding-left: 22px; }
.page li + li { margin-top: 6px; }
.lead { font-size: 19px; line-height: 1.55; color: var(--text) !important; max-width: 62ch; }
.muted { color: var(--muted) !important; }

/* Home */
.hero { padding: 8px 0 0; }
.hero h1 { margin: 8px 0 18px; font-size: 42px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
figure { background: var(--card); border: 1px solid var(--line-strong); border-radius: 7px; overflow: hidden; }
figure img { width: 100%; background: var(--map); }
.hero-figure { margin-top: 36px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px; align-items: center; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.gallery figure img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }

/* Several images in one slot */
figure.slides { position: relative; display: grid; }
figure.slides > img { grid-area: 1 / 1; align-self: center; visibility: hidden; }
figure.slides > img.current { visibility: visible; }
.slides-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 34px; height: 44px; border: 1px solid var(--button-line); border-radius: 5px;
  background: rgba(24, 32, 41, .85); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer;
}
.slides-arrow:hover { background: var(--button-hover); }
.slides-prev { left: 10px; }
.slides-next { right: 10px; }
.slides-count {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 2;
  padding: 1px 10px; border: 1px solid var(--button-line); border-radius: 4px;
  background: rgba(24, 32, 41, .85); color: var(--text-soft); font-size: 13px;
}

/* Image viewer */
figure img { cursor: zoom-in; }
body.lightbox-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(8, 11, 14, .92); display: flex; }
.lightbox[hidden] { display: none; }
.lightbox-scroll { margin: auto; max-width: 100%; max-height: 100%; overflow: auto; padding: 24px; }
.lightbox-scroll img { display: block; margin: 0 auto; max-width: calc(100vw - 48px); max-height: calc(100vh - 48px); width: auto; height: auto; cursor: zoom-in; border: 1px solid var(--line-strong); background: var(--map); }
.lightbox-scroll img.actual { max-width: none; max-height: none; cursor: zoom-out; }
.lightbox-close { position: absolute; top: 14px; right: 18px; z-index: 1; width: 40px; height: 40px; border: 1px solid var(--button-line); border-radius: 5px; background: var(--button); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; }
.lightbox-close:hover { background: var(--button-hover); }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line-strong); border-radius: 7px; padding: 20px 24px; }
.callout {
  background: var(--blue-card); border: 1px solid var(--blue-line); border-left: 4px solid var(--gold-strong);
  border-radius: 6px; padding: 18px 24px;
}
.callout strong { color: var(--gold); }
.callout h3 { margin-top: 0; font-size: 21px; }
.placeholder { border: 1px dashed var(--line-strong); border-radius: 6px; padding: 14px 18px; color: var(--muted) !important; font-style: italic; }

/* Tutorial */
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.toc { position: sticky; top: 104px; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 16px 18px; font-size: 14px; }
.toc p { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 8px; }
.toc ul { list-style: none; padding: 0; }
.toc li + li { margin-top: 4px; }
.toc a { text-decoration: none; }
.toc .sub { padding-left: 12px; font-size: 13px; }
.doc section + section { margin-top: 44px; }
code, kbd { background: #10161c; border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; font-family: Consolas, ui-monospace, monospace; font-size: .92em; color: var(--text); }
pre { margin: 12px 0 0; background: #10161c; border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px; overflow-x: auto; }
pre code { background: none; border: 0; padding: 0; }

/* Download */
.release { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.release h2 { border: 0; padding: 0; margin: 0 0 6px; color: var(--muted); }
.version-number { font-size: 28px; font-weight: 600; color: var(--text); }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line-strong); border-radius: 7px; overflow: hidden; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
th { background: var(--panel); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; font-weight: 500; }
tr:last-child td { border-bottom: 0; }
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.tag { display: inline-block; border: 1px solid var(--active-line); background: var(--active); border-radius: 4px; padding: 1px 8px; font-size: 12px; color: var(--text); }

/* Roadmap */
.roadmap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.stage { background: var(--card); border: 1px solid var(--line-strong); border-top: 4px solid var(--active-line); border-radius: 7px; padding: 18px 22px 22px; }
.stage h2 { border: 0; padding: 0; margin: 0 0 14px; color: var(--text); }
.stage ul { padding-left: 20px; }
.stage li { color: var(--text-soft); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--header); padding: 22px 24px; text-align: center; }
.site-footer p { color: var(--muted); font-size: 13px; margin: 0 auto; max-width: none; }

/* Narrow screens */
@media (max-width: 860px) {
  .site-header { position: static; padding: 14px 16px; }
  html { scroll-padding-top: 16px; }
  .page { padding: 28px 16px 48px; }
  .page > * + * { margin-top: 40px; }
  .hero h1 { font-size: 32px; }
  .split, .doc, .two-columns, .roadmap-grid { grid-template-columns: minmax(0, 1fr); }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
}
