/* Paleta: validovana reference (dataviz) - svetly i tmavy rezim zvlast krokovane. */
:root {
  color-scheme: light;
  --surface-1: #fcfcfb;
  --page: #f9f9f7;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-7: #4a3aa7;
  --good: #0ca30c;
  --good-text: #006300;
  --warning: #fab219;
  --warning-text: #915700;
  --critical: #d03b3b;
  --good-bg: #e7f6e8;
  --warn-bg: #fff3d5;
  --bad-bg: #fde8e7;
  --div-pos: #2a78d6;
  --div-neg: #d03b3b;
  --div-mid: #f0efec;
  --shadow: 0 1px 2px rgba(11, 11, 11, .05);
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --surface-1: #1a1a19;
    --page: #0d0d0d;
    --text-primary: #ffffff;
    --text-secondary: #c3c2b7;
    --text-muted: #898781;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-7: #9085e9;
    --good-text: #67dc72;
    --warning: #ffc44d;
    --warning-text: #ffd06a;
    --critical: #ff7770;
    --good-bg: #17351d;
    --warn-bg: #3c3015;
    --bad-bg: #431f20;
    --div-pos: #3987e5;
    --div-mid: #383835;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-1: #1a1a19;
  --page: #0d0d0d;
  --text-primary: #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted: #898781;
  --grid: #2c2c2a;
  --axis: #383835;
  --border: rgba(255, 255, 255, 0.10);
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-7: #9085e9;
  --good-text: #67dc72;
  --warning: #ffc44d;
  --warning-text: #ffd06a;
  --critical: #ff7770;
  --good-bg: #17351d;
  --warn-bg: #3c3015;
  --bad-bg: #431f20;
  --div-pos: #3987e5;
  --div-mid: #383835;
  --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--page);
  color: var(--text-primary);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--series-1); text-decoration: none; }
a:hover { text-decoration: underline; }

header.top {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 14px 22px; background: var(--surface-1);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20;
}
header.top h1 { font-size: 16px; font-weight: 700; margin: 0; letter-spacing: .01em; }
header.top nav { display: flex; gap: 14px; }
header.top nav a { color: var(--text-secondary); font-weight: 600; padding: 2px 0; }
header.top nav a.active { color: var(--text-primary); box-shadow: inset 0 -2px 0 var(--series-1); }
header.top .spacer { flex: 1; }
.meta { color: var(--text-muted); font-size: 12px; }

