/* Стиль проекта FLASH. Базовые классы кабинета и контракты его JS — из шаблона фабрики. */
:root,
:root[data-theme] {
  color-scheme: dark;
  --bg: #101011;
  --bg-2: #161617;
  --text: #f8f6f3;
  --muted: #b2aeae;
  --surface: #202022;
  --border: #373536;
  --card-bg: #1b1b1d;
  --card-shadow: none;
  --header-bg: #101011;
  --accent: #fa443d;
  --accent-2: #e03131;
  --accent-3: #ff7565;
  --red: #ff5148;
  --rule: #303032;
  --frame: 1160px;
  --side: clamp(20px, 5vw, 80px);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px
}

body {
  background: #101011;
  color: var(--text);
  font-family: Inter, Arial, sans-serif
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid #ffd865;
  outline-offset: 4px
}

.frame {
  width: min(calc(100% - 2 * var(--side)), var(--frame));
  margin-inline: auto
}

.skip {
  position: absolute;
  top: -70px;
  left: 12px;
  z-index: 50;
  background: white;
  color: black;
  padding: 10px
}

.skip:focus {
  top: 5px
}

.flash-header {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid #ffffff14;
  background: #111112
}

.flash-bar {
  display: flex;
  align-items: center;
  gap: 34px;
  height: 76px
}

.flash-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  line-height: 1
}

.flash-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px
}

.flash-brand span {
  font-style: italic;
  font-weight: 900;
  letter-spacing: -.085em
}

.flash-brand span {
  font-size: 31px
}

.flash-brand small {
  font: 700 9px/1.2 Inter, sans-serif;
  letter-spacing: .08em;
  align-self: center;
  color: #c6c3c3;
  padding: 3px 4px;
  border: 1px solid #575456;
  border-radius: 3px
}

.top-nav {
  margin-left: auto;
  display: flex;
  gap: 30px
}

.top-nav a,
.login-link {
  text-decoration: none;
  color: #c7c3c3;
  font-size: 13px;
  font-weight: 550
}

.top-nav a:hover,
.footer a:hover {
  color: #fff
}

.flash-actions {
  margin-left: auto
}

.top-nav+.flash-actions {
  margin-left: 0
}

.login-link {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  border: 1px solid #454345;
  border-radius: 9px;
  padding: 9px 14px;
  color: white
}

.login-link:hover {
  background: #252325
}

.page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: auto
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #d2cdca;
  font: 650 10px/1.5 Inter, sans-serif;
  letter-spacing: .19em;
  margin: 0 0 17px
}

.eyebrow b {
  display: inline-block;
  width: 21px;
  height: 2px;
  background: var(--red)
}

.eyebrow b.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px #fc453e1b
}

.section-heading h2,
.auth__title,
.hello__title,
.bill h1 {
  font-weight: 780;
  letter-spacing: -.068em;
  line-height: 1.01
}

.action,
.btn--primary {
  background: #ed3b34;
  color: white;
  border: 1px solid #ff574e;
  border-radius: 10px;
  box-shadow: 0 6px 24px -12px #e83429;
  font-weight: 680
}

.action {
  display: inline-flex;
  font-size: 16px;
  gap: 35px;
  align-items: center;
  padding: 14px 21px;
  text-decoration: none;
  line-height: 1.35
}

.flow-arrow { flex: none; vertical-align: middle }

.action:hover,
.btn--primary:hover {
  background: #ff4a40;
  color: white
}

.trial-note {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #b4aeaf;
  font-size: 12px;
  margin: 12px 0 0
}

.trial-note i {
  color: #ffd359;
  font-weight: 800;
  font-size: 18px;
  line-height: 1
}

.plans-section {
  padding-block: 65px
}

.section-heading {
  margin-bottom: 25px
}

.section-heading .eyebrow {
  margin-bottom: 9px;
  color: #aaa4a3
}

.section-heading h2 {
  font-size: clamp(34px, 3.65vw, 54px);
  margin: 0
}

.section-heading h2 span {
  color: var(--red)
}

.section-heading>p:not(.eyebrow) {
  color: var(--muted);
  font-size: 14px;
  padding-top: 10px
}

.tariff-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr))
}

.tariff,
.bill {
  border: 1px solid var(--rule);
  background: #1b1b1c;
  border-radius: 16px;
  padding: 24px
}

.flow-card h3,
.tariff h3 {
  font-size: 21px;
  letter-spacing: -.045em;
  margin: 23px 0 7px;
  line-height: 1.2
}

