/* ============================================================
   Content Engine — Phase 1 concept demo
   Executive light theme · no external dependencies
   ============================================================ */

:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #fbfaf6;
  --ink: #18243a;
  --ink-2: #44506a;
  --muted: #7c8699;
  --faint: #a8b0bf;
  --line: #e6e2d8;
  --line-2: #efece4;
  --navy: #1e3a5f;
  --navy-d: #152b49;
  --gold: #a97f2f;
  --gold-bg: #f5efe1;
  --good: #1c7a4b;
  --good-bg: #e7f4ec;
  --warn: #a05e0b;
  --warn-bg: #fdf3e0;
  --info-bg: #eef3f9;
  --li-blue: #0a66c2;
  --yt-red: #cc0000;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(24, 36, 58, .05), 0 8px 24px -12px rgba(24, 36, 58, .12);
  --shadow-lg: 0 2px 4px rgba(24, 36, 58, .06), 0 18px 44px -16px rgba(24, 36, 58, .22);
  --serif: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }

.hidden { display: none !important; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 244, 239, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--navy) 0%, #2c5282 100%);
  color: #f0e6cf;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .02em;
  flex: none;
}

.brand-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}

.brand-sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}

.nav-btn {
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 99px;
  transition: background .15s, color .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  cursor: pointer;
}

.nav-btn:hover { background: var(--line-2); }

.nav-btn.active {
  background: var(--navy);
  color: #fff;
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.demo-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-bg);
  border: 1px solid #e7d9b8;
  padding: 4px 10px;
  border-radius: 99px;
}

.reset-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 99px;
  transition: color .15s, border-color .15s;
}

.reset-btn:hover { color: var(--ink); border-color: var(--faint); }

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: #f0e6cf;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}

/* ---------- Layout ---------- */

.main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.view { animation: viewIn .3s ease both; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.page-title {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.page-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.page-sub { color: var(--muted); font-size: 14.5px; margin-top: 6px; max-width: 620px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  padding: 11px 20px;
  transition: transform .12s, box-shadow .15s, background .15s, opacity .15s;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(30, 58, 95, .45);
}

.btn-primary:hover { background: var(--navy-d); }

.btn-primary:disabled {
  background: #b9c2d0;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.btn-ghost:hover { border-color: var(--faint); color: var(--ink); }

.btn-lg { padding: 13px 26px; font-size: 15.5px; border-radius: 12px; }

/* ---------- Cards & tiles ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 30px;
  background: linear-gradient(120deg, #fff 55%, #f3efe4 100%);
  margin-bottom: 22px;
}

.hero-card h2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.hero-card p { color: var(--ink-2); font-size: 14.5px; max-width: 540px; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.stat-tile { padding: 18px 20px 16px; }

.stat-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -.01em;
  line-height: 1.1;
}

.stat-delta {
  margin-top: 7px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stat-delta.up { color: var(--good); }
.stat-delta.flat { color: var(--muted); font-weight: 500; }

/* ---------- Dashboard grid ---------- */

.dash-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 14px;
  align-items: start;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
}

.panel-title { font-size: 15px; font-weight: 650; }

.panel-link {
  border: none;
  background: none;
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
}

.panel-link:hover { text-decoration: underline; }

/* pipeline strip */

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 14px 20px 20px;
}

.pipe-col {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.pipe-count { font-size: 22px; font-weight: 650; }

.pipe-name {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot-gray { background: var(--faint); }
.dot-blue { background: var(--li-blue); }
.dot-amber { background: #d98a1f; }
.dot-green { background: var(--good); }

/* how it works strip */

.flow-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px 20px;
  flex-wrap: wrap;
}

.flow-node {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 99px;
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--ink-2);
  white-space: nowrap;
}

.flow-node .ico { display: grid; place-items: center; }

.flow-arrow { color: var(--faint); font-size: 14px; }

/* activity feed */

.feed { padding: 8px 8px 12px; }

.feed-item {
  display: flex;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  align-items: flex-start;
}

.feed-item:hover { background: var(--surface-2); }

.feed-ico {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
}

.feed-body { min-width: 0; }

.feed-text { font-size: 13.5px; color: var(--ink-2); }
.feed-text strong { color: var(--ink); font-weight: 600; }
.feed-time { font-size: 12px; color: var(--faint); margin-top: 2px; }

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 99px;
  padding: 3px 10px;
  white-space: nowrap;
}

.badge-live { background: var(--good-bg); color: var(--good); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-draft { background: var(--line-2); color: var(--ink-2); }
.badge-info { background: var(--info-bg); color: var(--navy); }

/* ---------- Stepper ---------- */

.stepper {
  display: flex;
  align-items: flex-start;
  margin: 4px 0 30px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  flex: 1;
  position: relative;
}

.step::before {
  content: "";
  position: absolute;
  top: 16px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--line);
  z-index: 0;
}

.step:first-child::before { display: none; }

.step.done::before, .step.active::before { background: var(--navy); }

.step-dot {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13.5px;
  font-weight: 650;
  background: var(--surface);
  border: 2px solid var(--line);
  color: var(--muted);
  position: relative;
  z-index: 1;
  transition: all .2s;
}

.step.active .step-dot {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
  box-shadow: 0 0 0 5px rgba(30, 58, 95, .12);
}

.step.done .step-dot {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.step-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.step.active .step-name, .step.done .step-name { color: var(--ink); }

/* ---------- Capture ---------- */

.capture-card { padding: 26px 28px 28px; max-width: 760px; margin: 0 auto; }

.mode-tabs {
  display: flex;
  gap: 6px;
  background: var(--line-2);
  border-radius: 12px;
  padding: 5px;
  width: max-content;
  margin-bottom: 22px;
}

.mode-tab {
  border: none;
  background: transparent;
  padding: 8px 18px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .15s;
}

.mode-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(24, 36, 58, .12);
}

.idea-textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface-2);
  transition: border-color .15s, box-shadow .15s;
}

