:root {
  --gmg-green: #93d500;
  --gmg-green-hover: #9fe000;
  --gmg-action: #182104;
  --gmg-graphite: #4d4948;
  --gmg-text: #333333;
  --gmg-muted: #5f655f;
  --gmg-soft: #fbfcfa;
  --gmg-soft-2: #f2f5ef;
  --gmg-ink: #010203;
  --gmg-line: rgba(77, 73, 72, 0.14);
  --gmg-container: min(1320px, calc(100vw - 48px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--gmg-soft);
  color: var(--gmg-text);
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: var(--gmg-container);
  margin: 0 auto;
}

.site-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(98deg, rgba(1, 2, 3, 0.88) 0%, rgba(1, 2, 3, 0.7) 48%, rgba(1, 2, 3, 0.28) 100%),
    radial-gradient(circle at 82% 28%, rgba(147, 213, 0, 0.22), transparent 35%),
    #101410;
  color: #f8fbf2;
}

.site-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: min(420px, 42vw);
  opacity: 0.18;
  background-image:
    linear-gradient(30deg, transparent 35%, rgba(147, 213, 0, 0.22) 36%, rgba(147, 213, 0, 0.22) 37%, transparent 38%),
    linear-gradient(150deg, transparent 35%, rgba(147, 213, 0, 0.18) 36%, rgba(147, 213, 0, 0.18) 37%, transparent 38%);
  background-size: 88px 76px;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.72fr);
  gap: 64px;
  min-height: 520px;
  align-items: center;
  padding: 86px 0 76px;
}

.hero-copy h1,
.panel h2 {
  margin: 0;
  color: inherit;
  font-weight: 700;
  letter-spacing: -0.055em;
}

.hero-copy h1 {
  max-width: 760px;
  font-size: clamp(46px, 5vw, 70px);
  line-height: 0.96;
}

.lead {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(248, 251, 242, 0.78);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  margin: 0 0 18px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(147, 213, 0, 0.1);
  color: #5b7908;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 30px;
  text-transform: uppercase;
}

.site-hero .eyebrow {
  color: var(--gmg-green);
  background: rgba(147, 213, 0, 0.12);
}

.eyebrow span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--gmg-green);
}

.button,
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.button:hover,
.file-button:hover {
  transform: translateY(-1px);
}

.button-primary,
.file-button {
  background: var(--gmg-green);
  color: var(--gmg-action);
}

.button-primary:hover,
.file-button:hover {
  background: var(--gmg-green-hover);
  color: var(--gmg-action);
}

.button-ghost {
  border-color: rgba(248, 251, 242, 0.2);
  background: rgba(248, 251, 242, 0.1);
  color: #f8fbf2;
}

.button-light {
  border-color: rgba(77, 73, 72, 0.14);
  background: rgba(77, 73, 72, 0.04);
  color: var(--gmg-graphite);
}

.hero-preview {
  display: flex;
  justify-content: flex-end;
}

.mini-card {
  width: min(100%, 420px);
  padding: 30px;
  border: 1px solid rgba(248, 251, 242, 0.3);
  border-radius: 8px;
  background: rgba(248, 251, 242, 0.9);
  box-shadow: 0 24px 70px rgba(1, 2, 3, 0.25);
}

.mini-photo {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--gmg-green);
  color: var(--gmg-action);
  font-weight: 800;
}

.mini-lines {
  display: grid;
  gap: 9px;
  margin-top: 20px;
}

.mini-lines span {
  height: 9px;
  border-radius: 999px;
  background: rgba(77, 73, 72, 0.16);
}

.mini-lines span:first-child {
  width: 66%;
  background: rgba(147, 213, 0, 0.35);
}

.mini-lines span:nth-child(2) {
  width: 92%;
}

.mini-lines span:nth-child(3) {
  width: 54%;
}

.mini-rule {
  height: 2px;
  margin: 24px 0 16px;
  background: var(--gmg-green);
}

.mini-products {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mini-products span {
  padding: 9px 12px;
  border-radius: 7px;
  background: rgba(147, 213, 0, 0.12);
  color: #5b7908;
  font-size: 11px;
  font-weight: 800;
}

.tool {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(520px, 1.18fr);
  gap: 24px;
  padding: 64px 0;
}

.panel {
  min-width: 0;
  border: 1px solid var(--gmg-line);
  border-radius: 8px;
  background: rgba(251, 252, 250, 0.92);
}

.panel {
  padding: 28px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.panel h2 {
  color: #1f2420;
  font-size: clamp(24px, 2vw, 32px);
  line-height: 1.08;
}

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

label span,
.html-output span {
  display: block;
  margin-bottom: 7px;
  color: #60665f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(77, 73, 72, 0.24);
  border-radius: 6px;
  background: #f8faf5;
  color: var(--gmg-text);
  outline: none;
}

input {
  min-height: 44px;
  padding: 10px 12px;
}

textarea {
  min-height: 210px;
  padding: 14px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
}

input:focus,
textarea:focus {
  border-color: rgba(147, 213, 0, 0.92);
  box-shadow: 0 0 0 3px rgba(147, 213, 0, 0.16);
}

.photo-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 24px;
}

.photo-frame {
  width: 112px;
  height: 117px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: transparent;
  color: var(--gmg-action);
  font-size: 24px;
  font-weight: 800;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.photo-controls p {
  flex-basis: 100%;
  margin: 0;
  color: var(--gmg-muted);
  font-size: 13px;
  line-height: 1.6;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.text-button {
  border: 0;
  background: transparent;
  color: #668600;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.advanced {
  margin-top: 28px;
  border-top: 1px solid var(--gmg-line);
  padding-top: 18px;
}

.advanced summary {
  color: var(--gmg-graphite);
  font-weight: 800;
  cursor: pointer;
}

.product-editor {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.product-row {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(77, 73, 72, 0.14);
  border-radius: 8px;
  background: rgba(77, 73, 72, 0.035);
}

.product-row input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
}

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

.product-row-fields .wide {
  grid-column: 1 / -1;
}

.copy-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 10px;
}

.copy-actions .button {
  white-space: nowrap;
}

.notice {
  display: none;
  min-height: 0;
  margin: 0;
  color: #668600;
  font-size: 13px;
  font-weight: 700;
}

.signature-stage {
  max-width: 100%;
  overflow: auto;
  padding: 26px;
  border: 1px solid var(--gmg-line);
  border-radius: 8px;
  background: #ffffff;
}

.html-output {
  display: block;
  margin-top: 20px;
}

@media (max-width: 1080px) {
  .hero-grid,
  .tool {
    grid-template-columns: 1fr;
  }

  .hero-preview {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  :root {
    --gmg-container: min(100vw - 28px, 1320px);
  }

  .hero-grid {
    min-height: auto;
    padding: 60px 0;
  }

  .panel {
    padding: 20px;
  }

  .panel-head,
  .photo-row,
  .field-grid,
  .product-row-fields {
    grid-template-columns: 1fr;
  }

  .panel-head {
    display: grid;
  }

  .copy-actions {
    justify-content: flex-start;
  }
}
