:root {
  --paper: #f8f5ef;
  --card: #ffffff;
  --ink: #1d2a2f;
  --soft: #56656c;
  --line: #e3dccf;
  --petrol: #0f5e66;
  --petrol-dark: #0a464c;
  --night: #173c42;
  --amber: #f4b740;
  --amber-dark: #e0a020;
  --tint: #e9f2f1;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font: 16px/1.65 var(--sans);
}
main { flex: 1 0 auto; width: 100%; }
img { max-width: 100%; height: auto; }
a { color: var(--petrol); text-underline-offset: 2px; }
a:hover { color: var(--petrol-dark); }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--tint); padding: .05em .35em; border-radius: 4px; }
:target { scroll-margin-top: 84px; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--card); padding: 8px 12px; }

.shell { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 16px; }

/* ---------- шапка ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--petrol); color: #fff; box-shadow: 0 2px 0 var(--amber), 0 6px 16px -10px rgba(0,0,0,.45); }
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 700 1.15rem/1 var(--serif); }
.brand:hover { color: #fff; }
.brand__logo { width: 36px; height: 36px; border-radius: 9px; }
.menu ul { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.menu a { display: block; padding: 6px 14px; border-radius: 999px; color: #e6f0ef; text-decoration: none; font-size: .95rem; font-weight: 600; }
.menu a:hover { background: rgba(255,255,255,.12); color: #fff; }
.menu a[aria-current="page"] { background: var(--amber); color: var(--ink); }

/* ---------- крошки, вводная, оглавление ---------- */
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: .85rem; color: var(--soft); padding-top: 18px; }
.crumbs a { color: var(--soft); }
.text { padding-bottom: 48px; }
.text h1, .text h2, .text h3 { font-family: var(--serif); line-height: 1.22; color: var(--ink); }
.text h1 { font-size: clamp(1.6rem, 5vw, 2.35rem); margin: 0 0 16px; }
.text h2 { font-size: clamp(1.3rem, 3.4vw, 1.65rem); margin: 0 0 14px; }
.text h3 { font-size: 1.15rem; margin: 24px 0 10px; }
.text p { margin: 0 0 14px; }

.lede {
  margin: 18px 0 18px; padding: 24px 20px 10px; background: var(--card);
  border: 1px solid var(--line); border-top: 6px solid var(--amber); border-radius: var(--radius);
}
.lede p:first-of-type { font-size: 1.04rem; }
.lede__ops { display: flex; justify-content: center; gap: 12px; list-style: none; margin: 8px 0 16px; padding: 0; }
.lede__ops li { background: var(--night); border-radius: 10px; width: 76px; height: 52px; display: grid; place-items: center; }
.lede__op { max-height: 34px; max-width: 58px; width: auto; height: auto; object-fit: contain; }

.toc { margin: 0 0 8px; }
.toc details { background: var(--tint); border-radius: 10px; padding: 0 16px; }
.toc summary { cursor: pointer; padding: 12px 0; font-weight: 700; color: var(--petrol-dark); }
.toc ol { margin: 0; padding: 0 0 14px 20px; columns: 1; }
.toc li { padding: 3px 0; break-inside: avoid; }

.part { margin-top: 36px; padding-top: 22px; border-top: 2px solid var(--line); }

.steps, .points { margin: 0 0 16px; padding: 0; list-style: none; }
.steps { counter-reset: step; }
.steps li { position: relative; padding: 2px 0 12px 44px; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--tint); color: var(--petrol); border: 2px solid var(--petrol);
  font: 700 .9rem/26px var(--sans); text-align: center;
}
.points li { position: relative; padding: 0 0 10px 24px; }
.points li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 9px; height: 9px; background: var(--amber); transform: rotate(45deg); }

.qa { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin: 0 0 12px; }
.qa__q { cursor: pointer; list-style: none; padding: 14px 44px 14px 18px; position: relative; font: 700 1.05rem/1.35 var(--serif); }
.qa__q::-webkit-details-marker { display: none; }
.qa__q::after { content: "+"; position: absolute; right: 18px; top: 10px; font: 700 1.4rem/1 var(--sans); color: var(--petrol); }
.qa[open] .qa__q::after { content: "–"; }
.qa p { padding: 0 18px 4px; }

.disclosure { font-size: .84rem; color: var(--soft); background: var(--tint); border-radius: 8px; padding: 10px 14px; }