.idea-textarea:focus {
  outline: none;
  border-color: var(--navy);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(30, 58, 95, .09);
}

.capture-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.hint-text { font-size: 13px; color: var(--muted); }

.sample-btn {
  border: 1px dashed var(--faint);
  background: transparent;
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 99px;
  transition: all .15s;
}

.sample-btn:hover { background: var(--info-bg); border-color: var(--navy); }

.dropzone {
  border: 2px dashed var(--faint);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 44px 20px;
  text-align: center;
  transition: all .15s;
  cursor: pointer;
}

.dropzone:hover { border-color: var(--navy); background: var(--info-bg); }

.dropzone-title { font-weight: 650; margin-top: 12px; }
.dropzone-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

.file-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 16px;
}

.file-chip .file-ico {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}

.file-name { font-weight: 600; font-size: 14px; }
.file-meta { font-size: 12.5px; color: var(--muted); }

.file-remove {
  margin-left: auto;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.file-remove:hover { color: var(--yt-red); }

.capture-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line-2);
}

/* ---------- Processing ---------- */

.process-card {
  max-width: 620px;
  margin: 0 auto;
  padding: 34px 36px;
  text-align: center;
}

.process-title { font-family: var(--serif); font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.process-sub { color: var(--muted); font-size: 14px; margin-bottom: 26px; }

.voice-chips {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.voice-chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  background: var(--info-bg);
  border: 1px solid #d6e2f0;
  padding: 5px 12px;
  border-radius: 99px;
}

.check-list { text-align: left; display: grid; gap: 6px; margin-bottom: 26px; }

.check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  color: var(--faint);
  transition: all .2s;
}

.check-item.running { color: var(--ink); background: var(--surface-2); }
.check-item.done { color: var(--ink-2); }

.check-icon {
  width: 22px;
  height: 22px;
  flex: none;
  display: grid;
  place-items: center;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.check-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line);
}

.progress-track {
  height: 6px;
  background: var(--line-2);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--navy), #3b6ea5);
  transition: width .5s ease;
}

/* ---------- Review ---------- */

.review-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 16px;
  align-items: start;
}

.pane { overflow: hidden; }

.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-2);
  background: var(--surface-2);
}

