:root {
  --ink: #14212b;
  --muted: #5d6974;
  --paper: #f5f1e8;
  --surface: #ffffff;
  --line: #d8dee4;
  --red: #d92f2f;
  --green: #0a7a68;
  --gold: #d69b24;
  --blue: #255c99;
  --shadow: 0 24px 60px rgba(20, 33, 43, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(10, 122, 104, 0.08), transparent 380px),
    var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(20, 33, 43, 0.08);
  background: rgba(245, 241, 232, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: stretch;
}

.preview-area {
  display: grid;
  grid-template-columns: minmax(290px, 390px) minmax(250px, 1fr);
  gap: clamp(18px, 3vw, 28px);
  align-items: center;
  min-height: 690px;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid rgba(20, 33, 43, 0.1);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 20%, rgba(214, 155, 36, 0.18), transparent 34%),
    linear-gradient(135deg, #ffffff, #edf5f1 58%, #f8efe0);
  box-shadow: var(--shadow);
}

.phone-frame {
  width: min(390px, 100%);
  min-height: 650px;
  margin: 0 auto;
  padding: 12px;
  border: 1px solid #202a33;
  border-radius: 32px;
  background: #101820;
  box-shadow: 0 30px 70px rgba(10, 21, 29, 0.22);
}

.emergency-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 626px;
  padding: 18px;
  border-radius: 24px;
  background: #fbfcfc;
}

.status-line,
.sticker-head,
.pricing-controls,
.access-grid {
  display: flex;
  align-items: center;
}

.status-line {
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-badge,
.status-safe,
.token-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.status-badge {
  color: #ffffff;
  background: var(--red);
}

.status-safe,
.token-pill {
  color: var(--green);
  background: rgba(10, 122, 104, 0.12);
}

.alert-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--red);
}

.alert-band a {
  display: grid;
  min-width: 56px;
  min-height: 46px;
  place-items: center;
  border-radius: 8px;
  color: var(--red);
  background: #ffffff;
  font-weight: 900;
  text-decoration: none;
}

.identity-block {
  padding: 18px 0 4px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.identity-block h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.identity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 22px 0 0;
}

.identity-grid div {
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

dd {
  margin: 7px 0 0;
  font-size: 1.08rem;
  font-weight: 850;
}

.contacts-block h2,
.sticker-preview h2,
.business-panel h2,
.model-strip h2,
.future-access h2,
.section-title h2 {
  margin: 0;
  letter-spacing: 0;
}

.contacts-block h2 {
  font-size: 1.08rem;
}

.contact-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.contact-row:first-child {
  border-top: 0;
}

.contact-row strong {
  display: block;
  font-size: 1.05rem;
}

.contact-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.call-button {
  display: grid;
  min-width: 92px;
  min-height: 44px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--green);
  font-weight: 850;
  text-decoration: none;
}

.locked-strip {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding: 14px 0 0;
  border-top: 1px dashed #b7c0c8;
  color: var(--muted);
  font-size: 0.86rem;
}

.locked-strip strong,
.locked-strip span {
  display: block;
}

.locked-strip > span {
  color: var(--blue);
  font-weight: 900;
}

.sticker-preview,
.control-surface,
.future-access,
.model-strip article {
  border: 1px solid rgba(20, 33, 43, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.sticker-preview {
  align-self: center;
  padding: 22px;
}

.sticker-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.token-pill {
  font-size: 0.78rem;
  font-weight: 900;
}

#qrCanvas {
  display: block;
  width: min(100%, 216px);
  height: auto;
  margin: 0 auto;
  border: 10px solid #ffffff;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(20, 33, 43, 0.16);
}

.micro-link {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-align: center;
}

.control-surface {
  padding: clamp(18px, 3vw, 30px);
}

.section-title {
  margin-bottom: 22px;
}

.section-title p:last-child {
  max-width: 54ch;
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.5;
}

.section-title.compact {
  margin-bottom: 14px;
}

.profile-form {
  display: grid;
  gap: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label,
legend,
.member-input {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 850;
}

input,
select {
  width: 100%;
  min-height: 46px;
  margin-top: 7px;
  padding: 10px 12px;
  border: 1px solid #c8d0d7;
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(10, 122, 104, 0.16);
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

legend {
  padding: 0 8px;
}

.wide-field {
  grid-column: 1 / -1;
}

.business-panel {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.pricing-controls {
  gap: 10px;
  margin-bottom: 14px;
}

.price-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #c6d2d0;
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.price-button.active {
  color: #ffffff;
  border-color: var(--green);
  background: var(--green);
}

.member-input {
  display: block;
  max-width: 240px;
}

.revenue-output {
  display: block;
  margin-top: 16px;
  padding: 16px;
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  color: var(--ink);
  background: #fff8e8;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  font-weight: 950;
}

.model-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 3vw, 28px);
  margin-top: clamp(24px, 5vw, 48px);
}

.model-strip article {
  min-height: 220px;
  padding: 24px;
}

.model-number {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 950;
}

.model-strip article:nth-child(2) .model-number {
  background: var(--green);
}

.model-strip article:nth-child(3) .model-number {
  background: var(--red);
}

.model-strip p {
  color: var(--muted);
  font-weight: 650;
  line-height: 1.55;
}

.future-access {
  margin-top: clamp(20px, 4vw, 36px);
  padding: clamp(20px, 4vw, 34px);
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}

.access-grid div {
  min-height: 112px;
  padding: 16px 0;
  border-top: 4px solid var(--line);
}

.access-grid div:nth-child(1) {
  border-color: var(--green);
}

.access-grid div:nth-child(2) {
  border-color: var(--red);
}

.access-grid div:nth-child(3) {
  border-color: var(--gold);
}

.access-grid strong,
.access-grid span {
  display: block;
}

.access-grid strong {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.access-grid span {
  color: var(--muted);
  font-weight: 650;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .workspace,
  .preview-area {
    grid-template-columns: 1fr;
  }

  .preview-area {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.86rem;
  }

  main {
    padding: 16px;
  }

  .phone-frame {
    min-height: auto;
    border-radius: 24px;
  }

  .emergency-view {
    min-height: auto;
    border-radius: 16px;
  }

  .form-grid,
  .identity-grid,
  .model-strip,
  .access-grid {
    grid-template-columns: 1fr;
  }

  .contact-row {
    grid-template-columns: 1fr;
  }

  .call-button {
    width: 100%;
  }
}