/* «Где рубли» на компьютере: окно приложения поверх общих стилей сайта */
.app-body { display: flex; flex-direction: column; min-height: 100vh; background: var(--bg); }
.app-bar { position: sticky; top: 0; z-index: 20; background: rgb(255 255 255 / .95); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.app-bar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 60px; padding-block: 8px; }
.app-bar .logo { margin-right: auto; }
.app-chip { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 6px 12px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: .8rem; font-weight: 600; line-height: 1.3; }
.app-chip[data-state]::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.app-chip-lock { background: var(--ok-soft); color: var(--ok); }
.app-chip-lock svg { flex: none; }
.app-chip[data-state="offline"], .app-chip[data-state="ok"] { background: var(--ok-soft); color: var(--ok); }
.app-chip[data-state="wait"] { background: var(--accent-soft); color: var(--accent); }
.app-chip[data-state="error"] { background: var(--danger-soft); color: var(--danger); }
.app-update { background: var(--primary-soft); border-bottom: 1px solid #cfe0f6; }
.app-update-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding-block: 8px; font-weight: 550; }

.app-main { flex: 1; width: 100%; padding-block: 24px 40px; }
.app-main:focus { outline: none; }
.app-hero h1 { margin: 0 0 10px; font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.12; letter-spacing: -.03em; }
.app-hero .privacy-lead { max-width: 72ch; margin: 0; color: var(--muted); line-height: 1.55; }
.app-hero .privacy-lead strong { color: var(--text); }
.app-proof { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 7px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); font-size: .88rem; }
.app-proof[data-state="ok"] { border-color: #b7e3cb; background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.app-proof[data-state="warn"] { border-color: #f1d08a; background: var(--accent-soft); color: var(--accent); }

.app-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 22px; }
.app-grid .action-box { grid-area: auto; }
.app-side { display: grid; gap: 14px; min-width: 0; }
.app-panel { min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.app-panel h2 { margin: 0 0 8px; font-size: 1.05rem; }
.app-panel > summary { cursor: pointer; font-weight: 650; }
.app-panel p { margin: 6px 0; }
.app-license-ok { color: var(--ok); font-weight: 650; }
.app-body button.text-action { display: inline-flex; align-items: center; min-height: 32px; padding: 0; border: 0; background: none; color: var(--primary); font: inherit; font-size: .9rem; font-weight: 600; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.app-body a.text-action { font-size: .9rem; font-weight: 600; text-underline-offset: .18em; }
.app-panel .tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 8px; }
.app-key-form { display: grid; gap: 8px; margin-top: 8px; }
.app-key-form[hidden] { display: none; }
.app-key-form textarea { width: 100%; min-height: 70px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font: inherit; font-size: .8rem; resize: vertical; }
.app-key-form .btn { justify-self: start; }

.app-result { margin-top: 22px; scroll-margin-top: 80px; }
.app-result:empty { display: none; }
.app-result .local-result { scroll-margin-top: 80px; }

.app-section { margin-top: 26px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.app-section h2 { margin: 0 0 10px; font-size: 1.2rem; }
.app-section p { max-width: 80ch; line-height: 1.55; }
.app-steps, .app-install-list { display: grid; gap: 10px; max-width: 80ch; margin: 0; padding-left: 1.3em; line-height: 1.5; }
.app-note { margin: 14px 0 0; padding: 10px 14px; border-left: 3px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--primary-soft); }
.app-installed { color: var(--ok); font-weight: 650; }

.app-footer { padding-block: 14px 18px; border-top: 1px solid var(--line); background: #fff; font-size: .85rem; }
.app-footer .footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.app-footer .footer-note { margin: 8px 0 0; color: var(--muted); }

@media (max-width: 900px) {
  .app-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .app-bar { position: static; }
  .app-bar .logo { margin-right: 0; width: 100%; }
  .app-section { padding: 16px; }
}

/* Претензии и сроки */
.app-claims-alert { margin: 12px 0 0; max-width: 80ch; }
.app-claims-summary { margin: 0 0 10px; font-weight: 600; }
.app-claims-list { display: grid; gap: 12px; margin: 12px 0 0; padding: 0; list-style: none; }
.app-claim { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.app-claim[data-status="submitted"] { border-left-color: var(--primary); }
.app-claim[data-status="overdue"], .app-claim[data-status="rejected"] { border-left-color: var(--danger); }
.app-claim[data-status="approved"], .app-claim[data-status="partial"] { border-left-color: var(--accent); }
.app-claim[data-status="credited"] { border-left-color: var(--ok); }
.app-claim p { margin: 0; }
.app-claim-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; align-items: baseline; }
.app-claim-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.app-claim-status { font-size: .92rem; }
.app-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--surface-soft); font-weight: 650; font-size: .82rem; }
.app-claim[data-status="credited"] .app-badge { background: var(--ok-soft); color: var(--ok); }
.app-claim[data-status="overdue"] .app-badge, .app-claim[data-status="rejected"] .app-badge { background: var(--danger-soft); color: var(--danger); }
.app-claim[data-status="submitted"] .app-badge { background: var(--primary-soft); color: var(--primary-dark); }
.app-claim-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin-top: 4px; }
.app-claim-field { display: grid; gap: 3px; font-size: .8rem; color: var(--muted); }
.app-claim-field input { min-height: 36px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; font-size: .9rem; color: var(--text); }
.app-claim-field input[type="text"] { width: 150px; }
.app-claim-credits summary { cursor: pointer; font-size: .88rem; font-weight: 600; }
.app-claim-credits ul { margin: 6px 0 0; padding-left: 1.2em; font-size: .85rem; color: var(--muted); }
.app-next { margin-top: 14px; }
.app-next summary { cursor: pointer; font-weight: 650; }
.app-next .app-steps { margin-top: 10px; }