main { padding: 20px 22px 60px; max-width: 1480px; margin: 0 auto; }
section { margin-bottom: 30px; }
h2 { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
h2 + .sub { color: var(--text-secondary); font-size: 13px; margin: 0 0 12px; }
.sub { color: var(--text-secondary); font-size: 13px; }

/* --- filtry (jeden radek nad grafy) --- */
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.btn, select, input[type=text], input[type=password] {
  font: inherit; color: var(--text-primary); background: var(--surface-1);
  border: 1px solid var(--border); border-radius: 7px; padding: 5px 11px; cursor: pointer;
}
.btn:hover, select:hover { border-color: var(--axis); }
.btn[aria-pressed=true] { background: var(--series-1); border-color: var(--series-1); color: #fff; }
.btn.ghost[aria-pressed=true] { background: var(--grid); color: var(--text-primary); border-color: var(--axis); }

/* --- stat tiles --- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 9px; }
.tile {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 11px; box-shadow: var(--shadow);
}
.tile .label { color: var(--text-secondary); font-size: 12.5px; font-weight: 600; margin-bottom: 2px; }
.tile .value { font-size: 23px; font-weight: 700; letter-spacing: -.01em; }
.tile .foot { color: var(--text-muted); font-size: 12px; margin-top: 2px; }

/* --- karty s grafy --- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 10px; }
.card {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 11px 6px; box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 2px; }
.card-head .sym { font-weight: 700; font-size: 15px; }
.card-head .nm { color: var(--text-secondary); font-size: 13px; font-weight: 500; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-head .px { font-weight: 700; font-size: 19px; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums; }
.card-sub { display: flex; gap: 10px; flex-wrap: wrap; color: var(--text-muted);
  font-size: 11.5px; margin-bottom: 8px; }
.card-foot { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px;
  color: var(--text-secondary); padding: 6px 0 4px; border-top: 1px solid var(--grid); margin-top: 6px; }
.card-foot b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-primary); }

.delta { font-variant-numeric: tabular-nums; font-weight: 600; }
.delta.up { color: var(--good-text); }
.delta.down { color: var(--critical); }
.delta .arrow { font-size: 11px; }

.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px;
  padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-secondary); }
.chip.cz { color: var(--good-text); border-color: var(--good-text); font-weight: 600; }
.tone-positive { color: var(--good-text); }
.tone-negative { color: var(--critical); }
.tone-neutral { color: var(--text-muted); }
.chip.tone-positive, .chip.tone-negative, .chip.tone-neutral { font-weight: 600; }

/* --- tabulky --- */
.tablewrap { overflow-x: auto; background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 6px 8px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--grid); }
th { position: sticky; top: 0; background: var(--surface-1); color: var(--text-secondary);
  font-weight: 650; cursor: pointer; z-index: 2; }
th:first-child, td:first-child, th.l, td.l { text-align: left; }
td { font-variant-numeric: tabular-nums; }
tbody tr:hover { background: var(--grid); }
tr.group-row td { background: var(--page); color: var(--text-secondary); font-weight: 600; text-align: left; }
th .sortmark { color: var(--series-1); }

/* --- grafy --- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .tooltip {
  position: absolute; pointer-events: none; background: var(--surface-1);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .14); min-width: 120px; z-index: 10; opacity: 0;
  transition: opacity .08s linear;
}
.chart .tooltip .t-date { color: var(--text-secondary); font-size: 12px; margin-bottom: 4px; }
.chart .tooltip .t-row { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.chart .tooltip .t-row .sw { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.chart .tooltip .t-row b { font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-secondary);
  margin: 2px 0 6px; }
.legend .item { display: inline-flex; align-items: center; gap: 5px; }
.legend .sw { width: 9px; height: 9px; border-radius: 2px; }
.legend .sw.dash { height: 0; border-top: 2px dashed currentColor; width: 12px; border-radius: 0; }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 10px; }
.panel { background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 11px; box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 2px; font-size: 14px; font-weight: 700; }
.panel .sub { margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; font-size: 12.5px; }
.kv dt { color: var(--text-secondary); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.loading { color: var(--text-muted); padding: 30px 0; text-align: center; }
.err { color: var(--critical); border: 1px solid var(--critical); border-radius: 8px;
  padding: 10px 12px; background: var(--surface-1); }
.toggle-table { font-size: 11.5px; color: var(--text-secondary); background: none; border: 0;
  cursor: pointer; padding: 2px 0; text-decoration: underline; }
details.data-table { margin-top: 8px; }
details.data-table summary { font-size: 11.5px; color: var(--text-secondary); cursor: pointer; }

/* ===================================================== rozklikavaci analyzy */
.alist { display: grid; gap: 8px; }
.agroup { margin-bottom: 18px; }
.agroup > h3 { font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted); margin: 0 0 7px; }

.aitem { background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow); overflow: hidden; }
.aitem-head { display: flex; align-items: center; gap: 10px; padding: 11px 13px;
  cursor: pointer; width: 100%; background: none; border: 0; text-align: left; font: inherit;
  color: var(--text-primary); }
.aitem-head:hover { background: var(--grid); }
.aitem-head .caret { color: var(--text-muted); font-size: 11px; width: 10px; flex: none;
  transition: transform .12s ease; }