.flow-card p,
.faq-list p {
  color: #b5afb0;
  font-size: 14px;
  line-height: 1.55;
  margin: 0
}

.plans-section {
  border-top: 1px solid var(--rule)
}

.tariff-grid {
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr))
}

.tariff h3 {
  margin: 0 0 18px
}

.tariff p {
  font-size: 20px;
  margin: 0
}

.tariff strong {
  font-size: 32px;
  color: white;
  letter-spacing: -.05em
}

.tariff small {
  color: var(--muted)
}

.tariff a {
  display: flex;
  justify-content: space-between;
  margin-top: 23px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  color: white;
  text-decoration: none
}

.tariff a:hover {
  color: var(--red)
}

.footer {
  border-top: 1px solid var(--rule);
  background: #111112;
  color: var(--muted)
}

.footer__inner {
  max-width: var(--frame);
  width: calc(100% - 2 * var(--side));
  padding: 25px 0;
  margin: auto
}

.footer__links a {
  color: #bdb7b7
}

body:not(.flash-entry) .page {
  max-width: var(--frame);
  width: calc(100% - 2 * var(--side));
  margin: auto;
  padding-block: clamp(25px, 4vw, 58px);
  min-height: 65vh
}

.card,
.pay__sheet,
.profile__panel,
.cab-nav {
  background: #1b1b1d;
  border-color: #373538;
  box-shadow: none
}

.btn {
  border-radius: 10px
}

.auth-card,
.bill {
  width: min(100%, 470px);
  margin: auto
}

.auth-card {
  padding: clamp(22px, 4vw, 37px)
}

.narrow {
  padding: 0;
  width: auto;
  max-width: 100%
}

.auth__title,
.hello__title {
  color: #fff;
  font-size: clamp(33px, 4vw, 48px);
  margin: 8px 0 12px
}

.auth__hint,
.field__hint,
.steps-card__hint {
  color: var(--muted)
}

.auth-card .eyebrow {
  margin: 0
}

.auth-primary {
  margin: 23px 0 10px
}

.auth-primary button,
.auth-primary a {
  width: 100%;
  justify-content: center
}

.other-auth {
  margin: 19px 0 0;
  border-top: 1px solid var(--rule);
  padding: 16px 0 0
}

.other-auth summary {
  cursor: pointer;
  color: #dedada;
  font-weight: 600;
  font-size: 14px
}

.other-auth .segmented {
  margin-top: 18px
}

.btn--outline,
.btn--ghost,
.btn--social {
  background: #232325;
  color: #f1eded;
  border-color: #484548
}

.sub-card__actions,
.fast-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px
}

.tg-wait__code {
  color: var(--red)
}

.cab-nav__item--active,
.badge--active,
.badge--trial {
  color: #ff9d83
}

.cab-nav__item--active {
  background: #372121
}

.bill h1 {
  font-size: 34px;
  margin: 12px 0
}

.bill .bill-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  border-block: 1px solid var(--rule);
  padding-block: 18px;
  margin: 22px 0;
  color: var(--muted)
}

.bill-line strong {
  font-size: 25px;
  color: white
}

.bill .btn {
  display: flex;
  justify-content: center;
  margin: 8px 0
}

html .reveal {
  opacity: 1;
  transform: none
}

@media(max-width:780px) {
  .flash-bar {
    height: 62px;
    gap: 16px
  }

  .plans-section {
    padding-block: 30px
  }
}