.pane-title {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.pane-body { padding: 20px 22px; }

.raw-text {
  font-size: 14.5px;
  color: var(--ink-2);
  white-space: pre-wrap;
  line-height: 1.65;
}

.transcript-label {
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 18px 0 8px;
}

.draft-title {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 6px;
}

.draft-deck {
  font-size: 15px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 16px;
}

.draft-body p { margin-bottom: 13px; font-size: 14.5px; color: var(--ink-2); }
.draft-body p:last-child { margin-bottom: 0; }

.editable {
  border-radius: 10px;
  padding: 4px 6px;
  margin: -4px -6px;
  transition: box-shadow .15s, background .15s;
}

.editable:hover { background: var(--surface-2); }

.editable:focus {
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(30, 58, 95, .25);
}

.edit-note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.review-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.meta-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* shimmer while regenerating */

.shimmer { position: relative; overflow: hidden; }

.shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(246, 244, 239, .95) 50%, transparent 70%);
  animation: shimmerMove 1s ease infinite;
}

@keyframes shimmerMove {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* ---------- Publish (website) ---------- */

.publish-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  align-items: start;
}

.browser-frame { overflow: hidden; }

.browser-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eceae3;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.traffic { display: flex; gap: 6px; }
.traffic span { width: 10px; height: 10px; border-radius: 50%; display: block; }
.t-r { background: #e0897e; }
.t-y { background: #e6c37a; }
.t-g { background: #97c489; }

.url-pill {
  flex: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 12.5px;
  color: var(--ink-2);
  padding: 5px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  white-space: nowrap;
}

.url-pill .lock { color: var(--good); flex: none; }

.site-preview { padding: 26px 30px 30px; }

.site-brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.article-h1 {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.22;
  margin-bottom: 8px;
}

.article-deck { font-size: 14.5px; color: var(--muted); font-style: italic; margin-bottom: 16px; }

.byline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line-2);
}

.byline .avatar { width: 34px; height: 34px; font-size: 13px; }

.byline-name { font-size: 13.5px; font-weight: 650; }
.byline-meta { font-size: 12px; color: var(--muted); }

.article-body p { font-size: 14px; color: var(--ink-2); margin-bottom: 12px; }

.fade-out {
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}

.why-card { padding: 22px 24px; background: linear-gradient(160deg, #fff 60%, var(--info-bg)); }

.why-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 650;
  margin-bottom: 10px;
}

.why-card p { font-size: 13.5px; color: var(--ink-2); margin-bottom: 10px; }

.why-list { list-style: none; display: grid; gap: 8px; margin-top: 12px; }

.why-list li {
  display: flex;
  gap: 9px;
  font-size: 13px;
  color: var(--ink-2);
  align-items: flex-start;
}

.why-list .tick { color: var(--good); flex: none; margin-top: 1px; }

.publish-cta { margin-top: 18px; display: grid; gap: 10px; }

.success-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--good-bg);
  border: 1px solid #cbe6d6;
  border-radius: 12px;
  padding: 14px 16px;
  animation: viewIn .3s ease both;
}

.success-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--good);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}

.success-title { font-weight: 650; font-size: 14px; color: var(--good); }
.success-sub { font-size: 12.5px; color: var(--ink-2); word-break: break-all; }

/* ---------- Distribute ---------- */

.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 20px;
}

.channel-card { display: flex; flex-direction: column; overflow: hidden; }

.channel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-2);
}

.channel-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: none;
}

