/* Public user manual. Tokens and typography follow documentation/navody/aktivacia-efaktury.html. */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #eef0fa;
  --surface: #ffffff;
  --ink: #161a33;
  --ink-soft: #4a4f6a;
  --ink-faint: #6b7090;
  --line: #dde0f0;
  --accent: #3f47cc;
  --accent-soft: #e6e8fb;
  --ok: #1f8a4c;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  overflow-wrap: break-word;
}
a { color: var(--accent); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* The header stays in view, so the way back to the tree and the index is never scrolled away. */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; gap: 12px; max-width: 1180px; margin: 0 auto; padding: 12px 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 600; }
.brand img { display: block; height: 32px; width: auto; }
.brand span { padding-left: 12px; border-left: 1px solid var(--line); color: var(--ink-soft); }

/* Without JavaScript (or on a phone) the content comes first and the tree below it; from 900 px a
   grid puts the tree in the left column. */
.layout { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.layout main { padding: 32px 0 56px; min-width: 0; }
@media (min-width: 900px) {
  .layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 32px; padding: 0 20px; }
  .layout main { grid-column: 2; grid-row: 1; max-width: 800px; padding-top: 40px; }
  .layout .tree { grid-column: 1; grid-row: 1; }
}

.eyebrow {
  display: flex; align-items: center; gap: 12px;
  color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); }
h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.2; margin: 12px 0 16px; letter-spacing: -.01em; }
.lead { color: var(--ink-soft); font-size: 18px; margin: 0 0 28px; max-width: 720px; }

.cards { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cards li { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 0; }
.cards a { font-weight: 600; text-decoration: none; }
.cards a:hover { text-decoration: underline; }

.crumbs { font-size: 14px; color: var(--ink-faint); margin-bottom: 16px; }
.crumbs a { color: var(--ink-faint); }

section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; margin-top: 28px; }
section h2 { font-size: 23px; line-height: 1.3; margin: 0 0 8px; }
section h3 { font-size: 18px; margin: 20px 0 6px; }
section p, section li { color: var(--ink-soft); }
section ol, section ul { padding-left: 22px; }
section li { margin: 6px 0; }
section b, section strong { color: var(--ink); }
.ui { font-weight: 600; color: var(--ink); white-space: nowrap; }

.note {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 14px 18px; margin: 20px 0; color: var(--ink-soft); font-size: 15px;
}
.note strong { color: var(--ink); }

section table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
section th, section td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
section th { background: var(--surface); color: var(--ink); }

figure { margin: 20px 0 8px; }
figure img { display: block; max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; }
figure.narrow img { max-width: 560px; width: 100%; }
figcaption { color: var(--ink-faint); font-size: 14px; margin-top: 8px; }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin: 10px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--ink-soft); margin: 10px 0 2px; }

.site-footer { text-align: center; color: var(--ink-soft); font-size: 15px; padding: 8px 16px 40px; }

/* Previous / Next under the content, in the order of the tree. */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
.pager a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 18px; text-decoration: none; font-weight: 600; }
.pager a:hover { border-color: var(--accent); }
.pager small { display: block; color: var(--ink-faint); font-weight: 400; font-size: 13px; }
.pager .prev { grid-column: 1; }
.pager .next { grid-column: 2; text-align: right; }

/* The tree. Everything that needs JavaScript (the drawer, the current page, the section list) is
   scoped to .js, which navod.js sets, so without a script the plain tree simply sits in the page. */
.tree { padding: 16px 0 40px; font-size: 15px; line-height: 1.4; }
.tree ul { list-style: none; margin: 0; padding: 0; }
.tree a { display: block; text-decoration: none; color: var(--ink-soft); padding: 6px 10px; border-radius: 8px; }
.tree a:hover { background: var(--accent-soft); color: var(--ink); }
.tree .tree-home { font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.tree [aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tree li { margin: 2px 0; }
.tree details { background: none; border: 0; border-radius: 0; padding: 0; margin: 0; }
.tree summary { list-style: none; cursor: pointer; font-weight: 600; color: var(--ink); padding: 6px 10px; border-radius: 8px; }
.tree summary::-webkit-details-marker { display: none; }
.tree summary::before { content: "›"; display: inline-block; width: 16px; color: var(--ink-faint); transition: transform .15s; }
.tree details[open] > summary::before { transform: rotate(90deg); }
.tree summary:hover { background: var(--accent-soft); }
.tree details ul { margin: 2px 0 8px 16px; border-left: 1px solid var(--line); padding-left: 6px; }
.tree .tree-sections { margin: 4px 0 6px 12px; border-left: 0; padding-left: 0; font-size: 14px; }
.tree .tree-sections a { padding: 4px 10px; color: var(--ink-faint); }
.tree .tree-sections a.active { color: var(--accent); font-weight: 600; }
.tree .soon { padding: 6px 10px 6px 26px; color: var(--ink-faint); }
.tree .soon small { font-size: 12px; margin-left: 6px; }

.tree-toggle { display: none; font: inherit; font-weight: 600; font-size: 15px; color: var(--ink);
  background: var(--accent-soft); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.tree-backdrop { position: fixed; inset: 0; background: rgba(22, 26, 51, .35); z-index: 40; }
@media (min-width: 900px) { .tree-backdrop { display: none; } }

@media (min-width: 900px) {
  .tree { position: sticky; top: 58px; align-self: start; max-height: calc(100vh - 58px); overflow-y: auto; padding-top: 24px; }
}
@media (max-width: 899px) {
  .js .tree-toggle { display: inline-block; }
  .js .tree { position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); z-index: 50; overflow-y: auto;
    background: var(--bg); padding: 20px 12px 40px; box-shadow: 4px 0 24px rgba(22, 26, 51, .18);
    transform: translateX(-105%); visibility: hidden; transition: transform .2s, visibility .2s; }
  .js body.tree-open .tree { transform: none; visibility: visible; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .layout main { padding-top: 24px; }
  .site-header .bar { padding: 12px 16px; }
  .pager { grid-template-columns: 1fr; }
  .pager .prev, .pager .next { grid-column: 1; text-align: left; }
  section { padding: 20px 16px; }
  section h2 { font-size: 20px; }
  /* A long button label would otherwise push the page wider than a phone. */
  .ui { white-space: normal; }
}
