:root {
  --bg: #f7f9fb;
  --surface: #ffffff;
  --surface-2: #f3f6fa;
  --text: #17243a;
  --muted: #607089;
  --border: #dce4ec;
  --brand: #155eef;
  --brand-2: #1146b8;
  --accent: #087f8c;
  --warn: #b75b12;
  --danger: #b42318;
  --ring: 0 0 0 3px rgba(21, 94, 239, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

a:focus,
button:focus,
textarea:focus,
input:focus {
  outline: none;
  box-shadow: var(--ring);
}

.hero {
  position: relative;
  overflow: hidden;
  width: min(1180px, calc(100% - 48px));
  margin: 32px auto 0;
  border: 1px solid #f0c2be;
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff 20%, #fff2f1 100%);
  color: #17243a;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  display: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  max-width: none;
  margin: 0;
  padding: clamp(24px, 4vw, 42px);
}

.hero-copy h1 {
  margin: 10px 0 12px;
  font-size: clamp(2rem, 4vw, 4.1rem);
  line-height: 1.02;
  max-width: 820px;
}

.hero-copy p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--danger);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.button--secondary,
.button--ghost {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
}

.hero .button--secondary {
  border-color: var(--border);
  background: #ffffff;
  color: var(--text);
}

.button--ghost {
  min-height: 40px;
  padding: 9px 12px;
  box-shadow: none;
}

.urgent-note {
  max-width: 620px;
  padding: 18px 20px;
  border: 0;
  border-radius: 14px;
  background: var(--danger);
  color: #ffffff;
}

.urgent-note strong {
  display: block;
  margin-bottom: 6px;
}

.urgent-note p {
  margin: 0;
  color: #ffffff;
  line-height: 1.6;
}

.principle-note {
  margin-top: 12px !important;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .25);
  color: #ffffff !important;
  font-weight: 800;
}

.urgent-note__link {
  display: inline-flex;
  margin-top: 14px;
  color: #ffffff;
  font-weight: 800;
  text-underline-offset: 3px;
}

.urgent-note__link:hover {
  color: #ffffff;
  opacity: .82;
}

.alert {
  max-width: 1180px;
  margin: 16px auto;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.12);
}

.alert--bad {
  border-color: rgba(251, 113, 133, 0.42);
  background: rgba(251, 113, 133, 0.12);
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px;
}

