/* Личный сайт — та же палитра, что у платформы:
   brick / navy / cream, Merriweather + Open Sans. */

:root {
  --brick: #B83A4B;
  --brick-d: #933040;
  --navy: #3D5A80;
  --navy-d: #2c4566;
  --cream: #FFF8F0;
  --paper: #FFFDFB;
  --ink: #27292e;
  --muted: #6b7178;
  --line: #ece3d8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Open Sans", system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.65;
}

h1, h2, h3 { font-family: Merriweather, Georgia, serif; line-height: 1.2; margin: 0; }
a { color: var(--brick); }
a:hover { color: var(--brick-d); }

/* ── Каркас: кремовая только шапка и подвал, середина — белая ── */

.topbar {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 14px 24px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand {
  font-family: Merriweather, Georgia, serif; font-weight: 900; font-size: 18px;
  color: var(--ink); text-decoration: none;
}
.topbar nav { display: flex; gap: 16px; flex-wrap: wrap; }
.topbar nav a {
  color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 600;
}
.topbar nav a:hover { color: var(--navy); }
.topbar nav a.on { color: var(--navy); border-bottom: 2px solid var(--brick); }
.topbar .spacer { flex: 1; }
.platform-link {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 14.5px;
  color: #fff; background: var(--navy); border-radius: 8px; padding: 8px 16px;
}
.platform-link:hover { background: var(--navy-d); color: #fff; }

.wrap { max-width: 780px; margin: 0 auto; padding: 0 22px; }

/* ── Герой ── */

.hero { padding: 72px 0 48px; border-bottom: 1px solid var(--line); }
.hero .kicker {
  font-size: 13.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brick); margin: 0 0 14px;
}
.hero h1 { font-size: clamp(34px, 6vw, 54px); font-weight: 900; margin-bottom: 18px; }
.hero .lead { font-size: 19px; color: var(--ink); max-width: 620px; margin: 0 0 28px; }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 15.5px;
  padding: 12px 22px; border-radius: 9px; border: 1px solid transparent;
}
.btn-main { background: var(--brick); color: #fff; }
.btn-main:hover { background: var(--brick-d); color: #fff; }
.btn-ghost { border-color: var(--navy); color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }

/* ── Разделы ── */

section { padding: 46px 0 40px; border-bottom: 1px solid var(--line); }
.sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 26px; }
.sec-num {
  font-family: Merriweather, Georgia, serif; font-weight: 900; font-size: 15px;
  color: var(--brick); letter-spacing: .06em;
}
.sec-head h2 { font-size: clamp(24px, 4vw, 32px); font-weight: 900; }
.sec-head .sec-note { margin-left: auto; font-size: 13.5px; color: var(--muted); }

/* ── Курсы: редакционный список, не карточки ── */

.offer { padding: 22px 0; border-top: 2px solid var(--ink); }
.offer + .offer { border-top: 1px solid var(--line); }
.offer-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.offer-head h3 { font-size: 21px; }
.offer-head h3 a { color: var(--ink); text-decoration: none; }
.offer-head h3 a:hover { color: var(--brick); }
.tag {
  font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 6px;
  background: #eef3f9; color: var(--navy);
}
.tag-booster { background: #fdf2f1; color: var(--brick); }
.offer p { margin: 8px 0 10px; max-width: 640px; }
.offer .offer-meta { font-size: 13.5px; color: var(--muted); margin: 0 0 12px; }
.offer a.go { font-weight: 700; font-size: 15px; text-decoration: none; }
.offer a.go:hover { text-decoration: underline; }

/* ── Олимпиады и ДВИ ── */

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.two-col h3 { font-size: 19px; margin-bottom: 10px; }
.two-col p { margin: 0 0 10px; font-size: 15.5px; }
.two-col ul { margin: 0; padding-left: 20px; font-size: 15.5px; }
.two-col li { margin-bottom: 6px; }
.how {
  margin-top: 30px; padding: 18px 22px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 10px;
}
.how h3 { font-size: 17px; margin-bottom: 8px; }
.how ol { margin: 0; padding-left: 22px; font-size: 15.5px; }
.how li { margin-bottom: 6px; }

/* ── Статьи ── */

.article { padding: 16px 0; border-top: 1px solid var(--line); }
.article:first-of-type { border-top: none; }
.article h3 { font-size: 18.5px; margin-bottom: 4px; }
.article h3 a { color: var(--ink); text-decoration: none; }
.article h3 a:hover { color: var(--brick); }
.article .a-meta { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.article p { margin: 0; font-size: 15px; max-width: 640px; }

/* ── Контакты ── */

.contacts p { max-width: 620px; }
.contact-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.contact-row .btn-ghost { text-decoration: none; }

footer {
  background: var(--cream); border-top: 1px solid var(--line);
  padding: 28px 0 40px; color: var(--muted); font-size: 13.5px;
}

/* Полоса доводок внизу текстовой страницы */
.nextrow { display: flex; gap: 26px; flex-wrap: wrap; padding: 8px 0 4px; }
.nextrow a { font-weight: 700; font-size: 15.5px; text-decoration: none; }
.nextrow a:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .two-col { grid-template-columns: 1fr; }
  .hero { padding: 52px 0 40px; }
  .sec-head .sec-note { display: none; }
}

/* ── Подсайты олимпиад: лонгрид, таблицы ── */

.backlink { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--muted); }
.backlink:hover { color: var(--navy); }

.longread { padding: 10px 0 30px; max-width: 760px; }
.longread h1 {
  font-size: clamp(26px, 4.6vw, 40px); font-weight: 900;
  margin: 18px 0 26px; line-height: 1.25;
}
.longread h2 {
  font-size: 22px; margin: 36px 0 12px; padding-top: 22px;
  border-top: 1px solid var(--line);
}
.longread h3 { font-size: 18px; margin: 24px 0 8px; }
.longread p, .longread li { font-size: 16px; }
.longread ul, .longread ol { padding-left: 24px; margin: 10px 0 16px; }
.longread li { margin-bottom: 7px; }
.longread blockquote {
  margin: 16px 0; padding: 4px 20px; border-left: 3px solid var(--brick);
  color: var(--ink); background: var(--cream);
}
.longread table {
  width: 100%; border-collapse: collapse; margin: 14px 0 22px;
  font-size: 14.5px; background: var(--paper);
}
.longread th, .longread td {
  text-align: left; padding: 9px 12px; border: 1px solid var(--line);
  vertical-align: top;
}
.longread th {
  background: var(--cream); font-family: Merriweather, Georgia, serif;
  font-size: 14px;
}
@media (max-width: 700px) {
  .longread table { font-size: 13px; }
  .longread th, .longread td { padding: 7px 8px; }
}

/* ── Инфографика: стат-бар на подсайтах ── */

.infobar {
  margin: 0 0 10px; padding: 18px 20px 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
}
.ib-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 18px; }
.stat-num {
  display: block; font-family: Merriweather, Georgia, serif; font-weight: 900;
  font-size: 20px; color: var(--navy); line-height: 1.15;
}
.stat-cap {
  display: block; font-size: 12px; color: var(--muted);
  margin-top: 5px; line-height: 1.35;
}
.stat-sub { display: block; opacity: .85; }