.aitem[open] .aitem-head .caret, .aitem.open .aitem-head .caret { transform: rotate(90deg); }
.aitem-head .t { font-weight: 600; font-size: 13.5px; }
.aitem-head .d { color: var(--text-secondary); font-size: 12px; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aitem-body { padding: 0 13px 14px; border-top: 1px solid var(--grid); }
.aitem-body[hidden] { display: none; }

/* tonovy indikator - vzdy s textem, nikdy jen barva */
.tone { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); flex: none; }
.tone .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.tone.good { color: var(--good-text); }
.tone.warn { color: #9a6700; }
.tone.bad { color: var(--critical); }
.tone.neutral { color: var(--text-muted); }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .tone.warn { color: var(--warning); }
}
:root[data-theme="dark"] .tone.warn { color: var(--warning); }

/* verdikt */
.verdict { margin: 12px 0; padding: 11px 13px; border-radius: 9px; background: var(--page);
  border: 1px solid var(--border); border-left: 3px solid var(--axis); }
.verdict.good { border-left-color: var(--good); }
.verdict.warn { border-left-color: var(--warning); }
.verdict.bad { border-left-color: var(--critical); }
.verdict .vh { font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.verdict ul { margin: 6px 0 0; padding-left: 17px; }
.verdict li { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 4px; line-height: 1.5; }
.verdict .vmetrics { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0 2px;
  padding-top: 8px; border-top: 1px solid var(--grid); }
.verdict .vmetrics div { font-size: 11.5px; color: var(--text-muted); }
.verdict .vmetrics b { display: block; font-size: 15px; color: var(--text-primary);
  font-variant-numeric: tabular-nums; font-weight: 600; }

/* vysvetlivky co to dela / jak cist / na co pozor */
.explain { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px; margin: 12px 0; }
.explain section { margin: 0; }
.explain h4 { margin: 0 0 3px; font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted); }
.explain p { margin: 0; font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }
.explain .caveat h4 { color: var(--critical); }

/* prepinac obdobi + ovladaci radek v detailu */
.ctlbar { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin: 12px 0 10px;
  padding: 8px 10px; background: var(--page); border: 1px solid var(--border); border-radius: 8px; }
.ctlbar .lbl { font-size: 11.5px; color: var(--text-muted); }
.ctlbar .btn { padding: 3px 9px; font-size: 12px; }
.ctlbar select { padding: 3px 7px; font-size: 12px; }
.ctlbar .sep { width: 1px; height: 18px; background: var(--border); margin: 0 3px; }
.filters .sep { width: 1px; height: 18px; background: var(--border); margin: 0 3px; display: inline-block; }
.filters select { padding: 3px 7px; font-size: 12px; }
/* "obnoveno pred 12 s" se meni kazdou sekundu - fixni sirka, aby neposkakoval zbytek radku */
#freshness { min-width: 190px; font-variant-numeric: tabular-nums; }

/* ===================================================== zpravy */
.newslist { display: grid; gap: 9px; }
.newsitem { background: var(--surface-1); border: 1px solid var(--border); border-radius: 9px;
  padding: 11px 13px; box-shadow: var(--shadow); }
.newsitem a.ttl { font-weight: 600; font-size: 13.5px; color: var(--text-primary);
  display: block; margin-bottom: 4px; line-height: 1.35; }
.newsitem a.ttl:hover { color: var(--series-1); }
.newsitem .sum { font-size: 12.5px; color: var(--text-secondary); margin: 4px 0 7px;
  line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical;
  overflow: hidden; }
.newsitem .nmeta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  font-size: 11.5px; color: var(--text-muted); }
.chip { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 5px;
  background: var(--grid); color: var(--text-secondary); border: 1px solid var(--border); }
