/* =========================================================
   Delow — Изработка на SEO-ориентиран сайт: graphics on top of service.css
   ========================================================= */

/* ---------- Hero: the page assembles, speed fills to 98, vitals turn green ---------- */
.build { position: relative; padding: 22px; border-radius: 28px; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; }
.build__win { position: relative; border-radius: 18px; background: #fff; box-shadow: var(--shadow-lift), 0 0 0 1px var(--line); margin-right: 26px; }
.build__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.build__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-2); }
.build__bar span { margin-left: 10px; padding: 3px 12px; border-radius: 999px; background: var(--surface); font-size: .8125rem; color: var(--ink-2); }
.build__body { display: grid; gap: 11px; padding: 18px 18px 26px; }
.build__nav { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.build__nav b { width: 46px; height: 10px; border-radius: 4px; background: var(--ink); margin-right: auto; }
.build__nav i { width: 30px; height: 7px; border-radius: 4px; background: var(--surface-2); }
.build__h { height: 18px; width: 72%; border-radius: 6px; background: var(--ink); }
.build__p { height: 9px; width: 92%; border-radius: 5px; background: var(--surface-2); }
.build__p--s { width: 60%; }
.build__btn { display: inline-flex; align-items: center; gap: 6px; justify-self: start; margin-top: 4px; padding: 9px 16px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .8125rem; font-weight: 600; }
.build__btn .ico { width: 14px; height: 14px; }
.build__body > * { transition: opacity .45s ease, transform .55s var(--ease-out); }
.build__score { position: absolute; right: -26px; bottom: -26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 104px; height: 104px; border-radius: 50%; background: var(--dark); color: #fff; box-shadow: 0 0 0 6px var(--surface); }
.build__score svg { position: absolute; inset: 9px; width: calc(100% - 18px); height: calc(100% - 18px); rotate: -90deg; }
.build__score circle { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 5; }
.build__score circle.is-on { stroke: #22c55e; stroke-linecap: round; stroke-dasharray: 170; stroke-dashoffset: 3.4; transition: stroke-dashoffset 1.2s var(--ease-out), stroke .4s ease; }
.build__score b { position: relative; font-family: var(--font-display); font-size: 1.75rem; font-weight: 650; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.build__score span { position: relative; font-size: .75rem; color: var(--on-dark-2); }
.build__vitals { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.vital { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: .8125rem; font-weight: 600; transition: background-color .4s ease, color .4s ease; }
.vital b { font-weight: 700; color: var(--ink); }
/* Loop phases (JS) */
.build.is-p0 .build__body > * { opacity: 0; transform: translateY(8px); }
.build.is-p0 .build__score circle.is-on, .build.is-p1 .build__score circle.is-on { stroke-dashoffset: 170; }
.build.is-p0 .vital, .build.is-p1 .vital { background: #fff; color: var(--muted); box-shadow: 0 0 0 1px var(--line); }
@media (max-width: 559px) {
  .build { padding: 14px 14px 16px; border-radius: 22px; }
  .build__win { margin-right: 18px; }
  .build__body { padding: 14px 14px 20px; gap: 9px; }
  .build__score { width: 84px; height: 84px; right: -18px; bottom: -20px; }
  .build__score b { font-size: 1.375rem; }
  .build__vitals { margin-top: 16px; gap: 6px; }
  .vital { font-size: .75rem; padding: 6px 10px; }
}

/* ---------- Text bits ---------- */
.doc code { padding: 2px 7px; border-radius: 6px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-size: .88em; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; overflow-wrap: anywhere; }
.doc__h3 { margin-top: 64px; font-size: clamp(1.5rem, 1.25rem + .8vw, 2rem); letter-spacing: -.03em; }
.prose__h3 { font-size: 1.375rem; letter-spacing: -.02em; color: var(--ink); margin: 1.6em 0 .2em; }
.split__b > .prose__h3:first-child { margin-top: 0; }
@media (min-width: 960px) { .split__b > .prose__h3:first-child { margin-top: 1.4em; } }

/* ---------- Sticky graphic figures ---------- */
.tree { display: grid; justify-items: center; gap: 14px; width: min(100%, 400px); }
.tree__node { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--line); font-weight: 600; font-size: .9375rem; position: relative; }
.tree__node em { font-style: normal; font-size: .6875rem; font-weight: 600; color: var(--muted); }
.tree__node--root { background: var(--ink); color: #fff; box-shadow: none; }
.tree__node--mid { background: var(--accent); color: #fff; box-shadow: none; }
.tree__node--mid em { color: rgba(255,255,255,.7); }
.tree__leaves { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-top: 14px; border-top: 2px solid var(--accent-light); }
.tree__leaves .tree__node { flex-direction: column; gap: 2px; padding: 8px 12px; font-size: .8438rem; }
.tree__urls { display: grid; gap: 6px; justify-items: center; margin-top: 4px; }
.tree__urls code { background: #fff; }
.tree__urls code.is-good { color: #15803d; box-shadow: 0 0 0 1.5px #86efac; }
.tree__urls code.is-bad { color: #b91c1c; text-decoration: line-through; }

.cwv { display: grid; gap: 12px; width: min(100%, 400px); }
.cwv__m { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; row-gap: 4px; padding: 14px 16px; border-radius: 16px; background: #fff; }
.cwv__k { font-family: var(--font-display); font-weight: 700; }
.cwv__bar { height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.cwv__bar i { display: block; height: 100%; width: var(--w); border-radius: 6px; background: #22c55e; transform-origin: 0 50%; }
.cwv__v { font-size: .8125rem; font-weight: 700; color: #15803d; white-space: nowrap; }
.cwv__d { grid-column: 2 / -1; font-size: .8125rem; color: var(--muted); }

.base { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: min(100%, 400px); }
.base li { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-radius: 12px; background: #fff; font-weight: 600; font-size: .875rem; }
.base .ico { flex: none; width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--ink); color: #fff; stroke-width: 2.6; }
.base__note { font-size: .875rem; color: var(--muted); }

html.js .fig.is-active .tree > *, html.js .fig.is-active .cwv__m, html.js .fig.is-active .base li { animation: rise .5s var(--ease-out) both; }
html.js .fig.is-active .tree > :nth-child(2), html.js .fig.is-active .cwv__m:nth-child(2), html.js .fig.is-active .base li:nth-child(2) { animation-delay: .12s; }
html.js .fig.is-active .tree > :nth-child(3), html.js .fig.is-active .cwv__m:nth-child(3), html.js .fig.is-active .base li:nth-child(3) { animation-delay: .24s; }
html.js .fig.is-active .tree > :nth-child(4), html.js .fig.is-active .base li:nth-child(4) { animation-delay: .36s; }
html.js .fig.is-active .base li:nth-child(5) { animation-delay: .44s; }
html.js .fig.is-active .base li:nth-child(6) { animation-delay: .52s; }
html.js .fig.is-active .cwv__bar i { animation: load 1s var(--ease-out) .3s both; }

/* ---------- Landing page: the ad and the page say the same thing ---------- */
.land { position: relative; display: grid; justify-items: center; gap: 10px; padding: 44px 18px 20px; border-radius: 26px; background: var(--surface); }
.land__ad { display: grid; gap: 3px; width: min(100%, 320px); padding: 14px 16px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-lift); }
.land__spons { font-size: .75rem; color: var(--muted); }
.land__ad b { color: #1a0dab; font-size: 1.0625rem; }
.land__ad > span:last-child { font-size: .875rem; color: var(--ink-2); }
.land__arrow { width: 22px; height: 22px; color: var(--accent); }
.land__pages { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.land__page { position: relative; display: grid; align-content: start; gap: 8px; padding: 16px 14px; border-radius: 14px; background: #fff; min-height: 128px; }
.land__page.is-good { box-shadow: 0 0 0 2px #22c55e; }
.land__page.is-bad { opacity: .7; }
.land__h { font-weight: 700; font-size: .9375rem; line-height: 1.25; }
.land__h--muted { color: var(--muted); font-weight: 600; }
.land__p { height: 7px; border-radius: 4px; background: var(--surface-2); }
.land__btn { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 7px 12px; border-radius: 999px; background: #16a34a; color: #fff; font-size: .75rem; font-weight: 600; }
.land__btn .ico { width: 13px; height: 13px; }
.land__mark { position: absolute; top: -9px; right: -9px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .8125rem; font-weight: 700; }
.land__mark--ok { background: #22c55e; color: #fff; }
.land__mark--ok .ico { width: 14px; height: 14px; stroke-width: 3; }
.land__mark--bad { background: #fee2e2; color: #b91c1c; }
html.js .split__fig.is-in .land__mark { animation: pop .5s cubic-bezier(.34,1.56,.64,1) .5s both; }

/* ---------- Migration: old → new map + 5 steps ---------- */
.move { display: grid; gap: 24px; margin-top: 32px; }
.move__map { position: relative; display: grid; gap: 8px; align-content: start; padding: 22px 18px 20px; border-radius: 26px; background: var(--surface); }
.move__title { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; margin: 0 60px 6px 0; }
.move__row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #fff; }
.move__row code { background: none; box-shadow: none; padding: 0; font-size: .8125rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.move__row code.is-new { color: #15803d; font-weight: 600; }
.move__301 { padding: 3px 8px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .6875rem; font-weight: 700; }
.move__row.is-wrong { position: relative; background: #fff5f5; box-shadow: 0 0 0 1.5px #fca5a5; }
.move__row.is-wrong .move__301 { background: #b91c1c; }
.move__row.is-wrong em { position: absolute; right: 10px; top: -9px; padding: 1px 8px; border-radius: 999px; background: #b91c1c; color: #fff; font-style: normal; font-size: .6875rem; font-weight: 700; }
.move__steps { display: grid; gap: 10px; counter-reset: none; }
.move__steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px 18px; border-radius: 18px; background: var(--surface); line-height: 1.5; color: var(--ink); }
.move__n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: .9375rem; }
@media (max-width: 479px) { .move__row { grid-template-columns: minmax(0, 1fr) auto; } .move__row code:last-of-type { grid-column: 1 / -1; } }
@media (min-width: 1200px) { .move { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 32px; align-items: start; } .move__map { position: sticky; top: calc(var(--header-h) + 40px); } }
html.js .move__map.is-in .move__row { animation: rise .5s var(--ease-out) both; }
html.js .move__map.is-in .move__row:nth-of-type(2) { animation-delay: .12s; }
html.js .move__map.is-in .move__row:nth-of-type(3) { animation-delay: .24s; }
html.js .move__map.is-in .move__row:nth-of-type(4) { animation-delay: .4s; }

/* Dark note (callout) */
.panel-dark--note { margin-top: 40px; padding: 28px 24px; }
.panel-dark__kicker { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; color: #fff; }
.panel-dark__kicker .ico { width: 22px; height: 22px; color: var(--accent-light); }
.panel-dark__text { margin-top: 12px; font-size: var(--fs-lead); line-height: 1.55; color: var(--on-dark); max-width: 60ch; }
@media (min-width: 768px) { .panel-dark--note { padding: 36px 40px; } }

/* ---------- Content plan card ---------- */
.plan { position: relative; padding: 22px 18px 20px; border-radius: 26px; background: var(--surface); }
.plan__head { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; margin: 0 60px 14px 0; }
.plan__rows { display: grid; gap: 8px; }
.plan__rows > div { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: #fff; }
.plan__rows dt { font-size: .75rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.plan__rows dd { font-weight: 600; display: flex; flex-wrap: wrap; gap: 6px; }
.plan__chip { padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); font-size: .8125rem; font-weight: 600; }
.plan__act { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #16a34a; color: #fff; font-size: .8125rem; }
.plan__act .ico { width: 13px; height: 13px; }

/* ---------- What to prepare: checklist ---------- */
.prep { display: grid; gap: 10px; margin-top: 32px; }
.prep li { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; border-radius: 18px; background: var(--surface); font-weight: 500; line-height: 1.5; color: var(--ink); }
.prep__box { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1.5px var(--ink) inset; }
.prep__box .ico { width: 16px; height: 16px; stroke-width: 2.8; color: var(--ink); }
html.js .prep.is-in .prep__box { animation: tick .45s cubic-bezier(.34,1.56,.64,1) both; animation-delay: calc(var(--d, 0ms) + 250ms); }
@keyframes tick { from { background: #fff; transform: scale(.7); } }
@media (min-width: 768px) { .prep { grid-template-columns: 1fr 1fr; gap: 12px; } }

/* Related card: small mocks inside links */
.rel .viz-rank { max-width: 300px; }
.rel .viz-funnel__row > span, .rel .viz-funnel__label { display: block; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .build__body > *, .build__score circle.is-on, .vital { transition: none; }
}