.lvl {
  display: inline-block; min-width: 30px; text-align: center;
  padding: 1px 8px; border-radius: 7px; color: #fff;
}
.lvl-i { background: var(--brick); }
.lvl-ii { background: var(--navy); }
.lvl-iii { background: var(--muted); }
.lvl-out {
  background: #fff; color: var(--muted); border: 1.5px dashed var(--muted);
}
.lvl-vsosh { background: var(--navy-d); font-size: 15px; }

.steps {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0;
  list-style: none; margin: 14px 0 0; padding: 12px 0 2px;
  border-top: 1px solid var(--line); counter-reset: step;
}
.steps li {
  counter-increment: step; display: flex; align-items: center;
  font-size: 13.5px; font-weight: 600;
}
.steps li::before {
  content: counter(step);
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 22px;
  background: var(--navy); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; margin-right: 8px;
}
.steps li::after {
  content: "→"; color: var(--brick); font-weight: 700; margin: 0 12px;
}
.steps li:last-child::after { content: ""; margin: 0; }

@media (max-width: 700px) {
  .ib-stats { grid-template-columns: 1fr 1fr; }
  .steps { flex-direction: column; align-items: flex-start; gap: 8px; }
  .steps li::after { content: ""; margin: 0; }
}

/* ── Инфографика: сравнительная доска в каталоге ── */

.board-scroll { overflow-x: auto; }
.board {
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper); min-width: 660px;
}
.b-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.5fr) 70px 52px minmax(140px, 1.3fr) minmax(104px, .9fr);
  align-items: center; gap: 10px; padding: 10px 16px; font-size: 14px;
}
.b-row + .b-row { border-top: 1px solid var(--line); }
.b-row:nth-child(even) { background: #fff; }
.b-head {
  background: var(--cream); font-size: 11.5px; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
}
.b-name { color: var(--ink); text-decoration: none; font-weight: 600; }
.b-name:hover { color: var(--brick); }
.b-st { text-align: center; color: var(--muted); font-weight: 700; }
.pbar {
  display: block; height: 8px; margin-bottom: 4px;
  background: var(--cream); border: 1px solid var(--line);
  border-radius: 5px; overflow: hidden;
}
.pbar > span { display: block; height: 100%; background: var(--brick); }
.b-part-n { font-size: 13px; font-weight: 700; }
.b-na { font-size: 12.5px; color: var(--muted); }
.b-thr { font-weight: 700; color: var(--navy); font-size: 13px; }
.board-note {
  font-size: 13px; color: var(--muted); margin: 12px 0 0; max-width: 680px;
}
