:root {
  --paper: #17232f;
  --ink: #edf3f7;
  --muted: #a1b0bc;
  --orange: #edb85f;
  --line: #344653;
  --panel: #1c2c39;
  --panel-top: #203341;
  --danger: #f07178;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 72% 8%, #253e50 0, transparent 48%), var(--paper);
  color: var(--ink);
  font: 15px/1.65 Inter, Arial, sans-serif;
}
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(920px, calc(100% - 48px)); margin: auto; }
.staging-banner {
  background: #edb85f;
  color: #10212f;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 8px 12px;
}
header {
  background: #131e28b8;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}
.brand-seal {
  display: flex;
  align-items: baseline;
  justify-content: center;
  width: 43px;
  height: 43px;
  background: var(--orange);
  color: #142431;
  font-size: 22px;
  line-height: 43px;
  letter-spacing: -2px;
  font-weight: 800;
}
.brand-seal > span { font-size: 20px; }
.brand-name {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.6px;
  line-height: 1.45;
  color: #e8f1f6;
}
.brand-name > span {
  display: block;
  font-size: 10px;
  letter-spacing: 1.1px;
  font-weight: 550;
  color: #a9becb;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}
.nav-user { color: var(--muted); }
.nav-cta { color: var(--ink); border-bottom: 1px solid #718896; padding-block: 6px; }
.inline { display: inline; margin: 0; }
.text-btn {
  background: none;
  border: 0;
  color: var(--orange);
  font: inherit;
  cursor: pointer;
  padding: 0;
}
main { flex: 1; padding-block: 48px 64px; }
footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
  font-size: 12px;
  color: #99adbc;
  border-top: 1px solid var(--line);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.8px;
  font-weight: 650;
  color: #bacbd5;
  margin: 0 0 18px;
}
.eyebrow > span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--orange);
  margin-right: 6px;
  vertical-align: middle;
}
h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -1.5px;
  font-weight: 700;
  margin: 0 0 12px;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.auth-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid #536e80;
  box-shadow: 10px 10px 0 #101b25;
  padding: 32px 28px;
}
.auth-form {
  display: grid;
  gap: 14px;
  margin: 22px 0 18px;
}
.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.4px;
  color: #c1d5e1;
  font-weight: 600;
}
.auth-form input {
  background: #152531;
  border: 1px solid #41596b;
  color: var(--ink);
  padding: 12px 14px;
  font: inherit;
  border-radius: 0;
}
.auth-form input:focus {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
.form-error {
  color: var(--danger);
  font-size: 13px;
  margin: 0;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--orange);
  color: #10212f;
  border: 1px solid var(--orange);
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
}
.button:hover { background: #f5ce89; text-decoration: none; }
.button:disabled { opacity: 0.45; cursor: not-allowed; }
.button.small { padding: 8px 12px; font-size: 12px; }
.dash .panel {
  margin-top: 28px;
  background: var(--panel);
  border: 1px solid #536e80;
  box-shadow: 10px 10px 0 #101b25;
}
.panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--panel-top);
  font-size: 11px;
  letter-spacing: 0.7px;
  font-weight: 650;
  color: #c1d5e1;
}
.panel-top i {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--orange);
  margin-right: 6px;
}
.badge {
  font-size: 10px;
  color: #9db6c7;
  border: 1px solid #536e80;
  padding: 3px 8px;
}
.panel-body { padding: 22px 24px 28px; }
.checklist {
  list-style: none;
  padding: 0;
  margin: 18px 0 24px;
}
.checklist li {
  padding: 8px 0;
  border-bottom: 1px solid #354959;
  color: #c1d3df;
}
.checklist li::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--orange);
  margin-right: 12px;
  vertical-align: middle;
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 28px); }
  .auth-card { padding: 24px 18px; }
  footer { flex-wrap: wrap; }
}

.wrap-wide { width: min(1180px, calc(100% - 48px)); }
.nav-link { color: var(--ink); font-size: 13px; }
.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.empty-state {
  text-align: left;
  padding: 12px 0 8px;
}
.empty-state h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.5px;
}
.pitch-list { display: grid; gap: 0; }
.pitch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #354959;
  color: inherit;
  text-decoration: none;
}
.pitch-row:last-child { border-bottom: 0; }
.pitch-row:hover { text-decoration: none; }
.pitch-row:hover strong { color: var(--orange); }
.pitch-row-main { display: grid; gap: 4px; min-width: 0; }
.pitch-row-main strong { font-size: 16px; }
.pitch-meta { font-size: 12px; color: var(--muted); }
.pitch-row-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.pitch-stat { font-size: 12px; color: var(--muted); white-space: nowrap; }
.status-pill {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid #536e80;
  color: #c1d5e1;
}
.status-draft { border-color: #536e80; }
.status-running { border-color: #3d9a6a; color: #8fe0b3; background: #1a3a2c; }
.status-paused { border-color: #a8843a; color: #edb85f; background: #3a3018; }

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 28px 0 24px;
}
.template-card {
  text-align: left;
  background: var(--panel);
  border: 1px solid #536e80;
  box-shadow: 8px 8px 0 #101b25;
  padding: 20px 18px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}
.template-card:hover { border-color: var(--orange); }
.template-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.3px;
}
.template-card p {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.template-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #edb85f;
  border: 1px solid #5a6f3f;
  padding: 3px 8px;
}

.builder-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}
.builder-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1.1fr) minmax(260px, 1fr);
  gap: 18px;
  margin-top: 20px;
  align-items: start;
}
.builder-col .panel { margin-bottom: 16px; }
.stack { display: grid; gap: 14px; }
.field-label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.4px;
  color: #c1d5e1;
  font-weight: 600;
}
.field-label code {
  font-weight: 500;
  color: #edb85f;
  font-size: 11px;
}
.field-label input,
.field-label textarea,
.field-label select {
  background: #152531;
  border: 1px solid #41596b;
  color: var(--ink);
  padding: 11px 12px;
  font: inherit;
  width: 100%;
}
.field-label textarea { resize: vertical; min-height: 120px; }
.field-label input:focus,
.field-label textarea:focus,
.field-label select:focus {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
.hint { font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; }
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.toggle-row em { color: var(--muted); font-style: normal; font-size: 12px; }
.keys-block[hidden] { display: none !important; }
.logo-preview img {
  display: block;
  margin-top: 8px;
  max-height: 48px;
  max-width: 160px;
  background: #0e1b25;
  padding: 6px;
  border: 1px solid #41596b;
}
.token-legend { margin-top: 4px; }
.token-view {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  max-height: 120px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.5;
  color: #9fb4c2;
  white-space: pre-wrap;
}
.shortcode-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #203746;
  border: 1px solid #47677c;
  color: #b9d5e7;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}
.shortcode-chip.locked {
  border-color: #edb85f;
  color: #edb85f;
  background: #3a3018;
}
.builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}
.button.ghost {
  background: transparent;
  color: var(--orange);
  border-color: #5a6f3f;
}
.button.ghost:hover { background: #203341; }
.builder-msg {
  font-size: 13px;
  color: #8fe0b3;
}
.builder-msg.error { color: var(--danger); }
.preview-panel .panel-body { padding: 0; }
#preview-frame {
  width: 100%;
  min-height: 480px;
  border: 0;
  background: #0e1b25;
  display: block;
}
@media (max-width: 1000px) {
  .builder-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .pitch-row { flex-direction: column; align-items: flex-start; }
  .dash-head .button { width: 100%; }
}
