/* Ondographics product site.
 *
 * The colours are the app's own: the accent and the second colour the appearance settings
 * call Accent and Second, which everything in the window is built from. A page about the
 * app that wears a different palette than the app would be a page about something else.
 */

:root {
  --accent: #a678f0;
  --accent-2: #00d2d3;
  --accent-glow: rgba(166, 120, 240, 0.28);
  --accent-soft: rgba(166, 120, 240, 0.14);
  --bg: #0e0c15;
  --panel: #17141f;
  --panel-2: #1e1a29;
  --line: rgba(255, 255, 255, 0.10);
  --ink: #f2effa;
  --muted: #a9a2bd;
  --radius: 14px;
  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 550px at 10% -5%, var(--accent-glow), transparent 60%),
    radial-gradient(900px 500px at 95% 0%, rgba(0, 210, 211, 0.12), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; margin: 2.2em 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin-top: 0; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; color: var(--muted); }

p, li { color: #ded9ec; }
strong { color: #fff; }

code {
  font: 0.9em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1em 0.35em;
}

pre {
  background: #0b0911;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
}
pre code { background: none; border: 0; padding: 0; font-size: 0.88em; }

blockquote {
  margin: 1.5em 0;
  padding: 0.6em 1.1em;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 10px 10px 0;
  color: var(--muted);
}

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px; top: 12px; z-index: 10;
  background: var(--panel); padding: 8px 12px; border-radius: 8px;
}

/* ------------------------------- the top bar ------------------------------- */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px max(20px, calc((100% - var(--wrap)) / 2));
  background: rgba(14, 12, 21, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.brand img { display: block; border-radius: 7px; }
.brand:hover { text-decoration: none; }

.top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;
}
.top nav a {
  color: var(--muted);
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 0.92rem;
}
.top nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); text-decoration: none; }
.top nav a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); }

/* --------------------------------- layout --------------------------------- */

main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 32px 20px 96px;
}

.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }

.hero { padding: 26px 0 8px; }
.hero .tagline { font-size: clamp(1.1rem, 2.4vw, 1.35rem); color: var(--muted); max-width: 60ch; }

.buttons { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 26px; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.98rem;
}
.button:hover { text-decoration: none; border-color: rgba(255, 255, 255, 0.22); }
.button.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #14101f;
}
.button.primary:hover { filter: brightness(1.07); }
.button.small { padding: 8px 14px; font-size: 0.9rem; }
.button[disabled] { opacity: 0.55; cursor: default; filter: none; }

.note { color: var(--muted); font-size: 0.9rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.card h3 { margin: 0 0 8px; font-size: 1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.94rem; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 20px 0;
}

.panel h2, .panel h3 { margin-top: 0; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.facts li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.facts b { display: block; font-size: 1.35rem; color: #fff; }
.facts span { color: var(--muted); font-size: 0.88rem; }

/* ------------------------------- the manual ------------------------------- */

.doc { max-width: 76ch; }
.doc h2 { padding-top: 8px; border-top: 1px solid var(--line); }
.doc h2:first-of-type { border-top: 0; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc img { max-width: 100%; border-radius: var(--radius); }

.doc-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 34px;
  align-items: start;
}
@media (max-width: 860px) {
  .doc-head { grid-template-columns: 1fr; }
}

.toc {
  position: sticky;
  top: 78px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 16px 18px;
  font-size: 0.9rem;
  max-height: calc(100vh - 110px);
  overflow: auto;
}
.toc p { margin: 0 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; }
.toc ol { margin: 0; padding-left: 18px; }
.toc li { margin: 5px 0; color: var(--muted); }
.toc a { color: #cfc8e4; }
.toc .sub { display: block; padding-left: 14px; font-size: 0.86rem; }

.table-wrap { overflow-x: auto; margin: 1.4em 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
th { background: rgba(255, 255, 255, 0.05); color: #fff; }

/* ------------------------------- the download ------------------------------ */

.download-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }

.progress {
  flex: 1 1 320px;
  min-width: 260px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.15s linear;
}

.status { min-height: 1.5em; color: var(--muted); font-size: 0.92rem; }
.status[data-state="done"] { color: #7ef0c0; }
.status[data-state="error"] { color: #ff9a9a; }

dl.spec { margin: 18px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 0.92rem; }
dl.spec dt { color: var(--muted); }
dl.spec dd { margin: 0; overflow-wrap: anywhere; }
dl.spec code { font-size: 0.84em; }

details.parts { margin-top: 18px; }
details.parts summary { cursor: pointer; color: var(--muted); }
details.parts ol { columns: 2; font-size: 0.85rem; }
@media (max-width: 620px) { details.parts ol { columns: 1; } }

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}
footer div {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 24px 20px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
}
