/* Стиль журнала eru.ru: Roboto, фон #f3f3f3, белые карточки с рамкой, фирменный градиент #DD2476 → #FF512F */
:root {
  --bg: #f3f3f3; --card: #ffffff; --ink: #111111; --text: #222222; --muted: #888888; --muted2: #67696b;
  --line: #e8e8e8; --pink: #dd2476; --orange: #ff512f;
  --grad: linear-gradient(342.85deg, #dd2476 -8.16%, #ff512f 119.17%);
  --grad-soft: linear-gradient(342.85deg, rgba(221, 36, 118, .1) -8.16%, rgba(255, 81, 47, .1) 119.17%);
  --pink-soft: rgba(221, 36, 118, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.55 Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--pink); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

/* ---------- шапка как у журнала ---------- */
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-in { max-width: 820px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo svg { width: 64px; height: 40px; }
.section-name { font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; padding-left: 14px; border-left: 1px solid var(--line); }
.top-nav { margin-left: auto; display: flex; gap: 6px; }
.top-nav a { font-size: 14px; font-weight: 500; color: #444; text-decoration: none; padding: 7px 12px; border-radius: 8px; }
.top-nav a:hover, .top-nav a.on { color: var(--pink); background: var(--grad-soft); }

.wrap { max-width: 820px; margin: 0 auto; padding: 20px 16px 40px; }
.foot { text-align: center; padding: 10px 16px 36px; font-size: 13px; color: var(--muted); }
.foot a { color: var(--muted2); text-decoration: none; margin: 0 8px; }
.foot a:hover { color: var(--pink); }

/* ---------- карточки и типографика ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 26px 28px; margin-bottom: 14px; }
.center { text-align: center; }
.h1 { font-size: 28px; line-height: 1.25; font-weight: 700; margin: 8px 0 12px; color: var(--ink); }
.h2 { font-size: 12px; font-weight: 700; letter-spacing: .72px; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.lead { font-size: 17px; color: var(--text); margin: 0 0 14px; white-space: pre-line; }
.muted { color: var(--muted); font-size: 14px; }
.chip { display: inline-block; background: var(--pink-soft); color: var(--pink); font-size: 11px; font-weight: 700; letter-spacing: .66px;
  text-transform: uppercase; padding: 2px 7px; border-radius: 4px; }
.meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 13px; margin: 2px 0 18px; }
.cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin-bottom: 18px; }

/* ---------- кнопки как «Найти» / «Войти» ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; background: var(--grad); color: #fff; font: inherit;
  font-weight: 600; font-size: 16px; padding: 13px 30px; border-radius: 24px; cursor: pointer; text-decoration: none;
  transition: filter .15s, transform .1s; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--grad-soft); color: var(--pink); }

/* ---------- прохождение ---------- */
.progress { height: 6px; background: #eeeeee; border-radius: 6px; overflow: hidden; }
.bar { height: 100%; width: 0; background: var(--grad); transition: width .3s ease; }
.counter { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .72px; text-transform: uppercase; margin: 14px 0 6px; }
.qimg { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin: 8px 0 14px; }
.qtext { font-size: 22px; line-height: 1.3; font-weight: 700; margin: 4px 0 18px; }
.answers { display: grid; gap: 10px; }
.ans { text-align: left; font: inherit; font-size: 16px; padding: 14px 18px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.ans:hover { border-color: var(--pink); }
.ans.picked { border-color: var(--pink); background: var(--grad-soft); color: var(--pink); font-weight: 600; }
.back { margin-top: 16px; border: 0; background: none; color: var(--muted2); font: inherit; font-size: 14px; cursor: pointer; padding: 6px 0; }
.back:hover { color: var(--pink); }

.spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--pink-soft); border-top-color: var(--pink);
  margin: 10px auto 14px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- результат ---------- */
.qname { color: var(--muted); font-size: 14px; margin-top: 8px; }
.rimg { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin: 14px 0 6px; }
.score { display: inline-block; margin-top: 12px; background: var(--grad); color: #fff; font-weight: 700; font-size: 20px;
  padding: 5px 16px; border-radius: 20px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 20px 0 6px; padding-top: 18px; border-top: 1px solid var(--line); }
.share .muted { width: 100%; font-size: 12px; font-weight: 700; letter-spacing: .72px; text-transform: uppercase; }
.sh { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 16px; font: inherit; font-size: 13.5px;
  font-weight: 500; text-decoration: none; border: 1px solid transparent; cursor: pointer; background: #f3f3f3; color: #444; }
.sh:hover { border-color: var(--pink); color: var(--pink); }
.sh.vk::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #0077ff; }
.sh.tg::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #229ed9; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.link-card { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line);
  text-decoration: none; color: var(--ink); font-weight: 700; font-size: 15.5px; line-height: 1.35; }
.link-card:first-of-type { border-top: 0; padding-top: 0; }
.link-card span { color: var(--pink); flex: none; }
.link-card:hover { color: var(--pink); }
.more .h2 + .link-card { border-top: 0; padding-top: 0; }
.more .h2:not(:first-child) { margin-top: 18px; }
.all-link { display: inline-block; margin-top: 14px; font-weight: 600; font-size: 13.5px; text-decoration: none; color: var(--pink); }

/* ---------- сетка тестов как карточки статей ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; transition: border-color .15s; }
.tile:hover { border-color: var(--pink); }
.tile img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.tile .chip { margin: 12px 14px 0; align-self: flex-start; }
.tile-t { font-weight: 700; font-size: 15.5px; line-height: 1.35; padding: 8px 14px 4px; }
.tile-d { color: var(--muted); font-size: 13px; padding: 0 14px 14px; margin-top: auto; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.page-head .h1 { margin: 0; }

/* ---------- статистика ---------- */
.tbl { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 14.5px; }
.tbl th, .tbl td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tbl th { font-size: 12px; font-weight: 700; letter-spacing: .72px; text-transform: uppercase; color: var(--muted); background: #fafafa; }
.tbl tr:last-child td { border-bottom: 0; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

@media (max-width: 600px) {
  .card { padding: 20px 18px; }
  .h1 { font-size: 23px; }
  .qtext { font-size: 19px; }
  .cols { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .section-name { font-size: 17px; padding-left: 10px; }
  .top-nav a.hide-m { display: none; }
  .logo svg { width: 54px; height: 34px; }
}
