:root {
  --bg: #fafafa;
  --card: #fff;
  --border: #e2e2e2;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #2f5fff;
  --accent-text: #fff;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--accent); }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

header.site-header {
  padding: 28px 0 8px;
  text-align: center;
}

header.site-header h1 {
  font-size: 26px;
  margin: 0 0 6px;
}

header.site-header p {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
}

section {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

section:first-of-type {
  border-top: none;
}

h2 {
  font-size: 18px;
  margin: 0 0 14px;
}

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

.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p { margin: 0; font-size: 14px; color: var(--muted); }

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

label {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

label span.hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}

input, textarea {
  font: inherit;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

input:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

button {
  font: inherit;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: 8px;
  padding: 11px 18px;
  font-weight: 600;
  font-size: 14px;
}

.btn-primary:hover { opacity: .92; }

.btn-secondary {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 13px;
}

.snippet {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  background: #f4f4f4;
  padding: 8px 10px;
  border-radius: 6px;
  display: block;
  white-space: pre-wrap;
  word-break: break-all;
}

.form-msg {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 6px;
  display: none;
}

.form-msg.show { display: block; }
.form-msg.ok { background: #e8f7ec; color: #17692b; }
.form-msg.err { background: #fdecec; color: #a3231a; }

footer.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 24px 0 40px;
}

/* ---- rectangle ad unit (rendered by widget.js, also used for the live preview) ---- */

.adswap-unit {
  width: 300px;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
  position: relative;
  transition: opacity .25s ease;
}

.adswap-unit .adswap-label {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #9a9a9a;
}

.adswap-unit .adswap-body {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 14px 12px;
}

.adswap-unit .adswap-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #eee;
  flex-shrink: 0;
}

.adswap-unit .adswap-name {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 2px;
  color: #1a1a1a;
}

.adswap-unit .adswap-tagline {
  font-size: 12px;
  color: #666;
  margin: 0;
}

.adswap-unit .adswap-cta {
  display: block;
  text-align: center;
  padding: 9px;
  background: #f4f4f4;
  border-top: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.adswap-unit .adswap-cta:hover { background: #ececec; }

.adswap-unit.adswap-empty {
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
}
