:root {
  --bg: #0c0d0f;
  --bg-elevated: #15171c;
  --bg-soft: #1b1e26;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f1ea;
  --text-muted: #9a958b;
  --accent: #ff6a3d;
  --accent-soft: rgba(255, 106, 61, 0.16);
  --accent-text: #ffd5c6;
  --success: #7dffa3;
  --danger: #ff7b7b;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

[hidden] { display: none !important; }

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

button,
textarea,
select {
  font: inherit;
  color: inherit;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: drift 16s ease-in-out infinite alternate;
}

.bg__glow--a {
  width: min(70vw, 520px);
  height: min(70vw, 520px);
  top: -12%;
  left: -10%;
  background: radial-gradient(circle, rgba(255, 106, 61, 0.45), transparent 68%);
}

.bg__glow--b {
  width: min(60vw, 460px);
  height: min(60vw, 460px);
  right: -8%;
  bottom: 8%;
  background: radial-gradient(circle, rgba(90, 140, 255, 0.22), transparent 70%);
  animation-delay: -6s;
}

.bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 20%, black 20%, transparent 75%);
  opacity: 0.5;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(24px, -18px, 0) scale(1.08); }
}

.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: min(1280px, calc(100% - 1.25rem));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
  align-items: start;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 1rem 0 1.5rem;
  min-width: 0;
}

.promo {
  min-width: 0;
}

.promo--desk {
  display: none;
}

.promo--mobile {
  display: block;
  margin: 0 0 1.15rem;
}

.promo--mobile-bottom {
  margin: 1.35rem 0 0;
}

.promo__link {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.promo__link:hover {
  transform: translateY(-2px);
  border-color: rgba(90, 180, 255, 0.45);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.38);
}

.promo__img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 1100px) {
  .layout {
    grid-template-columns: minmax(140px, 200px) minmax(0, 720px) minmax(140px, 200px);
    justify-content: center;
    gap: 1.25rem;
    padding-top: 2.5rem;
    padding-bottom: 3rem;
  }

  .shell {
    width: 100%;
    padding-top: 0;
  }

  .promo--desk {
    display: block;
    position: sticky;
    top: 1.5rem;
    width: 100%;
  }

  .promo--mobile {
    display: none;
  }
}

.hero {
  text-align: center;
  margin-bottom: 1.75rem;
  animation: rise 0.7s ease both;
}

.hero__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 0.85rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--accent-text);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  font-weight: 600;
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.hero__subtitle {
  margin: 0.85rem auto 0;
  max-width: 28rem;
  color: var(--text-muted);
  font-size: clamp(1rem, 2.8vw, 1.15rem);
}

.panel {
  animation: rise 0.8s ease 0.08s both;
}

.form {
  display: grid;
  gap: 1.1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(180deg, rgba(27, 30, 38, 0.92), rgba(21, 23, 28, 0.96));
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.field {
  display: grid;
  gap: 0.55rem;
}

.field__label {
  font-size: 0.92rem;
  font-weight: 600;
}

.field__textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  padding: 0.95rem 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field__textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.55;
}

