/* rustore-iphone — «приёмка сервис-центра»: холодный алюминий, чернильный текст,
   оранжевая бирка ремонта, штампы-вердикты. Onest + PT Mono. Светлая тема:
   читают днём с телефона, в магазине и в очереди — тёмный фон тут чужой. */

@font-face {
  font-family: 'Onest';
  src: url('/assets/fonts/onest-var-cyr.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  src: url('/assets/fonts/onest-var-lat.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'PT Mono';
  src: url('/assets/fonts/ptmono-cyr.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'PT Mono';
  src: url('/assets/fonts/ptmono-lat.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}

:root {
  --alu:        #eef0f3;
  --alu-deep:   #e3e6eb;
  --card:       #ffffff;
  --line:       #d0d5dd;
  --line-soft:  #dde1e7;
  --ink:        #171a20;
  --ink-dim:    #49505e;
  --ink-faint:  #5b6373;
  --tag:        #d5491d;
  --tag-deep:   #b8440e;
  --tag-haze:   #fceade;
  --ok:         #1c7f52;
  --ok-haze:    #e0f1e8;
  --bad:        #bf3434;
  --bad-haze:   #f9e6e4;
  --warn:       #7a5507;
  --warn-haze:  #f8efd4;
  --mono: 'PT Mono', 'Courier New', monospace;
  --sans: 'Onest', 'Segoe UI', system-ui, sans-serif;
  --measure: 68ch;
  --pad: clamp(16px, 4.5vw, 84px);
  --r-card: 12px;
  --r-btn: 8px;
  --r-code: 4px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--alu);
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }

::selection { background: var(--tag); color: #fff; }
:focus-visible { outline: 2.5px solid var(--tag); outline-offset: 2px; border-radius: 2px; }

.wrap { padding-left: var(--pad); padding-right: var(--pad); }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 60;
  background: var(--ink); color: #fff; padding: 8px 16px; border-radius: var(--r-btn);
}
.skip:focus { left: 8px; }

code {
  font-family: var(--mono); font-size: .84em;
  background: var(--alu-deep); border-radius: var(--r-code);
  padding: 1px 6px; white-space: nowrap;
}
mark { background: var(--tag-haze); color: inherit; padding: 0 3px; border-radius: 3px; }
a { color: var(--tag-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--tag); }

/* ── шапка ── */
.hdr {
  position: sticky; top: 0; z-index: 40;
  background: rgba(238, 240, 243, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.hdr__in { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo__m { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--ink); color: #fff; }
.logo__m svg { width: 20px; height: 20px; }
.logo__t { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.logo__t span { color: var(--ink-faint); font-weight: 600; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  text-decoration: none; color: var(--ink-dim); font-weight: 600; font-size: 15px;
  padding: 7px 13px; border-radius: var(--r-btn);
  transition: background .15s ease, color .15s ease;
}
.nav a:hover { background: var(--alu-deep); color: var(--ink); }
.nav a[aria-current] { background: var(--ink); color: #fff; }
.hdr__cta {
  text-decoration: none; background: var(--tag-deep); color: #fff; font-weight: 700; font-size: 15px;
  padding: 9px 16px; border-radius: var(--r-btn);
  transition: background .15s ease, transform .1s ease;
}
.hdr__cta:hover { background: #9c3708; color: #fff; }
.hdr__cta:active { transform: translateY(1px); }
.burger { display: none; }
.mnav { display: none; }

@media (max-width: 900px) {
  .nav, .hdr__cta { display: none; }
  .burger {
    display: grid; gap: 5px; margin-left: auto; padding: 12px 6px;
    background: none; border: 0; cursor: pointer;
  }
  .burger span { display: block; width: 22px; height: 2.2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.2px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.2px) rotate(-45deg); }
  .mnav {
    display: none; position: fixed; inset: 64px 0 0; z-index: 39;
    background: var(--alu); padding: 18px var(--pad);
    flex-direction: column; gap: 2px; overflow: auto;
  }
  .mnav.open { display: flex; }
  .mnav a {
    text-decoration: none; color: var(--ink); font-weight: 700; font-size: 21px;
    padding: 13px 6px; border-bottom: 1px solid var(--line-soft);
  }
}

/* ── штамп-вердикт ── */
.stamp {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 13.5px; letter-spacing: .04em;
  border: 2px solid currentColor; border-radius: 6px;
  padding: 6px 12px; transform: rotate(-1.2deg);
  background: var(--card);
}
.stamp svg { width: 16px; height: 16px; flex: 0 0 16px; }
.stamp--ok   { color: var(--ok);   background: var(--ok-haze); }
.stamp--bad  { color: var(--bad);  background: var(--bad-haze); }
.stamp--warn { color: var(--warn); background: var(--warn-haze); }
.stamp--stop { color: var(--bad);  background: var(--bad-haze); }
.stamp--hero { font-size: 15px; padding: 9px 16px; margin-top: 22px; }
@media (prefers-reduced-motion: no-preference) {
  .stamp--hero { animation: stamp-in .55s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
  @keyframes stamp-in {
    from { opacity: 0; transform: rotate(0.8deg) scale(1.12); }
    to   { opacity: 1; transform: rotate(-1.2deg) scale(1); }
  }
}

/* ── герой ── */
.hero { background: linear-gradient(180deg, var(--alu-deep), var(--alu) 78%); border-bottom: 1px solid var(--line-soft); }
.hero__in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding-top: clamp(40px, 6vw, 84px); padding-bottom: clamp(40px, 6vw, 84px); }
.hero:not(.hero--front) .hero__in { grid-template-columns: 1fr; padding-top: clamp(30px, 4.5vw, 60px); padding-bottom: clamp(30px, 4.5vw, 60px); }
h1 {
  font-size: clamp(31px, 4.6vw, 54px); line-height: 1.06; font-weight: 850;
  letter-spacing: -.028em; max-width: 19ch; text-wrap: balance;
}
.lead { margin-top: 18px; font-size: clamp(17px, 1.5vw, 19.5px); color: var(--ink-dim); max-width: var(--measure); text-wrap: pretty; }
.lead strong { color: var(--ink); }

/* квитанция в герое */
.qs {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 26px 24px 22px;
  box-shadow: 0 10px 28px -14px rgba(23, 26, 32, .22);
}
.qs::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: -1px; height: 8px;
  background-image: radial-gradient(circle at 8px 0, var(--alu) 4.5px, transparent 5px);
  background-size: 22px 8px; background-repeat: repeat-x;
}
.qs__t { font-family: var(--mono); font-size: 13px; color: var(--ink-faint); letter-spacing: .05em; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.qs__l { list-style: none; counter-reset: q; margin: 6px 0 16px; }
.qs__l li { counter-increment: q; display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line-soft); }
.qs__l li:last-child { border-bottom: 0; }
.qs__l li::before {
  content: counter(q); font-family: var(--mono); font-size: 13px; color: var(--tag-deep);
  border: 1.5px solid var(--tag); border-radius: 50%;
  width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; margin-top: 1px;
}
.qs__l a { color: var(--ink); font-weight: 600; font-size: 15.5px; line-height: 1.4; text-decoration: none; }
.qs__l a:hover { color: var(--tag-deep); text-decoration: underline; text-underline-offset: 3px; }
.qs__go {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff; text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 11px 18px; border-radius: var(--r-btn); transition: background .15s ease, transform .1s ease;
}
.qs__go:hover { background: #2a2f3a; color: #fff; }
.qs__go:active { transform: translateY(1px); }
.qs__go svg { width: 17px; height: 17px; }

@media (max-width: 900px) {
  .hero__in { grid-template-columns: 1fr; }
}

/* ── крошки ── */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 16px; color: var(--ink-faint); }
.crumbs a { color: var(--ink-faint); text-decoration: none; }
.crumbs a:hover { color: var(--tag-deep); text-decoration: underline; }
.crumbs span[aria-current] { color: var(--ink-dim); }
.crumbs__sep { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }

/* ── тело ── */
.body__in { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(28px, 4vw, 72px); padding-top: clamp(34px, 4.5vw, 60px); padding-bottom: clamp(44px, 6vw, 88px); }
.body__in--wide { grid-template-columns: 1fr; }
.main { max-width: 880px; min-width: 0; }
.main > p { max-width: var(--measure); margin-top: 16px; text-wrap: pretty; }
.main > h2 {
  font-size: clamp(24px, 2.6vw, 31px); line-height: 1.16; font-weight: 800; letter-spacing: -.02em;
  max-width: 28ch; margin-top: clamp(40px, 5vw, 62px); text-wrap: balance;
}
.main > h2:first-child { margin-top: 0; }
.main > h3 { font-size: 19.5px; line-height: 1.3; font-weight: 750; margin-top: 30px; max-width: 34ch; }
.main > .ul, .main > .ol { max-width: var(--measure); margin-top: 14px; padding-left: 24px; }
.main .ul li, .main .ol li { margin-top: 8px; text-wrap: pretty; }
.main .ul li::marker { color: var(--tag); }
.main .ol li::marker { font-family: var(--mono); font-size: .88em; color: var(--tag-deep); }
.fine { font-size: 14.5px; color: var(--ink-faint); max-width: var(--measure); margin-top: 14px; }

.q { scroll-margin-top: 84px; }

/* ── таблицы ── */
.tbl__wrap { margin-top: 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); scrollbar-color: var(--line) var(--card); scrollbar-width: thin; }
.tbl__wrap::-webkit-scrollbar { height: 8px; }
.tbl__wrap::-webkit-scrollbar-track { background: var(--card); }
.tbl__wrap::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.tbl { border-collapse: collapse; width: 100%; font-size: 15.5px; }
.tbl th, .tbl td { text-align: left; padding: 12px 16px; vertical-align: top; }
.tbl thead th { font-family: var(--mono); font-size: 12.5px; letter-spacing: .05em; color: var(--ink-faint); background: var(--alu-deep); border-bottom: 1px solid var(--line); }
.tbl tbody tr + tr { border-top: 1px solid var(--line-soft); }
.tbl tbody th { font-weight: 700; }

/* ── заметки ── */
.note { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; margin-top: 22px; max-width: 760px; flex-direction: column; }
.note__t { display: flex; align-items: center; gap: 9px; font-weight: 750; font-size: 16px; }
.note__t svg { width: 19px; height: 19px; flex: 0 0 19px; }
.note__i svg { width: 19px; height: 19px; }
.note__b > p { margin-top: 8px; }
.note__b > p:first-child { margin-top: 0; }
.note__b .ul, .note__b .ol { margin-top: 8px; padding-left: 22px; }
.note__b .ul li, .note__b .ol li { margin-top: 6px; }
.note--warn { border-color: #e5cf96; background: var(--warn-haze); }
.note--warn .note__t { color: var(--warn); }
.note--stop, .note--bad { border-color: #eabab5; background: var(--bad-haze); }
.note--stop .note__t, .note--bad .note__t { color: var(--bad); }
.note--ok { border-color: #b3dcc6; background: var(--ok-haze); }
.note--ok .note__t { color: var(--ok); }

/* ── квитанция-тикет ── */
.tk {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-card); margin-top: 26px;
  box-shadow: 0 8px 22px -14px rgba(23, 26, 32, .18);
}
.tk::before {
  content: ""; position: absolute; left: 12px; right: 12px; top: -1px; height: 8px;
  background-image: radial-gradient(circle at 8px 0, var(--alu) 4.5px, transparent 5px);
  background-size: 22px 8px; background-repeat: repeat-x;
}
.tk__top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px dashed var(--line); }
.tk__t { font-size: 18.5px; font-weight: 800; letter-spacing: -.01em; margin-right: auto; }
.tk__stamp { transform: rotate(-1.6deg); }
.tk__b { padding: 6px 22px 20px; }
.tk__b > p { margin-top: 12px; max-width: var(--measure); }
.tk__b .ul, .tk__b .ol { margin-top: 10px; padding-left: 22px; max-width: var(--measure); }
.tk__b .ul li, .tk__b .ol li { margin-top: 6px; }
.tk__b .route { margin-top: 8px; }

/* ── способы ── */
.ways { margin-top: 22px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); overflow: hidden; }
.way { display: grid; grid-template-columns: minmax(150px, .9fr) 150px minmax(200px, 1.4fr); gap: 8px 18px; padding: 14px 18px; align-items: baseline; }
.way + .way { border-top: 1px solid var(--line-soft); }
.way__n { font-weight: 700; font-size: 15.5px; }
.way__s { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 13px; }
.way__s svg { width: 14px; height: 14px; flex: 0 0 14px; }
.way__s--ok { color: var(--ok); }
.way__s--bad, .way__s--stop { color: var(--bad); }
.way__s--warn { color: var(--warn); }
.way__c { font-size: 14.5px; color: var(--ink-dim); }
@media (max-width: 760px) {
  .way { grid-template-columns: 1fr; gap: 5px; }
}

/* ── карточки банков ── */
.bks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 24px; }
@media (max-width: 700px) { .bks { grid-template-columns: 1fr; } }
.bk {
  display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 20px; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.bk:hover { border-color: var(--tag); transform: translateY(-2px); box-shadow: 0 12px 26px -16px rgba(23, 26, 32, .3); color: var(--ink); }
.bk__mark {
  font-family: var(--mono); font-weight: 400; font-size: 15px;
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 10px; background: var(--alu-deep); color: var(--ink-dim);
}
.bk__n { display: block; font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.bk__s { display: block; margin-top: 5px; font-size: 14.5px; color: var(--ink-dim); line-height: 1.45; }
.bk__st { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12.5px; margin-top: auto; }
.bk__st svg { width: 14px; height: 14px; }

/* ── шаги ── */
.route { margin-top: 24px; }
.route__t { font-weight: 800; font-size: 17px; margin-bottom: 4px; }
.steps { list-style: none; }
.step { display: flex; gap: 16px; padding: 14px 0; }
.step + .step { border-top: 1px dashed var(--line-soft); }
.step__n {
  font-family: var(--mono); font-size: 14px; color: var(--tag-deep);
  border: 1.5px solid var(--tag); border-radius: 50%;
  width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; margin-top: 2px;
}
.step__b { min-width: 0; }
.step__t { font-weight: 700; font-size: 16.5px; }
.step__b > p:not(.step__t) { margin-top: 6px; font-size: 15.5px; color: var(--ink-dim); max-width: 62ch; }
.step__b .ul, .step__b .ol { margin-top: 6px; padding-left: 20px; font-size: 15.5px; color: var(--ink-dim); }

/* ── боковая колонка ── */
.side { display: flex; flex-direction: column; gap: 18px; }
.toc { position: sticky; top: 84px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; }
.toc__t { font-family: var(--mono); font-size: 12.5px; letter-spacing: .05em; color: var(--ink-faint); margin-bottom: 10px; }
.toc ul { list-style: none; }
.toc li + li { margin-top: 7px; }
.toc a { color: var(--ink-dim); text-decoration: none; font-size: 14.5px; line-height: 1.4; display: block; }
.toc a:hover { color: var(--tag-deep); text-decoration: underline; text-underline-offset: 3px; }
.side__box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; }
.side__box--quiet { background: none; border-style: dashed; }
.side__t { font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.side__fine { font-size: 14px; color: var(--ink-dim); margin-top: 7px; line-height: 1.5; }
.side__go {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 13px;
  background: var(--tag-deep); color: #fff; text-decoration: none; font-weight: 700; font-size: 14.5px;
  padding: 9px 15px; border-radius: var(--r-btn); transition: background .15s ease, transform .1s ease;
}
.side__go:hover { background: #9c3708; color: #fff; }
.side__go:active { transform: translateY(1px); }
.side__go svg, .side__link svg { width: 15px; height: 15px; }
.side__link { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; font-weight: 700; font-size: 14.5px; color: var(--tag-deep); text-decoration: none; }
.side__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.mtoc { display: none; }
@media (max-width: 1080px) {
  .body__in { grid-template-columns: 1fr; }
  .toc { display: none; }
  .side { flex-direction: row; flex-wrap: wrap; }
  .side > * { flex: 1 1 260px; }
  .mtoc { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 4px 20px; margin-bottom: 6px; }
  .mtoc summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 12.5px; letter-spacing: .05em; color: var(--ink-faint); padding: 12px 0; }
  .mtoc summary::-webkit-details-marker { display: none; }
  .mtoc summary::after { content: "+"; font-size: 17px; color: var(--tag-deep); }
  .mtoc[open] summary::after { content: "−"; }
  .mtoc ul { list-style: none; padding-bottom: 12px; }
  .mtoc li + li { margin-top: 8px; }
  .mtoc a { color: var(--ink-dim); text-decoration: none; font-size: 14.5px; display: block; }
}

/* ── смежные ── */
.rel { margin-top: clamp(44px, 6vw, 68px); border-top: 1px solid var(--line-soft); padding-top: 26px; }
.rel__t { font-family: var(--mono); font-size: 13px; letter-spacing: .05em; color: var(--ink-faint); }
.rel__g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
@media (max-width: 640px) { .rel__g { grid-template-columns: 1fr; } }
.rel__g a {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 16px 18px; transition: border-color .15s ease, transform .15s ease;
}
.rel__g a:hover { border-color: var(--tag); transform: translateY(-2px); color: var(--ink); }
.rel__n { display: block; font-weight: 750; font-size: 15.5px; }
.rel__d { display: block; margin-top: 5px; font-size: 13.5px; color: var(--ink-dim); line-height: 1.45; }

/* ── 404 ── */
.e404 { font-family: var(--mono); font-size: clamp(60px, 10vw, 120px); color: var(--line); line-height: 1; }

/* ── подвал ── */
.ftr { border-top: 1px solid var(--line-soft); background: var(--alu-deep); margin-top: 20px; }
.ftr__in { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)) minmax(240px, 1.4fr); gap: 28px; padding-top: 44px; padding-bottom: 48px; }
.ftr__h { font-family: var(--mono); font-size: 12.5px; letter-spacing: .05em; color: var(--ink-faint); margin-bottom: 10px; }
.ftr__c a { display: block; color: var(--ink-dim); text-decoration: none; font-size: 14.5px; padding: 4px 0; }
.ftr__c a:hover { color: var(--tag-deep); text-decoration: underline; text-underline-offset: 3px; }
.ftr__note p { font-size: 13.5px; color: var(--ink-faint); line-height: 1.55; }
.ftr__note p + p { margin-top: 8px; }
@media (max-width: 860px) {
  .ftr__in { grid-template-columns: repeat(2, 1fr); }
  .ftr__note { grid-column: 1 / -1; }
}
