/* ============ PDF do ePUAP — styles ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #faf9f7;
  --panel: #ffffff;
  --line: #e7e2da;
  --ink: #1f2430;
  --dim: #6b7280;
  --crimson: #d4213d;
  --crimson-dark: #a91830;
  --navy: #1f3a5f;
  --green: #15803d;
  --green-bg: #ecfdf3;
  --radius: 20px;
  --shadow: 0 10px 34px rgba(31, 36, 48, 0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background:
    radial-gradient(700px 340px at 92% -5%, #d4213d10, transparent 60%),
    radial-gradient(600px 320px at 0% 12%, #1f3a5f0d, transparent 55%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.wrap { max-width: 880px; margin: 0 auto; padding: clamp(18px, 4vw, 48px); }

/* ---------- hero ---------- */
.hero { text-align: center; padding-top: clamp(6px, 2.5vh, 26px); }
.kicker {
  display: inline-block;
  background: #15803d14;
  border: 1px solid #15803d35;
  color: var(--green);
  padding: 6px 16px; border-radius: 999px;
  font-weight: 500; font-size: 0.82rem;
}
.hero h1 {
  margin-top: 18px;
  font-size: clamp(1.9rem, 5.8vw, 3.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.hero h1 em { font-style: normal; color: var(--crimson); }
.subtitle { margin: 14px auto 0; max-width: 620px; color: var(--dim); font-size: clamp(0.98rem, 2.3vw, 1.12rem); line-height: 1.6; }
.subtitle strong { color: var(--crimson-dark); }

/* ---------- panel & tool ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(20px, 3.4vw, 32px);
}
.tool { margin-top: clamp(26px, 4vh, 42px); }

.dropzone {
  border: 2.5px dashed #cfc6b8;
  border-radius: 16px;
  padding: clamp(28px, 6vw, 48px) 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  background: #fdfcfa;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--crimson); background: #fff6f7; outline: none; }
.dropzone.dragover { border-color: var(--crimson); background: #fff0f2; transform: scale(1.01); }
.dz-icon { font-size: 2.6rem; display: block; }
.dz-main { margin-top: 10px; font-size: 1.12rem; font-weight: 700; }
.dz-link { color: var(--crimson); text-decoration: underline; }
.dz-sub { margin-top: 6px; color: var(--dim); font-size: 0.88rem; }

/* file list */
.file-list { list-style: none; margin-top: 14px; }
.file-item {
  display: flex; align-items: center; gap: 10px;
  background: #fbfaf8;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 0.92rem;
}
.fi-icon { font-size: 1.2rem; }
.fi-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.fi-size { color: var(--dim); font-size: 0.82rem; white-space: nowrap; }
.fi-btn {
  background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 30px; height: 30px; cursor: pointer; font-size: 0.85rem;
  color: var(--dim); transition: all 0.12s ease;
  flex-shrink: 0;
}
.fi-btn:hover:not(:disabled) { color: var(--ink); border-color: var(--dim); }
.fi-btn:disabled { opacity: 0.3; cursor: default; }
.fi-btn.del:hover { color: var(--crimson); border-color: var(--crimson); }

/* options */
.options { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; justify-content: space-between; }
.options[hidden] { display: none; }
.label { display: block; font-size: 0.86rem; font-weight: 500; color: var(--dim); margin-bottom: 7px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-btn {
  font-family: inherit; font-size: 0.88rem; font-weight: 500;
  background: #fbfaf8;
  border: 1px solid var(--line);
  color: var(--dim);
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.active { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }

.btn {
  font-family: inherit; font-weight: 700; font-size: 1.02rem;
  border: none; border-radius: 12px; cursor: pointer;
  padding: 13px 28px;
  transition: transform 0.15s ease, opacity 0.15s ease;
  text-decoration: none; display: inline-block;
}
.btn:active { transform: scale(0.97); }
.btn.go {
  background: var(--crimson); color: #fff;
  box-shadow: 0 8px 24px #d4213d40;
}
.btn.go:hover { opacity: 0.93; transform: translateY(-1px); }
.btn.download {
  background: var(--green); color: #fff;
  box-shadow: 0 8px 24px #15803d40;
  margin-top: 14px;
}
.btn.download:hover { opacity: 0.93; transform: translateY(-1px); }

/* progress */
.progress { margin-top: 20px; }
.prog-bar { height: 14px; background: #f0ece5; border-radius: 999px; overflow: hidden; }
.prog-fill {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--crimson), #ff7a8c);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.prog-text { margin-top: 10px; color: var(--dim); font-size: 0.92rem; text-align: center; }

/* result */
.result { margin-top: 20px; text-align: center; background: var(--green-bg); border: 1px solid #15803d30; border-radius: 16px; padding: 24px; }
.result.warn { background: #fff7ed; border-color: #d9770630; }
.res-head { font-size: 1.3rem; font-weight: 800; }
.res-stats { margin-top: 8px; color: var(--dim); font-size: 0.95rem; line-height: 1.6; }
.res-stats b { color: var(--ink); }
.linklike {
  display: block; margin: 12px auto 0;
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 0.85rem; color: var(--dim);
  text-decoration: underline;
}
.linklike:hover { color: var(--ink); }

/* ---------- steps ---------- */
.steps { margin-top: clamp(46px, 7vh, 76px); }
.steps h2, .privacy h2, .faq h2 {
  text-align: center; font-size: clamp(1.4rem, 3.6vw, 2rem);
  font-weight: 800; margin-bottom: 22px;
}
.step-list { list-style: none; counter-reset: step; max-width: 640px; margin: 0 auto; }
.step-list li {
  counter-increment: step;
  position: relative;
  padding: 14px 0 14px 62px;
  color: var(--dim); line-height: 1.6; font-size: 0.98rem;
}
.step-list li::before {
  content: counter(step);
  position: absolute; left: 0; top: 12px;
  width: 42px; height: 42px;
  background: var(--panel);
  border: 2px solid var(--crimson);
  color: var(--crimson);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem;
}
.step-list strong { color: var(--ink); }
.steps-note {
  max-width: 640px; margin: 14px auto 0;
  background: #fffbea; border: 1px solid #f5e6a8;
  border-radius: 12px; padding: 14px 18px;
  color: #7a6410; font-size: 0.92rem; line-height: 1.6;
}

/* ---------- privacy ---------- */
.privacy { margin-top: clamp(46px, 7vh, 76px); text-align: center; }
.privacy p { color: var(--dim); line-height: 1.7; max-width: 640px; margin: 0 auto; }
.privacy strong { color: var(--ink); }

/* ---------- FAQ ---------- */
.faq { margin-top: clamp(46px, 7vh, 76px); }
.faq details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 16px 20px;
  font-weight: 700; font-size: 0.98rem;
  list-style: none; position: relative; padding-right: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%);
  color: var(--crimson); font-size: 1.3rem;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 20px 18px; color: var(--dim); line-height: 1.65; font-size: 0.93rem; }
.faq strong { color: var(--ink); }

/* ---------- footer / toast ---------- */
.footer {
  margin-top: clamp(46px, 7vh, 76px);
  text-align: center;
  color: var(--dim); font-size: 0.88rem; line-height: 1.8;
  padding-bottom: 30px;
}
.footer .muted { color: #857c6d; }

.toast {
  position: fixed; bottom: 26px; left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--ink); color: #fff;
  padding: 13px 26px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 50;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ==== dodatki SEO/a11y ==== */
.noscript-note { background: #fff3cd; color: #5a4500; padding: 12px 16px; border-radius: 10px; margin: 16px auto; max-width: 720px; font-size: 0.95rem; }
.more-tools { margin-top: 14px; font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; }
.more-tools a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.more-tools a:hover { opacity: 0.75; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto !important; }
}
