/* kontas.download download site. System fonts only, no external resources. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-soft: #f3f6f9;
  --bg-code: #eef2f6;
  --text: #17202b;
  --muted: #45505e;
  --line: #cfd8e2;
  --accent: #0a5aa8;
  --accent-text: #ffffff;
  --accent-soft: #e3effb;
  --warn-bg: #fff6df;
  --warn-line: #b7791f;
  --focus: #c2410c;
  --radius: 10px;
  --gutter: 16px;
  --max: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e141b;
    --bg-soft: #16202b;
    --bg-code: #1b2632;
    --text: #e7ecf2;
    --muted: #b0bcc9;
    --line: #2f3d4c;
    --accent: #79b8ff;
    --accent-text: #0b1520;
    --accent-soft: #19324d;
    --warn-bg: #33290f;
    --warn-line: #e0b252;
    --focus: #ffb86b;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 2em 0 .6em; }
h3 { font-size: 1.15rem; margin: 1.5em 0 .5em; }
p, ul, ol, dl { margin: 0 0 1em; }
li { margin-bottom: .35em; }
code, pre, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: .92em; }
:not(pre) > code { background: var(--bg-code); padding: .08em .35em; border-radius: 4px; overflow-wrap: anywhere; }
pre {
  position: relative;
  background: var(--bg-code);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9em 1em;
  overflow-x: auto;
  margin: 0 0 1em;
  max-width: 100%;
}
pre code { white-space: pre; }
pre > button.copy {
  position: absolute; top: .4em; right: .4em;
  font: inherit; font-size: .8rem;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px; padding: .15em .6em; cursor: pointer;
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: var(--gutter); top: -3em; background: var(--accent); color: var(--accent-text); padding: .5em 1em; border-radius: 6px; z-index: 10; }
.skip-link:focus { top: .5em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .5em 1.5em; padding-top: .75em; padding-bottom: .75em; }
.brand { display: flex; align-items: center; gap: .55em; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand img { width: 32px; height: 32px; flex: none; }
.brand small { display: block; font-weight: 400; font-size: .78rem; color: var(--muted); }
.site-nav { flex: 1 1 auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25em .9em; }
.site-nav li { margin: 0; }
.site-nav a { display: inline-block; padding: .3em .1em; color: var(--text); text-decoration: none; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); font-weight: 600; }
.lang-switch { display: flex; gap: .3em; align-items: center; }
.lang-switch button {
  font: inherit; font-size: .9rem; min-width: 2.75em; min-height: 2.25em;
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 700; }

main { display: block; padding-bottom: 3em; }
.hero { padding: 2.5em 0 1.5em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 48rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75em; margin: 1.5em 0; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 2.75em;
  padding: .55em 1.2em; border-radius: 8px; font-weight: 600; text-decoration: none;
  background: var(--accent); color: var(--accent-text); border: 2px solid var(--accent);
}
.button.secondary { background: transparent; color: var(--accent); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1em; list-style: none; padding: 0; }
.facts li, .card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1em 1.1em; margin: 0; }
.facts strong { display: block; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1em; }
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.note { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: .8em 1em; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 1em; }
.warn { border-left: 4px solid var(--warn-line); background: var(--warn-bg); padding: .8em 1em; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 1em; }
.note > :last-child, .warn > :last-child { margin-bottom: 0; }
.filename { font-weight: 600; }

/* Manual */
.manual-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2em; }
.manual-layout > * { min-width: 0; }
@media (min-width: 64rem) {
  .manual-layout { grid-template-columns: 17rem minmax(0, 1fr); }
  .toc { position: sticky; top: 1em; align-self: start; max-height: calc(100vh - 2em); overflow-y: auto; }
}
.toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1em; font-size: .95rem; }
.toc h2 { margin: 0 0 .5em; font-size: 1.05rem; }
.toc ol { margin: 0; padding-left: 1.3em; }
.manual section { scroll-margin-top: 1em; }
.manual section + section { border-top: 1px solid var(--line); }
.manual h2 { margin-top: 1.4em; }
.steps > li { margin-bottom: .9em; }
dl.trouble dt { font-weight: 700; margin-top: 1em; }
dl.trouble dd { margin: .3em 0 0 0; }

/* OS tabs */
.os-tabs { margin: 0 0 1.2em; }
.tablist { display: flex; flex-wrap: wrap; gap: .3em; border-bottom: 1px solid var(--line); margin-bottom: .8em; }
.tablist button {
  font: inherit; padding: .45em 1em; min-height: 2.5em; cursor: pointer;
  background: transparent; color: var(--text); border: 1px solid transparent; border-bottom: 0;
  border-radius: 8px 8px 0 0; margin-bottom: -1px;
}
.tablist button[aria-selected="true"] { background: var(--bg); border-color: var(--line); font-weight: 700; color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.os-tabs:not(.tabs-ready) > [data-os] { border-left: 3px solid var(--line); padding-left: 1em; margin-bottom: 1em; }

table { border-collapse: collapse; width: 100%; margin: 0 0 1em; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--line); padding: .45em .6em; text-align: left; vertical-align: top; }
th { background: var(--bg-soft); }

details { border: 1px solid var(--line); border-radius: var(--radius); padding: .6em 1em; margin: 0 0 .8em; background: var(--bg-soft); }
summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: .5em; }

.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); font-size: .92rem; padding: 1.5em 0; }
.site-footer p { margin: 0 0 .5em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-header nav, .lang-switch, .skip-link, pre > button.copy, .tablist { display: none !important; }
  .os-tabs > [data-os] { display: block !important; }
}
