* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 10%, var(--gradient-primary), transparent 34rem),
    radial-gradient(circle at 90% 86%, var(--gradient-secondary), transparent 31rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 0.14em; }
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.shell { width: min(70rem, calc(100% - 2rem)); margin: 0 auto; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
}
.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--text); text-decoration: none; font-weight: 850; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 1.1rem;
  box-shadow: 0 8px 24px rgba(76, 140, 43, 0.24);
}
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; flex-wrap: wrap; }
.language-picker { display: block; min-width: min(14rem, 48vw); }
.language-picker select { min-height: 2.65rem; border-radius: 999px; font-weight: 750; }

main { padding: 3.2rem 0 4.5rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(19rem, 0.8fr); gap: 2rem; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 850; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.78rem; }
h1 { margin: 0.45rem 0 1rem; max-width: 14ch; font-size: clamp(2.25rem, 6vw, 4.7rem); line-height: 1.02; letter-spacing: -0.055em; }
.lead { max-width: 42rem; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 4vw, 2rem);
}
.card h2 { margin-top: 0; font-size: 1.45rem; }
.field { display: grid; gap: 0.45rem; margin-bottom: 1rem; }
label { font-weight: 760; }
select {
  width: 100%;
  min-height: 3.15rem;
  padding: 0 0.9rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background-color: var(--surface);
  color: var(--text);
  font: inherit;
  color-scheme: light;
  cursor: pointer;
}
select option {
  background-color: var(--surface);
  color: var(--text);
}
.actions { display: grid; gap: 0.75rem; }
.registration-actions { grid-template-columns: 1fr; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--primary);
  border-radius: 0.9rem;
  background: var(--primary);
  color: var(--primary-ink);
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.button.secondary { background: transparent; color: var(--accent); }
.button.secondary:hover { background: var(--surface-soft); }
.note { margin: 1rem 0 0; color: var(--muted); font-size: 0.91rem; }

