/* RG-DesktopLink site: a classic documentation site, in the manner of the old Windows Help and
   the MSDN library: contents on the left, the page on a framed sheet, "In this article" on the
   right. No fonts to download, no frameworks, no inline styles (the CSP allows none). */

:root {
  --paper: #f8f6f0;
  --sheet: #fffdf8;
  --side: #f1ede3;
  --ink: #222;
  --muted: #5d5d5d;
  --rule: #cfcabd;
  --rule-dark: #b9b3a5;
  --frame: #8f8a7e;
  --shadow: #ddd8cb;
  --head: #ece7da;
  --link: #1d4f91;
  --visited: #5b3d86;
  --box: #fff;
  --note: #fffbe6;
  --note-rule: #e2d38c;
  --tip: #eef5e9;
  --tip-rule: #a7c497;
  --warn: #fbedea;
  --warn-rule: #d6a49c;
  --ui: Verdana, Geneva, Tahoma, sans-serif;
  --mono: Consolas, "Courier New", monospace;
  --top: 62px;
}

html { background: var(--paper); scroll-padding-top: calc(var(--top) + 14px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 Georgia, "Times New Roman", serif;
}

a { color: var(--link); }
a:visited { color: var(--visited); }
img { max-width: 100%; height: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 30;
  background: var(--box); padding: 6px 12px; font: 14px var(--ui);
}
.skip:focus { left: 12px; top: 8px; }

/* ---- The bar at the top: the logo and only what is needed ---------------------------------- */

.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--sheet);
  border-bottom: 3px double var(--rule-dark);
}
.top-in {
  max-width: 1600px; margin: 0 auto; padding: 0 20px; min-height: var(--top);
  display: flex; align-items: center; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px; flex: none;
  color: var(--ink); text-decoration: none;
  font: bold 23px/1 Georgia, "Times New Roman", serif; letter-spacing: -0.4px;
}
.brand:visited { color: var(--ink); }
.brand img { border-radius: 8px; }
.top .tag {
  margin: 0; padding-left: 16px; border-left: 1px solid var(--rule);
  color: var(--muted); font-style: italic; font-size: 15px; line-height: 1.3;
}
.top-links {
  margin-left: auto; display: flex; align-items: center; gap: 18px; flex: none;
  font: 13px var(--ui);
}
.top-links a:not(.button) { color: var(--link); }
.menu-btn { display: none; }
.menu-toggle { display: none; }

/* ---- Three columns: contents, the page, "In this article" ---------------------------------- */

.layout {
  max-width: 1600px; margin: 0 auto; padding: 22px 20px 0;
  display: grid; grid-template-columns: 262px minmax(0, 1fr) 214px; gap: 0 26px;
  align-items: start;
}
.layout.no-toc { grid-template-columns: 262px minmax(0, 1fr); }

/* The contents, like a Help file's tree. */
.side {
  position: sticky; top: calc(var(--top) + 18px);
  max-height: calc(100vh - var(--top) - 34px); overflow: auto;
  background: var(--side); border: 1px solid var(--rule-dark);
  box-shadow: 3px 3px 0 var(--shadow);
  font: 13px/1.45 var(--ui);
}
.side-title {
  margin: 0; padding: 6px 10px; background: var(--head);
  border-bottom: 1px solid var(--rule-dark); font-weight: bold;
}
.side .filter { margin: 8px 8px 2px; }
.side .filter input {
  width: 100%; box-sizing: border-box; padding: 4px 6px;
  font: 13px var(--ui); border: 1px solid var(--frame); background: var(--box);
}
.side nav { padding: 6px 6px 10px; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li { margin: 0; }
.side a {
  display: block; padding: 3px 8px 3px 10px; color: var(--ink); text-decoration: none;
  border-left: 3px solid transparent;
}
.side a:visited { color: var(--ink); }
.side a:hover { color: var(--link); text-decoration: underline; background: var(--box); }
.side a[aria-current="page"] {
  background: var(--box); border-left-color: var(--link); color: var(--link); font-weight: bold;
}
.side .solo > a { font-weight: bold; padding-left: 6px; }
.side details { margin: 2px 0; }
.side summary {
  cursor: pointer; list-style: none; padding: 4px 6px; font-weight: bold;
}
.side summary::-webkit-details-marker { display: none; }
.side summary::before {
  content: "+"; display: inline-block; width: 9px; height: 9px; margin-right: 7px;
  border: 1px solid var(--frame); background: var(--box); vertical-align: 0;
  font: 10px/8px var(--mono); text-align: center; color: var(--ink);
}
.side details[open] > summary::before { content: "\2212"; }
.side summary:hover { color: var(--link); }
.side details ul { margin: 0 0 4px 11px; padding-left: 6px; border-left: 1px dotted var(--frame); }
.side .gone { display: none; }

/* The page itself, on a framed sheet as wide as the window allows. */
.main { min-width: 0; }
.sheet {
  background: var(--sheet); border: 1px solid var(--frame);
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 22px 42px 30px;
}
.crumbs { margin: 0 0 4px; font: 12.5px var(--ui); color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 5px; }
.meta {
  margin: -2px 0 20px; padding-bottom: 10px; border-bottom: 1px solid var(--rule);
  font: 12.5px var(--ui); color: var(--muted);
}

/* "In this article". */
.onpage {
  position: sticky; top: calc(var(--top) + 18px);
  max-height: calc(100vh - var(--top) - 34px); overflow: auto;
  font: 12.5px/1.45 var(--ui);
}
.onpage-title { margin: 0 0 6px; font-weight: bold; }
.onpage ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule-dark); }
.onpage li { margin: 0; }
.onpage a {
  display: block; padding: 3px 0 3px 11px; margin-left: -1px;
  border-left: 2px solid transparent; color: var(--muted); text-decoration: none;
}
.onpage a:hover { color: var(--link); text-decoration: underline; }
.onpage a.here { border-left-color: var(--link); color: var(--ink); font-weight: bold; }