.pic { margin: 8px 0 18px; }
.pic img { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.pic img.pic--narrow { max-width: 560px; margin: 0 auto; }
.pic figcaption { font-size: .85rem; color: var(--soft); margin-top: 8px; text-align: center; }

/* ---------- таблицы ---------- */
.tablewrap { margin: 0 0 20px; }
.grid { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: .94rem; }
.grid th, .grid td { padding: 11px 14px; text-align: left; vertical-align: top; }
.grid thead { display: none; }
.grid tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
.grid tbody tr:last-child { border-bottom: 0; }
.grid tbody > tr > * { display: block; padding: 4px 16px; }
.grid td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; font-size: .74rem; font-weight: 700; color: var(--soft); text-transform: uppercase; letter-spacing: .04em; }
.grid tbody th { font-weight: 700; color: var(--petrol-dark); font-family: var(--serif); font-size: 1.02rem; }
.op { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.op__img { width: 40px; height: 28px; object-fit: contain; background: var(--night); border-radius: 7px; padding: 5px 8px; box-sizing: content-box; flex-shrink: 0; }

@media (min-width: 680px) {
  .grid thead { display: table-header-group; }
  .grid tr { display: table-row; padding: 0; border: 0; }
  .grid tbody > tr > *, .grid thead th { display: table-cell; padding: 11px 14px; border-bottom: 1px solid var(--line); }
  .grid tbody tr:last-child > * { border-bottom: 0; }
  .grid td[data-label]::before { display: none !important; }
  .grid thead th { background: var(--petrol); color: #fff; font: 600 .88rem/1.3 var(--sans); }
  .grid tbody tr:nth-child(even) { background: #fbfaf6; }
}

/* ---------- листинг ---------- */
.offers { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.offer {
  position: relative; display: grid; grid-template-columns: 112px 1fr; gap: 10px 14px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
}
.offer:first-child { border: 2px solid var(--amber); box-shadow: 0 6px 18px -12px rgba(15,94,102,.6); }
.offer__rank {
  position: absolute; top: -8px; left: -8px; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; background: var(--petrol); color: #fff; font: 700 .9rem/1 var(--sans); border: 2px solid var(--paper);
}
.offer:first-child .offer__rank { background: var(--amber); color: var(--ink); }
.offer__logo { display: grid; place-items: center; height: 64px; background: var(--night); border-radius: 10px; padding: 8px; }
.offer__img { max-height: 46px; width: auto; max-width: 100%; object-fit: contain; }
.offer__body p { margin: 0; }
.offer__name { font: 700 1.08rem/1.3 var(--serif); }
.offer__bonus { font-weight: 600; font-size: .95rem; }
.offer__pay { font-size: .82rem; color: var(--soft); }
.offer__go {
  grid-column: 1 / -1; display: block; text-align: center; padding: 11px 20px; border-radius: 10px;
  background: var(--amber); color: var(--ink); font-weight: 700; text-decoration: none;
  box-shadow: inset 0 -3px 0 var(--amber-dark);
}
.offer__go:hover { background: var(--amber-dark); color: var(--ink); }

@media (min-width: 680px) {
  body { font-size: 17px; }
  .shell { padding-left: 24px; padding-right: 24px; }
  .lede { padding: 30px 30px 14px; }
  .toc ol { columns: 2; column-gap: 28px; }
  .offer { grid-template-columns: 140px 1fr auto; padding: 16px 18px; gap: 6px 20px; }
  .offer__logo { height: 72px; }
  .offer__go { grid-column: auto; white-space: nowrap; }
}

/* ---------- футер ---------- */
.foot { flex-shrink: 0; background: var(--ink); color: #cfd8da; font-size: .9rem; margin-top: 24px; }
.foot a { color: #f6cf7a; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { padding: 3px 0; }
.foot p { margin: 0 0 8px; }
.foot__grid { display: grid; gap: 22px; padding-top: 34px; padding-bottom: 24px; }
.foot__brand { display: flex; align-items: center; gap: 10px; font: 700 1.1rem/1.2 var(--serif); color: #fff; }
.foot__brand img { border-radius: 7px; }
.foot__head { font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; }
.foot__base { border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; padding-bottom: 26px; }
.foot__badges { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.badge18 { display: grid; place-items: center; width: 46px; height: 46px; border: 2.5px solid #fff; border-radius: 50%; font: 700 .95rem/1 var(--sans); color: #fff; }
.foot__help { display: inline-block; border: 1px solid rgba(255,255,255,.35); border-radius: 10px; padding: 6px 12px; text-decoration: none; font-weight: 700; line-height: 1.25; color: #fff !important; }
.foot__help small { font-weight: 400; color: #cfd8da; }
.foot__note { color: #a9b8bc; }
.foot__copy { color: #7f9196; font-size: .82rem; }

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