/* Legba · страница-приветствие (главная; запрос владельца 27.09 через backend). Значения — из tokens.css. */
.wl { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 700px) { .wl { padding: 0 var(--sp-6); } }

/* первый экран: текст слева, превью сводки справа */
/* сцены первого экрана режимов шириной в окно (100vw — с полосой прокрутки): лишнее по краям срезается, без прокрутки вбок (20.10) */
html:has(.wl-hero) { overflow-x: clip; }
.wl-hero { display: grid; gap: var(--sp-6); grid-template-columns: minmax(0, 1fr); align-items: center; padding: var(--sp-7) 0 var(--sp-6); position: relative; }
/* на широком экране текст стоит вровень с верхом сводки и не уходит при прокрутке, пока видна сводка (аудит 29.09) */
@media (min-width: 1040px) { .wl-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: var(--sp-7); align-items: start; }
  .wl-hero > .fade:first-child { position: sticky; top: calc(var(--nav-h) + var(--sp-6)); padding-top: var(--sp-5); } }
.wl-hero::before { content: ""; position: absolute; z-index: -1; right: 0; top: 0; width: 60%; height: 100%; pointer-events: none;
  background: radial-gradient(closest-side, var(--accent-a10), transparent 75%); }
.wl h1 { margin: 0 0 var(--sp-4); font: 600 var(--fs-48)/1.1 var(--font-ui); color: var(--head); letter-spacing: -.02em; max-width: 15ch; }
.wl h1 em { font-style: normal; color: var(--accent-hi); }   /* акцент — цветом того же шрифта, без вставки другой гарнитуры (аудит 29.09) */
@media (max-width: 600px) { .wl h1 { font-size: var(--fs-36); } }
.wl-sub { margin: 0 0 var(--sp-5); font: 400 var(--fs-18)/1.55 var(--font-ui); color: var(--text); max-width: 54ch; }
.wl-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: var(--sp-5); }
.wl-btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; border-radius: var(--r-pill); font: 600 var(--fs-14)/1 var(--font-ui); text-decoration: none; }
.wl-btn.pri { background: var(--accent); color: var(--on-accent); }
.wl-btn.pri:hover { background: var(--accent-hi); }
.wl-btn.sec { border: 1px solid var(--line); color: var(--head); background: var(--surface); }
.wl-btn.sec:hover { border-color: var(--accent); }
.wl-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wl-access { margin: -8px 0 var(--sp-5); font-size: var(--fs-13); color: var(--muted); }
.wl-access[hidden], .wl-btn[hidden] { display: none; }
.wl-how a { color: var(--accent); text-decoration: none; font-weight: 600; }   /* ссылка на открытую страницу «Как работает Legba» (12.11) */
.wl-how a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* сеть — строка пояснения, не кнопка */
.wl-chains { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: var(--fs-13); color: var(--muted); }
.wl-chain { display: inline-flex; gap: 6px; align-items: center; color: var(--text); }
.wl-chain svg { width: 12px; height: 12px; }