.field__textarea:focus {
  border-color: rgba(255, 106, 61, 0.7);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.field__hint {
  opacity: 0.75;
}

.audience {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.audience > .field__label {
  padding: 0;
}

.audience__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.audience__option {
  position: relative;
  cursor: pointer;
}

.audience__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.audience__option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  user-select: none;
}

.audience__option:hover span {
  border-color: rgba(255, 106, 61, 0.45);
  color: var(--text);
}

.audience__option input:checked + span {
  color: #1a0b07;
  border-color: transparent;
  background: linear-gradient(135deg, #ff7a4d, #ff4d2e 55%, #e23a1c);
  box-shadow: 0 8px 20px rgba(255, 77, 46, 0.22);
}

.audience__option input:focus-visible + span {
  outline: 2px solid rgba(255, 106, 61, 0.8);
  outline-offset: 2px;
}

.audience__option input:disabled + span {
  opacity: 0.45;
  cursor: not-allowed;
}

.audience__option:active span {
  transform: scale(0.98);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 52px;
  padding: 0.85rem 1.15rem;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.15s ease, opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  touch-action: manipulation;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  width: 100%;
  background: linear-gradient(135deg, #ff7a4d, #ff4d2e 55%, #e23a1c);
  color: #1a0b07;
  box-shadow: 0 12px 30px rgba(255, 77, 46, 0.28);
}

.btn--primary:hover:not(:disabled) {
  filter: brightness(1.05);
}

.btn--primary.is-loading .btn__label {
  opacity: 0.15;
}

.btn--primary.is-loading .btn__spinner {
  opacity: 1;
}

.btn__spinner {
  position: absolute;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid rgba(26, 11, 7, 0.25);
  border-top-color: #1a0b07;
  border-radius: 50%;
  opacity: 0;
  animation: spin 0.8s linear infinite;
}

.btn--primary {
  position: relative;
}

.btn--secondary,
.btn--ghost {
  flex: 1 1 140px;
  background: var(--bg-soft);
  border-color: var(--line);
}

.btn--secondary:hover:not(:disabled),
.btn--ghost:hover:not(:disabled) {
  border-color: rgba(255, 106, 61, 0.45);
  background: rgba(255, 106, 61, 0.08);
}

.btn--ghost.is-copied {
  color: var(--success);
  border-color: rgba(125, 255, 163, 0.35);
}

.btn--amplify {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-text);
  background: transparent;
  border-color: rgba(255, 106, 61, 0.28);
  border-style: dashed;
}

.btn--amplify:hover:not(:disabled) {
  background: var(--accent-soft);
  border-color: rgba(255, 106, 61, 0.55);
  border-style: solid;
}

.alert {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 123, 123, 0.35);
  background: rgba(255, 80, 80, 0.1);
  color: #ffd0d0;
  animation: rise 0.35s ease both;
}

.result {
  margin-top: 1.15rem;
}

.result__card {
  padding: 1.25rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 106, 61, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(27, 30, 38, 0.96), rgba(18, 20, 24, 0.98));
  box-shadow: var(--shadow);
  animation: rise 0.45s ease both;
}

