/* Страница кейсов Яндекс Директ — жёлто-чёрная тема */
body.direct { --bg:#0b0b0b; --bg-panel:#141414; --bg-elevated:#1b1b1b; --border:#2b2b2b; --border-soft:#1f1f1f;
  --text:#f5f2e8; --text-dim:#a7a395; --text-faint:#64615a;
  --purple:#ffdb4d; --cyan:#ffdb4d; --green:#ffdb4d; --yellow:#ffdb4d; --y:#ffdb4d; --y2:#ffb800; }
body.direct .bg__glow--1 { background: radial-gradient(circle, rgba(255,219,77,.30), transparent 70%); }
body.direct .bg__glow--2 { background: radial-gradient(circle, rgba(255,184,0,.22), transparent 70%); }
body.direct .bg__glow--3 { background: radial-gradient(circle, rgba(255,219,77,.14), transparent 70%); }
body.direct .btn--primary { color: #111; }
body.direct ::selection { background: var(--y); color: #111; }

.d-hero { padding-top: 5rem; padding-bottom: 2rem; max-width: 900px; }
.d-hero__title { font-family: var(--mono); font-weight: 800; font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.05; letter-spacing: -.02em; margin: 0 0 1rem; }
.d-hero__title mark { background: var(--y); color: #111; padding: 0 .2em; border-radius: 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.d-hero__lede { color: var(--text-dim); font-size: 1.05rem; line-height: 1.75; max-width: 62ch; }

.d-total { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-top: 2.5rem; }
.d-total__item { background: var(--bg-panel); padding: 1.2rem 1.25rem; }
.d-total__num { font-family: var(--mono); font-weight: 800; font-size: clamp(1.4rem, 3vw, 2rem); color: var(--y); line-height: 1.1; }
.d-total__label { margin-top: .45rem; font-family: var(--mono); font-size: .72rem; color: var(--text-dim); line-height: 1.5; }
.d-note { margin-top: .9rem; font-family: var(--mono); font-size: .75rem; color: var(--text-faint); }
@media (max-width: 780px) { .d-total { grid-template-columns: repeat(2, 1fr); } }

.d-list { display: grid; gap: 1.75rem; padding-top: 3.5rem; padding-bottom: 2rem; max-width: 1000px; }
.camp { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease), border-color .2s; }
.camp.in-view { opacity: 1; transform: none; }
.camp:hover { border-color: rgba(255,219,77,.45); }
.camp__head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; padding: 1.1rem 1.4rem; background: var(--y); color: #111; }
.camp__num { font-family: var(--mono); font-weight: 800; font-size: .8rem; background: #111; color: var(--y); border-radius: 6px; padding: .2rem .55rem; }
.camp__name { font-family: var(--mono); font-weight: 800; font-size: 1.3rem; letter-spacing: .01em; }
.camp__niche { font-size: .85rem; opacity: .75; }
.camp__status { margin-left: auto; display: inline-flex; align-items: center; gap: .45rem; font-family: var(--mono); font-size: .74rem; font-weight: 600; background: #111; color: var(--y); border-radius: 999px; padding: .3rem .8rem; }
.camp__status i { width: 7px; height: 7px; border-radius: 50%; background: var(--y); animation: pulse 2s ease-in-out infinite; }
.camp__body { padding: 1.6rem 1.4rem 1.7rem; }

.budget { margin-bottom: 1.8rem; }
.budget__row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-family: var(--mono); font-size: .8rem; color: var(--text-dim); margin-bottom: .55rem; }
.budget__row b { color: var(--text); font-weight: 600; }
.budget__bar { height: 10px; border-radius: 99px; background: var(--bg-elevated); border: 1px solid var(--border); overflow: hidden; }
.budget__fill { height: 100%; width: 0; border-radius: 99px; background: repeating-linear-gradient(135deg, var(--y) 0 10px, var(--y2) 10px 20px); transition: width 1.4s var(--ease) .3s; }
.camp.in-view .budget__fill { width: var(--w); }

.funnel { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.fstep { position: relative; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1rem 1.05rem; }
.fstep:not(:last-child)::after { content: attr(data-conv); position: absolute; right: -.95rem; top: 50%; transform: translateY(-50%); z-index: 2; font-family: var(--mono); font-size: .66rem; font-weight: 700; background: var(--y); color: #111; border-radius: 999px; padding: .15rem .45rem; white-space: nowrap; }
.fstep__num { font-family: var(--mono); font-weight: 800; font-size: clamp(1.3rem, 2.6vw, 1.8rem); line-height: 1; }
.fstep:last-child { border-color: rgba(255,219,77,.5); background: rgba(255,219,77,.07); }
.fstep:last-child .fstep__num { color: var(--y); }
.fstep__label { margin-top: .5rem; font-family: var(--mono); font-size: .72rem; color: var(--text-dim); line-height: 1.4; }
@media (max-width: 780px) { .funnel { grid-template-columns: repeat(2, 1fr); gap: 1.1rem .9rem; } .fstep:nth-child(2)::after { display: none; } }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-top: 1.1rem; }
.kpi { border: 1px dashed var(--border); border-radius: 10px; padding: .85rem 1rem; }
.kpi__v { font-family: var(--mono); font-weight: 700; font-size: 1.15rem; color: var(--y); }
.kpi__l { margin-top: .3rem; font-family: var(--mono); font-size: .7rem; color: var(--text-dim); line-height: 1.4; }
@media (max-width: 560px) { .kpis { grid-template-columns: 1fr; } }
.camp__foot { margin-top: 1.3rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.camp__foot a { font-family: var(--mono); font-size: .85rem; color: var(--y); }
.camp__foot a:hover { text-decoration: underline; }
.camp__wait { font-family: var(--mono); font-size: .88rem; line-height: 1.8; color: var(--text-dim); border: 1px dashed rgba(255,219,77,.4); border-radius: 10px; padding: 1.1rem 1.2rem; }

.d-gloss { max-width: 1000px; padding-top: 3rem; padding-bottom: 1rem; }
.d-gloss__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.4rem; }
.d-gloss__item { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 10px; padding: 1.1rem 1.2rem; }
.d-gloss__item h3 { font-family: var(--mono); font-size: .95rem; color: var(--y); margin-bottom: .45rem; }
.d-gloss__item p { font-size: .85rem; line-height: 1.65; color: var(--text-dim); }
@media (max-width: 780px) { .d-gloss__grid { grid-template-columns: 1fr; } }

/* --- живые элементы --- */
.ticker { overflow: hidden; border-block: 1px solid var(--border); background: var(--y); color: #111; margin: 1.5rem -1.25rem 0; }
.ticker__track { display: flex; width: max-content; animation: tick 40s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker span { font-family: var(--mono); font-weight: 700; font-size: .82rem; padding: .6rem 1.4rem; white-space: nowrap; }
.ticker span::after { content: '★'; margin-left: 2.8rem; opacity: .5; }
@keyframes tick { to { transform: translateX(-50%); } }

.serp-wrap { max-width: 900px; padding-top: 3.5rem; }
.serp { background: #fff; color: #222; border-radius: 14px; padding: 1.1rem; box-shadow: 0 30px 60px -25px rgba(255,219,77,.35); font-family: var(--sans); }
.serp__bar { display: flex; align-items: center; gap: .8rem; border: 2px solid #ffdb4d; border-radius: 12px; padding: .65rem .9rem; min-height: 3rem; }
.serp__logo { width: 26px; height: 26px; border-radius: 50%; background: #fc3f1d; color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .85rem; flex-shrink: 0; }
.serp__q { font-size: 1rem; }
.serp__caret { width: 2px; height: 1.2em; background: #222; animation: blink 1s step-end infinite; }
.serp__ad { margin-top: 1.1rem; padding: .2rem .4rem .4rem; opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s var(--ease); }
.serp__ad.is-on { opacity: 1; transform: none; }
.serp__meta { font-size: .8rem; color: #666; } .serp__meta b { background: #eee; border-radius: 4px; padding: 0 .35rem; margin-right: .4rem; font-weight: 500; }
.serp__title { font-size: 1.2rem; color: #1a0dab; margin: .3rem 0 .25rem; font-weight: 500; }
.serp__text { font-size: .92rem; line-height: 1.5; color: #333; }
.serp__links { margin-top: .4rem; font-size: .85rem; color: #1a0dab; }

.radar { position: relative; width: 120px; height: 120px; margin: 0 auto 1.4rem; border-radius: 50%; border: 1px solid rgba(255,219,77,.5); background: radial-gradient(circle, rgba(255,219,77,.08), transparent 70%); overflow: hidden; }
.radar i { position: absolute; inset: 0; background: conic-gradient(from 0deg, rgba(255,219,77,.55), transparent 28%); animation: spin 3s linear infinite; }
.radar b { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--y); box-shadow: 0 0 10px var(--y); animation: blip 3s ease-in-out infinite; }
.radar b:nth-of-type(1) { top: 28%; left: 62%; } .radar b:nth-of-type(2) { top: 64%; left: 30%; animation-delay: 1s; } .radar b:nth-of-type(3) { top: 55%; left: 72%; animation-delay: 2s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blip { 0%,100% { opacity: .1; } 40% { opacity: 1; } }

.vs, .calc { max-width: 1000px; padding-top: 3rem; }
.vs__row { margin-top: 1.4rem; }
.vs__name { font-family: var(--mono); font-size: .78rem; color: var(--text-dim); margin-bottom: .45rem; }
.vs__line { display: grid; grid-template-columns: 5.5rem 1fr 4.5rem; align-items: center; gap: .75rem; margin-bottom: .35rem; font-family: var(--mono); font-size: .72rem; color: var(--text-dim); }
.vs__track { height: 12px; background: var(--bg-elevated); border-radius: 99px; overflow: hidden; }
.vs__fill { height: 100%; width: 0; border-radius: 99px; background: var(--y); transition: width 1.2s var(--ease); }
.vs__line:nth-of-type(2) .vs__fill { background: var(--y2); opacity: .75; }
.vs__line b { color: var(--text); text-align: right; font-weight: 600; }

.calc__box { margin-top: 1.4rem; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.calc__top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .85rem; color: var(--text-dim); margin-bottom: 1rem; }
.calc__top b { color: var(--y); font-size: 1.3rem; }
#calcR { width: 100%; accent-color: #ffdb4d; height: 28px; cursor: pointer; }
.calc__out { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.2rem 0; }
.calc__out div { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; }
.calc__out .is-main { border-color: rgba(255,219,77,.5); background: rgba(255,219,77,.07); }
.calc__out b { display: block; font-family: var(--mono); font-size: clamp(1.6rem, 4vw, 2.3rem); color: var(--text); } .calc__out .is-main b { color: var(--y); }
.calc__out span { font-family: var(--mono); font-size: .72rem; color: var(--text-dim); }

.coin { position: fixed; z-index: 120; pointer-events: none; font-family: var(--mono); font-weight: 800; color: #ffdb4d; text-shadow: 0 0 8px rgba(255,219,77,.6); }
