:root {
  --bg: #080b10;
  --bg-2: #0d1118;
  --panel: #111820;
  --panel-2: #151d27;
  --line: #263342;
  --line-soft: rgba(255,255,255,.08);
  --text: #eef4f8;
  --muted: #98a6b5;
  --faint: #667485;
  --green: #45d08f;
  --green-2: #bfffe0;
  --blue: #6db4ff;
  --warn: #f1bd55;
  --red: #ff7b7b;
  --shadow: 0 24px 70px rgba(0,0,0,.32);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg), var(--bg-2) 58%, var(--bg));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.centered {
  display: grid;
  place-items: start center;
  padding: 14px;
}

a { color: inherit; }

.page {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 20px 0;
}

.shell {
  width: min(840px, 100%);
  margin: 0 auto;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  color: var(--muted);
  font-size: 13px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 900;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--green);
  box-shadow: 0 0 0 1px rgba(255,255,255,.18) inset;
}

.panel {
  border: 1px solid var(--line);
  background: rgba(17,24,32,.94);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel.pad { padding: 18px; }

.hero {
  min-height: calc(100vh - 52px);
  display: grid;
  align-content: center;
  gap: 12px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 12px;
  align-items: stretch;
}

.hero-main {
  min-height: 400px;
  padding: 28px;
  display: grid;
  align-content: center;
}

.eyebrow {
  display: inline-flex;
  width: max-content;
  color: var(--green-2);
  background: rgba(69,208,143,.09);
  border: 1px solid rgba(69,208,143,.24);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 12px;
}

h1, h2, h3, p { margin: 0; }

h1 {
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1;
  max-width: 780px;
}

h2 {
  font-size: clamp(25px, 4vw, 38px);
  line-height: 1.08;
}

h3 {
  font-size: 18px;
  line-height: 1.25;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.lead {
  max-width: 690px;
  margin-top: 12px;
  font-size: 16px;
}

.stack { display: grid; gap: 9px; }
.stack-lg { display: grid; gap: 11px; }

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

button, .btn {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button.primary, .btn.primary {
  background: var(--green);
  color: #03110a;
  border-color: transparent;
}

button.danger, .btn.danger {
  color: #ffd0d0;
  border-color: rgba(255,123,123,.38);
  background: rgba(255,123,123,.08);
}

button.ghost, .btn.ghost { background: transparent; }
button:hover, .btn:hover { border-color: var(--blue); }
button:disabled { opacity: .62; cursor: not-allowed; }

.side { display: grid; gap: 10px; }

.metric, .tile, .stat {
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,.026);
  border-radius: 8px;
  padding: 12px;
}

.metric span, .tile span, .stat span, .label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.metric strong, .stat strong {
  display: block;
  font-size: 22px;
  margin-bottom: 5px;
  overflow-wrap: anywhere;
}

.proof, .grid-2, .features {
  display: grid;
  gap: 10px;
}

.proof { grid-template-columns: 1fr 1fr; margin-top: 12px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.features { grid-template-columns: repeat(3, 1fr); }

.badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(241,189,85,.34);
  color: #ffe4a7;
  background: rgba(241,189,85,.08);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.ok {
  border-color: rgba(69,208,143,.3);
  color: var(--green-2);
  background: rgba(69,208,143,.09);
}

.badge.bad {
  border-color: rgba(255,123,123,.34);
  color: #ffd0d0;
  background: rgba(255,123,123,.08);
}

.notice {
  border: 1px solid rgba(241,189,85,.34);
  background: rgba(241,189,85,.08);
  color: #ffe4a7;
  border-radius: 8px;
  padding: 12px;
  line-height: 1.55;
}

.notice.ok {
  border-color: rgba(69,208,143,.3);
  color: var(--green-2);
  background: rgba(69,208,143,.09);
}

.notice.info {
  border-color: rgba(109,180,255,.28);
  color: #cfe8ff;
  background: rgba(109,180,255,.08);
}

dialog {
  width: min(460px, calc(100% - 26px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(4px);
}

.modal { padding: 16px; }

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.close {
  width: 36px;
  min-height: 36px;
  padding: 0;
  font-size: 20px;
}

form { display: grid; gap: 10px; }

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1017;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  outline: none;
}

input:focus { border-color: var(--blue); }
input[readonly] { text-align: center; font-weight: 900; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.estimate {
  border: 1px solid rgba(69,208,143,.28);
  background: rgba(69,208,143,.08);
  color: var(--green-2);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.estimate strong { font-size: 21px; }

.stepper {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 8px;
}

.stepper button {
  min-height: 44px;
  padding: 0;
  font-size: 20px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.code {
  background: #0a1018;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  white-space: pre-wrap;
  overflow: auto;
  color: #dceaff;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}

.script-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.script-row .code {
  white-space: nowrap;
  margin: 0;
  display: flex;
  align-items: center;
  min-height: 44px;
}

.copy-btn {
  min-height: 44px;
  white-space: nowrap;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  font-size: 13px;
}

th { color: var(--muted); }
.hidden { display: none; }

.qr-box {
  display: grid;
  justify-items: center;
  gap: 10px;
  background: #f8fafc;
  color: #101820;
  border-radius: 8px;
  padding: 16px;
}

.qr-frame {
  width: min(260px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e1e7ee;
}

.qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.qr-download {
  min-height: 34px;
  padding: 0 11px;
  border-color: #d7dde5;
  background: #eef3f7;
  color: #111820;
  font-size: 12px;
}

.poll {
  border: 1px solid rgba(109,180,255,.28);
  background: rgba(109,180,255,.08);
  color: #cfe8ff;
  border-radius: 8px;
  padding: 12px;
  line-height: 1.55;
  display: flex;
  gap: 10px;
  align-items: center;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(207,232,255,.22);
  border-top-color: #cfe8ff;
  border-radius: 999px;
  animation: spin .8s linear infinite;
  flex: 0 0 auto;
}

.success {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(69,208,143,.35);
  background: rgba(69,208,143,.12);
  color: #dfffea;
  border-radius: 8px;
  padding: 18px;
  line-height: 1.55;
  text-align: center;
}

.success strong {
  display: block;
  color: #fff;
  font-size: 22px;
  margin-bottom: 4px;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .hero { min-height: auto; padding-bottom: 24px; }
  .hero-grid, .features, .proof, .grid-2 { grid-template-columns: 1fr; }
  .hero-main { min-height: auto; padding: 20px; }
}

@media (max-width: 560px) {
  body.centered { align-items: start; }
  .page { width: min(100% - 24px, 1120px); padding: 14px 0; }
  .panel.pad { padding: 14px; }
  .row { grid-template-columns: 1fr; }
  .top, .nav { flex-direction: column; }
  .script-row { grid-template-columns: 1fr; }
  .actions button, .actions .btn { width: 100%; }
  h1 { font-size: clamp(33px, 12vw, 46px); }
}
