/* NCDS support pages — Release Notes, User Guides, Downloads.
   Layout after Bryan's 16 Sep 2026 mockup: a fixed dark left rail (logo, three sections, Customer
   Portal at the foot), a dark title bar, and content cards on a light page — the Customer Portal's
   look, so these pages read as part of the same system. Brand tokens are the desktop theme's
   (src/desktop/NCDS.Desktop/Themes/NcdsTheme.xaml).
   Rules the portal's Content-Security-Policy imposes and the browser enforces silently: no scripts,
   nothing fetched from another host. Fonts are system fonts; the only image is nizpro-logo.png beside
   these files. Everything links by RELATIVE path — the pages are served under /support/. */

:root {
  --brand:       #121F46;   /* rail + title bar */
  --brand-2:     #182858;   /* rail hover / active */
  --brand-line:  #24356B;   /* rail separators */
  --accent:      #223A83;
  --accent-dark: #1A2D66;
  --accent-soft: #E7F1FB;
  --ink:         #1B1B1B;
  --muted:       #6A6A6A;
  --line:        #DCDCDC;
  --page:        #F4F5F7;   /* content background */
  --panel:       #FFFFFF;   /* cards */
  --warn-bg:     #FFF5E6;
  --warn-line:   #E0A93B;
  --green:       #3FA34D;
  --rail-w:      210px;
  --bar-h:       46px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:         #E8E8E8;
    --muted:       #A2A8B4;
    --line:        #33384A;
    --page:        #141720;
    --panel:       #1B1F2C;
    --accent:      #7FA3E8;
    --accent-dark: #A8C2F2;
    --accent-soft: #1E2740;
    --warn-bg:     #2C2415;
  }
}

* { box-sizing: border-box; }

html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--page);
}

/* ── Left rail ────────────────────────────────────────────────────────── */
.rail {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--rail-w);
  background: var(--brand);
  color: #FFFFFF;
  display: flex; flex-direction: column;
}
.rail .logo {
  display: block; padding: 22px 26px 18px;
  border-bottom: 1px solid var(--brand-line);
}
.rail .logo img { display: block; width: 100%; height: auto; }

.rail nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px 11px 22px;
  color: #D9E1F5; text-decoration: none; font-size: 15px;
  border-left: 4px solid transparent;
}
.rail nav a:hover { background: var(--brand-2); color: #FFFFFF; }
.rail nav a.active { background: var(--brand-2); color: #FFFFFF; font-weight: 600; border-left-color: #FFFFFF; }
.rail nav a svg { width: 16px; height: 16px; flex: none; fill: currentColor; opacity: .85; }

.rail .foot {
  margin-top: auto;
  border-top: 1px solid var(--brand-line);
}
.rail .foot a {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px; color: #D9E1F5; text-decoration: none; font-size: 15px;
}
.rail .foot a:hover { background: var(--brand-2); color: #FFFFFF; }
.rail .foot a svg { width: 16px; height: 16px; flex: none; fill: currentColor; opacity: .85; }

/* ── Title bar + content ──────────────────────────────────────────────── */
.bar {
  position: fixed; top: 0; left: var(--rail-w); right: 0; height: var(--bar-h);
  background: var(--brand); color: #FFFFFF;
  display: flex; align-items: center; padding: 0 28px;
  font-size: 15px; font-weight: 600;
}

main {
  margin-left: var(--rail-w);
  padding: calc(var(--bar-h) + 28px) 40px 64px 28px;
  max-width: calc(var(--rail-w) + 960px);
}
main > h1 { margin: 0; font-size: 24px; font-weight: 700; color: var(--ink); }
main > .lead { margin: 2px 0 22px; color: var(--muted); font-size: 14px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 18px 22px 8px;
  margin: 0 0 18px;
}
.card > .kicker {
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin: 0 0 10px;
}

h2 {
  font-size: 18px; font-weight: 600; color: var(--accent-dark);
  margin: 26px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.card > h2:first-child, .card > .kicker + h2 { margin-top: 4px; }
h3 { font-size: 16px; font-weight: 600; margin: 18px 0 6px; }
p  { margin: 0 0 12px; }
a  { color: var(--accent); }

ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 6px; }

code, .k {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: .92em;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ── Landing cards ────────────────────────────────────────────────────── */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 0 0 18px; }
.cards a {
  display: block; padding: 18px 20px; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 4px; background: var(--panel);
}
.cards a:hover { border-color: var(--accent); }
.cards a h3 { margin: 0 0 6px; color: var(--accent-dark); }
.cards a p  { margin: 0; color: var(--muted); font-size: 14px; }

/* ── Callouts ─────────────────────────────────────────────────────────── */
.note, .warn {
  border: 1px solid var(--line); border-left-width: 4px;
  border-radius: 3px; padding: 12px 14px; margin: 0 0 16px;
  background: var(--page);
}
.warn { background: var(--warn-bg); border-left-color: var(--warn-line); }
.note { border-left-color: var(--accent); }
.note p:last-child, .warn p:last-child { margin-bottom: 0; }

/* ── Tables (release notes) ───────────────────────────────────────────── */
.scroll { overflow-x: auto; margin: 0 0 18px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--page); font-weight: 600; white-space: nowrap; }
td.ver { white-space: nowrap; font-family: Consolas, monospace; }

.release { margin: 0 0 22px; }
.release h3 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 0; }
.release .date { font-size: 13.5px; font-weight: 400; color: var(--muted); }
.tag {
  font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  padding: 2px 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark);
}
.tag.current { background: var(--green); color: #FFFFFF; }

/* ── Downloads ────────────────────────────────────────────────────────── */
.download {
  display: inline-block; padding: 10px 18px; border-radius: 4px;
  background: var(--accent); color: #FFFFFF; text-decoration: none; font-weight: 600;
}
.download:hover { background: var(--accent-dark); }
.download.disabled { background: var(--line); color: var(--muted); pointer-events: none; }
.meta { color: var(--muted); font-size: 13.5px; }

footer {
  margin-left: var(--rail-w);
  padding: 0 40px 28px 28px;
  color: var(--muted); font-size: 13.5px;
}

/* ── Narrow screens: the rail becomes a top strip ─────────────────────── */
@media (max-width: 760px) {
  .rail { position: static; width: auto; }
  .rail .logo { padding: 14px 20px; max-width: 200px; }
  .rail nav { display: flex; flex-wrap: wrap; }
  .rail nav a { padding: 10px 14px; border-left: 0; border-bottom: 3px solid transparent; }
  .rail nav a.active { border-left: 0; border-bottom-color: #FFFFFF; }
  .rail .foot { margin-top: 0; }
  .bar { position: static; left: 0; }
  main, footer { margin-left: 0; padding-left: 18px; padding-right: 18px; }
  main { padding-top: 22px; }
}
