/* Proekto site. Tokens follow the Mini App (web/src/styles.css). */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD, U+20BD;
}

:root {
  --primary: #3b82f6;
  --primary-strong: #2563eb;
  --brand-deep: #1e3a8a;
  --tint: #e8f3ff;
  --tint-2: #f0f7ff;
  --bg: #f5f9ff;
  --surface: #ffffff;
  --text: #1e2a44;
  --text-2: #64748b;
  --border: #e2e8f0;
  --spark: #fbbf24;
  --success: #22c55e;

  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-sm: 0 2px 8px rgba(30, 58, 138, 0.06);
  --shadow-md: 0 10px 30px rgba(30, 58, 138, 0.1);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  --gutter: 16px;
  --space: clamp(48px, 7vw, 88px);

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
  hyphens: none;
}

h1 {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 800;
}

h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 750;
}

h3 {
  font-size: 19px;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--primary-strong);
  text-underline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
}

.icon {
  flex: none;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }
}

/* Header */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.top__in {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.logo {
  display: flex;
}

.top__nav {
  display: none;
  gap: 28px;
  margin-left: auto;
}

.top__nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 550;
}

.top__nav a:hover,
.top__nav a[aria-current] {
  color: var(--primary-strong);
}

.top .btn {
  margin-left: auto;
}

@media (min-width: 900px) {
  .top__nav {
    display: flex;
  }

  .top .btn {
    margin-left: 0;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border-radius: var(--r-md);
  background: var(--primary);
  color: #fff;
  font-weight: 650;
  font-size: 17px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
  transition:
    background 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.btn:hover {
  background: var(--primary-strong);
  transform: translateY(-1px);
}

.btn--sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 15px;
  border-radius: 12px;
  box-shadow: none;
}

.cta {
  margin-top: 28px;
}

.cta__note {
  max-width: 44ch;
  margin: 12px 0 0;
  color: var(--text-2);
  font-size: 15px;
}

/* Sections */

.section {
  padding-block: calc(var(--space) / 2);
}

.section--tint {
  margin-block: calc(var(--space) / 2);
  padding-block: var(--space);
  background: linear-gradient(180deg, var(--tint-2), var(--tint));
}

.section__lead {
  max-width: 62ch;
  color: var(--text-2);
}

.lead {
  max-width: 58ch;
  font-size: clamp(18px, 2vw, 20px);
  color: var(--text-2);
}

.page-head {
  padding-top: 16px;
}

.page-head h1 {
  max-width: 22ch;
}

.more {
  margin-top: 24px;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--brand-deep);
  font-size: 14px;
  font-weight: 600;
}

/* Hero: text on the left in the lower part, the illustration overlaps the edge on the right */