.section--soft {
  max-width: none;
  margin: 0;
  padding: 56px max(24px, calc(50vw - 590px));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading--with-action {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h2 {
  margin: 8px 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.08;
}

.section-heading p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.incident-tabs {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.incident-tab {
  display: flex;
  min-height: 74px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.incident-tab small {
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.incident-tab span {
  font-weight: 800;
  line-height: 1.3;
}

.incident-tab:hover,
.incident-tab.is-active {
  border-color: rgba(21, 94, 239, 0.34);
  background: #eaf1ff;
}

.incident-panel {
  padding: 24px 0 4px;
  border-top: 1px solid var(--border);
}

.incident-panel[hidden] {
  display: none;
}

.incident-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.incident-header h3 {
  margin: 8px 0 8px;
  font-size: clamp(1.45rem, 2.6vw, 2.2rem);
}

.incident-header p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.steps-layout {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 14px;
}

.step-group {
  padding: 18px;
  border: 1px solid var(--border);
  border-left: 5px solid var(--brand);
  border-radius: 12px;
  background: #ffffff;
}

.step-group--now {
  border-left-color: var(--warn);
  background: #fff7e8;
}

.step-group h4,
.prepare-box h4 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.step-group ol,
.prepare-box ul,
.cheatsheet ol,
.remember ul {
  margin: 0;
  padding-left: 1.2rem;
}

.step-group li,
.prepare-box li,
.cheatsheet li,
.remember li {
  margin: 8px 0;
  line-height: 1.55;
}

.prepare-box {
  margin-top: 14px;
  padding: 18px;
  border: 1px dashed rgba(8, 127, 140, 0.46);
  border-radius: 12px;
  background: #eaf7f5;
}

.info-blocks {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.info-block {
  padding: 18px;
  border: 1px solid rgba(21, 94, 239, 0.22);
  border-radius: 12px;
  background: #eaf1ff;
}

.info-block h4,
.fraud-card h4 {
  margin: 0 0 8px;
}

.info-block p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
}

.info-block ul,
.fraud-card ul {
  margin: 0;
  padding-left: 1.2rem;
}

.info-block li,
.fraud-card li {
  margin: 7px 0;
  line-height: 1.5;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.related-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(21, 94, 239, 0.32);
  color: var(--text);
  text-decoration: none;
}

.related-link:hover {
  background: #eaf1ff;
}

.fraud-section {
  border-top: 1px solid var(--border);
}

.fraud-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 16px;
}

.fraud-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
}

.fraud-badge {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eaf1ff;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fraud-card h3 {
  margin: 0 0 8px;
  font-size: 1.22rem;
}

.fraud-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

.fraud-columns {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 14px;
}

.cheatsheet-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 16px;
}

.cheatsheet {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.cheatsheet-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.sheet-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: rgba(74, 222, 128, 0.14);
  color: var(--accent);
}

.cheatsheet h3,
.contact-item h3 {
  margin: 0 0 6px;
}

.cheatsheet p,
.contact-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.remember {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.remember strong {
  display: block;
  margin-bottom: 8px;
}

.cheatsheet-source {
  display: none;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.cheatsheet-source a {
  color: var(--text);
  font-weight: 800;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 14px;
}

.contact-item {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
}

.contact-item > span {
  color: var(--brand);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 28px 0 34px;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer a {
  color: var(--muted);
}

.back-to-top {
  position: fixed;
  right: max(10px, calc((100vw - 1120px) / 2 - 64px));
  bottom: 18px;
  z-index: 30;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(21, 94, 239, 0.38);
  border-radius: 999px;
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(2, 8, 23, 0.28);
  opacity: 0;
  pointer-events: none;
  text-decoration: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  box-shadow: 0 18px 38px rgba(21, 94, 239, 0.24);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
}

@media (min-width: 720px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    align-items: end;
  }

  .incident-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps-layout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cheatsheet-grid,
  .contact-grid,
  .info-blocks,
  .fraud-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hero { width: min(100% - 24px, 1180px); margin-top: 18px; }
}

@media (min-width: 1040px) {
  .incident-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fraud-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .incident-header,
  .section-heading--with-action {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .back-to-top {
    right: 8px;
    bottom: 14px;
  }
}

@media print {
  @page {
    margin: 10mm;
  }

  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --text: #111827;
    --muted: #374151;
    --border: #cbd5e1;
  }

  body {
    background: #ffffff;
    font-size: 10.5pt;
    line-height: 1.35;
  }

  .public-header,
  .hero-actions,
  .button,
  .related-links,
  .back-to-top,
  .public-footer {
    display: none !important;
  }

  body.print-incidents #typy-podvodu,
  body.print-incidents #tahaky,
  body.print-incidents .hero,
  body.print-cheatsheets #postupy,
  body.print-cheatsheets #typy-podvodu,
  body.print-cheatsheets #kontakty,
  body.print-cheatsheets .hero {
    display: none !important;
  }

  .hero__inner {
    padding: 0 0 10px;
  }

  .hero-copy h1,
  .section-heading h2 {
    font-size: 18pt;
    margin: 4px 0 6px;
  }

  .hero-copy p,
  .section-heading p,
  .incident-header p,
  .cheatsheet p,
  .contact-item p,
  .info-block p {
    line-height: 1.35;
  }

  .section-heading {
    margin-bottom: 8px;
  }

  .incident-tabs {
    display: none;
  }

  .incident-panel[hidden] {
    display: block;
  }

  .incident-panel {
    padding: 10px 0;
    break-inside: avoid;
  }

  .incident-header {
    margin-bottom: 8px;
  }

  .incident-header h3 {
    font-size: 14pt;
    margin: 2px 0 4px;
  }

  .steps-layout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .cheatsheet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .contact-grid,
  .info-blocks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .incident-panel,
  .cheatsheet,
  .contact-item,
  .step-group,
  .prepare-box,
  .info-block,
  .urgent-note {
    break-inside: avoid;
    box-shadow: none;
  }

  .step-group,
  .prepare-box,
  .info-block,
  .cheatsheet,
  .contact-item,
  .urgent-note {
    padding: 7px;
  }

  .step-group {
    border-left-width: 3px;
  }

  .step-group h4,
  .prepare-box h4,
  .info-block h4,
  .cheatsheet h3,
  .contact-item h3 {
    margin: 0 0 4px;
    font-size: 10.5pt;
  }

  .cheatsheet-head {
    gap: 7px;
    margin-bottom: 6px;
  }

  .sheet-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .step-group li,
  .prepare-box li,
  .info-block li,
  .cheatsheet li,
  .remember li {
    margin: 2px 0;
    line-height: 1.32;
  }

  .cheatsheet-source {
    display: block;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #cbd5e1;
    color: #111827;
    font-size: 9.5pt;
    break-inside: avoid;
  }

  .cheatsheet-source a {
    color: #111827;
    text-decoration: none;
  }

  .remember {
    margin-top: 7px;
    padding-top: 6px;
  }

  .section,
  .section--soft {
    margin: 0;
    padding: 8px 0;
    border: 0;
    background: #ffffff;
  }
}
