/* Návod SmartBox pre Upgates – vzhľad podľa administrácie Upgates (Plus Jakarta Sans, béžové pozadie,
   biele karty, fialová #7052bc, oranžové hlavné tlačidlo #ff8800). */
:root {
  --bg: #f6f2ee;
  --card: #ffffff;
  --ink: #313130;
  --muted: #6f6a64;
  --faint: #9a948d;
  --line: rgba(182, 149, 124, 0.35);
  --line-soft: #efebe6;
  --purple: #7052bc;
  --purple-soft: #f1edfa;
  --orange: #ff8800;
  --green: #1f7a35;
  --green-soft: #e3f4e6;
  --yellow-soft: #fbf0d0;
  --yellow-ink: #664d00;
  --radius: 8px;
  --side: 280px;
  --top: 64px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--purple); }
button { font: inherit; }
svg { flex-shrink: 0; }

/* hlavička */
.top { position: sticky; top: 0; z-index: 30; background: rgba(246, 242, 238, 0.92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line-soft); }
.top-in { max-width: 1320px; margin: 0 auto; height: var(--top); padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand .mark { width: 36px; height: 36px; }
.brand b { display: block; font-size: 17px; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: 12.5px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.langs { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 3px; gap: 2px; }
.langs button { border: 0; background: transparent; padding: 5px 10px; border-radius: 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; }
.langs button.on { background: var(--purple); color: #fff; }
.btn-ghost { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(112, 82, 188, 0.35); color: var(--purple); background: #fff; border-radius: 4px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn-ghost svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.progress { height: 3px; background: transparent; }
.progress i { display: block; height: 100%; width: 0; background: var(--purple); transition: width 0.3s; }

/* rozloženie */
.layout { max-width: 1320px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); gap: 28px; align-items: start; }
.side { position: sticky; top: calc(var(--top) + 20px); background: var(--card); border-radius: var(--radius); padding: 16px 12px 14px; max-height: calc(100vh - var(--top) - 40px); overflow: auto; }
.side-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 8px 10px; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.side-count { font-variant-numeric: tabular-nums; }
#toc { list-style: none; margin: 0; padding: 0; }
#toc a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 13.5px; font-weight: 500; line-height: 1.3; }
#toc a:hover { background: var(--bg); }
#toc a.active { background: var(--purple-soft); color: #4b3592; font-weight: 700; }
#toc .dot { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: #efebe6; color: var(--muted); flex-shrink: 0; }
#toc a.active .dot { background: var(--purple); color: #fff; }
#toc a.done .dot { background: var(--green); color: #fff; }
#toc a.done .dot::after { content: "✓"; }
#toc a.done .dot span { display: none; }
.side-help { margin: 14px 8px 0; padding-top: 14px; border-top: 1px solid var(--line-soft); display: grid; gap: 2px; font-size: 13px; }
.side-help b { font-size: 13px; margin-bottom: 2px; }
.side-help a { text-decoration: none; font-weight: 600; }
.side-help small { color: var(--muted); }

/* obsah */
main { min-width: 0; outline: none; }
.hero { background: var(--card); border-radius: var(--radius); padding: 28px 30px; margin-bottom: 18px; }
.eyebrow { color: var(--purple); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
h1 { font-size: 30px; line-height: 1.2; margin: 6px 0 10px; letter-spacing: -0.01em; }
.hero p { margin: 0; color: #4a4642; max-width: 760px; }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.flow button { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 12px 14px; cursor: pointer; display: grid; gap: 2px; transition: border-color 0.15s, box-shadow 0.15s; }
.flow button:hover { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple); }
.flow .n { width: 26px; height: 26px; border-radius: 50%; background: var(--purple); color: #fff; font-weight: 700; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.flow b { font-size: 14px; }
.flow small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg { width: 16px; height: 16px; fill: none; stroke: var(--purple); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.step { scroll-margin-top: calc(var(--top) + 16px); background: var(--card); border-radius: var(--radius); padding: 26px 30px 28px; margin-bottom: 18px; }
.step-head { display: flex; align-items: flex-start; gap: 14px; }
.step-num { width: 38px; height: 38px; border-radius: 10px; background: var(--purple); color: #fff; font-weight: 800; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step h2 { font-size: 21px; line-height: 1.25; margin: 4px 0 2px; }
.step .where { color: var(--muted); font-size: 13px; }
.step .where b { color: var(--ink); font-weight: 600; }
.step-body { margin-top: 14px; }
.step-body > p { margin: 0 0 12px; max-width: 820px; }
.done-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: 6px 12px 6px 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.done-btn i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); display: inline-block; }
.done-btn[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.done-btn[aria-pressed="true"] i { border-color: var(--green); background: var(--green); box-shadow: inset 0 0 0 3px var(--green-soft); }

ol.how { margin: 4px 0 16px; padding: 0; list-style: none; counter-reset: how; display: grid; gap: 8px; max-width: 820px; }
ol.how li { counter-increment: how; position: relative; padding-left: 36px; }
ol.how li::before { content: counter(how); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 6px; background: var(--bg); color: var(--purple); font-weight: 700; font-size: 12.5px; display: flex; align-items: center; justify-content: center; }
.ui { display: inline-block; padding: 0 6px; border-radius: 4px; background: var(--purple-soft); color: #4b3592; font-weight: 600; font-size: 0.92em; white-space: nowrap; }
.ui.orange { background: #fff1e0; color: #a35400; }

.note { display: flex; gap: 10px; padding: 11px 14px; border-radius: var(--radius); font-size: 14px; margin: 12px 0; max-width: 820px; }
.note svg { width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.note.tip { background: var(--green-soft); color: #1f5a2c; }
.note.warn { background: var(--yellow-soft); color: var(--yellow-ink); }
.note.info { background: var(--purple-soft); color: #3f2c80; }

/* obrázok so značkami */
.shot { margin: 16px 0 6px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.shot.wide { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.shot.wide .legend { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.shot.small .frame { max-width: 520px; }
.frame { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg); cursor: zoom-in; line-height: 0; }
.frame img { width: 100%; height: auto; display: block; }
.frame .hl { position: absolute; border: 2px solid var(--purple); border-radius: 6px; background: rgba(112, 82, 188, 0.08); opacity: 0; transition: opacity 0.15s; pointer-events: none; }
/* číslo stojí vedľa prvku (vľavo, pri okraji obrázka vpravo, pri veľkých oblastiach v ich rohu), aby ho nezakrývalo */
.frame .pin { --t: translate(-50%, -50%); position: absolute; transform: var(--t); width: 26px; height: 26px; border-radius: 50%; background: var(--purple); color: #fff; font: 700 12.5px/26px "Plus Jakarta Sans", sans-serif; text-align: center; box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(0, 0, 0, 0.25); border: 0; padding: 0; cursor: pointer; z-index: 2; transition: transform 0.15s; }
.frame .pin:hover, .frame .pin.on { transform: var(--t) scale(1.15); background: var(--orange); }
.frame.focus .hl.on { opacity: 1; }
.frame .zoom-hint { position: absolute; right: 10px; bottom: 10px; background: rgba(49, 49, 48, 0.78); color: #fff; font: 600 11.5px/1 "Plus Jakarta Sans", sans-serif; padding: 6px 9px; border-radius: 999px; opacity: 0; transition: opacity 0.15s; pointer-events: none; }
.frame:hover .zoom-hint { opacity: 1; }
.cap { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: none; }
.legend li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: default; transition: background 0.15s; }
.legend li:hover, .legend li.on { background: var(--purple-soft); }
.legend .num { width: 24px; height: 24px; border-radius: 50%; background: var(--purple); color: #fff; font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.legend li.on .num { background: var(--orange); }
.legend b { display: block; font-size: 14px; line-height: 1.35; }
.legend span { display: block; color: #57524c; font-size: 13.5px; line-height: 1.5; }

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.pair .shot { grid-template-columns: minmax(0, 1fr); }

/* časté otázky */
.faq { display: grid; gap: 8px; margin-top: 6px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.faq summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--purple); font-weight: 700; font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 16px 14px; color: #4a4642; }
.faq details > div p { margin: 0 0 8px; }

.contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.contact a, .contact div { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); display: grid; gap: 2px; }
.contact small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.contact b { color: var(--purple); }
footer.foot { color: var(--faint); font-size: 12.5px; padding: 6px 4px 30px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* zväčšený obrázok */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(35, 31, 32, 0.86); display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
.lightbox[hidden] { display: none; }
.lb-stage { overflow: auto; padding: 32px; display: flex; align-items: flex-start; justify-content: center; }
.lb-figure { position: relative; width: min(1500px, 100%); line-height: 0; border-radius: var(--radius); overflow: hidden; background: #fff; cursor: zoom-out; }
.lb-figure img { width: 100%; display: block; }
.lb-legend { background: #fff; overflow: auto; padding: 56px 16px 20px; }
.lb-close { position: absolute; right: 14px; top: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--bg); font-size: 24px; line-height: 1; cursor: pointer; z-index: 2; color: var(--ink); }

@media (max-width: 1100px) {
  .shot { grid-template-columns: minmax(0, 1fr); }
  .lightbox { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .lb-legend { max-height: 34vh; padding-top: 16px; }
}
@media (max-width: 900px) {
  :root { --top: 58px; }
  .layout { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 14px; }
  .side { position: static; max-height: none; }
  #toc { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
  #toc a { white-space: nowrap; }
  #toc a .t { display: none; }
  #toc a.active .t { display: inline; }
  .side-help { display: none; }
  .flow, .pair, .contact { grid-template-columns: minmax(0, 1fr); }
  .hero, .step { padding: 20px 18px; }
  h1 { font-size: 24px; }
  .done-btn span { display: none; }
  .top-in { padding: 0 16px; }
  #print span { display: none; }
}

/* tlač = PDF */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  body { background: #fff; font-size: 11pt; }
  .top, .side, .done-btn, .zoom-hint, .lightbox, .flow button::after { display: none !important; }
  .layout { display: block; padding: 0; max-width: none; }
  .hero, .step { padding: 0 0 6mm; margin: 0 0 6mm; border-bottom: 1px solid #ddd; border-radius: 0; break-inside: auto; }
  .step { break-before: page; }
  .shot { grid-template-columns: minmax(0, 1fr); break-inside: avoid; }
  .frame { border: 1px solid #ccc; }
  .frame .pin { box-shadow: 0 0 0 2px #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .legend .num, .step-num, .flow .n, .ui, .note { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .faq details { break-inside: avoid; }
  .faq details > div { display: block !important; }
  a { color: inherit; text-decoration: none; }
}
