:root {
  --ink: #0b2545;
  --text: #1f2937;
  --muted: #64748b;
  --blue: #2563eb;
  --green: #11845b;
  --aqua: #0ea5a4;
  --gold: #f5b041;
  --line: #d8e0ea;
  --paper: #ffffff;
  --soft: #f5f8fc;
  --night: #071a33;
  --panel: rgba(255, 255, 255, 0.88);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Cambria, Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at 0 0, rgba(37, 99, 235, 0.18), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(17, 132, 91, 0.14), transparent 32%),
    linear-gradient(180deg, #f8fbff 0%, #e7edf6 100%);
}

a,
button {
  font: inherit;
}

.mobile-reader {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  padding: 10px;
}

.topbar,
.bottom-controls {
  width: min(520px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(216, 224, 234, 0.9);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 36px rgba(11, 37, 69, 0.10);
}

.topbar {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-symbol {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.42);
}

.brand strong {
  color: var(--ink);
  font-size: clamp(22px, 6vw, 30px);
  line-height: 1;
  white-space: nowrap;
}

.download-actions {
  display: flex;
  gap: 7px;
}

.download-actions a,
.bottom-controls button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.download-actions a {
  min-width: 52px;
  padding: 0 11px;
  font-size: 12px;
}

.viewport {
  width: min(520px, 100%);
  min-height: 0;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.mobile-page {
  width: 100%;
  height: calc(100dvh - 150px);
  min-height: 610px;
  max-height: 820px;
  overflow: hidden;
  border: 1px solid rgba(216, 224, 234, 0.95);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(11, 37, 69, 0.18);
}

.mobile-page.is-changing {
  pointer-events: none;
}

#pageContent {
  height: 100%;
  overflow: auto;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 260ms ease,
    transform 340ms cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-page.is-changing #pageContent {
  opacity: 0;
  transform: translateY(12px) scale(0.992);
}

.page-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(18px, 5vw, 28px);
  position: relative;
  overflow: hidden;
}

.page-inner::before {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -74px;
  top: -78px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.10);
}

.theme-dark {
  color: #eaf2ff;
  background:
    radial-gradient(circle at top right, rgba(14, 165, 164, 0.36), transparent 42%),
    linear-gradient(160deg, #06162c 0%, #0b2545 100%);
}

.theme-dark h1,
.theme-dark .lead,
.theme-dark .kicker {
  color: #ffffff;
}

.theme-dark .point-card {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
}

.theme-dark .point-card strong,
.theme-dark .point-card span {
  color: #ffffff;
}

.theme-cover,
.theme-analytics {
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 56%, #edf5ff 100%);
}

.theme-device {
  background:
    radial-gradient(circle at 80% 8%, rgba(17, 132, 91, 0.16), transparent 32%),
    #ffffff;
}

.theme-security {
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 62%, #f4f7fb 100%);
}

.theme-close {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 36%),
    radial-gradient(circle at bottom left, rgba(17, 132, 91, 0.14), transparent 38%),
    #ffffff;
}

.kicker {
  margin: 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 9.5vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.lead {
  margin: 0;
  color: var(--text);
  font-size: clamp(16px, 4.4vw, 21px);
  line-height: 1.28;
  position: relative;
  z-index: 1;
}

.visual-frame {
  margin: 2px 0 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(11, 37, 69, 0.10);
  position: relative;
  z-index: 1;
}

.visual-frame img {
  width: 100%;
  display: block;
  border-radius: 14px;
}

.visual-frame figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  font-style: italic;
}

.phone-frame {
  width: min(250px, 68%);
  margin-left: auto;
  margin-right: auto;
  padding: 14px;
  border-radius: 34px;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
}

.phone-frame img {
  border-radius: 24px;
}

.metric-grid,
.point-stack,
.timeline,
.report-list {
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.metric-grid {
  grid-template-columns: 1fr 1fr;
}

.metric,
.point-card,
.timeline-item,
.report-card,
.contact-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.metric,
.point-card,
.report-card {
  padding: 13px;
}

.metric strong,
.point-card strong,
.timeline-item strong,
.report-card strong,
.contact-panel strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.16;
}

.metric span,
.point-card span,
.timeline-item span:not(.step-number),
.report-card span,
.contact-panel span {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
}

.timeline {
  margin-top: 3px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 11px;
  align-items: center;
  padding: 12px;
  justify-items: center;
}

.timeline-item > div {
  justify-self: stretch;
}

.timeline-item .step-number {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--green));
  font-weight: 900;
  font-size: 25.2px;
  line-height: 42px;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  margin: 0;
  padding: 0;
  flex: 0 0 42px;
}

.report-card {
  border-left: 5px solid var(--blue);
}

.contact-panel {
  margin-top: auto;
  padding: 16px;
  border-color: rgba(17, 132, 91, 0.55);
  background: #e8f7f1;
  position: relative;
  z-index: 1;
}

.contact-panel small {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.bottom-controls {
  display: grid;
  grid-template-columns: 92px 1fr 92px;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border-radius: 22px;
}

.bottom-controls button {
  padding: 0 10px;
  font-size: 12px;
  cursor: pointer;
}

.bottom-controls button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.progress {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce5f2;
}

.track span {
  display: block;
  width: 10%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 220ms ease;
}

@media (max-width: 390px) {
  .mobile-reader {
    padding: 8px;
    gap: 8px;
  }

  .topbar,
  .bottom-controls {
    border-radius: 18px;
  }

  .download-actions a {
    min-width: 47px;
    padding: 0 8px;
  }

  .mobile-page {
    height: calc(100dvh - 140px);
    min-height: 560px;
    border-radius: 24px;
  }

  .page-inner {
    padding: 18px;
    gap: 11px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .bottom-controls {
    grid-template-columns: 80px 1fr 80px;
  }

  .bottom-controls button {
    font-size: 11px;
    padding: 0 7px;
  }
}
