:root {
  --bg: #070707;
  --bg-soft: #101010;
  --card: rgba(18, 18, 18, .88);
  --card-2: rgba(13, 13, 13, .92);
  --line: rgba(255, 121, 41, .36);
  --line-soft: rgba(255, 255, 255, .10);
  --text: #fff8f1;
  --muted: #cbb9a9;
  --muted-2: #9f8d7e;
  --accent: #ff6a13;
  --accent-hover: #ff8a3d;
  --accent-soft: rgba(255, 106, 19, .14);
  --ok: #ffd08a;
  --err: #ff9b75;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .38);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 78% 2%, rgba(255, 106, 19, .22), transparent 30rem),
    radial-gradient(circle at 7% 105%, rgba(255, 166, 85, .12), transparent 24rem),
    linear-gradient(145deg, #15100d 0%, #080808 46%, #030303 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent 70%);
}

button,
select,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.page {
  width: min(100% - clamp(24px, 6vw, 64px), 1120px);
  margin: 0 auto;
  padding: clamp(22px, 5vw, 58px) 0 clamp(34px, 6vw, 74px);
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 155, 85, .34);
  border-radius: 999px;
  background: rgba(255, 106, 19, .10);
  color: #ffd9bd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.language-switcher {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
}

.lang-btn {
  min-width: 48px;
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.lang-btn:hover,
.lang-btn.is-active {
  background: linear-gradient(180deg, #ff944d 0%, var(--accent) 100%);
  color: #fff;
}

.lang-btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(255, 106, 19, .18);
}

.lang-btn:hover {
  transform: translateY(-1px);
}

.card,
.disclaimer {
  position: relative;
  z-index: 1;
}

.section-heading span {
  display: block;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.disclaimer {
  border: 1px solid rgba(255, 149, 75, .38);
  border-radius: 18px;
  padding: clamp(13px, 3.6vw, 18px);
  background: linear-gradient(90deg, rgba(255, 106, 19, .14), rgba(255, 255, 255, .035));
  box-shadow: 0 12px 34px rgba(255, 106, 19, .08);
}

.disclaimer strong {
  display: block;
  margin-bottom: 7px;
  color: #ffd9be;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.disclaimer p {
  margin: 0;
  color: #fff1e4;
  font-size: clamp(13px, 3.8vw, 15px);
  line-height: 1.45;
}

.disclaimer p + p {
  margin-top: 5px;
  color: #e7ccba;
}

.card {
  display: grid;
  gap: clamp(16px, 4vw, 22px);
  margin-top: clamp(16px, 4vw, 26px);
  padding: clamp(16px, 4.6vw, 26px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, var(--card), var(--card-2)),
    linear-gradient(135deg, rgba(255, 106, 19, .20), transparent);
  box-shadow: var(--shadow);
}

.section-heading h2,
.split h2 {
  margin: 6px 0 0;
  font-size: clamp(21px, 5vw, 30px);
  line-height: 1.15;
  letter-spacing: -.02em;
}

.demo-panel {
  width: 100%;
  padding: clamp(13px, 4vw, 18px);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 106, 19, .035)),
    #0c0c0c;
}

.demo-panel .form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.demo-panel .form-grid + .form-grid {
  margin-top: 12px;
}

.demo-panel .field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.demo-panel .field select,
.demo-panel .field input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  outline: none;
  background: rgba(0, 0, 0, .34);
  color: var(--text);
  font-size: 16px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}

.demo-panel .field select:hover,
.demo-panel .field input:hover {
  border-color: rgba(255, 149, 75, .42);
  background: rgba(0, 0, 0, .42);
}

.demo-panel .field select:focus-visible,
.demo-panel .field input:focus-visible,
.demo-panel button:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 106, 19, .18);
}

.demo-panel .field select:focus-visible,
.demo-panel .field input:focus-visible {
  transform: translateY(-1px);
}

.demo-panel .hint {
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 12px;
}

.demo-panel .quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.demo-panel .quick button {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 106, 19, .06);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.demo-panel .quick button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.demo-panel .summary {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 149, 75, .24);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 106, 19, .15), rgba(255, 255, 255, .035));
}

.demo-panel .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.demo-panel .row span:last-child,
.demo-panel .row strong {
  color: var(--text);
  font-weight: 800;
  text-align: right;
}

.demo-panel .row strong {
  font-size: clamp(20px, 5.8vw, 26px);
  letter-spacing: -.02em;
}

.demo-panel .actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin-top: 14px;
}

.demo-panel .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 12px 15px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.btn-primary {
  border: 0;
  background: linear-gradient(180deg, #ff944d 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(255, 106, 19, .27);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #ffa15d 0%, var(--accent-hover) 100%);
  box-shadow: 0 16px 32px rgba(255, 106, 19, .32);
  transform: translateY(-1px);
}

.btn-secondary {
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .025);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: rgba(255, 149, 75, .46);
  background: rgba(255, 106, 19, .08);
  transform: translateY(-1px);
}

.demo-panel .status {
  min-height: 20px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.demo-panel .status.ok {
  color: var(--ok);
}

.demo-panel .status.error {
  color: var(--err);
}

.split {
  padding-top: clamp(16px, 4vw, 22px);
  border-top: 1px solid var(--line-soft);
}

.history {
  display: grid;
  gap: 10px;
  max-height: 230px;
  margin: 12px 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  scrollbar-color: rgba(255, 106, 19, .45) rgba(255, 255, 255, .06);
}

.history li {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(255, 106, 19, .075), rgba(255, 255, 255, .025));
  color: #ffe8d7;
  font-size: 13px;
  line-height: 1.4;
}

.meta {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 12px;
}

.future {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.future li {
  position: relative;
  min-height: 44px;
  padding: 11px 12px 11px 38px;
  border: 1px solid rgba(255, 149, 75, .22);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255, 106, 19, .11), rgba(255, 255, 255, .025));
  color: #ffe8d7;
  font-weight: 600;
  line-height: 1.35;
}

.future li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffd2ad 0%, var(--accent) 70%);
  box-shadow: 0 0 0 4px rgba(255, 106, 19, .14);
  transform: translateY(-50%);
}

.future-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  color: #ffc69e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.future-title::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.note {
  margin: 12px 0 0;
  padding: 11px 12px;
  border: 1px dashed rgba(255, 149, 75, .34);
  border-radius: 13px;
  background: rgba(255, 106, 19, .045);
  color: #d7bfaa;
  font-size: 12px;
  line-height: 1.4;
}

@media (min-width: 390px) {
  .demo-panel .actions {
    grid-template-columns: 1.25fr 1fr;
  }
}

@media (min-width: 430px) {
  .demo-panel {
    padding: 18px;
  }
}

@media (min-width: 768px) {
  .demo-panel .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card {
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    align-items: start;
  }

  .section-heading,
  .demo-panel {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .card {
    grid-template-columns: minmax(360px, 460px) minmax(0, 1fr);
  }

  .section-heading {
    grid-column: 1 / -1;
  }

  .demo-panel {
    grid-column: 1;
    grid-row: 2 / span 2;
  }

  .split {
    padding-top: 0;
    border-top: 0;
  }
}

@media (min-width: 1280px) {
  .page {
    width: min(100% - 80px, 1180px);
  }
}

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