:root {
  --bg: #f4f1ea;
  --ink: #1f252c;
  --muted: #5c6875;
  --surface: #fffdf8;
  --line: #d7d0c4;
  --accent: #175f4a;
  --accent-2: #dba341;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(219, 163, 65, 0.18), transparent 32%),
    linear-gradient(180deg, #f6f2ea 0%, #ece7dc 100%);
}

.hero,
.card,
.surface-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(31, 37, 44, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  padding: 28px;
  margin: 20px;
  border-radius: 20px;
}

.layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 0 20px 24px;
}

.layout.single {
  grid-template-columns: minmax(0, 1fr);
}

.card {
  border-radius: 18px;
  padding: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--muted);
}

.lede {
  color: var(--muted);
  line-height: 1.5;
  max-width: 58ch;
}

.button-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

button,
a {
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 10px 16px;
  background: white;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  font-size: 0.95rem;
}

button.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.hero-actions {
  display: flex;
  align-items: start;
  justify-content: end;
  flex-wrap: wrap;
  gap: 10px;
}

.stack {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

input,
select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
}

.status-box,
.result-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed var(--line);
  background: #fffaf1;
  min-height: 54px;
}

.result-box {
  white-space: pre-wrap;
  overflow: auto;
}

iframe {
  width: 100%;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.surface {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 24, 30, 0.5);
  z-index: 50;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 92vw);
  padding: 20px;
  background: rgba(20, 24, 30, 0.25);
  z-index: 49;
}

.drawer .surface-card {
  height: 100%;
}

.surface-card {
  width: min(520px, 100%);
  padding: 22px;
  border-radius: 18px;
}

.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff7e3;
  box-shadow: 0 12px 30px rgba(31, 37, 44, 0.16);
  z-index: 80;
}

.hidden {
  display: none;
}

.popup-body,
.frame-body {
  padding: 18px;
}

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

  .hero-actions,
  .cookie-banner {
    justify-content: start;
  }

  .cookie-banner {
    flex-direction: column;
    align-items: start;
  }
}