/* Previous / next, at the bottom of every guide page. */
.pager {
  display: flex; gap: 16px; margin-top: 38px; padding-top: 16px;
  border-top: 1px solid var(--rule); font: 14px/1.4 var(--ui);
}
.pager a {
  flex: 1 1 0; max-width: 50%; padding: 8px 12px; text-decoration: none;
  background: var(--box); border: 1px solid var(--rule-dark); box-shadow: 2px 2px 0 var(--shadow);
}
.pager a:hover { border-color: var(--link); }
.pager small { display: block; color: var(--muted); font-size: 12px; }
.pager .next { margin-left: auto; text-align: right; }

/* ---- Text --------------------------------------------------------------------------------- */

h1 { font-size: 30px; line-height: 1.25; margin: 6px 0 10px; }
h2 { font-size: 23px; line-height: 1.3; margin: 36px 0 10px; padding-bottom: 3px; border-bottom: 1px solid var(--rule); }
h3 { font-size: 18.5px; margin: 24px 0 6px; }
.sheet > h2:first-child, .sheet > h1 + h2 { margin-top: 14px; }
p, ul, ol { margin: 0 0 12px; }
li { margin-bottom: 4px; }
.lead { font-size: 19px; color: #333; }
code, kbd {
  font: 14px var(--mono);
  background: var(--box); border: 1px solid var(--rule); padding: 0 4px;
}
kbd { border-bottom-width: 2px; white-space: nowrap; }
pre {
  font: 14px/1.5 var(--mono); background: var(--box); border: 1px solid var(--rule);
  padding: 10px 12px; overflow-x: auto; margin: 0 0 14px;
}
pre code { border: 0; padding: 0; background: none; }

figure { margin: 18px 0 22px; }
figure img {
  display: block; max-width: 100%; height: auto;
  border: 1px solid var(--frame); box-shadow: 3px 3px 0 var(--shadow);
}
figure.plain img { border: 0; box-shadow: none; }
/* The demo films (MP4, silent, looping): framed like the pictures. */
figure video.demo {
  display: block; width: 100%; height: auto; background: #0d1117;
  border: 1px solid var(--frame); box-shadow: 3px 3px 0 var(--shadow);
}
figcaption { margin-top: 6px; font-size: 14px; color: var(--muted); font-style: italic; }

/* Text beside a picture, when the page is wide enough. */
.split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 32px;
  align-items: start; margin: 6px 0 10px;
}
.split > figure { margin-top: 4px; }
.split.wide-pic { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }

table { border-collapse: collapse; width: 100%; margin: 8px 0 16px; background: var(--box); }
th, td { border: 1px solid var(--rule-dark); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--head); font-weight: bold; }
td.num { white-space: nowrap; }

