/* The Mini App on the site (BERDA-SITE /cabinet/partner, owner 2026-10-22): the same screens in the site's dark look.
   Loaded only by the site page (after app.css and onb.css, html.site-mode). Tokens follow the site (landing.css):
   ink #070c18, panels #0e182c / #13213a, cream text, the red accent, Russo One headings, JetBrains Mono details.
   Phone: bottom tabs like the bot. Desktop (≥ 960 px): its own layout — sidebar with the partner card, a two-column board, motion. */
:root.site-mode, .site-mode .onbx {
  --bg: #0c1527; --card: #121d33; --tile: #182640; --tile-2: #14203a;
  --fg: #e9eef6; --muted: #9fb0c8; --faint: #6d8099; --line: rgba(160, 190, 230, .16);
  --accent: #ff4a2e; --accent-ink: #ffffff; --accent-soft: rgba(255, 74, 46, .14);
  --good: #7ddc6a; --good-soft: rgba(125, 220, 106, .12); --warn: #ffc94a; --warn-soft: rgba(255, 201, 74, .12);
  --bad: #ff6a55; --bad-soft: rgba(255, 106, 85, .13); --gold: #ffc94a; --gold-soft: rgba(255, 201, 74, .12);
  --violet: #a98bff; --violet-soft: rgba(169, 139, 255, .14); --pink: #ff72aa; --pink-soft: rgba(255, 114, 170, .13);
  --teal: #3dcfcb; --teal-soft: rgba(61, 207, 203, .12); --orange: #ff9c50; --orange-soft: rgba(255, 156, 80, .13);
  --night: #0a1222; --night-2: #13213a; --sheen: rgba(255, 255, 255, .1);
  --chat-bg: #060a14; --chat-dot: rgba(127, 176, 230, .06); --bub-me: #c2361f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 26px rgba(0, 0, 0, .3);
  --f-display: "Russo One", "Unbounded", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", Consolas, monospace;
  color-scheme: dark;
}
:root.site-mode body { background: var(--bg); }
.site-mode .onbx { color-scheme: dark; }

/* The application on the site: no pixel canvas in the hero, calmer hero. */
.site-mode .onbx #pix { display: none; }
.site-mode .onbx .site-apply .hero { padding-bottom: 20px; }
.site-mode .onbx .site-apply .hero h1 { font-size: clamp(26px, 3.2vw, 36px); }
.site-mode .onbx .site-apply .sa-info > .faq { margin: 0; }

