/* S4U.pro Trader — стиль приложения поверх site/main.css (те же токены: тёплая бумага, острые углы,
   тонкие линии, зелёный акцент, тёмные «чернильные» и песочные блоки). Мобильный в первую очередь. */

:root {
	--tab-h: 62px;
	--top-h: 54px;
	--safe-b: env(safe-area-inset-bottom, 0px);
	--safe-t: env(safe-area-inset-top, 0px);
	--pad: 16px;
}
html { scroll-behavior: auto; }
body.app {
	min-height: 100vh;
	padding: calc(var(--top-h) + var(--safe-t)) 0 calc(var(--tab-h) + var(--safe-b) + 12px);
	background: var(--bg);
	background-image: none;
	-webkit-tap-highlight-color: transparent;
	overscroll-behavior-y: none;
}
.app-view { display: block; max-width: 760px; margin: 0 auto; padding: 0 var(--pad); outline: none; }

/* ---------- Шапка ---------- */
.app-top {
	position: fixed; inset: 0 0 auto; z-index: 40;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) var(--pad) 0;
	background: var(--header-bg); border-bottom: 1px solid var(--line);
	backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
}
.app-top .brand__text { font-size: 22px; }
.app-top__tag { margin-left: 8px; padding: 3px 7px; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent-strong); font: 600 10.5px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.app-top__right { display: flex; align-items: center; gap: 6px; }
.app-top__bell { position: relative; display: grid; place-items: center; width: 40px; height: 40px; margin-right: -8px; color: var(--text); }
.app-top__bell svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-top__bell b { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--red, #c62828); box-shadow: 0 0 0 2px var(--header-bg, #ebe7e0); }
.app-top__install { min-height: 34px; padding: 6px 14px; border: 0; border-radius: var(--radius); background: var(--accent); color: #fff; font: 700 13px var(--font); cursor: pointer; }

/* ---------- Нижнее меню: тёмное, «чернильное», как тёмные блоки сайта ---------- */
.tabbar {
	position: fixed; inset: auto 0 0; z-index: 40;
	display: grid; grid-template-columns: repeat(6, 1fr);
	height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
	background: var(--ink); border-top: 1px solid #000;
}
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; color: rgba(242, 237, 229, .62); font: 600 10.5px/1 var(--font); white-space: nowrap; letter-spacing: .01em; text-decoration: none; }
.tabbar a::before { content: ""; position: absolute; top: -1px; left: 50%; width: 36px; margin-left: -18px; height: 2px; background: #2fd08f; transform: scaleX(0); transition: transform .25s var(--ease); }
.tabbar a.is-on { color: #fff; }
.tabbar a.is-on::before { transform: scaleX(1); }
.tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.is-on svg { color: #2fd08f; }
.tabbar__dot { position: absolute; top: 9px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--ink); }

/* ---------- Общие блоки ---------- */
.hero { padding: 26px 0 6px; }
.hero .eyebrow { margin-bottom: 10px; color: var(--accent-strong); }
.hero h1 { margin: 0 0 10px; font-size: clamp(32px, 9vw, 46px); font-weight: 700; letter-spacing: -.035em; line-height: 1.02; }
.hero p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.hero--sm { padding-top: 22px; }
.hero--sm h1 { font-size: clamp(28px, 7.5vw, 38px); }
.sec { margin: 26px 0 0; }
.sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.sec__head h2, .sec__t { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.sec__t { margin: 0 0 12px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.sec__head a { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 6px 0; color: var(--accent-strong); font: 800 13px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.sec__head a .ico { width: 20px; height: 20px; stroke-width: 2.6; }
.badge { display: inline-block; margin-top: 12px !important; padding: 4px 9px; background: var(--red); color: #fff !important; font: 600 11px var(--font-mono) !important; letter-spacing: .08em; text-transform: uppercase; }
.offline { margin: 14px 0 0; padding: 9px 12px; background: var(--sand); border: 1px solid var(--sand-line); color: var(--text-2); font-size: 13.5px; }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }
.spin { display: inline-block; width: 28px; height: 28px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Промо-карточки ---------- */
.promo { display: flex; flex-direction: column; gap: 7px; min-height: 196px; padding: 20px 18px 18px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); text-decoration: none; }
.promo:hover { color: var(--text); }
.promo__k { display: inline-flex; align-items: center; gap: 7px; color: var(--accent-strong); font: 600 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.promo__k .ico { width: 16px; height: 16px; }
.promo__t { font: 700 22px/1.15 var(--font-display); letter-spacing: -.02em; }
.promo__p { color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.promo__b { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: auto; padding: 10px 15px; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; }
.promo__b .ico { width: 16px; height: 16px; }
.promo--bonus { background: radial-gradient(120% 140% at 0% 0%, #13a372 0%, #0a7d55 45%, #065a3d 100%); border: 0; color: #fff; }
.promo--bonus:hover { color: #fff; }
.promo--bonus .promo__k, .promo--bonus .promo__p { color: rgba(255, 255, 255, .86); }
.promo--bonus .promo__t { font-size: 27px; }
.promo--bonus .promo__b, .promo--ink .promo__b { background: #ffc93c; color: #111; }
.promo--ink { background: var(--ink); border-color: var(--ink); color: var(--ink-text); }
.promo--ink:hover { color: var(--ink-text); }
.promo--ink .promo__k { color: #ffc93c; }
.promo--ink .promo__p { color: var(--ink-muted); }
.promo--sand { background: var(--sand); border-color: var(--sand-line); }
.promo--sand .promo__k { color: var(--gold); }
.promo--tg .promo__k { color: #1d8acb; }
.promo--tg .promo__b { background: #229ed9; }
.promo-row { display: grid; gap: 12px; margin-top: 18px; }

.carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 0; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad); scroll-padding: 0 var(--pad); }
.carousel::-webkit-scrollbar { display: none; }
.carousel .promo { flex: 0 0 100%; scroll-snap-align: start; margin-right: 0; }
.carousel .promo + .promo { margin-left: 12px; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.dots i { width: 6px; height: 6px; background: var(--line-2); transition: width .25s var(--ease), background .25s; }
.dots i.is-on { width: 18px; background: var(--accent); }

/* ---------- Сегодня на рынке / календарь ---------- */
.today { background: var(--surface); border: 1px solid var(--line-2); }
.today__none { margin: 0; padding: 18px; color: var(--muted); }
.today__warn { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 12px 14px; background: rgba(255, 201, 60, .16); border-top: 1px solid rgba(154, 100, 0, .2); color: var(--text-2); font-size: 14px; line-height: 1.45; }
.today__warn .ico { flex: none; margin-top: 1px; color: var(--gold); }
.evs { list-style: none; margin: 0; padding: 0; }
.ev { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px 14px; border-top: 1px solid var(--line); }
.evs .ev:first-child { border-top: 0; }
.ev__time { font: 600 15px/1.35 var(--font-mono); font-variant-numeric: tabular-nums; }
.ev__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ev__t { font-size: 15px; line-height: 1.35; }
.ev__t b { font: 600 12px var(--font-mono); letter-spacing: .04em; color: var(--text-2); }
.ev__f { color: var(--muted); font: 500 12px var(--font-mono); }
.ev__f b { color: var(--text); }
.ev__imp { padding: 3px 7px; font: 600 10px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.ev__imp em { font-style: normal; }
.ev--high .ev__imp { background: rgba(200, 50, 61, .1); color: var(--red); }
.ev--medium .ev__imp { background: rgba(154, 100, 0, .1); color: var(--gold); }
.ev--holiday .ev__imp { background: var(--bg-2); color: var(--muted); }
.ev--high .ev__time { color: var(--red); }
.ev.is-past { opacity: .5; }
.day { margin: 22px 0 0; background: var(--surface); border: 1px solid var(--line-2); }
.day__t { margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); font: 600 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.day.is-today { border-color: var(--accent); }
.day.is-today .day__t { background: var(--accent); color: #fff; }
.switch { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; font-weight: 600; font-size: 14.5px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: relative; width: 40px; height: 22px; background: var(--line-2); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }

/* ---------- Плитки калькуляторов ---------- */
.tiles { display: grid; grid-template-columns: 1fr; gap: 10px; }
.tiles--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { display: flex; flex-direction: column; gap: 6px; min-height: 128px; padding: 16px; border: 1px solid rgba(10, 125, 85, .35); border-left: 4px solid var(--accent); background: #e4f1ea; color: var(--text); text-decoration: none; transition: background .2s, border-color .2s; }
.tile:hover, .tile:active { color: var(--text); background: #d6eadf; border-color: var(--accent); }
.tile__t { font: 700 17px/1.2 var(--font-display); letter-spacing: -.01em; }
.tile__p { color: var(--text-2); font-size: 13.5px; line-height: 1.4; }
.tile__go { display: inline-flex; align-items: center; gap: 5px; margin-top: auto; color: var(--accent-strong); font: 700 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.tile__go .ico { width: 14px; height: 14px; }
.tiles:not(.tiles--2) .tile { min-height: 0; }

/* ---------- Дневник ---------- */
.jcard { display: flex; flex-direction: column; gap: 8px; padding: 22px 18px 18px; background: var(--ink); color: var(--ink-text); text-decoration: none; background-image: linear-gradient(135deg, transparent 0 60%, rgba(25, 179, 126, .14) 100%); }
.jcard:hover { color: var(--ink-text); }
.jcard__k { display: inline-flex; align-items: center; gap: 7px; color: var(--accent-bright); font: 600 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.jcard__t { font: 700 25px/1.1 var(--font-display); letter-spacing: -.025em; }
.jcard__p { color: var(--ink-muted); font-size: 14.5px; line-height: 1.45; }
.jcard__b { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 6px; padding: 10px 15px; background: var(--accent-bright); color: #08251a; font-weight: 700; font-size: 14px; }
.jcard__b .ico { width: 16px; height: 16px; }

/* ---------- Статьи ---------- */
.posts { display: grid; gap: 12px; }
.post { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: start; color: var(--text); text-decoration: none; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.post:hover { color: var(--text); }
.post__img { display: block; aspect-ratio: 1200 / 630; overflow: hidden; background: var(--bg-2); }
.post__img--art { display: grid; place-items: center; padding: 6%; background: var(--sand); }
.post__img--art .art { width: 100%; height: 100%; }
.post__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.post__c { color: var(--accent-strong); font: 600 10px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.post__t { font: 600 15px/1.3 var(--font-display); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post__d { color: var(--faint); font: 500 11.5px var(--font-mono); }
.post.is-new .post__c::after, .post.is-new .post__d::before { content: ""; }
.post.is-new .post__t::before { content: "NEW"; display: inline-block; margin-right: 6px; padding: 1px 5px; background: var(--red); color: #fff; font: 600 9.5px/1.5 var(--font-mono); letter-spacing: .08em; vertical-align: 2px; }
.posts--row { grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad); scroll-padding: 0 var(--pad); }
.posts--row::-webkit-scrollbar { display: none; }
.posts--row .post { grid-template-columns: 1fr; scroll-snap-align: start; border: 1px solid var(--line-2); background: var(--surface); padding: 0 0 12px; }
.posts--row .post__body { padding: 0 12px; }

/* ---------- Экран калькулятора ---------- */
.calc-screen { padding-top: 14px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font: 600 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.calc-screen__t { margin: 12px 0 6px; font-size: clamp(28px, 7.5vw, 38px); font-weight: 700; letter-spacing: -.03em; }
.calc-screen__p { margin: 0 0 16px; color: var(--muted); }
.calc-host .calc { grid-template-columns: minmax(0, 1fr); box-shadow: none; }
.calc-host .calc__in, .calc-host .calc__out { padding: 18px 16px; }
.calc-host .calc__main strong { font-size: clamp(48px, 14vw, 64px); }
.calc-host .calc__grid { grid-template-columns: minmax(0, 1fr); }
.calc-host .seg__opt span { padding: 9px 11px; }
.calc-host .calc .pick__list { width: 100%; max-height: 50vh; }
.calc-full { margin: 12px 0 0; }
.calc-full a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.learn { padding: 16px 18px; background: var(--sand); border: 1px solid var(--sand-line); }
.learn__t { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 700; }
.learn ul { margin: 0; padding-left: 18px; }
.learn li { margin: 6px 0; line-height: 1.4; }

/* ---------- «Ещё» ---------- */
.rows { border: 1px solid var(--line-2); background: var(--surface); }
.row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 14px; color: var(--text); text-decoration: none; }
.row + .row { border-top: 1px solid var(--line); }
.row:hover { color: var(--text); }
.row__ico { display: grid; place-items: center; width: 40px; height: 40px; background: var(--accent-soft); color: var(--accent-strong); }
.row__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row__body b { font-weight: 600; font-size: 15.5px; }
.row__body small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.row > .ico { color: var(--faint); }
.note { padding: 16px; background: var(--sand); border: 1px solid var(--sand-line); }
.note p { margin: 6px 0 0; color: var(--text-2); }
.qr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--line-2); }
.qr img { display: block; width: 132px; height: 132px; }
.qr p { margin: 4px 0 8px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.qr__url { color: var(--text) !important; font: 600 14px var(--font-mono) !important; }
.field select { height: 48px; font-size: 16px; }
.risk { margin: 26px 0 0; color: var(--faint); font-size: 12.5px; line-height: 1.5; }
.ver { margin: 6px 0 0; color: var(--faint); font: 500 11px var(--font-mono); }

/* ---------- Подсказка установки на iPhone ---------- */
.ios-hint { position: relative; padding: 16px 44px 16px 16px; background: var(--surface); border: 1px solid var(--accent); }
.ios-hint p { margin: 4px 0 10px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.ios-hint__steps { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-strong); font-weight: 600; font-size: 14px; }
.ios-hint__steps i { display: grid; place-items: center; width: 20px; height: 20px; background: var(--accent); color: #fff; font: 600 11px var(--font-mono); font-style: normal; }
.ios-hint__x { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border: 0; background: none; color: var(--faint); font-size: 22px; cursor: pointer; }

/* ---------- Тост ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); z-index: 50; padding: 10px 16px; background: var(--ink); color: var(--ink-text); font-size: 14px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 640px) {
	.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tiles--2 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.promo-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.post { grid-template-columns: 180px minmax(0, 1fr); }
	.posts--row { grid-auto-columns: 46%; }
	.calc-host .calc__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 359px) {
	:root { --pad: 12px; }
	.tiles--2 { grid-template-columns: 1fr; }
	.post { grid-template-columns: 92px minmax(0, 1fr); }
	.app-top .brand__text { font-size: 20px; }
}
[dir="rtl"] .back .ico, [dir="rtl"] .ico-arrow, [dir="rtl"] .row > .ico, [dir="rtl"] .tile__go .ico, [dir="rtl"] .promo__b .ico { transform: scaleX(-1); }

/* ---------- Уведомления ---------- */
.pn { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: start; padding: 16px; background: var(--surface); border: 1px solid var(--line-2); }
.pn > .ico { width: 24px; height: 24px; margin-top: 2px; color: var(--muted); }
.pn--on { border-color: var(--accent); }
.pn--on > .ico { color: var(--accent-strong); }
.pn p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.pn .btn { grid-column: 1 / -1; margin-top: 12px; justify-self: start; }
.pn-set.is-off { opacity: .55; }
.opt { display: flex; align-items: center; gap: 14px; padding: 13px 14px; cursor: pointer; }
.opt + .opt { border-top: 1px solid var(--line); }
.opt__body { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.opt__body b { font-weight: 600; font-size: 15.5px; }
.opt__body small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.opt .switch { margin: 0; flex: none; }
.opt--radio input { position: absolute; opacity: 0; }
.opt--radio i { flex: none; width: 20px; height: 20px; border: 2px solid var(--line-2); border-radius: 50%; transition: border .15s; }
.opt--radio input:checked + i { border: 6px solid var(--accent); }
.opt--radio input:focus-visible + i, .chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; transition: opacity .2s; }
.chips.is-off { opacity: .4; pointer-events: none; }
.chips__t { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: 7px 11px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font: 600 13px var(--font-mono); cursor: pointer; }
.chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.hours { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.hours select { height: 40px; padding: 0 8px; font: 600 14px var(--font-mono); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); }
.hours i { color: var(--faint); font-style: normal; }
.pn-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: 600; font-size: 14px; color: var(--accent-strong); text-decoration: none; }
.opt--wrap { flex-wrap: wrap; cursor: default; }
.opt--wrap .opt__body { flex-basis: 100%; }
.opt--wrap .hours select { flex: 1; min-width: 104px; }

/* ---------- Читаемость: на телефоне серый тонкий текст на белом читается плохо — темнее и плотнее ---------- */
body.app {
	--text: #0b0e11; --text-2: #1b2026; --muted: #3a4149; --faint: #5c636b;
	font-weight: 500; -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto;
}
body.app p, body.app small, body.app li, body.app td { font-weight: 500; }
body.app .hero p, body.app .post__t, body.app .opt__body small, body.app .row__body small { color: var(--text-2); }
body.app [class*="__k"], body.app .back, body.app .ev__m, body.app .post__d, body.app .post__c, body.app .tag { font-weight: 600; }
.ev.is-past { opacity: .62; }

/* ---------- Поиск и рубрики («Статьи») ---------- */
.search__box { display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1.5px solid var(--line-2); background: var(--surface); }
.search__box:focus-within { border-color: var(--accent); }
.search__box .ico { flex: none; width: 18px; height: 18px; color: var(--muted); }
.search__box input { flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; color: var(--text); font: 500 16px var(--font); outline: none; }
.cats { display: flex; gap: 8px; margin: 12px calc(var(--pad) * -1) 0; padding: 0 var(--pad) 4px; overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font: 600 13px var(--font); white-space: nowrap; cursor: pointer; }
.cat .ico { width: 14px; height: 14px; }
.cat.is-on { border-color: var(--accent); background: var(--accent); color: #fff; }
.res-head { margin: 0 0 12px; color: var(--muted); font: 600 12px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.more-btn { display: block; width: 100%; margin-top: 14px; }
.more-note, .empty-note { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.more-note a { color: var(--accent-strong); font-weight: 600; }
.empty-note { padding: 22px 16px; background: var(--sand); color: var(--text-2); }
.post { position: relative; }
.post__fav { position: absolute; top: 4px; left: 4px; display: grid; place-items: center; width: 24px; height: 24px; background: var(--ink); color: #ffd25a; }
.post__fav .ico { width: 14px; height: 14px; fill: currentColor; }

/* ---------- Чтение статьи ---------- */
.reader-top { position: sticky; top: calc(var(--top-h) + var(--safe-t)); z-index: 5; display: flex; align-items: center; justify-content: space-between; margin: 0 calc(var(--pad) * -1); padding: 8px var(--pad); background: var(--bg); border-bottom: 1px solid var(--line); }
.reader-top__r { display: flex; gap: 6px; }
.ico-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); cursor: pointer; }
.ico-btn .ico { width: 19px; height: 19px; }
.ico-btn.is-on { border-color: var(--ink); background: var(--ink); color: #ffd25a; }
.ico-btn.is-on .ico { fill: currentColor; }
.reader { padding: 18px 0 10px; }
.reader__t { margin: 0 0 8px; font-size: clamp(25px, 6.6vw, 34px); line-height: 1.15; letter-spacing: -.02em; }
.reader__c { margin: 0 0 16px; color: var(--accent-strong); font: 600 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.reader__body { font-size: 17px; line-height: 1.6; color: var(--text); overflow-wrap: anywhere; }
.reader__body img, .reader__body video, .reader__body iframe { max-width: 100%; height: auto; }
.reader__body iframe { width: 100%; aspect-ratio: 16 / 9; }
.reader__body table { display: block; max-width: 100%; overflow-x: auto; }
.reader__body pre { overflow-x: auto; }
.reader .promo-row { margin-top: 18px; }

/* ---------- Лента: Telegram и видео ---------- */
.seg { display: inline-flex; margin-top: 14px; border: 1.5px solid var(--ink); }
.seg a { padding: 8px 16px; color: var(--ink); font: 600 13px var(--font-mono); letter-spacing: .04em; text-decoration: none; }
.seg a.is-on { background: var(--ink); color: #fff; }
.feed { display: flex; flex-direction: column; gap: 14px; }
.tgp { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid #229ed9; scroll-margin-top: 80px; }
.tgp.is-hl { border-color: var(--accent); border-left-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tgp__imgs { display: grid; gap: 4px; margin: -14px -14px 12px; }
.tgp__imgs--2, .tgp__imgs--4 { grid-template-columns: 1fr 1fr; }
.tgp__imgs--3 { grid-template-columns: 1fr 1fr; }
.tgp__imgs--3 img:first-child { grid-column: 1 / -1; }
.tgp__imgs img { display: block; width: 100%; height: 100%; max-height: 420px; object-fit: cover; background: var(--bg-2); }
.tgp__text { color: var(--text); font-size: 15.5px; line-height: 1.5; overflow-wrap: anywhere; }
.tgp__text a { color: var(--accent-strong); text-decoration: underline; }
.tgp__meta { display: flex; justify-content: space-between; gap: 10px; margin: 10px 0 0; color: var(--faint); font: 600 11.5px var(--font-mono); }
.tgp__meta a { display: inline-flex; align-items: center; gap: 4px; color: #1b87bb; }
.tgp__meta .ico { width: 13px; height: 13px; }
.tgp--short .tgp__imgs { max-height: 190px; overflow: hidden; }
.tgp--short .tgp__text { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.feed-peek { display: block; color: inherit; text-decoration: none; margin-bottom: 10px; }
.ytl { display: flex; flex-direction: column; gap: 12px; }
.ytc { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px; align-items: start; color: var(--text); text-decoration: none; }
.ytc:hover { color: var(--text); }
.ytc__img { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink); }
.ytc__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ytc__img i { position: absolute; inset: 0; display: grid; place-items: center; }
.ytc__img i { place-items: end start; padding: 6px; }
.ytc__img i .ico { width: 26px; height: 26px; padding: 3px; background: #d4201c; color: #fff; }
.ytc__img i .ico circle { display: none; }
.ytc__img i .ico path { fill: #fff; }
.ytc__body { display: flex; flex-direction: column; gap: 4px; }
.ytc__body b { font: 600 15px/1.3 var(--font-display); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ytc__body small { color: var(--faint); font: 500 11.5px var(--font-mono); }

/* ---------- Торговые сессии ---------- */
.sec__aside { color: var(--faint); font: 600 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.sess { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; background: var(--line); border: 1px solid var(--line); }
.ses { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; padding: 11px 13px; background: var(--surface); }
.ses__n { font-weight: 700; color: var(--text); }
.ses__h { color: var(--muted); font: 600 13px var(--font-mono); text-align: right; }
.ses__st { grid-column: 1 / -1; color: var(--faint); font-size: 13.5px; font-weight: 600; }
.ses.is-open .ses__n::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); vertical-align: 1px; }
.ses.is-open .ses__st { color: var(--accent-strong); }
.ses__bar { grid-column: 1 / -1; height: 3px; background: var(--line); }
.ses__bar i { display: block; height: 100%; background: var(--accent); }
.ses:not(.is-open) .ses__bar { display: none; }
.sess__note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px; background: var(--accent-soft, #e4f1ea); color: var(--text-2); font-size: 14px; font-weight: 600; }
.sess__note .ico { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--accent-strong); }
.feed-peek, .feed-peek a, .feed-peek .tgp__text { color: var(--text); text-decoration: none; }
.post__img--none { display: grid; place-items: center; background: var(--sand); color: var(--accent-strong); font: 700 18px var(--font-display); letter-spacing: -.02em; }

/* ---------- Закрытые каналы ---------- */
.club-box { position: relative; padding: 20px 18px 18px; background: var(--ink); color: var(--ink-text); }
.club-box > .ico { width: 30px; height: 30px; color: #ffd25a; }
.club-steps { margin: 12px 0 16px; padding-left: 20px; color: #fff; font-size: 15.5px; line-height: 1.5; font-weight: 500; }
.club-steps li + li { margin-top: 6px; }
.club-go { display: flex; justify-content: center; gap: 8px; width: 100%; }
.club-go .ico { width: 18px; height: 18px; }
.club-wait { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; color: var(--ink-text); font-size: 14px; }
.club-wait .spin { width: 18px; height: 18px; }
.club-warn { margin: 0 0 14px; padding: 10px 12px; background: #fff3cd; color: #5c4400; font-size: 14px; font-weight: 600; }
.tgp--club { border-left-color: #b5201c; }
.tgp__ch { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; color: #b5201c; font: 700 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.tgp__ch .ico { width: 13px; height: 13px; }
.tgp__extra { margin: 8px 0 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.tgp__text blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid var(--line-2); }
.club-accs p { margin: 0 0 10px; color: var(--text-2); font-size: 14.5px; }
.club-accs .btn { margin: 0 6px 8px 0; }

/* RTL (ar, fa): стрелки «дальше» смотрят влево */
[dir="rtl"] .sec__head a .ico, [dir="rtl"] .promo__b .ico, [dir="rtl"] .jcard__b .ico { transform: scaleX(-1); }

/* ---------- Окно установки ---------- */
.btn--block { display: flex; width: 100%; justify-content: center; }
.ins { position: fixed; inset: 0; z-index: 300; display: flex; align-items: flex-end; justify-content: center; }
.ins__bg { position: absolute; inset: 0; background: rgba(10, 11, 13, .55); opacity: 0; transition: opacity .25s; }
.ins__box { position: relative; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; padding: 22px 20px calc(18px + var(--safe-b)); background: var(--surface); color: var(--text); box-shadow: 0 -20px 50px -10px rgba(0, 0, 0, .35); transform: translateY(100%); transition: transform .3s var(--ease); }
.ins.is-on .ins__bg { opacity: 1; }
.ins.is-on .ins__box { transform: none; }
.ins__x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; background: none; color: var(--faint); font-size: 26px; line-height: 1; cursor: pointer; }
.ins__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ins__head img { border-radius: 22%; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .4); }
.ins__head b { display: block; font: 700 17px var(--font-display, var(--font)); }
.ins__head small { color: var(--muted); font-size: 13px; }
.ins__box h2 { margin: 0 0 6px; font: 700 22px/1.15 var(--font-display, var(--font)); letter-spacing: -.02em; }
.ins__box > p { margin: 0 0 16px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.ins__go { min-height: 54px; font-size: 17px; }
.ins__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ins__steps li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bg); font-size: 15.5px; line-height: 1.35; }
.ins__steps li > i { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font: 700 14px var(--font-mono); font-style: normal; }
.ins__i { display: inline-block; width: 22px; height: 22px; margin: 0 2px; vertical-align: -5px; color: #0a84ff; }
.ins__dots { display: inline-block; padding: 0 6px; border-radius: 6px; background: rgba(10, 132, 255, .12); color: #0a84ff; font-weight: 800; letter-spacing: .05em; }
.ins__note { margin: 0 0 12px; padding: 12px 14px; background: var(--bg); font-size: 15px; line-height: 1.45; }
.ins__copy { margin-top: 8px; }
.ins__later { display: block; width: 100%; margin-top: 10px; padding: 10px; border: 0; background: none; color: var(--muted); font: 600 14px var(--font); cursor: pointer; }
/* Стрелка к кнопке браузера: вниз по центру (Safari до 26), вниз справа (Safari 26), вверх справа (iPad, Chrome, Android) */
.ins__arrow { position: fixed; z-index: 301; width: 46px; height: 46px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v17M5 13l7 7 7-7'/%3E%3C/svg%3E"); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6)); opacity: 0; transition: opacity .3s .3s; animation: ins-bob 1.1s ease-in-out infinite; pointer-events: none; }
.ins.is-on .ins__arrow { opacity: 1; }
.ins__arrow--center { bottom: 6px; left: 50%; margin-left: -23px; }
.ins__arrow--right { bottom: 6px; right: 14px; }
.ins__arrow--top { top: 6px; right: 14px; transform: rotate(180deg); animation-name: ins-bob-up; }
.ins:has(.ins__arrow--center) .ins__box, .ins:has(.ins__arrow--right) .ins__box { margin-bottom: 58px; }
@keyframes ins-bob { 50% { translate: 0 8px; } }
@keyframes ins-bob-up { 50% { translate: 0 -8px; } }
[dir="rtl"] .ins__x { right: auto; left: 8px; }
.reader__body .s4u-tbl table { display: table; max-width: none; }
