/* === WIDGET DEMO PAGE === */
body.page-widget-demo {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--surface-task);
  color: #1e293b;
  padding: 0;
}

.page-widget-demo > main { padding: 40px 20px 80px; }

.page-header {
  text-align: center;
  margin-bottom: 48px;
  padding: 28px 20px;
}
.page-header p {
  margin-top: 8px;
  font-size: var(--type-body);
  line-height: var(--leading-body);
  color: #5b6472;
}

/* ── Demo section ──────────────────────────────────────── */
.demo-section {
  max-width: 700px;
  margin: 0 auto 48px;
}
.demo-section h2 {
  font-size: var(--type-ui);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5b6472;
  margin-bottom: 16px;
}

/* Simulated partner site wrapper */
.partner-site {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.partner-site-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 24px;
}
.partner-logo {
  width: 38px;
  height: 38px;
  background: #0f766e;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: var(--type-ui);
  flex-shrink: 0;
}
.partner-site-name {
  font-weight: 700;
  font-size: 17px;
  color: #0f172a;
}
.partner-site-tagline {
  font-size: var(--type-ui);
  color: #5b6472;
}
.partner-body-text {
  font-size: var(--type-body);
  color: #475569;
  line-height: var(--leading-body);
  margin-bottom: 24px;
}
.grantmap-demo-frame {
  display: block;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  border: 0;
}

/* ── Embed code section ────────────────────────────────── */
.embed-section {
  max-width: 700px;
  margin: 0 auto 40px;
}
.embed-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}
.embed-section .lead {
  font-size: var(--type-body);
  line-height: var(--leading-body);
  color: #5b6472;
  margin-bottom: 18px;
}
.code-block {
  max-width: 100%;
  min-width: 0;
  background: #0f172a;
  border-radius: 10px;
  padding: 20px 22px;
  overflow-x: auto;
  contain: inline-size;
  margin-bottom: 14px;
}
.code-block code {
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: var(--type-ui);
  line-height: 1.7;
  color: #e2e8f0;
  white-space: pre;
  display: block;
}
.code-block code .cm-tag  { color: #7dd3fc; }
.code-block code .cm-attr { color: #86efac; }
.code-block code .cm-val  { color: #fde68a; }

.copy-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.copy-btn {
  min-height: 44px;
  background: #2d5f9e;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: var(--type-ui);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.copy-btn:hover { background: #204878; }
.copy-note {
  font-size: var(--type-ui);
  color: #5b6472;
  min-width: 0;
  overflow-wrap: anywhere;
}
.copy-confirm {
  font-size: var(--type-ui);
  color: #166534;
  display: none;
}
.copy-confirm.visible { display: inline; }
.clipboard-fallback { position: fixed; opacity: 0; pointer-events: none; }

/* ── Notes ─────────────────────────────────────────────── */
.notes {
  max-width: 700px;
  margin: 0 auto;
}
.notes h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 14px;
}
.notes ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notes li {
  position: relative;
  display: block;
  padding-left: 26px;
  font-size: var(--type-body);
  color: #475569;
  line-height: var(--leading-body);
  min-width: 0;
  overflow-wrap: anywhere;
}
.notes code { overflow-wrap: anywhere; word-break: break-word; }
.notes li::before {
  content: "✓";
  position: absolute;
  top: 0;
  left: 0;
  font-weight: 700;
  color: #16a34a;
}
.page-widget-demo strong { color: #1e293b; }