.button, button.button {
  display: inline-block; cursor: pointer;
  background: var(--link); color: #fff !important; text-decoration: none;
  border: 1px solid #123866; padding: 6px 14px;
  font: bold 14px var(--ui); box-shadow: 2px 2px 0 #a9b6c8;
}
.button:hover { background: #163f74; }
.button.soon, .button.soon:hover { background: #8a8578; border-color: #77736a; cursor: default; box-shadow: none; }
.button.light { background: var(--box); color: var(--link) !important; border-color: var(--link); }
.button.light:hover { background: #eef2f8; }
.top-links .button { padding: 4px 12px; font-size: 13px; }
table.downloads th { width: 34%; }
a.store img { vertical-align: middle; }

.key {
  font: 15px/1.5 var(--mono); word-break: break-all;
  background: var(--box); border: 1px dashed #777; padding: 10px 12px;
}

/* Callouts: Note, Tip, Important. */
.note, .tip, .warn {
  border: 1px solid var(--note-rule); border-left-width: 4px; padding: 9px 13px;
  margin: 14px 0 16px; background: var(--note);
}
.tip { background: var(--tip); border-color: var(--tip-rule); }
.warn { background: var(--warn); border-color: var(--warn-rule); }
.note > :last-child, .tip > :last-child, .warn > :last-child { margin-bottom: 0; }
.label {
  display: block; margin-bottom: 2px;
  font: bold 12px var(--ui); letter-spacing: 0.6px; text-transform: uppercase;
}

.small { font-size: 14px; color: var(--muted); }
.hidden { display: none; }
.toc { background: var(--box); border: 1px solid var(--rule); padding: 10px 14px 4px; }
.toc ol { margin-bottom: 6px; }

dl.faq dt { font-weight: bold; margin-top: 14px; }
dl.faq dd { margin: 4px 0 0 0; }

/* ---- The home page ------------------------------------------------------------------------ */

.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 30px;
  align-items: center; margin: 4px 0 8px;
}
.hero h1 { font-size: 34px; margin-top: 0; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; margin: 16px 0 6px; }
.hero figure { margin: 0; }

.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 18px;
  margin: 14px 0 24px;
}
.card {
  display: flex; flex-direction: column;
  background: var(--box); border: 1px solid var(--rule-dark); box-shadow: 3px 3px 0 var(--shadow);
}
.card h3 {
  margin: 0; padding: 6px 10px; background: var(--head); border-bottom: 1px solid var(--rule-dark);
  font: bold 14px/1.4 var(--ui);
}
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--link); text-decoration: underline; }
.card p { margin: 0; padding: 10px 12px 4px; font-size: 15.5px; line-height: 1.5; }
.card .more { margin-top: auto; padding: 4px 12px 10px; font: 13px var(--ui); }

/* The films are wide (two screens side by side): one under the other, as wide as the page. */
.films { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }

/* ---- The bottom of every page ------------------------------------------------------------- */

.foot {
  max-width: 1600px; margin: 40px auto 0; padding: 14px 20px 34px; box-sizing: border-box;
  border-top: 3px double var(--rule-dark);
  font: 12.5px/1.7 var(--ui); color: var(--muted);
}
.foot p { margin: 0 0 6px; }

/* ---- Narrower windows --------------------------------------------------------------------- */

@media (max-width: 1220px) {
  .layout, .layout.no-toc { grid-template-columns: 240px minmax(0, 1fr); }
  .onpage { display: none; }
  .sheet { padding: 20px 30px 26px; }
}
@media (max-width: 1000px) {
  .top .tag { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .split, .split.wide-pic { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  :root { --top: 54px; }
  .layout, .layout.no-toc { grid-template-columns: minmax(0, 1fr); padding: 14px 12px 0; }
  .menu-btn {
    display: inline-block; cursor: pointer; flex: none;
    font: bold 13px var(--ui); padding: 4px 9px;
    border: 1px solid var(--frame); background: var(--box); box-shadow: 2px 2px 0 var(--shadow);
  }
  .menu-toggle {
    display: block; position: absolute; top: 0; left: 0; opacity: 0;
    width: 1px; height: 1px; pointer-events: none;
  }
  .menu-toggle:focus-visible ~ .top .menu-btn { outline: 2px solid var(--link); outline-offset: 2px; }
  .side { display: none; position: static; max-height: none; margin-bottom: 14px; }
  .menu-toggle:checked ~ .layout .side { display: block; }
  .brand { font-size: 19px; }
  .brand img { width: 32px; height: 32px; }
  .top-in { padding: 0 12px; gap: 10px; }
  .top-links { gap: 12px; }
  .top-links .buy { display: none; }
  .sheet { padding: 16px 16px 22px; box-shadow: 2px 2px 0 var(--shadow); }
  .films { grid-template-columns: minmax(0, 1fr); }
  .foot { padding: 14px 16px 30px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  h1, .hero h1 { font-size: 25px; }
  h2 { font-size: 20px; }
  th, td { padding: 6px; }
  .pager { flex-direction: column; }
  .pager a { max-width: none; }
  .top-links .lang { display: none; }
  .menu-word { display: none; }
  .menu-btn { font-size: 15px; padding: 2px 9px; }
  .brand { font-size: 17px; gap: 8px; }
  .top-links .button { padding: 4px 9px; }
  .sheet { overflow-wrap: break-word; }
  kbd, td.num { white-space: normal; }
  th, td { overflow-wrap: anywhere; }
}
@media (max-width: 370px) {
  .top-in { gap: 6px; padding: 0 8px; }
  .top-links .button { padding: 4px 8px; }
  .brand { font-size: 15px; }
  .brand img { width: 26px; height: 26px; }
}

/* ---- On paper: only the page ------------------------------------------------------------- */

@media print {
  html, body { background: #fff; }
  .top, .side, .onpage, .pager, .skip, .menu-toggle { display: none !important; }
  .layout, .layout.no-toc { display: block; max-width: none; padding: 0; }
  .sheet { border: 0; box-shadow: none; padding: 0; }
  a { color: inherit; }
  figure, table, pre { break-inside: avoid; }
  .foot { border-top: 1px solid #999; }
}