/* Компактные блоки: «как убедиться» карточками, установка и данные — раскрываются */
.app-hero .hero-eyebrow { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 4px 12px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: .82rem; font-weight: 700; }
.app-hero .hero-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.app-proof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.app-proof-grid li { display: grid; gap: 4px; align-content: start; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-soft); font-size: .9rem; line-height: 1.45; }
.app-proof-grid span { color: var(--muted); }
.app-more { display: grid; gap: 10px; padding-block: 14px; }
.app-more details > summary { cursor: pointer; font-weight: 650; }
.app-more details > summary .result-note { font-weight: 400; }
.app-more details[open] > summary { margin-bottom: 8px; }

/* С чего начать и шаги подписки */
.app-start { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px; max-width: 900px; margin: 14px 0 0; padding: 0; list-style: none; }
.app-start[hidden] { display: none; }
.app-start li { counter-increment: step; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.app-start li::before { content: counter(step); flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; font-size: .8rem; font-weight: 700; }
.app-start a { color: inherit; text-decoration: none; }
.app-start a:hover strong { color: var(--primary); text-decoration: underline; }
.app-start strong, .app-start span { display: block; }
.app-start strong { font-size: .92rem; }
.app-start span { color: var(--muted); font-size: .82rem; }
.app-key-steps { display: grid; gap: 4px; margin: 6px 0 8px; padding-left: 1.3em; font-size: .9rem; }
.app-key-steps a { font-weight: 600; }
.app-guarantee { max-width: 80ch; margin: 10px 0 0; padding: 9px 13px; border-radius: var(--radius-sm); background: var(--ok-soft); color: var(--ok); font-size: .92rem; line-height: 1.45; }

/* Отчёт по токену API */
.app-token { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.app-token > summary { cursor: pointer; font-weight: 650; }
.app-token[open] { display: grid; gap: 10px; }
.app-token-switch { display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 600; }
.app-token-fields { display: grid; gap: 8px; }
.app-token-fields[hidden] { display: none; }
.app-token .app-claim-field input, .app-token .app-claim-field select { width: 100%; min-height: 38px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; color: var(--text); }