.result__eyebrow {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.result__eyebrow--accent {
  color: var(--accent-text);
}

.result__source,
.result__text {
  margin: 0.55rem 0 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.result__source {
  color: var(--text-muted);
  font-size: 1rem;
}

.result__text {
  font-size: 1.08rem;
  line-height: 1.65;
}

.result__arrow {
  margin: 1rem 0;
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 700;
}

.result__footer {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.model-badge {
  margin: 0;
  width: fit-content;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer {
  margin-top: 1.75rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  width: 100%;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.footer__main {
  flex: 1 1 auto;
  min-width: 0;
}

.footer p {
  margin: 0 0 0.55rem;
  max-width: none;
}

.footer p:last-child {
  margin-bottom: 0;
}

.footer__dev {
  flex-shrink: 0;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.footer__dev:hover {
  color: var(--accent-text);
}

/* Ссылки на тёмном фоне — не браузерный синий */
a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-color: rgba(255, 213, 198, 0.35);
  text-underline-offset: 0.18em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover {
  color: #ffe8dc;
  text-decoration-color: rgba(255, 232, 220, 0.7);
}
a:visited {
  color: var(--accent-text);
}
a.footer__dev,
a.banner-slide {
  color: inherit;
  text-decoration: none;
}
a.footer__dev:hover {
  color: var(--accent-text);
}
.btn--primary:disabled {
  color: rgba(26, 11, 7, 0.72);
  filter: saturate(0.85) brightness(0.92);
  box-shadow: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (min-width: 720px) {
  .form,
  .result__card {
    padding: 1.5rem;
  }

  .field__textarea {
    min-height: 170px;
  }
}

@media (max-width: 480px) {
  .field__hint {
    display: none;
  }

  .result__actions {
    flex-direction: column;
  }

  .btn--secondary,
  .btn--ghost {
    width: 100%;
  }

  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Working correspondence: шапка и подвал на всю ширину, двухколоночный только контент. */
.workspace-layout {
  display: flex;
  flex-direction: column;
  max-width: 1120px;
  width: min(1120px, calc(100% - 1.25rem));
  gap: 0;
}
.workspace-layout .site-header {
  width: 100%;
  margin-bottom: 1.25rem;
}
.workspace-layout .content-split {
  display: block;
  width: 100%;
}
.workspace-layout .shell {
  width: 100%;
  max-width: 720px;
  margin: 0;
  padding: 0;
}
.workspace-layout .footer {
  width: 100%;
  margin-top: 2rem;
}
.hero__lead {
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.2vw, 1.65rem);
  font-weight: 700;
  line-height: 1.25;
  max-width: 36rem;
}
.hero__subtitle { max-width: 38rem; }
.section-title { margin: 0 0 1rem; font-size: 1.2rem; }
.hint { color: var(--text-muted); font-size: .86rem; line-height: 1.6; margin: .3rem 0; }
.status { min-height: 1.4rem; margin: .6rem .25rem; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field { min-width: 0; }
.field select { min-height: 46px; width: 100%; min-width: 0; border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: .65rem .7rem; }
.field__textarea { width: 100%; min-height: 130px; }
.field__textarea--short { min-height: 95px; }
.result-editor { min-height: 190px; line-height: 1.65; }
.advanced { border-top: 1px solid var(--line); padding-top: .7rem; }
.advanced summary { cursor: pointer; padding: .4rem 0; color: var(--text-muted); }
.advanced[open] .settings-grid { margin-top: .8rem; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .65rem; }
.example-btn { font: inherit; font-size: .82rem; color: var(--accent-text); background: transparent; border: 1px solid var(--line); border-radius: 9px; padding: .5rem .65rem; cursor: pointer; min-height: 38px; }
.example-btn:hover { border-color: var(--accent); }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.mode-btn { min-height: 44px; font: inherit; font-size: .9rem; font-weight: 600; color: var(--text-muted); background: transparent; border: 1px solid var(--line); border-radius: 12px; padding: .5rem .6rem; cursor: pointer; }
.mode-btn.is-active, .mode-btn[aria-pressed="true"] { color: var(--text); border-color: var(--accent); background: rgba(200, 245, 66, .08); }
.mode-extra { margin: .4rem 0 .6rem; }
.mode-link { font: inherit; font-size: .82rem; color: var(--text-muted); background: none; border: 0; padding: .3rem 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.mode-link[aria-pressed="true"] { color: var(--accent-text); }
.result__actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin-top: 1rem; }
.result__actions .btn { min-width: 0; flex: none; min-height: 46px; font-size: .85rem; padding: .65rem .45rem; }
.result__actions .btn--amplify { grid-column: 1 / -1; }
.model-badge { margin-top: 1rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
textarea:focus-visible, select:focus-visible { outline-offset: 2px; }
@media (max-width: 480px) {
  .workspace-layout { padding-top: .5rem; }
  .workspace-layout .site-header { margin-bottom: .6rem; }
  .topbar { margin-bottom: .6rem; min-height: 0; flex-wrap: wrap; }
  .topbar-right { flex-wrap: nowrap; }
  .header-billing { align-items: flex-end; max-width: 100%; }
  .hb-compact { white-space: normal; }
  .brand-logo { width: min(200px, 56vw); }
  .account-btn { min-height: 40px; width: 40px; padding: 0; justify-content: center; }
  .account-btn #account-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hero { margin-bottom: .8rem; }
  .hero__lead { font-size: 1.15rem; }
  .hero__subtitle { display: none; }
  .form, .result__card { padding: 1rem; }
  .form { gap: .75rem; }
  .settings-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .settings-grid .field__label { font-size: .82rem; }
  .settings-grid .field select { min-height: 42px; font-size: .9rem; padding: .5rem .55rem; }
  #translate-form .consent-check { margin: .4rem 0; }
  #guest-terms-row { font-size: .85rem; }
  #submit-btn { min-height: 50px; width: 100%; }
  #translate-form { position: relative; }
  body.cookie-decided #submit-btn:not(:disabled) { position: sticky; bottom: max(.5rem, env(safe-area-inset-bottom)); z-index: 20; box-shadow: 0 -10px 24px rgba(12, 13, 15, .85); }
  body:has(#consent-banner:not([hidden])) .workspace-layout { padding-bottom: 9.5rem; }
  .field { gap: .4rem; }
  .examples { gap: .35rem .45rem; }
  .examples .hint { flex-basis: 100%; margin: 0; }
  .mode-extra { margin: .2rem 0 .3rem; }
  .advanced { padding-top: .3rem; }
  .form .hint:last-of-type { margin-top: .2rem; }
  .settings-grid { gap: .7rem; }
  .result__actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer { align-items: flex-start; text-align: left; }
  #submit-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
}

/* Codelta banner slider (right column, 2026-10-22) */
.promo-side { min-width: 0; }

/* Site-styled confirm dialog (replaces native window.confirm) */
.app-dialog { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.app-dialog[hidden] { display: none; }
.app-dialog__overlay { position: absolute; inset: 0; background: rgba(4, 6, 10, .72); backdrop-filter: blur(3px); }
.app-dialog__card {
  position: relative;
  width: min(420px, 100%);
  background: var(--panel, #17181c);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
.app-dialog__text { margin: 0 0 1rem; color: var(--text); font-size: .98rem; line-height: 1.5; }
.app-dialog__actions { display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; }
.app-dialog__actions .btn { min-height: 42px; min-width: 110px; }
.banner-slider {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #070907;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}
.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}
.banner-slide.is-active { opacity: 1; transform: none; pointer-events: auto; }
.banner-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.banner-slide:hover img { filter: brightness(1.05); }
.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 38px; height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner-arrow svg { display: block; }
.banner-arrow--prev { left: 10px; }
.banner-arrow--next { right: 10px; }
.banner-arrow:hover { border-color: rgba(200, 245, 66, 0.8); }
.banner-dots {
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  z-index: 2;
  display: flex;
  gap: 6px;
  justify-content: center;
}
.banner-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}
.banner-dot.is-active { background: #c8f542; }
@media (min-width: 1100px) {
  .workspace-layout .content-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2rem;
    align-items: start;
  }
  .workspace-layout .shell { max-width: none; }
  .promo-side {
    position: sticky;
    top: 1rem;
    align-self: start;
  }
  .banner-slider { width: 100%; max-height: calc(100vh - 2rem); }
}
@media (max-width: 1099px) {
  .promo-side { max-width: 400px; margin: 1.5rem auto 0; }
}

/* Account: header button + modal (2026-10-22) */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  min-height: 56px;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  flex: 0 1 auto;
  min-width: 0;
}
.brand-link:hover { color: inherit; text-decoration: none; }
.brand-logo {
  display: block;
  width: min(280px, 68vw);
  height: auto;
}
.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #f2f4f8);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.account-btn:hover { border-color: var(--accent); }
.field__input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 12px;
  padding: 0.65rem 0.7rem;
  color: inherit;
  font: inherit;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4vh 1rem 2rem;
}
.modal[hidden] { display: none; }
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(3px);
}
.modal__card {
  position: relative;
  width: min(580px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 18px;
  animation: rise 0.25s ease both;
}
.modal__card .result__card { margin: 0; }
.modal__close {
  position: sticky;
  top: 0.75rem;
  float: right;
  margin: 0.75rem 0.75rem 0 0;
  z-index: 3;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Account page (/account): cabinet without the modal overlay */
.acc-page-body .hero,
.acc-page-body .content-split,
.acc-page-body .footer { display: none; }
.acc-page-body .layout { padding-top: 1.5rem; }
html:has(body.acc-page-body),
.acc-page-body {
  background-color: #0c0d0f;
  color: #f4f1ea;
}
.modal--page {
  position: static;
  display: block;
  padding: 0;
  z-index: auto;
}
.modal--page .modal__overlay,
.modal--page .modal__close { display: none; }
.modal--page .modal__card {
  width: min(900px, 100%);
  max-height: none;
  overflow: visible;
  margin: 0 auto 3rem;
  animation: none;
}
.topbar-right { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; justify-content: flex-end; }

/* Account tabs */
.acc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 0.5rem;
  border-bottom: 1px solid var(--line);
}
.acc-tab {
  padding: 0.55rem 0.9rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: inherit;
  font: inherit;
  opacity: 0.7;
  cursor: pointer;
}
.acc-tab[aria-selected="true"] { opacity: 1; border-bottom-color: var(--accent); }
[data-panel][hidden] { display: none; }

/* Promo code row */
.promo-field { display: block; margin: 0.75rem 0 0.35rem; }
.promo-row { display: flex; gap: 0.5rem; margin-top: 0.35rem; }
.promo-row .field__input { flex: 1 1 auto; }
.promo-row .btn { flex: none; }

/* Loading spinner + playful status (2026-10-22) */
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  margin-right: 0.5rem;
  vertical-align: -2px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ff6a4d;
  animation: korporator-spin 0.7s linear infinite;
}
@keyframes korporator-spin { to { transform: rotate(360deg); } }
.btn.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}
.btn.is-loading::before {
  content: "";
  width: 16px; height: 16px;
  flex: none;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: korporator-spin 0.7s linear infinite;
}

/* Account page: header summary, inline panel with tabs (2026-11-17) */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.header-billing {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted, #9a958b);
  text-align: right;
}
.header-billing[hidden] { display: none; }
.hb-stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; }
.hb-compact { font-size: 0.78rem; white-space: nowrap; color: var(--text-muted); }
.hb-compact strong { color: var(--text); font-weight: 600; }
.hb-stat {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 96px;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.hb-label { font-size: 0.72rem; opacity: 0.8; }
.hb-stat strong { color: var(--text); font-size: 1rem; font-weight: 600; }
.hb-tariff { color: var(--accent-text); }
.hb-tariff strong { color: var(--text); font-weight: 600; }


/* Two-step code auth (2026-10-22) */
#account-guest .field { display: block; margin-bottom: 0.85rem; }
.auth-wide { width: 100%; min-height: 48px; }
.code-boxes {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 1.1rem 0;
}
.code-box {
  width: 46px;
  height: 56px;
  padding: 0;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  caret-color: #ff6a4d;
}
.code-box:focus {
  border-color: #ff6a4d;
  outline: 2px solid rgba(255, 106, 77, 0.35);
  outline-offset: 1px;
}
.auth-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}
@media (max-width: 480px) {
  .code-box { width: 40px; height: 50px; font-size: 1.25rem; }
}

/* Legal pack v1.0: consent checkboxes + analytics banner */
.consent-check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0.8rem 0;
  font-size: 0.92rem;
  line-height: 1.45;
  cursor: pointer;
}
.consent-check input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: #ff6a4d;
}
.consent-banner {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 60;
  width: min(680px, calc(100vw - 2rem));
  background: var(--panel, #17181c);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  font-size: 0.92rem;
  line-height: 1.5;
}
.consent-banner p { margin: 0 0 0.7rem; }
@media (max-width: 480px) {
  .consent-banner { top: auto; bottom: max(.5rem, env(safe-area-inset-bottom)); padding: .5rem .6rem; font-size: .76rem; line-height: 1.35; width: calc(100vw - 1rem); }
  .consent-banner p { margin: 0 0 .35rem; }
  .consent-banner .result__actions { grid-template-columns: 1fr 1fr; margin-top: .25rem; }
  .consent-banner p { margin: 0 0 .45rem; }
  .consent-banner .result__actions { margin-top: .4rem; gap: .4rem; }
  .consent-banner .btn { min-height: 38px; padding: .45rem .4rem; font-size: .8rem; }
}
.footer__legal { font-size: 0.85rem; line-height: 1.7; }