/* The site's square-ish geometry instead of the prototype's round cards. */
:root.site-mode { --r-lg: 10px; --r-md: 8px; --r-sm: 6px; }
.site-mode .card, .site-mode .hero, .site-mode .onbx .card, .site-mode .onbx .hero { border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.site-mode .btn { border-radius: 6px; }
.site-mode .btn:not(.ghost):not(.sm) { box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25); }
.site-mode .top h1, .site-mode .hero h2, .site-mode .onbx h1 { text-transform: uppercase; letter-spacing: .01em; }
.site-mode .chip { border-radius: 4px; }
.site-mode .tabbar { background: color-mix(in srgb, #0a1222 94%, transparent); }

/* Site header above the app: back to the site and the language. */
.site-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: 56px; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding: 0 max(16px, env(safe-area-inset-left, 0px)); background: color-mix(in srgb, #070c18 92%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-bar a { color: var(--fg); text-decoration: none; }
.site-bar .brand { display: inline-flex; align-items: center; gap: 10px; font: 400 17px/1 var(--f-display); letter-spacing: .04em; }
.site-bar .brand i { width: 26px; height: 26px; display: grid; place-items: center; background: var(--accent); color: #fff; font: 400 14px/1 var(--f-display); font-style: normal; }
.site-bar .brand small { font: 600 10px/1 var(--f-mono); letter-spacing: .2em; color: var(--accent); text-transform: uppercase; }
.site-bar .sp { flex: 1; }
.site-bar .lnk { font: 600 12px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.site-bar .lnk:hover { color: var(--fg); }

.site-mode .side-me { display: none; }
/* The chat is a fixed sheet in the bot (between the demo bar and the tab bar); on the site it sits under the site bar. */
.site-mode .chatv { top: 56px; }

/* Desktop (≥ 960 px): its own layout, not a stretched phone. A left sidebar with the partner card, a two-column
   board with wide heroes, KPIs in one row, a moving grid behind, cards that lift and follow the cursor. */
@media (min-width: 960px) {
  :root.site-mode { --side: 248px; --gapx: 36px; --main: 960px; }

  .site-mode .app { max-width: var(--main); margin: 0 0 0 calc(50% - (var(--side) + var(--gapx) + var(--main)) / 2 + var(--side) + var(--gapx)); padding: 28px 0 64px; }
  .site-mode .tabbar { top: 56px; bottom: 0; left: calc(50% - (var(--side) + var(--gapx) + var(--main)) / 2); right: auto; width: var(--side); border-top: 0; background: transparent; backdrop-filter: none; padding: 28px 0 24px; display: flex; flex-direction: column; gap: 18px; }
  .site-mode .tabbar[hidden] { display: none; }
  .site-mode .tabbar nav { max-width: none; display: flex; flex-direction: column; height: auto; gap: 4px; margin: 0; }
  .site-mode .tab { flex-direction: row; justify-content: flex-start; gap: 12px; height: 46px; padding: 0 16px; font: 600 14px/1 var(--f-ui); color: var(--muted); border-radius: 6px; transition: background .2s, color .2s, transform .2s; }
  .site-mode .tab:hover { background: var(--tile); color: var(--fg); transform: translateX(3px); }
  .site-mode .tab[aria-current="page"] { background: linear-gradient(90deg, var(--accent-soft), transparent); color: var(--fg); box-shadow: inset 3px 0 0 var(--accent); }
  .site-mode .tab i { display: grid; place-items: center; }
  .site-mode .tab.center i { width: auto; height: auto; margin: 0; background: none; color: inherit; box-shadow: none; border-radius: 0; }
  .site-mode .tab.center[aria-current="page"] i, .site-mode .tab[aria-current="page"] i { color: var(--accent); }
  .site-mode .tab .dot { top: 50%; right: 16px; transform: translateY(-50%); animation: pulse 2s ease-in-out infinite; }

  /* The partner card on top of the sidebar. */
  .site-mode .side-me { display: grid; grid-template-columns: auto 1fr; gap: 12px 12px; align-items: center; padding: 16px; border-radius: 10px; background: linear-gradient(160deg, #13213a, #0b1426); box-shadow: inset 0 0 0 1px var(--line); position: relative; overflow: hidden; }
  .site-mode .side-av { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; background: var(--accent); color: #fff; font: 400 16px/1 var(--f-display); box-shadow: 0 6px 18px rgba(255, 74, 46, .35); }
  .site-mode .side-tx { min-width: 0; }
  .site-mode .side-tx b { display: block; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .site-mode .side-tx small { display: block; margin-top: 3px; font: 600 11px/1.2 var(--f-mono); letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
  .site-mode .side-bal { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid var(--line); }
  .site-mode .side-bal b { display: block; font: 400 24px/1 var(--f-display); color: var(--fg); }
  .site-mode .side-bal small { font: 600 11px/1 var(--f-mono); letter-spacing: .1em; color: var(--faint); text-transform: uppercase; }

  /* The board: two columns, wide blocks span both. */
  .site-mode .view { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
  .site-mode .view > * { grid-column: 1 / -1; }
  .site-mode .duo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
  .site-mode .duo:has(> :only-child) { grid-template-columns: 1fr; }
  .site-mode .grid2 { gap: 18px; }
  .site-mode .grid2.kpi3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-mode .grid2.kpi3 > :last-child { grid-column: auto; }
  .site-mode .top { padding-bottom: 4px; }
  .site-mode .top h1 { font-size: 30px; }
  .site-mode .h-sec { margin: 10px 0 -6px; }
  .site-mode .hero { padding: 30px 32px 28px; }
  .site-mode .hero h2 { font-size: 34px; }
  .site-mode .hero .rate { font-size: 56px; }
  .site-mode .hero .money { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .site-mode .card { padding: 20px 22px; }
  .site-mode .chat { min-height: 52vh; }
  /* On the desktop the tab bar is a sidebar, so the chat is a tall block of the board, not a fixed sheet. */
  .site-mode .chatv { position: relative; top: auto; bottom: auto; left: auto; right: auto; max-width: none; height: calc(100vh - 150px); min-height: 520px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }

  /* Life: staggered entrance, lifting cards with a cursor spotlight, a sheen over the hero. */
  .site-mode .view > * { animation: deskin .55s cubic-bezier(.2, .8, .2, 1) both; }
  .site-mode .view > :nth-child(2) { animation-delay: .05s; } .site-mode .view > :nth-child(3) { animation-delay: .1s; }
  .site-mode .view > :nth-child(4) { animation-delay: .15s; } .site-mode .view > :nth-child(5) { animation-delay: .2s; }
  .site-mode .view > :nth-child(6) { animation-delay: .25s; } .site-mode .view > :nth-child(n+7) { animation-delay: .3s; }
  .site-mode .card { transition: box-shadow .2s; }
  .site-mode .card:hover { box-shadow: inset 0 0 0 1px var(--line-2, rgba(160, 190, 230, .28)), var(--shadow); }
  .site-mode .card.flat:hover { transform: none; }
  .site-mode .clan-btn { transition: transform .25s cubic-bezier(.2, .8, .2, 1), filter .25s; }
  .site-mode .clan-btn:hover { filter: brightness(1.06); }
  .site-mode .clan-btn .go { transition: transform .25s; } .site-mode .clan-btn:hover .go { transform: translateX(4px); }
  .site-mode .li { transition: background .2s, padding .2s; border-radius: 6px; }
  .site-mode button.li:hover, .site-mode a.li:hover { background: var(--tile); padding-inline: 10px; }
  .site-mode .btn { transition: transform .15s, filter .2s, box-shadow .2s; }
  .site-mode .btn:not(.ghost):hover { transform: translateY(-1px); filter: brightness(1.1); }
  .site-mode .btn:active { transform: translateY(1px); }
  .site-mode .toast { bottom: 28px; }

  /* Without the tab bar (the application) the app is centred and a bit wider than the phone. */
  .site-mode .app:has(.onbx) { margin: 0 auto; max-width: 620px; }
  .site-mode .onbx .view { display: flex; align-items: stretch; }
  /* The application page: the essentials on the left, the form on the right, sticky while the left column scrolls. */
  .site-mode .app:has(.site-apply) { max-width: 1120px; }
  .site-mode .onbx .site-apply { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 460px); gap: 28px; align-items: start; }
  .site-mode .onbx .sa-info, .site-mode .onbx .sa-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .site-mode .onbx .sa-form { position: sticky; top: 84px; }
  .site-mode .onbx .sa-form .h-sec { margin-top: 0; }
  .site-mode .onbx .site-apply > * { grid-column: auto; animation: none; }
}
@media (min-width: 960px) and (max-width: 1240px) {
  .site-mode .app { margin-left: calc(16px + var(--side) + 28px); margin-right: 24px; max-width: none; }
  .site-mode .tabbar { left: 16px; }
}
@media (min-width: 960px) and (prefers-reduced-motion: reduce) {
  :root.site-mode body::before, :root.site-mode body::after, .site-mode .hero, .site-mode .hero::after, .site-mode .side-me::after, .site-mode .view > *, .site-mode .tab .dot { animation: none !important; }
  .site-mode .card:hover, .site-mode .clan-btn:hover, .site-mode .tab:hover { transform: none; }
}
@keyframes deskin { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes gridpan { to { background-position: 56px 56px, 56px 56px; } }
@keyframes glowfloat { to { transform: translate(-140px, 120px) scale(1.15); } }
@keyframes sheen { 0%, 70% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(255, 106, 85, .18); } }
@media (max-width: 520px) {
  .site-bar { gap: 10px; }
  .site-bar .lnk:not([hreflang]) { display: none; }
}
