:root {
  --bg: #f3f5f7;
  --panel: #ffffff;
  --ink: #1a2332;
  --muted: #5b6b7c;
  --line: #d7dee7;
  --accent: #0b6e4f;
  --accent-ink: #ffffff;
  --danger: #9b1c1c;
  --warn: #8a5a00;
  --ok: #0b6e4f;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: linear-gradient(180deg, #e8eef3 0%, var(--bg) 40%, #eef2f6 100%);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: #102033;
  color: #f4f7fb;
}
.topbar .brand { font-weight: 700; letter-spacing: 0.02em; color: #fff; text-decoration: none; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; }
.topbar nav a { color: #c9d6e5; text-decoration: none; font-size: 0.92rem; }
.topbar nav a:hover { color: #fff; }
.topbar .meta { color: #93a6bc; font-size: 0.85rem; }

.wrap { max-width: 980px; margin: 0 auto; padding: 1.25rem; }
h1 { font-size: 1.55rem; margin: 0 0 0.35rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.75rem; }
.lead { color: var(--muted); margin: 0 0 1.25rem; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.85rem 1rem;
}
.stat .n { font-size: 1.5rem; font-weight: 700; font-family: var(--mono); }
.stat .l { color: var(--muted); font-size: 0.85rem; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  padding: 0.55rem 0.9rem;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; color: #fff; }
.btn.secondary { background: #30445c; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0 1rem; }

label { display: block; font-size: 0.9rem; margin: 0.65rem 0 0.25rem; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=datetime-local], select, textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  font: inherit;
  background: #fff;
}
textarea { min-height: 220px; font-family: var(--mono); font-size: 0.9rem; }
.help { color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }

/* App table styles; :where(:not(...)) keeps them (at the same specificity) out of email HTML in the editor canvas. */
table:where(:not(.html-visual table)) { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th:where(:not(.html-visual th)), td:where(:not(.html-visual td)) { text-align: left; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.row-actions { display: flex; align-items: center; gap: 0.75rem; white-space: nowrap; }
.row-actions form { margin: 0; }
button.icon-remove {
  background: none;
  border: 0;
  padding: 0 0.2rem;
  margin: 0;
  color: var(--muted);
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
button.icon-remove:hover { color: var(--danger); }
th:where(:not(.html-visual th)) { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
.badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  font-family: var(--mono);
  background: #f7fafc;
}
.badge.ok { border-color: #9bd0bc; color: var(--ok); }
.badge.warn { border-color: #e2c48a; color: var(--warn); }
.badge.err { border-color: #e2a0a0; color: var(--danger); }

.flash {
  padding: 0.7rem 0.9rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  background: #fff;
}
.flash.success { border-color: #9bd0bc; background: #eef8f3; }
.flash.error { border-color: #e2a0a0; background: #fdf2f2; }
.flash.info { border-color: #a8c0dc; background: #eef4fa; }

.auth-box {
  max-width: 420px;
  margin: 3rem auto;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1.5rem;
}
.auth-box h1 { margin-bottom: 0.25rem; }
.muted { color: var(--muted); }
.footer-note {
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.page-head h1 { margin-bottom: 0; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.section-head h2 { margin: 0; }
.section-head .btn { padding: 0.35rem 0.7rem; }
.section-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.html-visual [data-ppb-logo] { cursor: pointer; }

.tabs { display: flex; gap: 0.35rem; margin: 1rem 0 0.75rem; }
.tab {
  background: #f7fafc;
  border: 1px solid var(--line);
  color: var(--muted);
  font: inherit;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}
.tab.is-on { background: #102033; color: #fff; border-color: #102033; }

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
  max-width: 100%;
}
.editor-toolbar button, .system-card {
  font: inherit;
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0 0.6rem;
}
.editor-toolbar button,
.editor-toolbar select,
.editor-toolbar input[type="color"] {
  height: 2rem;
  line-height: 1;
}
.editor-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.editor-toolbar .tool {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  height: 2rem;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}
.editor-toolbar select,
.editor-toolbar input[type="color"] {
  font: inherit;
  font-size: 0.82rem;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0 0.35rem;
  max-width: 100%;
}
.editor-toolbar #font-family { max-width: 9.5rem; }
.editor-toolbar #font-size { max-width: 4.5rem; }
.editor-toolbar #block-style { max-width: 7.5rem; }
.editor-toolbar input[type="color"] {
  width: 2rem;
  padding: 0.15rem;
}
.editor-under { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.editor-under #clear-template { margin-left: auto; }
.btn-danger-outline {
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  background: transparent;
  color: var(--danger);
  border: 1px solid #e2a0a0;
  height: 2rem;
  padding: 0 0.7rem;
}
.btn-danger-outline:hover { background: #fdf3f3; border-color: var(--danger); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { color: #fff; }
.library-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.75rem; margin: 1rem 0 0.75rem; }
.library-head h2 { margin: 0; }
.editor-under button#preview-template {
  font: inherit;
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  height: 2rem;
  padding: 0 0.7rem;
}
.editor-toolbar button.is-on { background: #102033; color: #fff; }

.html-visual, .html-source {
  min-height: 280px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.75rem;
  overflow: auto;
}
.html-stage { position: relative; overflow: visible; }
.html-visual { position: relative; }
/* Email canvas: center fragments/tables like an email client would. Display only; saved HTML is unchanged. */
.html-visual > table { margin-left: auto; margin-right: auto; }
.html-visual:focus { outline: 2px solid #9bd0bc; }
.html-visual img {
  max-width: 100%;
  height: auto;
  cursor: pointer;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  user-drag: none;
}
.html-visual .ppb-img-frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
  vertical-align: bottom;
  line-height: 0;
  -webkit-user-drag: none;
  user-select: none;
  cursor: pointer;
}
.html-visual .ppb-img-frame.is-selected {
  outline: 2px solid #0b6e4f;
  outline-offset: 0;
  box-shadow: none;
  cursor: default;
}
.html-visual .ppb-img-frame.is-selected img { cursor: default; }
.html-visual img.ppb-selected { cursor: default; }
.html-visual .ppb-img-handle {
  display: none;
  position: absolute;
  z-index: 6;
  box-sizing: border-box;
  touch-action: none;
  -webkit-user-drag: none;
  user-select: none;
}
.html-visual .ppb-img-frame.is-selected .ppb-img-handle { display: block; }
.html-visual .ppb-img-handle[data-dir="e"],
.html-visual .ppb-img-handle[data-dir="w"] {
  top: 0;
  bottom: 0;
  width: 4px;
  height: auto;
  background: #0b6e4f;
  opacity: 0.85;
  cursor: ew-resize;
}
.html-visual .ppb-img-handle[data-dir="e"] { right: 0; }
.html-visual .ppb-img-handle[data-dir="w"] { left: 0; }
.html-visual .ppb-img-handle[data-dir="se"] {
  right: -3px;
  bottom: -3px;
  width: 10px;
  height: 10px;
  background: #0b6e4f;
  border: 1px solid #fff;
  box-shadow: none;
  cursor: nwse-resize;
}
.image-size {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
}
.image-size.is-open { display: flex !important; }
.image-size[hidden] { display: none !important; }
.image-size button, .image-size input { font: inherit; }
.image-size button { cursor: pointer; background: #fff; border: 1px solid var(--line); color: var(--ink); padding: 0.3rem 0.55rem; }
.image-size input[type="number"] { width: 88px; }
.editor-toolbar button:disabled { opacity: 0.45; cursor: default; }
.html-source { width: 100%; font-family: var(--mono); font-size: 0.85rem; }

.system-grid, .library-strip, .media-grid {
  display: grid;
  gap: 0.65rem;
}
.system-grid { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); margin-top: 0.75rem; }
.system-card { text-align: left; padding: 0; overflow: hidden; background: #fff; }
.system-preview { display: block; pointer-events: none; border-bottom: 1px solid var(--line); }
.system-card strong { display: block; padding: 0.45rem 0.6rem 0.55rem; font-size: 0.92rem; }
.system-card.is-selected, .system-card:hover { border-color: #0b6e4f; }

.library-strip, .media-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.thumb, .media-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.35rem;
  margin: 0;
}
.thumb { cursor: pointer; }
.thumb-insert {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.thumb img, .media-card img { display: block; width: 100%; height: 88px; object-fit: cover; background: #eef2f6; }
.library-strip .thumb { position: relative; }
.library-strip .thumb img {
  width: 100%;
  height: 88px;
  object-fit: contain;
  object-position: center;
  background: #eef2f6;
}
.thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 2;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #b42318;
  border-radius: 999px;
  background: #fff;
  color: #b42318;
  font: 700 14px/1 sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.thumb-remove:hover { background: #b42318; color: #fff; }
.image-size #img-remove {
  background: #fff5f5;
  border-color: #b42318;
  color: #b42318;
  font-weight: 600;
}
.html-visual .ppb-img-frame .ppb-img-x {
  display: none;
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 7;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid #b42318;
  border-radius: 999px;
  background: #fff;
  color: #b42318;
  font: 700 13px/1 sans-serif;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.html-visual .ppb-img-frame.is-selected .ppb-img-x { display: flex; }

.media-card figcaption { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.4rem; font-size: 0.78rem; }
.media-card figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(16, 32, 51, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem 1rem;
  overflow: auto;
}
.preview-modal[hidden] { display: none !important; }
.confirm-modal { align-items: center; }
.confirm-panel {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.1rem 1.2rem 1rem;
  box-shadow: 0 12px 32px rgba(16, 32, 51, 0.18);
}
.confirm-panel h2 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.confirm-panel p { margin: 0 0 1rem; color: var(--muted); line-height: 1.5; }
.confirm-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 0.5rem; }
.preview-panel {
  width: min(720px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 3rem);
}
.preview-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
}
.preview-subject {
  flex: 1;
  color: var(--muted);
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-panel iframe {
  width: 100%;
  height: min(720px, calc(100vh - 8rem));
  border: 0;
  background: #e8eef3;
}

.brief-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(16, 36, 72, 0.45);
  display: flex;
  justify-content: center;
  overflow: auto;
  padding: 24px 16px;
}
.brief-overlay[hidden] { display: none !important; }
.brief-panel {
  width: min(720px, 100%);
  background: #fff;
  color: var(--ink);
  border-radius: 16px;
  padding: 16px 16px 18px;
  box-shadow: 0 18px 50px rgba(16, 36, 72, 0.18);
  align-self: flex-start;
}
.brief-panel h2 { margin: 0 0 12px; font-size: 1.15rem; }
.grok-composer {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  padding: 12px 14px 10px;
}
.grok-composer textarea {
  display: block;
  width: 100%;
  min-height: 160px;
  border: 0;
  resize: vertical;
  padding: 4px 2px 8px;
  margin: 0;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1.45;
  background: transparent;
  outline: none;
}
.grok-composer-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.grok-composer-bar input {
  flex: 1 1 180px;
  min-width: 0;
  border: 0;
  border-radius: 999px;
  background: #f3f5f7;
  padding: 0.5rem 0.85rem;
  margin: 0;
}
.grok-send { border-radius: 999px; padding-left: 1.1rem; padding-right: 1.1rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.ai-progress { margin: 0.4rem 0; font-size: 1.05rem; }
.ai-preview iframe {
  width: 100%;
  height: min(720px, 70vh);
  border: 1px solid var(--line);
  background: #e8eef3;
  margin-top: 0.75rem;
}
.ai-meta { margin: 0.2rem 0; }
.ai-test-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.ai-test-row input { flex: 1 1 220px; min-width: 0; margin: 0; }
#ai-focus { min-height: 180px; font-family: var(--sans); font-size: 1rem; }
.brief-status { color: var(--muted); font-size: 0.85rem; white-space: pre-line; margin: 0.75rem 0 0; }
.brief-error { color: var(--danger, #9b2335); font-size: 0.9rem; margin: 0.75rem 0 0; }

@media (max-width: 640px) {
  .topbar { flex-direction: column; align-items: flex-start; }
  .wrap { padding: 0.85rem; }
}

.ai-heading-with-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.ai-info-btn {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--line, #c5d0dc);
  background: #eef4fa;
  color: #1b2a3d;
  font: 700 0.8rem/1 IBM Plex Sans, Arial, sans-serif;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
}
.ai-info-btn:hover,
.ai-info-btn:focus-visible {
  background: #dce8f5;
  outline: none;
}
.ai-help-panel {
  width: min(640px, 100%);
  max-height: calc(100vh - 3rem);
  overflow: auto;
}
.ai-help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.ai-help-head h2 { margin: 0; }
.ai-help-body h3 {
  margin: 1rem 0 0.4rem;
  font-size: 1rem;
}
.ai-help-body p,
.ai-help-body li {
  font-size: 0.95rem;
  line-height: 1.45;
}
.ai-help-example {
  margin: 0.4rem 0 0.75rem;
  padding: 0.75rem 0.9rem;
  background: #f4f7fb;
  border: 1px solid var(--line, #c5d0dc);
  border-radius: 10px;
  white-space: pre-wrap;
  font: 0.85rem/1.4 IBM Plex Mono, Consolas, monospace;
  overflow-x: auto;
}

.ai-progress-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}
.ai-progress-row .ai-progress {
  margin: 0;
}
.ai-spinner {
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid #c5d0dc;
  border-top-color: #1b2a3d;
  border-radius: 50%;
  flex: 0 0 auto;
  animation: ai-spin 0.8s linear infinite;
}
@keyframes ai-spin {
  to { transform: rotate(360deg); }
}

/* ---------------------------------------------------------------- public site */
.site { background: #f6f8fb; }
.site-wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-bar { max-width: 1100px; margin: 0 auto; padding: 0.7rem 1.25rem; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.site-nav { display: flex; gap: 1.1rem; flex-wrap: wrap; flex: 1 1 auto; }
.site-nav a { color: var(--ink); font-size: 0.95rem; }
.site-nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.site-auth { display: flex; align-items: center; gap: 0.75rem; }
.site-login { color: var(--ink); font-weight: 600; }
.site-main { min-height: 60vh; padding-bottom: 2rem; }
.site-main > .site-wrap:first-child .flash { margin-top: 1rem; }
.btn-lg { padding: 0.75rem 1.2rem; font-size: 1.02rem; }
.hero { background: linear-gradient(180deg, #ffffff 0%, #eef4fa 100%); border-bottom: 1px solid var(--line); padding: 3rem 0 2.5rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 2.5rem; align-items: start; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: #1466c4; font-weight: 600; margin: 0 0 0.6rem; }
.hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.15; margin: 0 0 1rem; color: #0f2136; }
.hero-sub { font-size: 1.1rem; color: #3b4b5e; line-height: 1.55; margin: 0 0 1.4rem; max-width: 40rem; }
.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.hero-points { list-style: none; padding: 0; margin: 0; color: #3b4b5e; }
.hero-points li { padding-left: 1.5rem; position: relative; margin: 0.35rem 0; }
.hero-points li::before, .checks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.hero-login { background: #fff; border: 1px solid var(--line); padding: 1.3rem 1.3rem 1rem; box-shadow: 0 10px 30px rgba(16, 32, 51, 0.08); }
.hero-login h2 { margin: 0 0 0.25rem; }
.hero-login .actions { align-items: center; justify-content: space-between; }
.hero-login-new { margin: 0.25rem 0 0; }
.section-title { font-size: 1.45rem; margin: 2.25rem 0 1rem; }
.offer-grid, .price-grid, .trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.offer-card, .price-card, .site-panel { background: #fff; border: 1px solid var(--line); padding: 1.25rem; position: relative; }
.offer-card h3 { margin: 0.5rem 0 0.5rem; font-size: 1.15rem; }
.offer-card p { color: #3b4b5e; line-height: 1.55; margin: 0 0 0.75rem; }
.offer-num { display: inline-flex; width: 2rem; height: 2rem; border-radius: 999px; align-items: center; justify-content: center; background: #e6f0fb; color: #1466c4; font-weight: 700; }
.offer-foot { font-weight: 600; margin: 0 !important; }
.offer-soon { background: #fbfcfe; }
.badge.soon { border-color: #a8c0dc; background: #eef4fa; color: #1b4f86; font-size: 0.75rem; vertical-align: middle; }
.offer-card .badge.soon { position: absolute; top: 1.25rem; right: 1.25rem; }
.trust { margin-top: 2rem; }
.trust h3, .site-panel h3 { margin: 0 0 0.4rem; font-size: 1.02rem; }
.trust p { margin: 0; line-height: 1.55; }
.page-intro { padding-top: 2rem; }
.page-intro h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.page-intro .lead { font-size: 1.08rem; max-width: 46rem; line-height: 1.55; }
.site-panel { margin-bottom: 1rem; }
.form-panel { max-width: 760px; margin-top: 1rem; }
.site-form textarea { min-height: 0; font-family: var(--sans); font-size: 0.95rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.price-card h2 { font-size: 1.1rem; margin: 0 0 0.6rem; }
.price { font-size: 2rem; font-weight: 700; margin: 0; color: #0f2136; }
.price span { font-size: 1rem; font-weight: 400; color: var(--muted); }
.price-quote { font-size: 1.35rem; }
.price-note { color: var(--muted); font-size: 0.9rem; margin: 0.3rem 0 0.9rem; }
.checks { list-style: none; padding: 0; margin: 0 0 1rem; }
.checks li { position: relative; padding-left: 1.4rem; margin: 0.35rem 0; font-size: 0.93rem; }
.steps { margin: 0 0 0.75rem; padding-left: 1.2rem; line-height: 1.7; }
.legal { max-width: 800px; padding-top: 2rem; line-height: 1.65; }
.legal h2 { margin-top: 1.6rem; font-size: 1.15rem; }
.legal ul { padding-left: 1.2rem; }
.site-footer { background: #102033; color: #c9d6e5; padding: 2rem 0 1rem; margin-top: 2rem; }
.site-footer .muted { color: #93a6bc; max-width: 22rem; }
.site-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1.5rem; }
.site-footer nav { display: flex; flex-direction: column; gap: 0.4rem; }
.site-footer nav strong { color: #fff; margin-bottom: 0.2rem; }
.site-footer nav a { color: #c9d6e5; }
.site-copy { color: #93a6bc; font-size: 0.85rem; border-top: 1px solid #22354c; margin-top: 1.5rem; padding-top: 0.9rem; }
.guest-bar { max-width: 420px; margin: 1.5rem auto -1.5rem; padding: 0 1.25rem; }
.unsub-choices { display: grid; gap: 0.5rem; margin: 1rem 0; }
.unsub-choice { border: 1px solid var(--line); padding: 0.7rem 0.85rem; display: flex; gap: 0.6rem; align-items: center; }
.unsub-choice.is-done { background: #eef8f3; border-color: #9bd0bc; }
.nav-soon { font-size: 0.7rem; color: #93a6bc; border: 1px solid #3a4f68; padding: 0 0.3rem; margin-left: 0.15rem; }
.table-scroll { overflow-x: auto; }
.inbound-table td { font-size: 0.88rem; min-width: 8rem; }
/* brand lockup: mark + wordmark + tagline */
.wordmark { display: inline-flex; align-items: center; gap: 0.55rem; color: #0f2136; text-decoration: none; }
.wordmark:hover { text-decoration: none; }
.wordmark img { width: 36px; height: 36px; display: block; flex: none; }
.wm-text { display: flex; flex-direction: column; line-height: 1.1; }
.wm-name { font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; color: #0f2136; }
.wm-tag { font-size: 0.74rem; color: #5b6b7c; margin-top: 0.12rem; }
.wordmark-footer .wm-name { color: #fff; }
.wordmark-footer .wm-tag { color: #93a6bc; }
.topbar .brand { display: inline-flex; align-items: center; gap: 0.45rem; }
.topbar .brand img { width: 22px; height: 22px; }
/* On the dark blue bars (app top bar, public footer) the mark is drawn as white lines, like the white
   "PingPing" letters: every opaque pixel of the PNG turns white and its transparent interior shows the
   bar colour. The original asset is untouched and light backgrounds keep the coloured mark. */
.topbar .brand img, .wordmark-footer img { filter: brightness(0) invert(1); background: none; }
.brand-tag { font-weight: 400; font-size: 0.72rem; opacity: 0.7; margin-left: 0.2rem; }
.offer-grid.offer-grid-2, .price-grid.price-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .brand-tag { display: none; } }
@media (max-width: 860px) {
  .offer-grid.offer-grid-2, .price-grid.price-grid-2 { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .offer-grid, .price-grid, .trust-grid { grid-template-columns: 1fr; }
  .site-footer-grid { grid-template-columns: 1fr 1fr; }
  .site-footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .site-bar { gap: 0.6rem 1rem; }
  .site-nav { order: 3; flex-basis: 100%; gap: 0.9rem; font-size: 0.9rem; }
  .site-auth { margin-left: auto; }
  .wordmark img { width: 30px; height: 30px; }
  .wm-name { font-size: 1.15rem; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 1.75rem 0 1.5rem; }
  .page-intro h1 { font-size: 1.6rem; }
}

/* account avatar menu (top-right) */
.topbar { position: relative; }
.topbar nav { margin-left: auto; }
.acct { position: relative; flex: 0 0 auto; }
.acct-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; margin: 0;
  border-radius: 999px; border: 1px solid #3a4f68;
  background: #1b3149; color: #c9d6e5; cursor: pointer;
}
.acct-btn:hover, .acct-btn[aria-expanded="true"] { color: #fff; border-color: #93a6bc; background: #24405e; }
.acct-btn:focus-visible { outline: 2px solid #9fd9c4; outline-offset: 2px; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  min-width: 220px; max-width: min(300px, calc(100vw - 1.5rem));
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(16, 32, 51, 0.18);
  padding: 0.35rem 0; font-size: 0.92rem;
}
.acct-menu[hidden] { display: none; }
.acct-who { padding: 0.55rem 0.9rem 0.6rem; border-bottom: 1px solid var(--line); margin-bottom: 0.3rem; display: flex; flex-direction: column; gap: 0.1rem; cursor: default; }
.acct-who strong { font-size: 0.92rem; }
.acct-who .acct-email { color: var(--ink); font-size: 0.86rem; word-break: break-all; }
.acct-who .acct-org { color: var(--muted); font-size: 0.8rem; }
.acct-menu a, .acct-menu .acct-logout button {
  display: block; width: 100%; box-sizing: border-box; text-align: left;
  padding: 0.5rem 0.9rem; color: var(--ink); text-decoration: none;
  background: none; border: 0; border-radius: 0; font: inherit; cursor: pointer; margin: 0;
}
.acct-menu a:hover, .acct-menu a:focus-visible,
.acct-menu .acct-logout button:hover, .acct-menu .acct-logout button:focus-visible { background: #eef2f6; text-decoration: none; outline: none; }
.acct-menu .acct-logout { margin: 0.3rem 0 0; border-top: 1px solid var(--line); padding-top: 0.3rem; }
@media (max-width: 640px) {
  .topbar nav { margin-left: 0; padding-right: 0; }
  .acct { position: absolute; top: 0.7rem; right: 1rem; }
  .acct-btn { width: 40px; height: 40px; }
  .acct-menu a, .acct-menu .acct-logout button { padding: 0.7rem 0.9rem; }
}

/* admin stats */
.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }
.small { font-size: 0.85rem; }
.nowrap { white-space: nowrap; }
.bar-chart { display: block; margin: 0.25rem 0 0.5rem; }
.admin-accounts td, .admin-accounts th { vertical-align: top; }
.admin-accounts th { font-size: 0.8rem; }
.month-table th, .month-table td { font-size: 0.8rem; padding-left: 0.3rem; padding-right: 0.3rem; }
.status-form input[type="text"] { max-width: 520px; }
.org-status-banner a { font-weight: 600; }
.wrap:has(.admin-accounts) { max-width: 1320px; }

/* 3-step flow bar under the top bar: 1 Create template, 2 Upload list, 3 Schedule blast */
.flowbar { background: #fff; border-bottom: 1px solid var(--line); }
.flowbar ol { list-style: none; margin: 0 auto; padding: 0.4rem 1.25rem; max-width: 980px; display: flex; gap: 0.5rem; align-items: center; }
.flowbar li { flex: 0 1 auto; }
.flowbar li + li::before { content: "\203A"; color: #aab6c4; margin-right: 0.5rem; }
.flowbar li { display: flex; align-items: center; }
.flowbar a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.7rem 0.3rem 0.35rem; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 0.88rem; line-height: 1.2; }
.flowbar a:hover { background: #eef2f6; text-decoration: none; color: var(--ink); }
.flowbar a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.flowbar .flow-num { display: inline-flex; align-items: center; justify-content: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; border: 1px solid #aab6c4; font-size: 0.78rem; font-weight: 600; flex: 0 0 auto; }
.flowbar li.is-done .flow-num { background: #e3f3ec; border-color: var(--accent); color: var(--accent); }
.flowbar li.is-current a { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.flowbar li.is-current a:hover { background: var(--accent); color: var(--accent-ink); }
.flowbar li.is-current .flow-num { background: #fff; border-color: #fff; color: var(--accent); }
.flowbar .flow-short { display: none; }
@media (max-width: 640px) {
  .flowbar ol { padding: 0.35rem 0.6rem; gap: 0.2rem; justify-content: space-between; }
  .flowbar li { flex: 1 1 0; justify-content: center; }
  .flowbar li + li::before { margin-right: 0.2rem; }
  .flowbar a { padding: 0.3rem 0.5rem 0.3rem 0.3rem; font-size: 0.82rem; min-height: 36px; }
  .flowbar .flow-long { display: none; }
  .flowbar .flow-short { display: inline; }
}

/* Campaign report: clickable stat tiles, list tools, pager */
a.stat-link { display: block; text-decoration: none; color: inherit; }
a.stat-link:hover, a.stat-link:focus-visible { border-color: var(--accent); }
a.stat-link .l { color: var(--accent); }
.report-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.5rem 0 1rem; }
.report-tools input[type=search] { width: min(320px, 100%); margin: 0; }
.cell-url { max-width: 28rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager { display: flex; gap: 0.75rem; align-items: center; justify-content: center; margin: 1rem 0 0; }

/* Schedule-all-segments series */
.series-preview { border-collapse: collapse; width: 100%; max-width: 34rem; font-size: 0.9rem; }
.series-preview th, .series-preview td { text-align: left; padding: 0.25rem 0.5rem; border-bottom: 1px solid var(--line, #e3e6ea); }
.series-preview tr.warn td { background: #fff7e6; }
.series-preview tr.warn-note td { background: #fff7e6; color: #8a5a00; font-size: 0.82rem; }
button.linklike { background: none; border: 0; padding: 0 0 0 0.5rem; color: var(--danger, #b42318); cursor: pointer; font: inherit; text-decoration: underline; }
a.badge { text-decoration: none; }

/* inside the send-time fieldset the hidden attribute always wins over display rules (labels are display:block) */
#segment_label[hidden], .send-when [hidden] { display: none !important; }

/* Send-time controls: date, time, select and number inputs share one height, font and padding */
.send-when input[type=date], .send-when input[type=time], .send-when input[type=number], .send-when input[type=datetime-local], .send-when select {
  box-sizing: border-box; height: 2.5rem; margin: 0; padding: 0 0.65rem; font-size: 1rem; line-height: 1.4; width: auto; min-width: 0; max-width: 100%; vertical-align: baseline;
}
.send-when .series-fields label { margin: 0; }
