/* BMEHQ palette
   --navy      header / major branding
   --blue      buttons / links / accents
   --me-green  Brand ME logo accent only (do not flood the UI)
   --paper     page background
   --card      cards / creator workspace
   --ink       main text
   --muted     secondary text
*/
:root {
  --navy: #0a3d73;
  --navy-2: #1256a0;
  --blue: #1a6fb5;
  --blue-2: #2b86d1;
  --me-green: #1aa34a;
  --sky: #e7f2fb;
  --paper: #f4f8fc;
  --card: #ffffff;
  --ink: #123a5c;
  --muted: #5b7390;
  --line: rgba(10, 61, 115, 0.14);
  --white: #ffffff;
  --gutter: 16px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy-2); }
img { max-width: 100%; display: block; }

.wrap { width: min(1120px, calc(100% - (var(--gutter) * 2))); margin: 0 auto; }
.narrow { width: min(520px, calc(100% - (var(--gutter) * 2))); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-header {
  position: sticky; top: 0; z-index: 4;
  background: var(--navy);
  padding: 10px 0;
}
.site-header .bar { flex-wrap: wrap; }
.site-footer {
  margin-top: 64px; padding: 28px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.brand { display: flex; align-items: center; }
.brand img { height: 100px; width: auto; display: block; }
.footer-brand img { height: 44px; width: auto; display: block; }
.cwsag-link { color: var(--navy); font-weight: 700; }
.cwsag-link:hover { color: var(--blue); }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: var(--white); }
.nav a:hover { color: #cfe6f8; }
.nav-cta, .gold-btn, button.gold-btn, input.gold-btn {
  appearance: none; -webkit-appearance: none;
  display: inline-block; text-align: center; vertical-align: middle;
  background: var(--blue); color: #ffffff; border: 0; min-height: 42px; padding: 10px 18px; line-height: 1.2;
  font: 600 14px var(--sans); cursor: pointer; border-radius: 6px;
}
.nav-cta:hover, .gold-btn:hover, button.gold-btn:hover { background: var(--blue-2); color: var(--white); }
.ghost-btn {
  display: inline-flex; align-items: center; min-height: 42px; padding: 0 18px;
  border: 1px solid var(--line); color: var(--navy); border-radius: 6px;
}
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.text-btn, .inline { display: inline; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.nav .text-btn { color: #cfe6f8; }
.kicker { text-transform: uppercase; letter-spacing: 0.22em; font-size: 11px; color: var(--blue); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 8px 0 16px; color: var(--navy); }
h1 { font-size: clamp(40px, 7vw, 84px); }
h2 { font-size: 32px; }
.lede { font-size: 20px; max-width: 38rem; color: var(--muted); }
.hero {
  background: linear-gradient(165deg, #0a3d73 0%, #1565a8 72%, #1a6fb5 100%);
  color: var(--white);
  padding: 72px 0 64px;
}
.hero h1 { color: var(--white); }
.hero .lede { color: #d7e9f8; }
.hero .kicker { color: #9fd0f5; }
.hero .ghost-btn { color: var(--white); border-color: rgba(255,255,255,.35); }
.hero .gold-btn { background: var(--white); color: var(--navy); }
.hero .gold-btn:hover { background: var(--sky); color: var(--navy); }
.page { padding: 48px 0 24px; }
.examples { padding: 56px 0 8px; }
.examples h2 { font-size: clamp(32px, 5vw, 56px); margin-bottom: 8px; }
.example-gallery {
  display: grid;
  grid-template-columns: 230px minmax(0, 1.35fr) minmax(0, 1fr) 168px;
  gap: var(--gutter);
  align-items: start;
  margin-top: 28px;
}
.example-card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: var(--gutter);
  margin: 0;
  min-width: 0;
  overflow: hidden;
}
.example-card.is-splash { grid-column: 1; grid-row: 1 / span 2; }
.example-card.is-wide { grid-column: 2 / span 2; }
.example-card.is-mid { grid-column: 2; }
.example-card.is-box { grid-column: 3; }
.example-card.is-sky { grid-column: 4; grid-row: 1 / span 2; }
.example-card.is-strip { grid-column: 2 / span 2; }
.example-frame {
  background: #d7e6f4;
  padding: var(--gutter);
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  line-height: 0;
}
.example-frame .stage {
  width: 100%;
  height: auto;
  max-width: none;
  box-shadow: none;
}
.example-card.is-splash .example-frame,
.example-card.is-sky .example-frame {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.example-card.is-splash .example-frame .stage,
.example-card.is-sky .example-frame .stage {
  width: 100%;
  height: auto;
  aspect-ratio: var(--cw) / var(--ch);
}
.example-card figcaption {
  display: flex;
  justify-content: space-between;
  gap: var(--gutter);
  flex-wrap: wrap;
  margin-top: var(--gutter);
  font-size: 13px;
  color: var(--muted);
}
.example-card.is-splash figcaption,
.example-card.is-sky figcaption {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.example-card figcaption strong { color: var(--navy); font-weight: 600; }
.example-cta { margin-top: 28px; }
.member-work-kicker { margin-top: 40px; }
.example-gallery.is-live {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.example-gallery.is-live .example-card {
  grid-column: auto;
  grid-row: auto;
}
.example-gallery.is-live .example-card.is-splash { max-width: 260px; }
.example-gallery.is-live .example-card.is-sky { max-width: 180px; }
.example-gallery.is-live .example-card.is-wide,
.example-gallery.is-live .example-card.is-strip {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
  justify-self: stretch;
  overflow: hidden;
}
.example-gallery.is-live .example-frame {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.example-gallery.is-live .example-frame .stage {
  width: 100%;
  height: auto;
  max-width: none;
}
.pitch { padding: 24px 0 0; }
.pitch h2 { font-size: clamp(28px, 4vw, 44px); max-width: 18ch; margin-bottom: 0; }
.pitch .lede { max-width: 42rem; }
.studio-blurb { margin: 12px auto 40px; }
.quotes + .studio-blurb { margin-top: 40px; }
.studio-blurb .panel p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.25;
  color: var(--navy);
}
.quotes { padding: 24px 0 8px; }
.quotes h2 { font-size: clamp(28px, 4vw, 44px); }
.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gutter);
  margin-top: 24px;
}
.quote-card {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 24px;
}
.quote-card blockquote {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.35;
  color: var(--navy);
}
.quote-card figcaption { color: var(--muted); font-size: 14px; }
.check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink);
}
.check input { width: auto; margin-top: 3px; }
.plain { padding-left: 18px; color: var(--muted); }
.plain em { color: var(--ink); font-style: italic; }
.split {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: var(--gutter);
  margin: 40px auto;
}
.split > .panel,
.split > article {
  flex: 1 1 260px;
  max-width: 340px;
  box-sizing: border-box;
}
.split.features-tools {
  justify-content: stretch;
}
.split.features-tools > .panel-span3 {
  flex: 3 1 600px;
  max-width: none;
}
.panel, .plan, .row-card { background: var(--card); border: 1px solid var(--line); padding: 24px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gutter); }
.plan ul { padding-left: 18px; color: var(--muted); }
.price { font-family: var(--serif); font-size: 48px; margin: 0; color: var(--navy); }
.price span { font-size: 16px; color: var(--muted); }
.plan.is-gold { border-color: var(--blue); box-shadow: 0 10px 30px rgba(26, 111, 181, 0.12); }
.stack { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input, select, textarea, button {
  font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); padding: 10px 12px;
}
button.gold-btn, input.gold-btn, a.gold-btn, .gold-btn {
  appearance: none; -webkit-appearance: none; display: inline-block;
  background: #1a6fb5; color: #ffffff; border: 0;
}
input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 0; }
.color-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.color-row input[type="color"] { flex: 0 0 28px; }
.hex-input {
  width: 7.2em;
  max-width: 100%;
  min-width: 0;
  font-family: Consolas, "Courier New", monospace;
  text-transform: lowercase;
}
button.save-layout-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  width: 100%;
  min-width: 8.5em;
  justify-self: start;
  flex-shrink: 0;
  padding: 8px 14px;
  font: 600 14px var(--sans);
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  background: #0a3d73;
  background-color: #0a3d73;
  border: 2px solid #0a3d73;
  border-radius: 6px;
  cursor: pointer;
}
button.save-layout-btn:hover {
  background: #1256a0;
  background-color: #1256a0;
  border-color: #1256a0;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}
.studio-actions {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.studio-actions form { margin: 0; }
.studio-actions .gold-btn,
.studio-actions button {
  width: 100%;
  box-sizing: border-box;
  border-radius: 6px;
}
.inspector button,
.tool-row button,
.nudge button {
  border-radius: 6px;
}
textarea { min-height: 72px; }
.error, .flash { color: var(--navy-2); }
.muted, .fine { color: var(--muted); }
.row-card { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 10px; }
.row-card span { display: block; color: var(--muted); font-size: 14px; }
.row-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.list-block { margin-top: 36px; }
.admin-home {
  display: grid;
  grid-template-columns: minmax(260px, 1.15fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: start;
}
.admin-home .panel { margin: 0; border-radius: 18px; }
.admin-signup h1 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 16px; }
.admin-signup p { margin: 0 0 16px; }
.admin-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.admin-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 52px;
  padding: 12px 16px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  border-radius: 18px;
  line-height: 1.2;
}
.admin-nav a:hover { background: var(--navy-2); color: #fff; }
.admin-nav a.is-current {
  background: var(--navy);
  color: #fff;
}
.admin-section .admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 20px;
}
.admin-section .admin-nav a {
  min-height: 42px;
  padding: 8px 16px;
}
.admin-search {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin: 0 0 20px;
}
.admin-search label { flex: 1 1 220px; }
.member-card { justify-content: flex-start; }
.member-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 48px;
  background: var(--sky);
}
.member-copy { flex: 1 1 160px; min-width: 0; }
.admin-role {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  min-width: 0;
}
.admin-role legend {
  float: left;
  width: auto;
  padding: 0;
  margin: 0 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.admin-role label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  color: var(--ink);
}
.admin-role input { width: auto; margin: 0; }
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-top: 24px;
}
.pager a, .pager-current {
  min-width: 2em;
  text-align: center;
  padding: 6px 10px;
  border-radius: 8px;
}
.pager-current {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}
.pager-gap { color: var(--muted); }
.kicker a { color: inherit; }
.admin-section h1 { font-size: clamp(32px, 5vw, 48px); }
.studio-body {
  background: var(--paper);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
.studio {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.studio-body .site-header,
.studio-body .site-footer { display: none; }
.studio-body .flash { margin: 0; padding: 10px 20px; flex: 0 0 auto; }
.studio-top { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--white); flex: 0 0 auto; }
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}
.canvas-well {
  background: #d7e6f4;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}
.canvas-scroll {
  box-sizing: border-box;
  width: max-content;
  min-width: 100%;
  min-height: 100%;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.inspector {
  border-left: 1px solid var(--line);
  padding: 16px;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--white);
}
.inspector .stack,
.inspector .el-fields,
.inspector .size-row,
.inspector .xy,
.inspector .tool-row,
.inspector .nudge,
.inspector .studio-actions,
.inspector label {
  min-width: 0;
  max-width: 100%;
}
.inspector input:not([type="color"]):not([type="checkbox"]),
.inspector select,
.inspector textarea,
.inspector button {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.inspector .tool-row button,
.inspector .nudge button {
  width: auto;
}
.stage {
  container-type: inline-size;
  width: calc(var(--cw) * 1px);
  height: calc(var(--ch) * 1px);
  max-width: none;
  flex-shrink: 0;
  aspect-ratio: var(--cw) / var(--ch);
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(10, 61, 115, .18);
}
.splash-body { background: var(--navy); }
.splash-shell { min-height: 100vh; display: grid; place-items: center; padding: 0; }
a.splash-shell { color: inherit; text-decoration: none; cursor: pointer; }
.splash-shell .stage { width: min(100vw, calc(100vh * var(--cw) / var(--ch))); max-height: 100vh; pointer-events: none; }
.splash-shell .el-youtube { pointer-events: auto; }
.capture-shell .el-youtube { pointer-events: auto; }
.el-youtube, .el-youtube-ph {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}
.el-youtube-ph {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-family: var(--sans);
  position: relative;
  overflow: hidden;
  outline: 2px solid #1a6fb5;
}
.el-youtube-ph img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.el-youtube-ph span, .el-youtube-ph.is-empty {
  position: relative;
  z-index: 1;
  background: rgba(0, 0, 0, 0.55);
  padding: 6px 10px;
}
.capture-body { background: var(--navy); }
.capture-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 40px;
  gap: 20px;
  box-sizing: border-box;
}
.capture-shell .stage {
  width: min(100%, calc((100vh - 280px) * var(--cw) / var(--ch)));
  max-width: 100%;
  max-height: calc(100vh - 280px);
}
.capture-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 20px;
}
.capture-thanks { margin: 0; color: var(--navy); font-size: 18px; line-height: 1.4; }
.capture-card form { display: grid; gap: 10px; }
.capture-card input, .capture-card select, .capture-card textarea, .capture-card button {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}
.banner-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--paper);
}
.banner-shell .stage {
  width: calc(var(--cw) * 1px);
  height: calc(var(--ch) * 1px);
  max-width: none;
}
.el { position: absolute; overflow: hidden; }
.el img, .el-shape, .el-btn, .el-text, .el-youtube, .el-youtube-ph { width: 100%; height: 100%; }
.el img { display: block; max-width: none; object-fit: fill; pointer-events: none; background: transparent; }
.el-image-missing { background: repeating-conic-gradient(#d7e6f4 0 25%, #ffffff 0 50%) 0 0 / 16px 16px; }
.resize {
  position: absolute; width: 10px; height: 10px; background: var(--blue);
  border: 1px solid #fff; z-index: 3; box-sizing: border-box;
}
.resize.nw { left: -5px; top: -5px; cursor: nwse-resize; }
.resize.ne { right: -5px; top: -5px; cursor: nesw-resize; }
.resize.sw { left: -5px; bottom: -5px; cursor: nesw-resize; }
.resize.se { right: -5px; bottom: -5px; cursor: nwse-resize; }
.el-text { white-space: pre-wrap; line-height: 1.15; }
.el-btn { display: grid; place-items: center; font-family: var(--sans); font-weight: 600; color: inherit; }
.is-ellipse { border-radius: 50%; }
.layer-thumb {
  width: 96px;
  height: 96px;
  object-fit: contain;
  background: var(--sky);
  border: 1px solid var(--line);
}
.el-fields { border: 1px solid var(--line); margin: 0 0 12px; padding: 10px; }
.size-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.xy { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tool-row, .nudge { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.noscript-note { margin: 0; padding: 10px 20px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); background: var(--sky); flex: 0 0 auto; }
.live-link { word-break: break-all; }
.is-editable { cursor: move; outline: 1px dashed transparent; }
.is-editable:hover, .is-editable.is-on { outline-color: var(--blue); }

@media (max-width: 1000px) {
  .example-gallery {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .example-card.is-splash,
  .example-card.is-wide,
  .example-card.is-mid,
  .example-card.is-box,
  .example-card.is-sky,
  .example-card.is-strip {
    grid-column: auto;
    grid-row: auto;
  }
  .example-card.is-splash,
  .example-card.is-sky { justify-self: center; width: min(100%, 230px); }
}
@media (max-width: 800px) {
  .admin-home { grid-template-columns: 1fr; }
  .row-card { flex-wrap: wrap; }
  .studio-grid { grid-template-columns: 1fr; overflow: auto; }
  .canvas-well { min-height: 46vh; height: 46vh; }
  .inspector { height: auto; max-height: none; border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .nav { gap: 10px; font-size: 14px; }
  .brand img { height: 72px; }
  .example-gallery { grid-template-columns: minmax(0, 1fr); }
}