.hero {
  overflow: hidden;
  background:
    radial-gradient(60% 80% at 85% 30%, #dbeafe 0%, transparent 70%),
    var(--bg);
}

.hero__in {
  display: grid;
  gap: 24px;
  padding-block: 32px 48px;
}

.hero h1 {
  margin-top: 16px;
  font-size: clamp(32px, 4.6vw, 56px);
}

.hero__price {
  margin: 0;
  font-size: 22px;
  font-weight: 750;
}

.hero__art {
  position: relative;
  max-width: 420px;
  justify-self: center;
}

.hero__cloud {
  position: absolute;
  inset: auto -10% -6% -20%;
  width: 130%;
  opacity: 0.9;
}

.hero__boy {
  position: relative;
  display: block;
}

@media (min-width: 900px) {
  .hero__in {
    grid-template-columns: 13fr 7fr;
    align-items: end;
    min-height: 600px;
    padding-block: 48px 72px;
  }

  .hero__art {
    max-width: none;
    margin-right: -12%;
  }
}

/* Grids and cards */

.grid4 {
  display: grid;
  gap: 16px;
}

@media (min-width: 640px) {
  .grid4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .grid4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature {
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.feature .icon {
  color: var(--primary);
  margin-bottom: 12px;
}

.feature p {
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
}

.feature--accent {
  background: var(--brand-deep);
  color: #fff;
}

.feature--accent h3,
.feature--accent .icon {
  color: #fff;
}

.feature--accent p {
  color: #c7d7fe;
}

.split {
  display: grid;
  gap: 32px;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 7fr 5fr;
    gap: 56px;
    align-items: start;
  }

  .split--even {
    grid-template-columns: 1fr 1fr;
  }
}

.split > div > p,
.prose p,
.prose li {
  max-width: 62ch;
}

.prose ol,
.prose ul {
  padding-left: 1.3em;
  margin: 0 0 1.2em;
}

.prose li {
  margin-bottom: 6px;
}

.prose h2 {
  margin-top: 1.2em;
  font-size: clamp(22px, 2.6vw, 28px);
}

.prose h2:first-child {
  margin-top: 0;
}

.note {
  padding: 28px;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.note h3:not(:first-child) {
  margin-top: 20px;
}

.note p {
  font-size: 15px;
  color: var(--text-2);
}

.note__small {
  margin: 16px 0 0;
  font-size: 14px !important;
}

@media (min-width: 900px) {
  aside.note {
    position: sticky;
    top: 88px;
  }
}

.check {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  gap: 12px;
}

.check li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.check .icon {
  margin-top: 4px;
  padding: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
}

/* Products */

.pcards {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.pcards--wide {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.pcard {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  text-decoration: none;
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.pcard:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pcard span:not(.pcard__icon) {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.4;
}

.pcard small {
  margin-top: auto;
  padding-top: 8px;
  color: var(--primary-strong);
  font-weight: 600;
}

.pcard__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: var(--tint);
  color: var(--primary);
}

.pcard--big {
  padding: 24px;
}

/* Steps */

.steps {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 16px;
  counter-reset: none;
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.steps li {
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.steps p {
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
}

.steps__n {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

/* Topics */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 24px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 550;
  text-decoration: none;
}

.chip .icon {
  color: var(--primary);
}

.chip small {
  color: var(--text-2);
  font-weight: 500;
}

.chip:hover {
  border-color: var(--primary);
}

.tcards {
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .tcards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .tcards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tcard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
  color: var(--text);
  text-decoration: none;
}

.tcard:hover {
  border-color: var(--primary);
}

.tcard b {
  font-size: 17px;
  line-height: 1.3;
}

.tcard span {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.45;
}

.tcard .tcard__sub {
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

h2 a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

h2 a .icon {
  color: var(--primary);
}

.ideas li {
  margin-bottom: 8px;
}

.rows {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  gap: 8px;
}

.rows li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 14px 20px;
  border-radius: var(--r-md);
  background: var(--surface);
}

.rows a {
  font-weight: 600;
}

.rows span {
  color: var(--text-2);
  font-size: 15px;
}

/* Tariffs */

.tariffs {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .tariffs {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tariff {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.tariff:nth-child(2) {
  outline: 2px solid var(--primary);
}

.tariff h3 {
  margin: 0;
  color: var(--text-2);
  font-size: 16px;
  font-weight: 600;
}

.tariff .tariff__price {
  margin: 4px 0 16px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tariff__product {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.tariff__product .icon {
  margin-top: 3px;
  color: var(--primary);
}

.tariff p {
  font-size: 15px;
}

.tariff__level {
  margin: auto 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text-2);
}

/* FAQ */

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

.faq details {
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary .icon {
  color: var(--text-2);
  transition: transform 0.2s var(--ease);
}

.faq details[open] summary .icon {
  transform: rotate(90deg);
}

.faq details p {
  margin: 0;
  padding: 0 22px 20px;
  max-width: 70ch;
  color: var(--text-2);
}

.final h2 {
  max-width: 18ch;
}

/* Breadcrumbs */

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  padding: 20px 0 0;
  margin: 0;
  font-size: 14px;
  color: var(--text-2);
}

.crumbs li + li::before {
  content: "/";
  margin-right: 4px;
  color: var(--border);
}

.crumbs a {
  color: var(--text-2);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--primary-strong);
}

/* Footer */

.foot {
  margin-top: var(--space);
  padding-block: 48px 32px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 15px;
}

.foot__grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 720px) {
  .foot__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .foot__grid {
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
  }
}

.foot h2 {
  margin-bottom: 12px;
  font-size: 15px;
  color: var(--text-2);
}

.foot ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.foot a {
  color: var(--text);
  text-decoration: none;
}

.foot a:hover {
  color: var(--primary-strong);
}

.foot__about {
  margin-top: 12px;
  color: var(--text-2);
  max-width: 34ch;
}

.foot__legal {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
}

.foot__legal p {
  margin: 0 0 4px;
}

/* Cookie banner: only on a build with Yandex Metrika (--metrika) */

button.btn {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.btn--ghost {
  background: var(--tint);
  color: var(--brand-deep);
}

.btn--ghost:hover {
  background: var(--tint-2);
}

.cookies {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  font-size: 15px;
}

.cookies[hidden] {
  display: none;
}

.cookies p {
  margin: 0 0 14px;
}

.cookies__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.foot__link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* Screens of the Mini App example (task 010: D2, C4, M2). Images of one row get about the same
   height: flex-grow follows the aspect ratio (wide 16:10, page A4, phone screen). */

.shots {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  margin-top: 24px;
}

.shot {
  flex: 16 1 0;
  min-width: 0;
  margin: 0;
}

.shot--page {
  flex-grow: 7;
}

.shot--tall {
  flex-grow: 4.6;
  max-width: 280px;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.shot figcaption {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.45;
  text-wrap: pretty;
}

.shots--topic {
  display: block;
  max-width: 640px;
  margin: 24px 0;
}

.shots__head {
  margin: 28px 0 0;
}

.shots__note {
  max-width: 75ch;
  margin: 16px 0 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.5;
  text-wrap: pretty;
}

.shots--topic .shots__note {
  margin: 0 0 12px;
}

@media (max-width: 600px) {
  .shot {
    flex-basis: 100%;
  }

  .shot--page,
  .shot--tall {
    flex: 1 1 40%;
    max-width: calc(50% - 10px);
  }
}

/* Telegram at school (task 010: C5) */

.tgwarn {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 24px 0;
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.tgwarn .icon {
  flex: none;
  margin-top: 2px;
  color: var(--spark);
}

.tgwarn p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  text-wrap: pretty;
}

/* Trust and payment (task 011: P5, M6, S5, C1) */

.tcard .tcard__price {
  margin-top: auto;
  padding-top: 6px;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

.paysafe {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 24px 0 0;
  padding: 20px 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.paysafe > .icon {
  margin-top: 2px;
  color: var(--success);
}

.paysafe h3 {
  margin: 0 0 6px;
}

.paysafe p {
  max-width: 75ch;
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-2);
  text-wrap: pretty;
}

.paysafe p:last-child {
  margin: 0;
  font-weight: 600;
}

.cmp {
  margin-top: 24px;
}

.cmp table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  font-size: 15px;
  line-height: 1.45;
}

.cmp th,
.cmp td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  text-wrap: pretty;
}

.cmp thead th {
  background: var(--tint-2);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}

.cmp tbody th {
  font-weight: 650;
  white-space: nowrap;
}

.cmp tbody tr:last-child > * {
  border-bottom: 0;
}

.cmp .cmp__us > * {
  background: var(--tint);
}

.cmp .cmp__us th {
  color: var(--brand-deep);
}

@media (max-width: 760px) {
  .cmp table,
  .cmp tbody,
  .cmp tr,
  .cmp th,
  .cmp td {
    display: block;
  }

  .cmp table {
    background: none;
    box-shadow: none;
    overflow: visible;
  }

  .cmp thead {
    display: none;
  }

  .cmp tr {
    margin-bottom: 12px;
    padding: 6px 0;
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
  }

  .cmp .cmp__us {
    background: var(--tint);
  }

  .cmp .cmp__us > * {
    background: none;
  }

  .cmp th,
  .cmp td {
    padding: 8px 18px;
    border: 0;
  }

  .cmp tbody th {
    font-size: 17px;
  }

  .cmp td::before {
    content: attr(data-label);
    display: block;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
  }
}

.ask {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 20px 0 0;
  font-size: 15px;
  color: var(--text-2);
}

.ask .icon {
  margin-top: 2px;
  color: var(--primary);
}

/* Task 018: products on topic cards (P1), topic groups on grade pages (G2) */

.tcard .tcard__made {
  margin-top: auto;
  padding-top: 6px;
  color: var(--primary-strong);
  font-size: 14px;
  font-weight: 550;
  line-height: 1.4;
}

.tcard .tcard__made + .tcard__price {
  margin-top: 0;
  padding-top: 2px;
}

.tgroup {
  margin: 32px 0 14px;
}

h2 + .tgroup {
  margin-top: 8px;
}
