:root {
  --demo-bg: #eef8ff;
  --demo-card: #ffffff;
  --demo-text: #14304d;
  --demo-muted: #637f99;
  --demo-primary: #1597e5;
  --demo-primary-dark: #0574bd;
  --demo-line: #cfe7f7;
  --demo-shadow: 0 18px 48px rgba(18, 92, 143, .1);
}

#changes,
#download,
#pdf-preview {
  scroll-margin-top: 92px;
}

.demo-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 18%, rgba(53, 183, 255, .24), transparent 25rem),
    linear-gradient(135deg, #f7fcff, var(--demo-bg));
}

.demo-hero::after {
  content: "ЕГЭ";
  position: absolute;
  right: max(20px, calc((100vw - 1120px) / 2));
  bottom: -54px;
  color: rgba(21, 151, 229, .065);
  font-size: clamp(130px, 24vw, 280px);
  font-weight: 950;
  letter-spacing: -.09em;
  line-height: 1;
  pointer-events: none;
}

.demo-hero .container {
  position: relative;
  z-index: 1;
}

.demo-hero h1 {
  max-width: 980px;
  font-size: clamp(42px, 6vw, 68px);
}

.demo-hero .btn {
  transition: transform .18s ease, box-shadow .18s ease;
}

.demo-hero .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(18, 92, 143, .13);
}

.demo-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 36px;
}

.demo-stat {
  padding: 22px;
  border: 1px solid var(--demo-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--demo-shadow);
}

.demo-stat-value {
  display: block;
  margin-bottom: 5px;
  color: var(--demo-primary-dark);
  font-size: 31px;
  font-weight: 950;
  letter-spacing: -.04em;
}

.demo-stat-label {
  color: var(--demo-muted);
  font-size: 14px;
  line-height: 1.45;
}

.demo-table-wrap {
  overflow: hidden;
  border: 1px solid var(--demo-line);
  border-radius: 24px;
  background: var(--demo-card);
  box-shadow: var(--demo-shadow);
}

.demo-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.demo-table th,
.demo-table td {
  padding: 20px 22px;
  border-bottom: 1px solid var(--demo-line);
  vertical-align: top;
  line-height: 1.55;
}

.demo-table thead th {
  color: #496b87;
  background: #e8f6ff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.demo-table tbody tr:last-child th,
.demo-table tbody tr:last-child td {
  border-bottom: 0;
}

.demo-table tbody td {
  color: var(--demo-muted);
}

.demo-table tbody td strong {
  color: var(--demo-text);
}

.demo-number {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--demo-primary), var(--demo-primary-dark));
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 9px 22px rgba(5, 116, 189, .2);
}

.demo-note {
  margin: 18px 0 0;
  padding: 18px 20px;
  border-left: 4px solid var(--demo-primary);
  border-radius: 0 16px 16px 0;
  color: var(--demo-muted);
  background: rgba(255, 255, 255, .72);
  line-height: 1.65;
}

.demo-note strong {
  color: var(--demo-text);
}

.demo-graph-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.demo-graph-card {
  padding: 24px;
  border: 1px solid var(--demo-line);
  border-radius: 22px;
  background: var(--demo-card);
  box-shadow: var(--demo-shadow);
}

.demo-graph-step {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  border-radius: 12px;
  color: var(--demo-primary-dark);
  background: #dff3ff;
  font-weight: 950;
}

.demo-graph-card h3 {
  margin: 0 0 9px;
  font-size: 20px;
}

.demo-graph-card p {
  margin: 0;
  color: var(--demo-muted);
  line-height: 1.65;
}

.demo-graph-card code {
  padding: 2px 6px;
  border-radius: 7px;
  color: var(--demo-primary-dark);
  background: #e8f6ff;
  font: 800 14px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.demo-download {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(270px, .75fr);
  gap: 16px;
  align-items: stretch;
}

.demo-download-card,
.demo-facts {
  padding: 26px;
  border: 1px solid var(--demo-line);
  border-radius: 22px;
  background: var(--demo-card);
  box-shadow: var(--demo-shadow);
}

.demo-file {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.demo-file-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 56px;
  height: 64px;
  border: 1px solid #bce2f7;
  border-radius: 15px;
  color: var(--demo-primary-dark);
  background: #e8f7ff;
  font-size: 13px;
  font-weight: 950;
}

.demo-file h3 {
  margin: 0 0 5px;
  font-size: 20px;
}

.demo-file p {
  margin: 0;
  color: var(--demo-muted);
  font-size: 14px;
}

.demo-download-card .actions {
  margin-top: 0;
}

.demo-source {
  margin: 18px 0 0;
  color: var(--demo-muted);
  font-size: 13px;
  line-height: 1.6;
}

.demo-source a,
.demo-inline-link {
  color: var(--demo-primary-dark);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: rgba(5, 116, 189, .35);
  text-underline-offset: 3px;
}

.demo-facts h3 {
  margin: 0 0 14px;
  font-size: 20px;
}

.demo-facts ul {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-facts li {
  position: relative;
  padding-left: 22px;
  color: var(--demo-muted);
  line-height: 1.55;
}

.demo-facts li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--demo-primary);
  font-weight: 950;
}

.demo-pdf {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--demo-line);
  border-radius: 22px;
  background: #dceefa;
  box-shadow: var(--demo-shadow);
}

.demo-pdf iframe {
  display: block;
  width: 100%;
  min-height: 820px;
  border: 0;
  background: #eef8ff;
}

.demo-pdf-fallback {
  padding: 14px 20px;
  color: var(--demo-muted);
  font-size: 14px;
  text-align: center;
}

.demo-faq {
  display: grid;
  gap: 10px;
  max-width: 900px;
}

.demo-faq details {
  border: 1px solid var(--demo-line);
  border-radius: 16px;
  background: #fff;
}

.demo-faq summary {
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 850;
  list-style-position: inside;
}

.demo-faq details[open] summary {
  color: var(--demo-primary-dark);
}

.demo-faq p {
  margin: 0;
  padding: 0 20px 18px 41px;
  color: var(--demo-muted);
  line-height: 1.65;
}

.demo-cta-title {
  margin: 0;
  font-size: 32px;
}

@media (max-width: 820px) {
  .demo-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .demo-graph-grid,
  .demo-download {
    grid-template-columns: 1fr;
  }

  .demo-pdf iframe {
    min-height: 640px;
  }
}

@media (max-width: 640px) {
  .demo-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .demo-table,
  .demo-table tbody,
  .demo-table tr,
  .demo-table th,
  .demo-table td {
    display: block;
    width: 100%;
  }

  .demo-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .demo-table tbody tr {
    margin-bottom: 14px;
    padding: 20px;
    border: 1px solid var(--demo-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--demo-shadow);
  }

  .demo-table tbody th,
  .demo-table tbody td {
    padding: 0;
    border: 0;
  }

  .demo-table tbody th {
    margin-bottom: 16px;
  }

  .demo-table tbody td + td {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--demo-line);
  }

  .demo-table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: #496b87;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
}

@media (max-width: 520px) {
  .demo-hero h1 {
    font-size: 40px;
  }

  .demo-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .demo-stat,
  .demo-graph-card,
  .demo-download-card,
  .demo-facts {
    padding: 20px;
  }

  .demo-stat-value {
    font-size: 27px;
  }

  .demo-file {
    align-items: flex-start;
  }

  .demo-pdf iframe {
    min-height: 500px;
  }

  .demo-cta-title {
    font-size: 27px;
  }
}
