:root {
  color-scheme: light;
  --green-900: #063d2e;
  --green-700: #0f6f4a;
  --green-500: #18a56a;
  --cyan-500: #19a7b8;
  --yellow-500: #ffc857;
  --ink: #14211d;
  --muted: #5c6b66;
  --line: #dce8e4;
  --surface: #ffffff;
  --soft: #eef7f2;
  --danger: #b42318;
  --shadow: 0 24px 70px rgba(6, 61, 46, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(238, 247, 242, 0.94), rgba(255, 255, 255, 0.94)),
    radial-gradient(circle at 18% 16%, rgba(25, 167, 184, 0.18), transparent 28%),
    radial-gradient(circle at 82% 0%, rgba(255, 200, 87, 0.26), transparent 30%);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.page-shell {
  width: 100%;
  margin: 0;
  padding: 0 0 28px;
}

.hero {
  display: flex;
  align-items: center;
  min-height: min(620px, 72vh);
  padding: 74px 0 84px;
  background:
    linear-gradient(90deg, rgba(6, 61, 46, 0.88) 0%, rgba(6, 61, 46, 0.7) 38%, rgba(6, 61, 46, 0.08) 74%),
    url("images/hero-qrcode-trader.png") center right / cover no-repeat;
  color: #fff;
}

.hero__content {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green-700);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: rgba(255, 255, 255, 0.86);
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 720px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.6rem, 8vw, 5.7rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  color: var(--green-900);
  font-size: 1.55rem;
  line-height: 1.16;
  letter-spacing: 0;
}

.tagline {
  max-width: 700px;
  margin: 18px 0 0;
  color: var(--yellow-500);
  font-size: clamp(1.2rem, 2.4vw, 1.75rem);
  font-weight: 800;
}

.intro {
  max-width: 660px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.05rem;
}

.generator {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 22px;
  align-items: stretch;
  width: min(1120px, calc(100% - 32px));
  margin: -46px auto 0;
}

.panel {
  border: 1px solid rgba(15, 111, 74, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 60px rgba(6, 61, 46, 0.1);
}

.panel--form {
  padding: 28px;
}

.panel--result {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
}

.section-heading {
  margin-bottom: 24px;
}

form label {
  display: block;
  margin-bottom: 8px;
  color: var(--green-900);
  font-weight: 800;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  border: 1px solid rgba(15, 111, 74, 0.12);
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(180deg, #f8fcfa, #eef7f2);
}

.mode-tabs button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: left;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.mode-tabs button:hover {
  border-color: rgba(15, 111, 74, 0.2);
  background: rgba(255, 255, 255, 0.72);
  color: var(--green-900);
}

.mode-tabs button.is-active {
  border-color: var(--green-700);
  background: #fff;
  color: var(--green-900);
  box-shadow: 0 10px 28px rgba(6, 61, 46, 0.12);
  transform: translateY(-1px);
}

.mode-tabs button.is-active::after {
  position: absolute;
  right: 10px;
  bottom: 8px;
  width: 24px;
  height: 3px;
  border-radius: 99px;
  background: var(--yellow-500);
  content: "";
}

.tab-icon {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(15, 111, 74, 0.09);
  color: var(--green-700);
  font-size: 0.74rem;
  line-height: 1;
}

.mode-tabs button.is-active .tab-icon {
  background: var(--green-700);
  color: #fff;
}

.tab-text {
  min-width: 0;
  line-height: 1.12;
}

.mode-panel {
  display: none;
}

.mode-panel[hidden] {
  display: none;
}

.mode-panel.is-active {
  display: block;
  min-height: 170px;
  border: 1px solid rgba(15, 111, 74, 0.12);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.72);
  animation: panel-in 180ms ease;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--ink);
  background: #fbfdfc;
  outline: none;
}

input,
select {
  min-height: 54px;
}

textarea {
  min-height: 112px;
  padding-top: 14px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(24, 165, 106, 0.14);
}

.submit-button,
.actions button {
  min-height: 54px;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--green-700);
  color: #fff;
  font-weight: 800;
  transition: transform 160ms ease, background-color 160ms ease;
}

.submit-button:hover,
.actions button:hover {
  background: var(--green-900);
  transform: translateY(-1px);
}

.submit-button {
  width: 100%;
  margin-top: 18px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  min-height: 54px;
  margin: 30px 0 0;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fbfdfc;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--green-700);
}

.checkbox-field span {
  color: var(--green-900);
  font-weight: 800;
}

.hint,
.message {
  min-height: 24px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.message.is-error {
  color: var(--danger);
  font-weight: 700;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.quick-links button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--soft);
  color: var(--green-900);
  font-weight: 800;
}

.result-top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--soft);
  color: var(--green-700);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.qr-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 340px;
  border: 1px dashed rgba(15, 111, 74, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(45deg, rgba(24, 165, 106, 0.06) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(24, 165, 106, 0.06) 25%, transparent 25%),
    #fbfdfc;
  background-size: 24px 24px;
}

.qrcode {
  display: none;
  width: 256px;
  height: 256px;
  padding: 14px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(6, 61, 46, 0.12);
}

.qrcode.is-visible {
  display: grid;
  place-items: center;
}

.qrcode canvas,
.qrcode img {
  width: 228px;
  height: 228px;
}

#empty-state {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

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

.actions button:nth-child(2) {
  background: var(--cyan-500);
}

.actions button:nth-child(2):hover {
  background: #117989;
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 28px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 860px) {
  .page-shell {
    padding-top: 0;
  }

  .generator {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 520px;
    padding: 58px 0 86px;
    background:
      linear-gradient(180deg, rgba(6, 61, 46, 0.9) 0%, rgba(6, 61, 46, 0.76) 48%, rgba(6, 61, 46, 0.2) 100%),
      url("images/hero-qrcode-trader.png") center right / cover no-repeat;
  }

  .generator {
    margin-top: -52px;
  }

  .mode-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-footer {
    width: min(100% - 22px, 1120px);
  }

  .panel--form,
  .panel--result {
    padding: 18px;
  }

  .input-row,
  .field-grid,
  .actions {
    grid-template-columns: 1fr;
  }

  .mode-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
  }

  .mode-tabs button {
    min-height: 50px;
    padding: 8px;
    font-size: 0.84rem;
  }

  .tab-icon {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
  }

  .checkbox-field {
    margin-top: 0;
  }

  .qr-frame {
    min-height: 300px;
  }

  .qrcode {
    width: 236px;
    height: 236px;
  }

  .qrcode canvas,
  .qrcode img {
    width: 208px;
    height: 208px;
  }

  .result-top {
    display: block;
  }

  .status-pill {
    display: inline-block;
    margin-top: 12px;
  }
}