.logo-li { background: var(--li-blue); }
.logo-ig { background: radial-gradient(circle at 30% 110%, #fdc468 10%, #dd2a7b 55%, #8134af 90%); }
.logo-yt { background: var(--yt-red); }
.logo-wp { background: var(--navy); }

.channel-name { font-weight: 650; font-size: 14px; }
.channel-kind { font-size: 11.5px; color: var(--muted); }

.channel-status { margin-left: auto; }

.channel-body { padding: 16px; flex: 1; }

.post-author {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.post-author .avatar { width: 32px; height: 32px; font-size: 12px; }

.pa-name { font-size: 13px; font-weight: 650; line-height: 1.2; }
.pa-sub { font-size: 11.5px; color: var(--muted); }

.post-text { font-size: 13px; color: var(--ink-2); white-space: pre-line; }

.post-more { color: var(--muted); font-weight: 600; font-size: 12.5px; }

.link-preview {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.link-preview-band {
  height: 54px;
  background: linear-gradient(120deg, var(--navy), #2c5282 60%, #4a7bab);
  display: flex;
  align-items: center;
  padding: 0 14px;
}

.link-preview-band span {
  font-family: var(--serif);
  color: #f0e6cf;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
}

.link-preview-meta { padding: 8px 12px; background: var(--surface-2); }
.lp-title { font-size: 12.5px; font-weight: 650; }
.lp-url { font-size: 11px; color: var(--muted); text-transform: lowercase; }

.ig-square {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background:
    radial-gradient(120% 120% at 15% 0%, rgba(255, 255, 255, .16), transparent 45%),
    linear-gradient(150deg, #1c3252 0%, #1e3a5f 45%, #3d5f8a 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  margin-bottom: 12px;
}

.ig-quote {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.35;
  font-weight: 700;
  color: #f4ecd9;
}

.ig-handle {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(244, 236, 217, .75);
}

.hashtags { color: var(--li-blue); font-size: 12.5px; margin-top: 8px; line-height: 1.6; }

.yt-thumb {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(140deg, #22354f, #101c2e 70%);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.yt-play {
  width: 52px;
  height: 37px;
  background: var(--yt-red);
  border-radius: 10px;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px -6px rgba(204, 0, 0, .6);
}

.yt-duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0, 0, 0, .8);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
}

.yt-title { font-size: 13.5px; font-weight: 650; line-height: 1.35; }

.yt-desc { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.tag {
  font-size: 11.5px;
  color: var(--ink-2);
  background: var(--line-2);
  border-radius: 99px;
  padding: 3px 9px;
}

.channel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--line-2);
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--muted);
}

.channel-card.locked { opacity: .62; }

.locked-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

/* toggle */

.toggle {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 99px;
  background: var(--faint);
  border: none;
  transition: background .15s;
  flex: none;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .18s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

.toggle.on { background: var(--good); }
.toggle.on::after { transform: translateX(16px); }

.distribute-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  flex-wrap: wrap;
}

.distribute-note { font-size: 13.5px; color: var(--ink-2); }

/* ---------- Summary / done ---------- */

.summary-card { max-width: 680px; margin: 0 auto; padding: 34px 38px; text-align: center; }

.summary-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--good-bg);
  color: var(--good);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}

.summary-title { font-family: var(--serif); font-size: 25px; font-weight: 700; margin-bottom: 6px; }
.summary-sub { color: var(--muted); font-size: 14.5px; margin-bottom: 24px; }

.timeline { text-align: left; display: grid; gap: 0; margin-bottom: 26px; }

.tl-item { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }

.tl-item::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 30px;
  bottom: 0;
  width: 2px;
  background: var(--line-2);
}

.tl-item:last-child::before { display: none; }
.tl-item:last-child { padding-bottom: 0; }

.tl-ico {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex: none;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}

.tl-title { font-size: 13.5px; font-weight: 650; }
.tl-sub { font-size: 12.5px; color: var(--muted); }

/* ---------- Library ---------- */

.library-table { overflow: hidden; }

.lib-row {
  display: grid;
  grid-template-columns: 1.9fr .8fr 1.1fr .8fr .8fr;
  gap: 14px;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line-2);
}

.lib-row:last-child { border-bottom: none; }

.lib-row.lib-head-row {
  padding: 12px 20px;
  background: var(--surface-2);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}

.lib-title { font-weight: 600; font-size: 14px; line-height: 1.35; }
.lib-title .lib-note { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px; }

.lib-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
  font-weight: 550;
}

.channel-dots { display: flex; gap: 6px; align-items: center; }

.chan-mini {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  opacity: 1;
}

.chan-mini.off { opacity: .22; filter: grayscale(1); }

.lib-date { font-size: 13px; color: var(--muted); }

.lib-row.new-item { animation: highlightIn 1.6s ease both; }

@keyframes highlightIn {
  0% { background: var(--gold-bg); }
  100% { background: transparent; }
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 550;
  padding: 11px 20px;
  border-radius: 99px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 9px;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Login ---------- */

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 20px;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(30, 58, 95, .06), transparent 70%),
    var(--bg);
  transition: opacity .35s ease;
}

