/* RdpClient documentation theme.
   One accent colour, a four-step surface scale, and a 68-character measure:
   the pages are reference material, so legibility beats decoration. */
:root {
  color-scheme: dark;
  --bg: #0b1220;
  --bg-soft: #0f1829;
  --panel: #142236;
  --panel-hi: #1b2c45;
  --line: #24385a;
  --line-soft: #1b2a42;
  --text: #e7eef8;
  --muted: #9db0ca;
  --faint: #7d90ab;
  --accent: #56c2f2;
  --accent-dim: #2b7fa8;
  --ok: #4ec98a;
  --warn: #e6b455;
  --bad: #f2777a;
  --measure: 68ch;
  --radius: 10px;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #fbfcfe;
    --bg-soft: #f2f5f9;
    --panel: #ffffff;
    --panel-hi: #eef2f7;
    --line: #d7dfea;
    --line-soft: #e6ebf2;
    --text: #16202e;
    --muted: #4d5f78;
    --faint: #6b7d95;
    --accent: #0a6ebd;
    --accent-dim: #4a9bdb;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font: 16px/1.65 -apple-system, "Segoe UI", system-ui, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ---- layout: sidebar + content, collapsing to a drawer on narrow screens -- */
.wrap { display: flex; min-height: 100vh; }

.topbar { display: none; }
.navtoggle { position: absolute; opacity: 0; pointer-events: none; }

nav {
  width: 264px; flex: 0 0 264px;
  background: var(--bg-soft);
  border-right: 1px solid var(--line-soft);
  padding: 26px 18px 40px;
  position: sticky; top: 0; align-self: flex-start;
  max-height: 100vh; overflow-y: auto;
  scrollbar-width: thin;
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brandname { font-weight: 650; letter-spacing: -0.01em; }
.brandmeta { color: var(--faint); font-size: 12px; margin-top: 1px; }
.navlabel {
  color: var(--faint); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.09em; margin: 20px 0 6px; padding-left: 12px;
}
nav a {
  display: block; padding: 7px 12px; margin: 1px 0;
  border-radius: 8px; color: var(--muted);
  text-decoration: none; font-size: 14.5px;
  border-left: 2px solid transparent;
}
nav a:hover { background: var(--panel-hi); color: var(--text); }
nav a.on {
  background: var(--panel-hi); color: var(--accent);
  font-weight: 600; border-left-color: var(--accent);
}

main {
  flex: 1; min-width: 0;
  padding: 44px 48px 96px;
  max-width: calc(var(--measure) + 96px + 264px);
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #001018;
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 20; font-weight: 600;
}
.skip:focus { left: 0; }

/* ---- hero: the README's centred block, rendered as markup -- */
.hero { text-align: center; padding: 8px 0 4px; margin-bottom: 8px; }
.hero img.logo { width: 116px; height: 116px; border-radius: 24px; margin-bottom: 14px; }
.hero h1 {
  font-size: 2.6rem; letter-spacing: -0.025em; margin: 0 0 6px;
  background: linear-gradient(180deg, var(--text), var(--muted));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.tagline { font-size: 1.16rem; color: var(--muted); margin: 0 0 18px; }
.hero .badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.hero .badges img { height: 20px; }
.hero .cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero .cta a {
  display: inline-block; padding: 8px 16px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--text); text-decoration: none; font-size: 14.5px; font-weight: 550;
}
.hero .cta a.primary { background: var(--accent); border-color: var(--accent); color: #001018; }
.hero .cta a:hover { border-color: var(--accent); }

/* ---- typography -- */
h1 { font-size: 2.1rem; letter-spacing: -0.02em; margin: 0 0 1.1em; }
h2 {
  margin: 2.4em 0 0.7em; padding-bottom: 0.3em;
  border-bottom: 1px solid var(--line-soft); font-size: 1.5rem; letter-spacing: -0.015em;
}
h3 { margin: 1.9em 0 0.5em; font-size: 1.18rem; color: var(--accent); }
h4 { margin: 1.5em 0 0.4em; font-size: 1.02rem; color: var(--muted); }
p, li { color: var(--text); }
a { color: var(--accent); text-decoration-color: var(--accent-dim); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--accent); }
strong { font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--line-soft); margin: 2.6em 0; }

main > *:first-child { margin-top: 0; }

/* Anchor links on headings, revealed on hover.
   The toc extension emits class="headerlink", not "head". */
h1 > a.headerlink, h2 > a.headerlink, h3 > a.headerlink, h4 > a.headerlink {
  color: var(--faint); text-decoration: none; font-weight: 400;
  margin-left: 0.35em; opacity: 0; transition: opacity 0.12s;
  font-size: 0.8em;
}
h1:hover > a.headerlink, h2:hover > a.headerlink,
h3:hover > a.headerlink, h4:hover > a.headerlink { opacity: 1; }
a.headerlink:focus { opacity: 1; }

/* ---- code ---- */
code {
  background: var(--panel-hi); border: 1px solid var(--line-soft);
  padding: 0.12em 0.38em; border-radius: 5px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.88em;
}
pre {
  background: var(--bg-soft); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 14px 16px; overflow-x:auto; line-height: 1.5;
}
pre code { background: none; border: 0; padding: 0; font-size: 0.86rem; }

/* ---- tables ---- */
.table-scroll { overflow-x: auto; margin: 1.3em 0; border-radius: var(--radius); border: 1px solid var(--line-soft); }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
th, td { padding: 9px 13px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
thead th { background: var(--panel); color: var(--muted); font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--panel-hi); }

/* ---- quotes, lists, images ---- */
blockquote {
  border-left: 3px solid var(--accent-dim); margin: 1.3em 0;
  padding: 0.2em 0 0.2em 18px; color: var(--muted); background: var(--bg-soft);
  border-radius: 0 8px 8px 0;
}
blockquote p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.4em; }
li { margin: 0.25em 0; }
li::marker { color: var(--faint); }
img { max-width: 100%; }
figure { margin: 1.6em 0; }
figcaption { color: var(--faint); font-size: 0.88rem; text-align: center; margin-top: 0.5em; }

/* ---- status words used throughout the docs ---- */
.ok { color: var(--ok); font-weight: 600; }
.warn { color: var(--warn); font-weight: 600; }
.bad { color: var(--bad); font-weight: 600; }

/* ---- page footer ---- */
.pagefoot {
  margin-top: 3.5em; padding-top: 1.2em; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 1em; flex-wrap: wrap;
  color: var(--faint); font-size: 0.88rem;
}

/* ---- narrow screens ---- */
@media (max-width: 900px) {
  .wrap { flex-direction: column; }
  .topbar {
    display: flex; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 10;
    padding: 10px 16px; background: var(--bg-soft);
    border-bottom: 1px solid var(--line-soft);
  }
  .toplogo { width: 26px; height: 26px; border-radius: 7px; }
  .topname { font-weight: 600; }
  .burger { display: flex; flex-direction: column; gap: 4px; cursor: pointer; padding: 6px; }
  .burger span { display: block; width: 20px; height: 2px; background: var(--muted); border-radius: 2px; }
  nav {
    display: none; width: auto; flex: none; max-height: none;
    position: static; border-right: 0; border-bottom: 1px solid var(--line-soft);
  }
  .navtoggle:checked ~ nav { display: block; }
  main { padding: 26px 20px 64px; max-width: 100%; }
  .hero h1 { font-size: 2rem; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.3rem; }
}
@media print {
  nav, .topbar, .pagefoot, .skip { display: none; }
  body { background: #fff; color: #000; }
}