/* превью «кабинета»: сводка, токены, крупные переводы — настоящие данные */
.wl-pv { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-4); box-shadow: var(--shadow-2); overflow: hidden; min-width: 0; }
.wl-pvh { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-deep); font-size: var(--fs-12); color: var(--muted); }
.wl-pvh b { color: var(--head); font-weight: 600; }
.wl-pvh .sp { flex: 1; }
.wl-pvb { padding: 16px; display: grid; gap: 16px; }
.wl-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wl-tile { background: var(--surface-2); border-radius: var(--r-2); padding: 10px 12px; display: grid; gap: 4px; min-width: 0; }
.wl-tile .v { font: 600 var(--fs-24)/1.1 var(--font-mono); color: var(--head); }
.wl-tile .l { font-size: var(--fs-12); color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wl-h { font: 600 var(--fs-11)/1.2 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; gap: 6px; align-items: center; margin: 0 0 8px; }
/* таблица токенов: строка целиком — ссылка на Reckoning (a::after накрывает строку) */
.wl-coins { overflow-x: auto; }
.wl-tt { width: 100%; border-collapse: collapse; font-size: var(--fs-13); }
.wl-tt :is(th, td) { padding: 7px 8px; text-align: right; white-space: nowrap; }
.wl-tt :is(th[scope="row"], th[rowspan]:first-child) { text-align: left; padding-left: 6px; }
.wl-tt td.nd { text-align: center; }
.wl-tt thead th { font: 500 var(--fs-11)/1.2 var(--font-ui); color: var(--muted); padding-top: 0; padding-bottom: 6px; vertical-align: bottom; }
.wl-tt thead .grp { text-align: center; padding-bottom: 5px; border-bottom: 1px solid var(--line-soft); }
.wl-tt thead tr:last-child th { padding-top: 5px; }
.wl-tt tbody tr { position: relative; border-top: 1px solid var(--line-soft); transition: background-color var(--t-fast) var(--ease); }
.wl-tt tbody tr:hover { background-color: var(--surface-2); }
.wl-tt tbody th { font: 600 var(--fs-13)/1.2 var(--font-ui); }
.wl-tt tbody th a { color: var(--head); text-decoration: none; }
.wl-tt tbody th a::after { content: ""; position: absolute; inset: 0; }
.wl-tt tbody th a:focus-visible { outline: none; }
.wl-tt tbody th a:focus-visible::after { outline: 2px solid var(--focus); outline-offset: -2px; }
.wl-tt tbody th .m { display: block; margin-top: 2px; font: 400 var(--fs-11)/1.2 var(--font-ui); }
.wl-tt tbody th .m.d { display: inline; margin: 0 0 0 8px; color: var(--muted); }   /* дата другого среза — в строке токена */
.wl-more { margin-top: 6px; border: 0; background: none; padding: 6px 6px; color: var(--accent-hi); font: 500 var(--fs-12)/1 var(--font-ui); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
/* крупные переводы — свёрнуты в строку-заголовок (владелец 29.09: сводка лаконичнее) */
.wl-fold > summary { cursor: pointer; list-style: none; margin: 0; padding: 6px 0; border-top: 1px solid var(--line-soft); }
.wl-fold > summary::-webkit-details-marker { display: none; }
.wl-fold > summary::before { content: "▸"; color: var(--muted); margin-right: 2px; }
.wl-fold[open] > summary::before { content: "▾"; }
.wl-fold > summary .cnt { font-family: var(--font-mono); color: var(--head); letter-spacing: 0; }
.wl-fold > summary:hover { color: var(--head); }
.wl-fold > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wl-fold[open] > summary { margin-bottom: 8px; }
.wl-tt td { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text); }
.wl-tt td.sh { font-weight: 600; color: var(--accent-hi); }
.wl .m { color: var(--muted); }
.wl-feed { list-style: none; margin: 0; padding: 0; display: grid; max-height: 264px; overflow: auto; }
.wl-feed li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-12); align-items: baseline; }
.wl-feed li:last-child { border-bottom: 0; }
.wl-feed .t { font-family: var(--font-mono); color: var(--muted); }
.wl-feed .w { color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-feed .w b { color: var(--head); }
.wl-feed .a { font-family: var(--font-mono); color: var(--head); text-align: right; white-space: nowrap; }
.wl-feed .u { grid-column: 3; font-family: var(--font-mono); color: var(--muted); text-align: right; }
.wl-feed .p { grid-column: 2; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-note { font-size: var(--fs-11); color: var(--faint); margin: 6px 0 0; }

/* три возможности — «бенто» (владелец 01.10, образец — Magic UI Bento Grid): сетка 3 колонки, строки 22rem; у карточки фон-иллюстрация,
   внизу значок, заголовок и текст; при наведении текст уходит вверх, значок уменьшается, снизу появляется ссылка; на телефоне ссылка видна всегда */
.wl-feats { display: grid; gap: var(--sp-4); grid-template-columns: minmax(0, 1fr); grid-auto-rows: 22rem; padding: var(--sp-6) 0; }
@media (min-width: 1024px) {
  .wl-feats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bc-groups, .bc-reck { grid-column: 1 / span 2; }
  .bc-watch { grid-column: 3; grid-row: 1 / span 2; }
}
.wl-feat { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3);
  box-shadow: inset 0 -20px 80px -20px color-mix(in srgb, var(--head) 12%, transparent); }
[data-skin="atlas"] .wl-feat.bc { box-shadow: 0 0 0 1px rgba(0, 0, 0, .03), 0 2px 4px rgba(0, 0, 0, .05), 0 12px 24px rgba(0, 0, 0, .05); }   /* светлое — тени образца */
.bc-bg { position: absolute; inset: 0; pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 78%); mask-image: linear-gradient(to bottom, #000 30%, transparent 78%); }
.bc-bg svg { position: absolute; display: block; }
.bc-body { position: relative; z-index: 1; padding: var(--sp-5); display: grid; gap: var(--sp-3); }
.bc-txt { display: grid; gap: 6px; transition: transform .3s var(--ease); }
.wl-feat .ic { width: 48px; height: 48px; border-radius: var(--r-2); display: grid; place-items: center; background: var(--accent-a10); border: 1px solid var(--accent-a35); color: var(--accent);
  transform-origin: left center; transition: transform .3s var(--ease); margin-bottom: 4px; }
.wl-feat .ic svg { width: 24px; height: 24px; stroke: currentColor; }
.wl-feat h2 { margin: 0; font: 600 var(--fs-20)/1.3 var(--font-ui); color: var(--head); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wl-feat p { margin: 0; line-height: 1.55; color: var(--muted); max-width: 32rem; }
.wl-feat .lk { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--fs-14); }
.wl-feat .lk a { color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-weight: 600; }
.wl-feat .lk a:hover { text-decoration: underline; text-underline-offset: 3px; }
.bc-ar { width: 15px; height: 15px; fill: currentColor; transition: transform .2s var(--ease); }
.wl-feat .lk a:hover .bc-ar { transform: translateX(3px); }
.bc-tint { position: absolute; inset: 0; pointer-events: none; transition: background-color .3s var(--ease); }
.wl-feat:hover .bc-tint { background-color: color-mix(in srgb, var(--head) 3%, transparent); }
@media (min-width: 1024px) and (hover: hover) {   /* широкий экран: ссылка — только при наведении или фокусе, текст уходит вверх */
  .bc-cta { position: absolute; left: var(--sp-5); right: var(--sp-5); bottom: var(--sp-4); opacity: 0; transform: translateY(40px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
  .wl-feat:is(:hover, :focus-within) .bc-cta { opacity: 1; transform: none; }
  .wl-feat:is(:hover, :focus-within) .bc-txt { transform: translateY(-40px); }
  .wl-feat:is(:hover, :focus-within) .ic { transform: scale(.75); }
}
/* фоны: группы — астроида Canopy с группами; Reckoning и Rings — круги-уровни и перевод; прослушка — крупные переводы лентой */
.bc-groups .bc-bg svg, .bc-reck .bc-bg svg { right: 1%; top: 5%; width: 46%; height: 90%; }
@media (min-width: 1024px) { .bc-groups p, .bc-reck p { max-width: 27rem; } }   /* текст слева, схема справа — не налезают */
/* схемы целиком справа; к тексту слева — затухание (на телефоне текст поверх — схема бледнее) */
.bc-groups .bc-bg, .bc-reck .bc-bg { -webkit-mask-image: linear-gradient(to left, #000 55%, transparent 92%); mask-image: linear-gradient(to left, #000 55%, transparent 92%); }
@media (max-width: 1023px) { .bc-groups .bc-bg, .bc-reck .bc-bg { opacity: .5; } }
.bc-tx { animation: bc-tx 4.5s var(--ease) infinite; }
@keyframes bc-tx { 0% { offset-distance: 0%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
.bc-feed { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 42%, transparent 72%); mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 42%, transparent 72%); }
.bc-feed ul { list-style: none; margin: 0; padding: var(--sp-4); display: grid; gap: 10px; animation: bc-up 60s linear infinite; }
@keyframes bc-up { to { transform: translateY(-50%); } }
.bc-feed li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-2); padding: 10px 12px; font-size: var(--fs-12); color: var(--text); }
.bc-feed li i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-a10); color: var(--accent); font-style: normal; font: 600 var(--fs-11)/1 var(--font-mono); grid-row: span 2; }
.bc-feed li b { color: var(--head); font-weight: 600; }
.bc-feed li .a { font-family: var(--font-mono); color: var(--head); white-space: nowrap; }
.bc-feed li .w { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-feed li .t { grid-column: 2 / span 2; color: var(--muted); font-family: var(--font-mono); font-size: var(--fs-11); }
@media (prefers-reduced-motion: reduce) { .bc-txt, .bc-cta, .wl-feat .ic, .bc-tint { transition: none; } .bc-tx, .bc-pulse, .bc-feed ul { animation: none; } }

.wl .fade { animation: wlin var(--t-slow) var(--ease) both; }
@keyframes wlin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wl .fade { animation: none; } }

/* анимация текста (fx.js; образец — Magic UI Text Animate): слово — из прозрачности, размытия и снизу, по очереди; после показа — снова строчные слова */
.ta .ta-s { opacity: 0; transition: opacity .3s var(--ease), transform .25s var(--ease), filter .25s var(--ease); }
.ta .ta-w { display: inline-block; }
.ta[data-anim="blurInUp"] .ta-s { filter: blur(10px); transform: translateY(20px); }
.ta[data-anim="fadeIn"] .ta-s { transform: translateY(20px); }
.ta.ta-on .ta-s { opacity: 1; filter: none; transform: none; }
.ta.ta-done .ta-w { display: inline; }
.ta.ta-done .ta-s { transition: none; }
.nt { font-variant-numeric: tabular-nums; }   /* числа, бегущие от 0 (образец — Number Ticker) */
/* блик по тексту кнопок (образец — Magic UI Animated Shiny Text): текст чуть прозрачнее, по нему раз в 8 с проходит светлая полоса шириной 100px */
.shiny { --shiny-width: 100px; --shine: rgba(255, 255, 255, .8); color: color-mix(in srgb, currentColor 75%, transparent);
  background: linear-gradient(90deg, transparent, var(--shine) 50%, transparent) 0 0 / var(--shiny-width) 100% no-repeat; -webkit-background-clip: text; background-clip: text;
  animation: shiny-text 8s infinite; }
[data-skin="atlas"] .shiny { --shine: rgba(0, 0, 0, .8); }   /* светлое оформление — тёмный блик, как у образца */
.wl-btn.pri .shiny, [data-skin="atlas"] .wl-btn.pri .shiny { --shine: rgba(255, 255, 255, .9); }
@keyframes shiny-text { 0%, 90%, 100% { background-position: calc(-100% - var(--shiny-width)) 0; } 30%, 60% { background-position: calc(100% + var(--shiny-width)) 0; } }
@media (prefers-reduced-motion: reduce) { .shiny { animation: none; background: none; color: inherit; } }

.bc-pulse { transform-box: fill-box; transform-origin: center; animation: bc-pulse 2.4s ease-in-out infinite; }   /* выбранный адрес Canopy — пульс, как на схеме */
@keyframes bc-pulse { 50% { transform: scale(1.35); } }
/* таблица токенов: мини-график цены за 30 дней (владелец 02.10; образец — Bklit Sparkline; welcome.js spark) */
.wl-tt td.sp { padding-left: 4px; padding-right: 4px; white-space: nowrap; }
.sp-w { display: inline-flex; gap: 6px; align-items: center; vertical-align: middle; }
.spk { display: block; overflow: visible; }
.spk-l { fill: none; stroke: var(--chart-line, var(--accent)); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.spk-a { fill: var(--accent-a10); opacity: 0; }
.spk-d { fill: var(--chart-line, var(--accent)); opacity: 0; }
.spk.on .spk-l { stroke-dashoffset: 0; transition: stroke-dashoffset .9s var(--ease-out) var(--d, 0s); }
.spk.on :is(.spk-a, .spk-d) { opacity: 1; transition: opacity .3s var(--ease) calc(var(--d, 0s) + .7s); }
.spk-p { min-width: 5ch; font: var(--fs-11)/1 var(--font-mono); color: var(--muted); text-align: right; }
@media (max-width: 480px) { .spk-p { display: none; } .spk { width: 44px; height: 18px; } .wl-tt :is(th, td) { padding-left: 4px; padding-right: 4px; } .wl-tt th.spk-h { white-space: normal; } }   /* телефон: без процента и уже — таблица не уезжает в прокрутку */
@media (prefers-reduced-motion: reduce) { .spk-l { stroke-dashoffset: 0; } .spk :is(.spk-a, .spk-d) { opacity: 1; } .spk.on * { transition: none; } }