@media(max-width:600px) {
  .tariff-grid {
    grid-template-columns: 1fr 1fr
  }

  .tariff {
    padding: 15px
  }

  .footer__inner {
    align-items: flex-start;
    gap: 14px
  }

  .cabinet {
    padding-top: 0
  }

  .flash-brand img {
    width: 30px;
    height: 30px
  }

  .flash-brand span {
    font-size: 27px
  }

  .login-link {
    padding: 7px 11px
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0
}

.hello__title span,
.auth__title span {
  color: var(--red)
}

.hello .eyebrow {
  margin: 0 0 8px
}

.auth__support a,
.field__hint a {
  color: #ff9f93
}

.auth-card .eyebrow {
  justify-content: center
}

.auth-card .other-auth {
  text-align: left
}

.bill .auth__hint {
  text-align: left
}

.bill form {
  display: grid;
  gap: 3px
}

.is-cabinet .sub-card {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 100% 0%, #522224, transparent 58%), #1e1b1c;
  border-color: #523233
}

.is-cabinet .sub-card:before {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -90px;
  height: 210px;
  width: 170px;
  background: repeating-linear-gradient(115deg, transparent 0 9px, #ee534815 9px 11px);
  transform: rotate(-11deg);
  pointer-events: none
}

.sub-card__body,
.sub-card__actions,
.sub-card__head {
  position: relative
}

.sub-card__plan {
  font-size: clamp(25px, 3vw, 35px);
  letter-spacing: -.06em
}

.cab-nav__item--active {
  box-shadow: none
}

.legal-list nav {
  display: grid;
  margin-top: 16px
}

.legal-list nav a {
  color: var(--text);
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid var(--rule)
}

.legal-list nav a:hover .flow-arrow {
  color: var(--red)
}

.invite-label {
  flex: 1;
  align-self: center;
  font-size: 14px;
  color: var(--muted)
}

@keyframes flash-mark-drift {
  0%, 100% { transform: translateY(0) rotate(0) }
  50% { transform: translateY(-1.5px) rotate(2deg) }
}
@media (prefers-reduced-motion: no-preference) {
  .flash-brand img { animation: flash-mark-drift 4.8s ease-in-out infinite }
}

body.is-cabinet { min-height: 100dvh; display: flex; flex-direction: column; }
body.is-cabinet .page { flex: 1 0 auto; width: min(100% - 24px, 448px); min-height: 0; margin: 0 auto; padding: 16px 0 26px; }
.is-cabinet .cabinet { display: block; margin: 0; padding: 0; }
.is-cabinet .cab-main { display: grid; gap: 16px; }
.is-cabinet .flash-bar { max-width: 448px; height: 62px; }
.is-cabinet .profile__button { min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.is-cabinet .footer { padding: 0 16px env(safe-area-inset-bottom,0px); }
.is-cabinet .footer__inner { padding: 12px 0; width: min(100%,448px); align-items: center; font-size: 12px; }
.cab-back { justify-self: start; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: #c3b5bc; }
.cab-back span { display: flex; transform: rotate(180deg); }
.dashboard-card { padding: 20px; text-align: center; }
.dashboard-card h1 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.dashboard-card > h1 { margin-bottom: 18px; }
.dashboard-balance { padding: 4px 0 18px; }
.dashboard-balance h1 { font-size: 14px; color: #dccbd1; }
.dashboard-days { display: block; margin-top: 10px; color: white; font: italic 700 clamp(68px,16vw,90px)/1 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; letter-spacing: -.05em; }
.dashboard-balance p { font-size: 12px; font-weight: 650; letter-spacing: .20em; text-transform: uppercase; color: #c2aeb5; margin: 8px 0 0; }
.dashboard-renew { min-height: 50px; font-size: 18px; }
.dashboard-key { margin-top: 20px; padding: 18px 14px; text-align: left; border-radius: 22px; border: 1px solid #ffffff0f; background: #30252c; }
.dashboard-key h2 { margin: 0; font-size: 21px; line-height: 1.2; letter-spacing: -.04em; }
.dashboard-key p { margin: 7px 0 12px; font-size: 14px; line-height: 1.45; color: #cec1c7; }
.dashboard-key .copy-feedback { color: var(--accent-link); margin: 5px 0 0; }
.dashboard-key .copy-feedback:empty { margin: 0; }
.dashboard-devices { text-align: left; min-width: 0; padding: 16px 20px; }
.dashboard-devices__heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; }
.dashboard-devices h2 { margin: 0; font-size: 19px; line-height: 1.3; letter-spacing: -.035em; }
.dashboard-devices__count { padding: 3px 9px; border-radius: 20px; background: #ffffff09; color: #d3c2ca; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dashboard-devices .device-list { margin: 12px 0 0; gap: 0; }
.dashboard-devices .device { padding: 10px 0; border-color: #ffffff12; }
.dashboard-devices .device:last-child { padding-bottom: 0; }
.dashboard-devices .device__icon { color: #ffb7a6; background: #f8877514; }
.dashboard-devices .device__meta { color: #c4b4bd; overflow-wrap: anywhere; }
.dashboard-devices__empty { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.dashboard-devices__empty p { margin: 0; color: #c4b4bd; font-size: 14px; line-height: 1.45; }
.key-line { display: flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border: 1px solid #ffffff18; border-radius: 17px; background: #1c161d; }
.key-line input { width: 0; min-width: 0; flex: 1; padding: 0; border: 0; outline-offset: 1px; background: transparent; color: #e4d8dd; font: 14px/1.5 ui-monospace,monospace; text-overflow: ellipsis; user-select: all; }

.profile__panel:has(.profile-invite[open]) { width: min(310px, calc(100vw - 32px)); max-height: 70dvh; overflow-y: auto; }
.profile-invite summary { cursor: pointer; }
.profile-invite .refer__link { flex-wrap: wrap; }
.profile-invite > :not(summary) { margin-inline: 8px; }

/* Оформление FLASH */
.pay .pay__periods { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pay .pay-period__box {
  display: flex; position: relative; isolation: isolate; overflow: hidden;
  align-items: flex-start; flex-direction: column; justify-content: center; gap: 6px;
  min-height: 74px; height: 100%; padding: 12px 14px; border-radius: 16px;
}
.pay .pay-period__price { margin: 0; font-size: 20px; font-variant-numeric: tabular-nums; }
.pay .pay-period__title { color: #d8cbd1; font-size: 14px; }
.pay-period--annual { grid-column: 1 / -1; }
.pay-period--annual .pay-period__box { background: linear-gradient(105deg, #32232b 15%, #39242a); }
.pay-bolt { position: absolute; inset: 0 4% 0 auto; height: 100%; width: auto; z-index: -1; pointer-events: none; }
.pay-bolt path { stroke: #f8ad85; stroke-width: 1.15; opacity: .5; }
.pay .pay__radio:checked + .pay-period__box { border-color: #ff917d; box-shadow: inset 0 0 0 1px #ff917d; background-color: #422a2f; }
.pay .pay__radio:checked + .pay-period__box::after {
  content: ''; position: absolute; right: 13px; top: 12px; width: 8px; height: 4px;
  border: solid #ffc3b1; border-width: 0 0 2px 2px; transform: rotate(-45deg);
}
.pay-quantity { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pay-quantity .pay__legend { margin: 0; color: var(--text); }
.pay-counter { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); overflow: hidden; }
.pay-counter button, .pay-counter select {
  min-width: 44px; height: 44px; padding: 0 4px; border: 0; color: var(--text);
  background: transparent; cursor: pointer; font: inherit; font-variant-numeric: tabular-nums;
}
.pay-counter button { color: #ffa28f; font-size: 21px; }
.pay-counter button:disabled { color: #897b82; cursor: default; }
.pay-counter select { text-align: center; text-align-last: center; color-scheme: dark; }
.pay-counter :focus-visible { outline: 2px solid #ffab94; outline-offset: -3px; }
.pay-promo { margin: 6px 0 0; }
.pay-promo summary { display: flex; align-items: center; gap: 8px; min-height: 44px; width: fit-content; cursor: pointer; color: #e1bab0; font-size: 14px; list-style: none; }
.pay-promo summary::-webkit-details-marker { display: none; }
.pay-promo summary::after { content: ''; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.4px 1.4px 0; transform: translateY(-2px) rotate(45deg); }
.pay-promo[open] summary::after { transform: translateY(2px) rotate(225deg); }
.pay-promo__entry { display: flex; gap: 7px; }
.pay-promo input, .pay-promo button { min-height: 44px; border: 1px solid var(--border); border-radius: 12px; font: inherit; color: var(--text); }
.pay-promo input { min-width: 0; width: 100%; padding: 0 12px; background: #201b20; font-size: 16px; }
.pay-promo button { padding: 0 12px; background: #3a292f; font-size: 14px; cursor: pointer; }
.pay-promo [role=status] { margin: 7px 0; font-size: 13px; color: #ffb6a4; }
.pay-promo [role=status]:empty { margin: 0; }

.tariff--annual { position: relative; isolation: isolate; overflow: hidden; grid-column: span 2; background: linear-gradient(110deg, #282126, #38232a); }
.tariff--annual .pay-bolt { height: 85%; top: auto; bottom: 0; right: 2%; opacity: .65; }
.plans-section .tariff-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 680px) {
  .plans-section .tariff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.cashier .bill-line { margin: 16px 0 20px; padding-block: 12px; }
.cashier .pay__group { margin: 0 0 10px; min-width: 0; }
.cashier .pay-method__box { min-height: 56px; }
.cashier .pay__radio:checked + .pay-method__box { border-color: #ff917d; background: #342326; }
.cashier .pay__radio:checked + .pay-method__box .pay-method__mark { background: #ff917d; color: #281413; }
.cashier-discount { display: flex; justify-content: space-between; color: #ffc6ac; font-size: .92rem; }
.cashier .cashier-status { margin-block: 4px 10px; }