.account-header { display: flex; justify-content: space-between; align-items: start; gap: 1rem; flex-wrap: wrap; }
.status { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--success); font-weight: 850; }
.status::before { content: ""; width: 0.68rem; height: 0.68rem; border-radius: 50%; background: currentColor; }
.public-id { margin: 0.7rem 0 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: clamp(1rem, 3vw, 1.35rem); font-weight: 850; overflow-wrap: anywhere; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.product { border: 1px solid var(--border); border-radius: 1.1rem; padding: 1.1rem; background: var(--surface-soft); }
.product h3 { margin: 0 0 0.45rem; font-size: 1.03rem; }
.product p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.product-state { display: inline-block; margin-top: 0.85rem; font-weight: 760; font-size: 0.87rem; }
.product-action { width: 100%; margin-top: 0.85rem; }
details { margin-top: 1.25rem; color: var(--muted); }
summary { cursor: pointer; font-weight: 750; color: var(--text); }
.tech-id { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.footer { padding: 2rem 0 3rem; color: var(--muted); font-size: 0.9rem; }

.error h1 { max-width: none; font-size: clamp(2rem, 5vw, 3.4rem); }

.auth-card { width: min(34rem, 100%); margin: 0 auto; }
.auth-card h1 { max-width: 18ch; font-size: clamp(2rem, 5vw, 3.4rem); }
.auth-form { display: grid; gap: 0.75rem; margin-top: 1.25rem; }
.auth-form .button { margin-top: 0.4rem; }
.text-link { display: inline-block; margin-top: 1rem; font-weight: 750; }

@media (max-width: 50rem) {
  .hero { grid-template-columns: 1fr; }
  h1 { max-width: 18ch; }
  .grid { grid-template-columns: 1fr; }
}

@media (max-width: 32rem) {
  .shell { width: min(100% - 1rem, 70rem); }
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  .topbar-actions { width: 100%; justify-content: flex-start; }
  .language-picker { width: 100%; }
  main { padding-top: 2rem; }
  .card { border-radius: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

input[type="text"], input[type="tel"], input[type="password"], input[type="number"] {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
input[type="text"]:focus-visible, input[type="tel"]:focus-visible, input[type="password"]:focus-visible, input[type="number"]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
button:disabled { opacity: 0.58; cursor: not-allowed; }
.devices { margin: 2rem 0; padding: 1.25rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.section-heading h2 { margin-bottom: 0.15rem; }
.section-heading p { margin: 0; color: var(--muted); }
.device-enroll { margin: 1rem 0 1.25rem; padding: 1rem; border-radius: 1rem; background: var(--surface-soft); }
.device-enroll-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem; margin-top: 0.45rem; }
.device-list { display: grid; gap: 0.8rem; }
.device-card { border: 1px solid var(--border); border-radius: 1rem; padding: 1rem; background: var(--surface); }
.device-card.is-current { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.device-card-head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.device-card h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.device-meta { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.82rem; overflow-wrap: anywhere; }
.device-status { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.35rem; color: var(--success); font-weight: 800; font-size: 0.85rem; }
.current-device { padding: 0.15rem 0.45rem; border-radius: 999px; background: var(--surface-soft); color: var(--text); }
.device-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; margin-top: 0.85rem; }
.device-rename { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; }
.button.compact { min-height: 2.7rem; padding: 0.55rem 0.8rem; }
.button.danger { border-color: var(--danger); background: transparent; color: var(--danger); }
.button.danger:hover { background: rgba(179, 38, 30, 0.08); border-color: var(--danger); }
.notice { margin: 1rem 0; padding: 0.75rem 0.9rem; border-radius: 0.8rem; background: var(--surface-soft); }
.notice.success { border: 1px solid var(--success); }
.notice.error { border: 1px solid var(--danger); color: var(--danger); }
.empty-state { color: var(--muted); }

@media (max-width: 42rem) {
  .device-enroll-row, .device-actions, .device-rename { grid-template-columns: 1fr; }
  .device-card-head { flex-direction: column; }
  .device-status { justify-content: flex-start; }
}


.service-shortcut { padding: .48rem .75rem; border: 1px solid var(--primary); border-radius: 999px; background: transparent; color: var(--accent); font-size: .9rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.service-shortcut:hover { background: var(--surface-soft); }
.service-page { max-width: 62rem; }
.service-page h1 { max-width: 18ch; }
.service-platforms { margin: 2rem 0; }
.platform-grid, .install-source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.platform-card, .install-source-card { padding: 1rem; border: 1px solid var(--border); border-radius: 1rem; background: var(--surface-soft); }
.platform-card h3 { margin: 0 0 .3rem; }
.platform-card p, .install-source-card p { margin: 0; color: var(--muted); }
.platform-card .product-action, .install-source-card .product-action { width: 100%; margin-top: .9rem; justify-content: center; }
.install-source-card .product-action { margin-top: 0; }
.platform-card .product-action[disabled], .install-source-card .product-action[disabled] { opacity: .72; cursor: not-allowed; }
.service-page-footer { display: flex; margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border); }
@media (max-width: 50rem) { .platform-grid, .install-source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 32rem) { .platform-grid, .install-source-grid { grid-template-columns: 1fr; } }


/* DOBRYASH_PAYMENT_ENTRY_WIDE_V2 */
.payment-entry-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: 100%;
  margin: 1.35rem 0 1.7rem;
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--primary);
  border-radius: 1.15rem;
  background: linear-gradient(135deg, var(--surface-soft), rgba(147, 223, 103, .22));
  box-shadow: inset 0 1px rgba(255,255,255,.7);
}
.payment-entry-wide h2 { margin: 0 0 .35rem; }
.payment-entry-wide p { margin: 0; max-width: 52rem; }
.payment-entry-action { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 42rem) {
  .payment-entry-wide { align-items: stretch; flex-direction: column; }
  .payment-entry-action { text-align: center; }
}

/* DOBRYASH_PRIVACY_PORTAL_CSS_V22 */
html[lang="ru"] .dobryash-privacy-card .dobryash-privacy-title-as-text {
  display: block !important;
  font-size: 34px !important;
  line-height: 1.14 !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  margin: 0 0 22px 0 !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  box-sizing: border-box !important;
  color: var(--text, #142414) !important;
}

/* DOBRYASH_HIDE_EMPTY_FOOTER_V3 */
.footer:empty { display: none; }

/* DOBRYASH_HOME_LEGAL_LINKS_ALIGNMENT_V1 */
.home-legal-link {
  margin-top: -0.65rem;
  font-size: 0.96rem;
  font-weight: 760;
}
.home-legal-link a {
  color: var(--accent);
  text-decoration: none;
}
.home-legal-link a:hover {
  text-decoration: underline;
  text-decoration-thickness: 0.12em;
}
.home-legal-link-left {
  justify-self: start;
}
.home-legal-link-right {
  justify-self: end;
  text-align: right;
  width: 100%;
}
@media (max-width: 760px) {
  .home-legal-link {
    margin-top: 0;
  }
}

/* DOBRYASH_HOME_EYEBROW_PRIVACY_ALIGN_V1 */
.home-legal-link-right {
  justify-self: end;
  text-align: right;
  width: 100%;
}

/* DOBRYASH_I18N_YOOKASSA_REVIEW_V1 */
.payment-plan-grid { align-items: stretch; }
.dobryash-requisites-card dl { display: grid; grid-template-columns: minmax(140px, 240px) 1fr; gap: 0.35rem 1rem; }
.dobryash-requisites-card dt { font-weight: 800; color: var(--muted); }
.dobryash-requisites-card dd { margin: 0; }
@media (max-width: 640px) { .dobryash-requisites-card dl { grid-template-columns: 1fr; } }

/* DOBRYASH_PUBLIC_EMAIL_PLAIN_V1 */
.dobryash-public-email {
  color: inherit;
  text-decoration: none;
  cursor: text;
  user-select: text;
}
.dobryash-requisites-card dt.dobryash-requisites-email-label {
  grid-column: 1;
  align-self: baseline;
}
.dobryash-requisites-card dd.dobryash-requisites-email-value {
  grid-column: 2;
  align-self: baseline;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

/* DOBRYASH_I18N_UX_CLEANUP_V2 */
@media (max-width: 640px) {
  .dobryash-requisites-card dt.dobryash-requisites-email-label,
  .dobryash-requisites-card dd.dobryash-requisites-email-value {
    grid-column: auto;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* DOBRYASH_SUBSCRIPTION_TERMS_V2 */
.dobryash-terms-card h1 {
  max-width: none;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: 0;
}
.dobryash-terms-card .lead {
  margin-bottom: 1.25rem;
}
.dobryash-terms-section {
  margin-top: 1.35rem;
}
.dobryash-terms-section h2 {
  margin: 0 0 0.45rem;
}
.dobryash-terms-section p {
  margin: 0;
  color: var(--text);
}
@media (max-width: 760px) {
  .home-legal-link-right {
    justify-self: start;
    text-align: left;
  }
}