.chip.sym { font-weight: 600; font-variant-numeric: tabular-nums; }
a.chip.sym:hover { background: var(--series-1); color: #fff; border-color: var(--series-1); }
.chip.ok { color: var(--good-text); }
.chip.bad { color: var(--critical); }
.chip.dup { color: #9a6700; }

/* ===================================================== sprava watchlistu */
textarea.paste { width: 100%; min-height: 120px; font: 13px/1.5 ui-monospace, monospace;
  color: var(--text-primary); background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 11px; resize: vertical; }
textarea.paste:focus { outline: 2px solid var(--series-1); outline-offset: -1px; }
.hint { font-size: 12px; color: var(--text-muted); margin: 6px 0 0; }
.preview { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; min-height: 24px; }
.btn.danger { color: var(--critical); }
.btn.danger:hover { background: var(--critical); color: #fff; border-color: var(--critical); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.rowact { display: flex; gap: 5px; justify-content: flex-end; }
.okmsg { color: var(--good-text); border: 1px solid var(--good); border-radius: 8px;
  padding: 9px 11px; background: var(--surface-1); font-size: 12.5px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }

/* ===================================================== bublina s vysvetlivkou */
[data-help-t] { cursor: help; }
th[data-help-t] { text-decoration: underline dotted var(--axis) 1px; text-underline-offset: 3px; }
dl.kv > dt[data-help-t], .tile .label[data-help-t] {
  text-decoration: underline dotted var(--axis) 1px; text-underline-offset: 2px;
}
[data-help-t]:focus-visible { outline: 2px solid var(--series-1); outline-offset: 2px; }

.helpbubble {
  position: fixed; z-index: 100; pointer-events: none;
  background: var(--surface-1); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 12px; box-shadow: 0 6px 22px rgba(0, 0, 0, .18);
  font: 12.5px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.helpbubble .hb-t { font-weight: 650; margin-bottom: 3px; font-size: 13px; }
.helpbubble .hb-d { color: var(--text-secondary); }

/* Denni zmena je hlavni cislo karty (vlevo, velke), vynos za zvolene obdobi
   ustupuje do podbarveneho stitku vpravo. Odlisuje je tvar, ne jen velikost -
   drive mela obe skoro stejny stupen a karta tak mela dve souperici cisla. */
.card-period { display: flex; align-items: center; gap: 7px; margin: 3px 0 7px; }
.card-period .hero { font-size: 27px; font-weight: 700; letter-spacing: -.02em;
  line-height: 1.1; font-variant-numeric: tabular-nums; }
.card-period .hero.up { color: var(--good-text); }
.card-period .hero.down { color: var(--critical); }
.card-period .hero .arrow { font-size: 15px; margin-right: 4px; vertical-align: 2px; }
.card-period .hero-lbl { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.card-period .spacer { flex: 1; }
.card-period .side {
  display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap;
  padding: 3px 9px 4px; border-radius: 999px;
  background: var(--div-mid); border: 1px solid transparent;
}
.card-period .side-lbl { font-size: 11px; color: var(--text-muted); }
.card-period .side .delta { font-size: 16px; font-weight: 650; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums; }
.card-period .side .delta .arrow { font-size: 9px; vertical-align: 1px; }
.card-period .side.up { background: var(--good-bg); border-color: var(--good-bg); }
.card-period .side.down { background: var(--bad-bg); border-color: var(--bad-bg); }

.signal-list { display: grid; gap: 6px; margin-top: 8px; }
.signal-row { display: grid; grid-template-columns: 70px 1fr auto; gap: 5px 10px; align-items: center;
  color: var(--text-primary); text-decoration: none; padding: 9px 3px; border-bottom: 1px solid var(--grid); }
.signal-row:hover { background: var(--grid); }
.signal-row small { grid-column: 1 / -1; color: var(--text-muted); line-height: 1.35; }
.signal-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.signal-score.good { color: var(--good-text); } .signal-score.warn { color: var(--warning-text); }
.signal-score.bad { color: var(--critical); }
.signal-alert { display: block; text-decoration: none; color: var(--text-primary); padding: 7px 9px;
  border: 1px solid var(--axis); border-left-width: 5px; background: var(--page); border-radius: 6px;
  font-weight: 550; }
.signal-alert::before { display: inline-block; width: 18px; font-weight: 800; }
.signal-alert.good { border-color: var(--good-text); background: var(--good-bg); }
.signal-alert.good::before { content: '▲'; color: var(--good-text); }
.signal-alert.warn { border-color: var(--warning); background: var(--warn-bg); }
.signal-alert.warn::before { content: '!'; color: var(--warning-text); }
.signal-alert.bad { border-color: var(--critical); background: var(--bad-bg); }
.signal-alert.bad::before { content: '▼'; color: var(--critical); }
.company-profile { margin-top: 12px; padding: 14px 16px; background: var(--surface-1);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.company-profile h3 { margin: 0 0 6px; font-size: 14px; }
.company-profile p { margin: 0 0 7px; line-height: 1.55; color: var(--text-secondary); }

/* pohyb mimo regularni seanci */
.exthours { display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin-top: 12px; padding: 9px 13px; background: var(--surface-1);
  border: 1px solid var(--border); border-radius: 9px; font-size: 13px; }
.exthours .meta { font-size: 11.5px; }

/* export tabulky */
.tblfoot { display: flex; justify-content: flex-end; padding: 5px 2px 0; }
.btn.link { background: none; border: 0; padding: 2px 4px; font-size: 11.5px;
  color: var(--text-muted); text-decoration: underline; cursor: pointer; }
.btn.link:hover { color: var(--series-1); }

/* ===================================================== preklad EN->CS */
/* Tlacitko se zjevi az po najeti na blok (.tr) a jen kdyz prekladac bezi. */
.tr { position: relative; }
.tr-btn {
  display: none;                      /* skryte dokud neni body.tr-on */
  border: 1px solid var(--border); background: var(--surface-1);
  color: var(--text-muted); border-radius: 6px; cursor: pointer;
  font-size: 12px; line-height: 1; padding: 2px 6px; margin-left: 6px;
  vertical-align: middle; opacity: 0; transition: opacity .12s, color .12s, border-color .12s;
}
body.tr-on .tr-btn { display: inline-block; }
.tr:hover .tr-btn, .tr:focus-within .tr-btn,
.tr-btn:focus-visible, .tr-btn:disabled { opacity: 1; }
.tr-btn:hover { color: var(--text-primary); border-color: var(--series-1); }
.tr-btn:disabled { cursor: progress; }

/* --- hlavicka na uzkych obrazovkach -----------------------------------------
   Puvodne se 7 odkazu + stav + 3 tlacitka zalamovaly do 3-4 radku a sticky lista
   pak pri rolovani sezrala znacnou cast viewportu. Tady se navigace drzi v jednom
   radku s vodorovnym scrollem a po odrolovani (trida .scrolled na <html>, dava ji
   initChrome) se titulek se stavem schova, takze zbyde jediny tenky radek. */
@media (max-width: 860px) {
  header.top { gap: 6px 12px; padding: 8px 12px; }
  header.top h1 { font-size: 14px; margin-right: auto; }
  header.top .spacer { display: none; }   /* nema co roztahovat, jen bere misto */
  header.top nav {
    order: 3; width: 100%; flex-wrap: nowrap;
    overflow-x: auto; overscroll-behavior-x: contain;
    gap: 16px; scrollbar-width: none;
  }
  header.top nav::-webkit-scrollbar { height: 0; }
  header.top nav a { white-space: nowrap; }
  header.top #status { font-size: 11px; }

  html.scrolled header.top { padding-top: 5px; padding-bottom: 5px; }
  html.scrolled header.top h1,
  html.scrolled header.top #status { display: none; }
  /* nav se vejde na jeden radek s tlacitky, prebytek se odscrolluje */
  html.scrolled header.top nav { order: 0; width: auto; flex: 1 1 0; min-width: 0; }
  /* vybledla prava hrana = signal, ze nabidka pokracuje */
  header.top nav.overflowing {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
  }
  html.scrolled header.top .btn { padding: 3px 8px; font-size: 12px; }
}

/* Uzivatel, ktery si vypnul animace, nema duvod videt poskakovani hlavicky. */
@media (max-width: 860px) and (prefers-reduced-motion: no-preference) {
  header.top { transition: padding .15s ease; }
}

/* Account actions stay visible without horizontal navigation scrolling. */
[hidden] { display: none !important; }
#account-entry { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
input[type=text], input[type=password] { cursor: text; }
@media (max-width: 860px) { #account-entry { max-width: 185px; } }