.login-screen.leaving { opacity: 0; pointer-events: none; }

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 42px 30px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.brand-mark-lg {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  font-size: 23px;
  margin: 0 auto 16px;
}

.login-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 4px;
}

#loginForm { text-align: left; margin-top: 28px; }

.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-2);
  margin: 15px 0 6px;
}

.field {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--surface-2);
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.field:focus {
  outline: none;
  border-color: var(--navy);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(30, 58, 95, .09);
}

.login-btn { width: 100%; justify-content: center; margin-top: 24px; }

.login-foot {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line-2);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.field-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

.field-error {
  font-size: 12.5px;
  color: #b3261e;
  margin-top: 6px;
  font-weight: 550;
}

.field-invalid {
  border-color: #d99b95;
  background: #fdf5f4;
}

.field-invalid:focus {
  border-color: #b3261e;
  box-shadow: 0 0 0 4px rgba(179, 38, 30, .1);
}

/* ---------- Alerts ---------- */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border-radius: 11px;
  padding: 12px 15px;
  font-size: 13.5px;
  line-height: 1.5;
  margin: 18px 0;
  border: 1px solid transparent;
  text-align: left;
}

.alert a { color: inherit; font-weight: 650; }

.alert-info    { background: var(--info-bg); border-color: #d6e2f0; color: var(--navy); }
.alert-success { background: var(--good-bg); border-color: #cbe6d6; color: var(--good); }
.alert-error   { background: #fbeceb; border-color: #f0cecb; color: #b3261e; }

.alert .spinner { margin-top: 2px; }

/* ---------- Settings ---------- */

.brand { text-decoration: none; color: inherit; }

.logout-form { display: inline; }

.settings-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 16px;
  align-items: start;
}

.settings-col { display: grid; gap: 16px; }

.settings-card { overflow: hidden; }

.settings-form { padding: 6px 22px 20px; }

.settings-form .field-label:first-of-type { margin-top: 6px; }

.field-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
  font-size: 13.5px;
}

#system_prompt {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
}

.field-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 14px;
}

.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.label-row .field-hint { margin-top: 0; }

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 9px; }

.btn-danger { color: #b3261e; }
.btn-danger:hover { border-color: #d99b95; color: #b3261e; }

.settings-foot {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 22px;
  border-top: 1px solid var(--line-2);
  background: var(--surface-2);
}

.key-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.key-mask {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
  color: var(--ink-2);
}

.key-meta { font-size: 12px; color: var(--muted); }

.key-state { flex: none; }

/* result of a run */

.settings-result { padding: 0 22px 20px; }

.settings-result .alert { margin-top: 0; }

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-2);
}

.result-meta { font-size: 12.5px; color: var(--muted); }

.result-article {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 20px 22px;
}

.result-article .draft-title { font-size: 21px; margin-bottom: 6px; }
.result-article .draft-deck { font-size: 14px; margin-bottom: 14px; }

.result-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--muted);
}

.result-raw { margin-top: 14px; }

.result-raw summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.result-raw summary:hover { color: var(--ink); }

.result-raw pre {
  margin-top: 10px;
  background: #f3f1ea;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow: auto;
  color: var(--ink-2);
}

/* usage + history */

.usage-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 14px 22px 18px;
}

.usage-row .stat-value { font-size: 26px; }

.run-history { border-top: 1px solid var(--line-2); padding: 8px 12px 12px; }

.run-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 9px;
}

.run-row:hover { background: var(--surface-2); }

.run-model { font-size: 13px; font-weight: 600; }
.run-sub { font-size: 12px; color: var(--muted); }

.empty-note { font-size: 13px; color: var(--muted); padding: 10px 10px 14px; }

.account-meta {
  display: grid;
  gap: 12px;
  padding: 14px 22px 4px;
}

.account-value { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-top: 2px; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .settings-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 12px; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .review-grid, .publish-grid { grid-template-columns: 1fr; }
  .channel-grid { grid-template-columns: 1fr; }
  .step-name { display: none; }
  .lib-row { grid-template-columns: 1.6fr 1fr 1fr; }
  .lib-row .lib-col-hide { display: none; }
  .hero-card { flex-direction: column; align-items: flex-start; }
}
