/* ============================================================================
   IG Content Engine — design system
   Identity: the violet→teal gradient (#6B2FBF → #1E7A8C) the engine itself
   stamps on the content it generates. Signature element: the "pipeline line" —
   used in exactly three places: the brand mark, the mobile tab bar's active
   indicator, and the Kanban columns' top edges (stepping violet→teal left to
   right, because the board literally is a pipeline).
   ========================================================================== */

:root {
  color-scheme: light dark;
  --bg: #f7f6fa;
  --surface: #ffffff;
  --fg: #1c1826;
  --muted: #6e6880;
  --border: #e5e2ec;
  --accent: #6b2fbf;
  --accent-2: #1e7a8c;
  --danger: #dc2626;
  --success: #16a34a;
  --grad: linear-gradient(90deg, #6b2fbf, #1e7a8c);
  --r: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgb(28 24 38 / 0.05), 0 4px 12px rgb(28 24 38 / 0.05);
  --shadow-lift: 0 2px 4px rgb(28 24 38 / 0.06), 0 8px 24px rgb(28 24 38 / 0.09);
  --tabbar-h: 58px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131118;
    --surface: #1c1925;
    --fg: #eceaf2;
    --muted: #9a94ab;
    --border: #2a2635;
    --accent: #a273e8;
    --accent-2: #4db3c8;
    --shadow: none;
    --shadow-lift: none;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

h1 { font-size: clamp(24px, 5vw, 30px); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-weight: 700; letter-spacing: -0.01em; }

a { color: var(--accent); }
button { font: inherit; }
button:disabled { opacity: 0.4; cursor: not-allowed; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { max-width: 960px; margin: 0 auto; padding: 24px 16px; }
.container-wide { max-width: 1400px; }
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.empty { color: var(--muted); }
.error { color: var(--danger); }

/* ---- Header (desktop nav) -------------------------------------------------- */

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 40;
}
.nav-brand {
  font-weight: 800;
  letter-spacing: -0.01em;
  position: relative;
  padding-bottom: 4px;
  white-space: nowrap;
}
.nav-brand::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 42px; height: 3px;
  border-radius: 2px;
  background: var(--grad);
}
.nav-brand-account { font-weight: 500; color: var(--muted); }
.nav-brand-account::before { content: " — "; }
.nav nav { display: flex; gap: 4px; flex: 1; }
.nav nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
}
.nav nav a:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 6%, transparent); }
.nav nav a.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.nav-logout button { background: none; border: none; color: var(--muted); cursor: pointer; padding: 6px 10px; }
.nav-logout button:hover { color: var(--fg); }

/* ---- Bottom tab bar (mobile) ----------------------------------------------- */

.tabbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: var(--tabbar-h);
  color: var(--muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  position: relative;
}
.tabbar-item svg { width: 22px; height: 22px; }
.tabbar-item.active { color: var(--accent); }
.tabbar-item.active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 28px; height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--grad);
}

@media (max-width: 767px) {
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); }
  .nav { gap: 12px; padding: 10px 16px; }
  .nav nav { display: none; }
  .nav-brand { flex: 1; overflow: hidden; text-overflow: ellipsis; }
}

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

.alert {
  background: #fef3c7;
  color: #92400e;
  padding: 10px 24px;
  font-size: 14px;
}
.container .alert { border-radius: var(--r-sm); margin-bottom: 16px; }
.alert-success { background: color-mix(in srgb, var(--success) 14%, var(--surface)); color: var(--success); }
.alert-error { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }

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

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.tab.active {
  color: white;
  border-color: transparent;
  background: var(--accent);
}

/* ---- Cards & forms ----------------------------------------------------------- */

.card {
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card h1, .card h2 { margin-top: 0; }
.card label { display: block; margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.card input:not([type="checkbox"]):not([type="radio"]), .card select, .card textarea {
  width: 100%;
  padding: 10px 12px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}
.card input[type="checkbox"], .card input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  vertical-align: middle;
}
.card textarea { min-height: auto; }
.card input:focus, .card select:focus, .card textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.card button:not(.btn-approve):not(.btn-reject):not(.btn-link):not(.btn-ghost) {
  margin-top: 16px;
  width: 100%;
  padding: 12px;
  min-height: 46px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--r-sm);
  font-weight: 600;
  cursor: pointer;
}
.card button:not(.btn-approve):not(.btn-reject):not(.btn-link):not(.btn-ghost):hover { filter: brightness(1.08); }

.btn-ghost {
  display: inline-block;
  padding: 8px 16px;
  min-height: 0;
  width: auto;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost-sm { padding: 5px 12px; font-size: 12px; }

/* ---- Preview studio -------------------------------------------------------- */
.preview-studio-grid { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(320px, 1.15fr); gap: 24px; align-items: start; }
.preview-studio-controls { position: sticky; top: 82px; }
.preview-studio-controls h2 { margin-bottom: 4px; }
.preview-kicker { color: var(--accent-2); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.preview-studio-output { min-height: 580px; display: grid; place-items: center; }
.preview-layer-track { width: 100%; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; color: var(--muted); font-size: 12px; }
.preview-layer-track span { padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.preview-layer-track b { color: var(--accent-2); }
.preview-phone { width: min(100%, 390px); margin: 0 auto; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lift); }
.preview-phone-bar { display: flex; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--muted); font: 700 10px/1 system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.preview-phone img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--bg); }
.preview-copy { padding: 16px; }
.preview-copy strong { display: block; margin-bottom: 8px; }
.preview-copy p { white-space: pre-line; line-height: 1.5; }
.preview-hashtags { color: var(--accent); font-size: 13px; }
.preview-empty-state { width: 100%; padding: 56px 28px; text-align: center; border: 1px dashed var(--border); border-radius: 22px; color: var(--muted); background: color-mix(in srgb, var(--surface) 65%, transparent); }
.preview-empty-state span { color: var(--accent-2); font-size: 12px; font-weight: 700; }
.preview-empty-state h2 { color: var(--fg); }
.preview-loading-status { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 13px 14px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--accent-2) 10%, var(--surface)); color: var(--fg); font-size: 13px; line-height: 1.4; }
.preview-loading-status[hidden] { display: none; }
.preview-spinner { width: 22px; height: 22px; flex: 0 0 auto; border: 3px solid color-mix(in srgb, var(--accent-2) 20%, transparent); border-top-color: var(--accent-2); border-radius: 50%; animation: preview-spin .8s linear infinite; }
@keyframes preview-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .preview-spinner { animation-duration: 1.8s; } }
.settings-action-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card .settings-action-pair .btn-preview-action { background: var(--accent-2); }
.funnel-preview-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; color: var(--muted); font-size: 13px; }
.card .funnel-preview-actions .btn-ghost { width: auto; margin: 0; padding: 8px 14px; min-height: 36px; background: transparent; color: var(--fg); border: 1px solid var(--border); }
@media (max-width: 760px) {
  .preview-studio-grid { grid-template-columns: 1fr; }
  .preview-studio-controls { position: static; }
  .preview-studio-output { min-height: 420px; }
  .settings-action-pair { grid-template-columns: 1fr; }
}

.inline-form { display: flex; gap: 8px; margin-bottom: 16px; }
.inline-form input {
  flex: 1;
  padding: 10px 12px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--fg);
}
.inline-form button {
  padding: 10px 18px;
  min-height: 44px;
  border-radius: var(--r-sm);
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.table { width: 100%; border-collapse: collapse; }
.table-wrap { overflow-x: auto; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }

.row-actions { display: flex; gap: 8px; }
.row-actions button {
  padding: 6px 12px;
  min-height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
}
.row-actions button:hover { border-color: var(--accent); color: var(--accent); }

.link-list { list-style: none; padding: 0; margin: 16px 0 0; }
.link-list li { padding: 10px 0; border-bottom: 1px solid var(--border); justify-content: space-between; }
.link-list .row-actions button { padding: 4px 12px; }

.insight-list-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--fg);
}
.insight-list-link:hover strong { color: var(--accent); }
.insight-list-meta { color: var(--muted); font-size: 13px; white-space: nowrap; }

.insight-accordion {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.insight-accordion > summary {
  cursor: pointer;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.insight-accordion > summary:hover strong { color: var(--accent); }
.insight-accordion-body { padding: 0 20px 20px; }
.insight-accordion-body .insight-card {
  border: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: 0;
}
.insight-accordion-empty {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  opacity: 0.6;
}

.btn-link {
  display: inline-block;
  text-decoration: none;
  padding: 6px 0;
  font-weight: 500;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}
.btn-link:hover { color: var(--accent); }
.btn-link-disabled { color: var(--muted); cursor: default; }

.status-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: color-mix(in srgb, var(--fg) 8%, transparent);
  width: fit-content;
}

/* ---- Post grid (examples, content types) ------------------------------------ */

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.post-card {
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  text-decoration: none;
  color: var(--fg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.post-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.post-card-noimg {
  aspect-ratio: 4/5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: color-mix(in srgb, var(--fg) 5%, transparent);
}
.post-card p { padding: 8px 12px; font-size: 14px; margin: 0; }

.example-form { margin-bottom: 24px; }
.example-card { padding: 12px; }
.example-card p { padding: 4px 0; }
.example-type { color: var(--accent); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.example-notes { color: var(--muted); font-size: 13px; font-style: italic; }
.example-card .row-actions { margin-top: 6px; align-items: center; }

/* ---- Insights ---------------------------------------------------------------- */

.insight-group-label { font-size: 15px; margin: 24px 0 8px; }
.insight-group-label:first-of-type { margin-top: 0; }
.insight-card { margin-bottom: 8px; }
.insight-period { color: var(--muted); font-size: 13px; margin-top: 0; }

.insight-summary { font-size: 14px; line-height: 1.55; }
.insight-summary h4 { margin: 14px 0 4px; font-size: 13px; }
.insight-summary h4:first-child { margin-top: 0; }
.insight-summary p { margin: 0 0 10px; }
.insight-summary ul { margin: 0 0 10px; padding-left: 20px; }
.insight-summary li { margin-bottom: 2px; }

.insight-previous-ideas { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.insight-previous-idea { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.idea-strike { text-decoration: line-through; text-decoration-thickness: 1.5px; opacity: 0.75; }

.insight-actions { display: flex; gap: 8px; margin-top: 14px; }
.insight-actions form { margin: 0; }

.insight-preview-panel {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}
.insight-preview-heading { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--accent); }
.insight-preview-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.insight-preview-item {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  background: var(--surface);
}
.insight-preview-item label { display: block; font-weight: normal; margin: 0; font-size: inherit; color: inherit; }
.insight-preview-item input[type="checkbox"] { margin-right: 8px; }
.idea-caption-direction { color: var(--muted); font-size: 13px; margin: 6px 0 0 24px; }
.insight-preview-actions { display: flex; align-items: center; gap: 16px; }

.insight-gaps-panel {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}
.insight-gaps-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.insight-gap-item {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  background: var(--surface);
}
.insight-gap-item label { display: flex; align-items: flex-start; gap: 8px; font-weight: normal; margin: 0; font-size: 13px; color: inherit; }
.insight-gap-item input[type="checkbox"] { margin-top: 2px; }
.insight-gap-used { opacity: 0.6; background: transparent; }
.insight-gap-used span { text-decoration: line-through; text-decoration-thickness: 1.5px; }

.insight-history { margin: 0 0 20px; font-size: 13px; }
.insight-history > summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  padding: 4px 0;
}
.insight-history > summary:hover { color: var(--accent); }
.insight-history-item {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-top: 8px;
  padding: 4px 12px;
  background: var(--surface);
}
.insight-history-item > summary {
  cursor: pointer;
  padding: 8px 0;
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.insight-history-date { color: var(--muted); font-size: 12px; white-space: nowrap; }
.insight-history-excerpt { color: var(--fg); }
.insight-history-body { padding: 4px 0 14px; }

.tag-funnel, .tag-content-type {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-left: 8px;
}
.tag-funnel { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.tag-content-type { background: color-mix(in srgb, var(--accent-2) 15%, transparent); color: var(--accent-2); }

/* ---- Kanban ------------------------------------------------------------------ */

.kanban-board {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 8px;
}
.kanban-column {
  flex: 1 0 230px;
  min-width: 230px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  border-top: 3px solid var(--accent);
  box-shadow: var(--shadow);
  overflow: hidden;
}
/* The pipeline signature: column top edges step violet→teal, left to right —
   the same gradient the engine stamps on generated content, because the board
   is that pipeline: idea in on the left, published post out on the right. */
.kanban-column:nth-child(1) { border-top-color: #6b2fbf; }
.kanban-column:nth-child(2) { border-top-color: #5e3cb7; }
.kanban-column:nth-child(3) { border-top-color: #5148ae; }
.kanban-column:nth-child(4) { border-top-color: #4555a6; }
.kanban-column:nth-child(5) { border-top-color: #38619d; }
.kanban-column:nth-child(6) { border-top-color: #2b6e95; }
.kanban-column:nth-child(7) { border-top-color: #1e7a8c; }

.kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.kanban-count {
  font-weight: 600;
  color: var(--muted);
  font-size: 12px;
  background: color-mix(in srgb, var(--fg) 8%, transparent);
  border-radius: 999px;
  padding: 1px 8px;
}
.kanban-column-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  min-height: 80px;
}
.kanban-column-body.drag-over { background: color-mix(in srgb, var(--accent) 10%, transparent); }

.kanban-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
  padding: 10px;
  font-size: 13px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
a.kanban-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.kanban-card img { width: 100%; border-radius: 6px; aspect-ratio: 4/5; object-fit: cover; margin-bottom: 6px; }
.kanban-card p { margin: 0; }
.kanban-card[draggable="true"] { cursor: grab; }
.kanban-card.dragging { opacity: 0.4; }
.kanban-card-angle { font-weight: 600; margin-bottom: 4px !important; }
.kanban-card-reason { color: var(--muted); font-style: italic; }
.kanban-card-processing { color: var(--muted); }
.kanban-card-failed-reason { color: var(--danger); font-size: 12px; margin-top: 4px !important; }
.kanban-card-scheduled { font-size: 12px; font-weight: 700; color: var(--accent-2); padding: 4px 0 0; margin: 0 !important; }
.kanban-card-unscheduled { color: var(--muted); font-weight: 400; }

.suggested-format {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.suggested-format-label, .format-goal {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.format-segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-top: 5px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}
.format-segmented button {
  min-height: 32px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
.format-segmented button.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow);
}
.format-goal { margin-top: 9px; }
.format-goal select { width: 100%; margin-top: 5px; min-height: 34px; }
.format-goal.is-hidden { display: none; }
.format-save-state { display: block; min-height: 15px; margin-top: 4px; color: var(--muted); font-size: 11px; }

.kanban-stage-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  margin: 0 0 6px;
}
.kanban-stage-topo { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.kanban-stage-meio { background: color-mix(in srgb, #3f62a7 20%, transparent); color: color-mix(in srgb, #3f62a7 70%, var(--fg)); }
.kanban-stage-fundo { background: color-mix(in srgb, var(--accent-2) 20%, transparent); color: var(--accent-2); }

.kanban-manual-add {
  border: 1px dashed var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 13px;
}
.kanban-manual-add summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.kanban-manual-form { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.kanban-manual-form label { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 600; }
.kanban-manual-form input, .kanban-manual-form select {
  padding: 8px;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-size: 13px;
}
.kanban-manual-form button {
  margin-top: 8px;
  padding: 10px;
  min-height: 42px;
  border: none;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
}

/* Mobile: one column per screen, snap-scrolled sideways like Trello. */
@media (max-width: 767px) {
  .kanban-board {
    scroll-snap-type: x mandatory;
    gap: 12px;
    margin: 0 -16px;
    padding: 0 16px 8px;
  }
  .kanban-column {
    flex: 0 0 86vw;
    min-width: 86vw;
    scroll-snap-align: center;
  }
}

/* ---- Post detail ------------------------------------------------------------- */

.post-detail-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 8px; flex-wrap: wrap; }
.post-detail-prevnext { display: flex; gap: 16px; }

.post-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 16px 0; }
.post-detail-image img { width: 100%; border-radius: var(--r); box-shadow: var(--shadow); }
.post-detail-form { display: flex; flex-direction: column; gap: 8px; }
.post-detail-form label { font-size: 13px; font-weight: 600; color: var(--muted); }
.post-detail-form textarea, .post-detail-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--fg);
  font-family: inherit;
}
.post-detail-form button {
  padding: 12px;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--fg);
  font-weight: 600;
  cursor: pointer;
}
.post-detail-form button:hover { border-color: var(--accent); color: var(--accent); }

.blog-preview {
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  margin-top: 8px;
  background: var(--surface);
}
.blog-preview :first-child { margin-top: 0; }
.blog-preview :last-child { margin-bottom: 0; }
.blog-featured-image { display: block; width: 100%; max-height: 520px; object-fit: cover; border-radius: 8px; }

.post-actions { display: flex; gap: 12px; }
.btn-approve, .btn-reject {
  color: white;
  border: none;
  padding: 12px 24px;
  min-height: 48px;
  border-radius: var(--r-sm);
  font-weight: 700;
  cursor: pointer;
}
.btn-approve { background: var(--success); }
.btn-reject { background: var(--danger); }
.btn-approve:hover, .btn-reject:hover { filter: brightness(1.08); }

@media (max-width: 767px) {
  .post-detail { grid-template-columns: 1fr; gap: 16px; }
  /* Approve/Reject pinned above the tab bar while reviewing, so the decision
     is always one thumb-tap away. Scrolling down to the calendar releases it. */
  .post-actions {
    position: sticky;
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 8px);
    z-index: 30;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 10px;
    box-shadow: var(--shadow-lift);
  }
  .post-actions form { flex: 1; }
  .post-actions button { width: 100%; }
}

/* ---- Scheduling calendar ------------------------------------------------------ */

.post-calendar { margin-top: 32px; }
.post-calendar-header { display: flex; align-items: center; justify-content: center; gap: 20px; }
.post-calendar-header h2 { margin: 0; text-transform: capitalize; min-width: 200px; text-align: center; font-size: 18px; }
.post-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 8px; }
.post-calendar-weekday { text-align: center; font-size: 12px; color: var(--muted); padding: 4px; }
.post-calendar-day {
  min-height: 70px;
  /* Grid items default to min-width:auto, so their content-based minimum size (here, a
     .post-calendar-entry's un-wrapped caption text) can inflate the whole 7-col grid wider than
     its container instead of shrinking — the entry's own text-overflow:ellipsis never gets a
     chance to kick in. min-width:0 lets the day cell shrink to its 1fr track size, which then
     lets the entry (width:100% of it via flex stretch) actually clip with ellipsis as intended.
     Only visible once real posts populate the calendar — an empty grid has no entries to trigger
     this, which is why it looked fine before scheduling started. */
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 4px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
}
.post-calendar-day-empty { border: none; background: none; }
.post-calendar-daynum { font-size: 12px; color: var(--muted); }
.post-calendar-entry {
  display: block;
  min-width: 0; /* belt-and-suspenders alongside .post-calendar-day's min-width:0 above */
  padding: 3px 6px;
  border-radius: 5px;
  text-decoration: none;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-calendar-entry-approved { background: color-mix(in srgb, var(--success) 18%, transparent); }
.post-calendar-entry-published { background: color-mix(in srgb, var(--success) 32%, transparent); }
.post-calendar-entry-pending_approval { background: color-mix(in srgb, var(--muted) 22%, transparent); }

/* Mobile: the 7-column grid is unreadable — collapse to an agenda of only the
   days that actually have something scheduled. */
@media (max-width: 767px) {
  .post-calendar-grid { display: flex; flex-direction: column; gap: 8px; }
  .post-calendar-weekday { display: none; }
  .post-calendar-day-empty { display: none; }
  .post-calendar-day:not(:has(.post-calendar-entry)) { display: none; }
  .post-calendar-day {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 12px;
    font-size: 13px;
  }
  .post-calendar-daynum { font-size: 15px; font-weight: 700; color: var(--fg); min-width: 28px; }
  .post-calendar-day .post-calendar-entry { flex: 1; }
  .post-calendar-grid:not(:has(.post-calendar-entry))::after {
    content: "Nenhum post agendado neste mês.";
    color: var(--muted);
    font-size: 14px;
  }
}

/* ---- Misc --------------------------------------------------------------------- */

.page-picker-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: 8px;
  cursor: pointer;
  background: var(--surface);
}
.page-picker-option input { width: auto; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   PAUTA — editorial studio redesign
   Ink blue anchors the working surface; coral is reserved for decisions and
   yellow behaves like a real editor's highlighter. The board is a proofing
   table, not a generic analytics dashboard.
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #edf1f0;
  --surface: #fbfcf8;
  --fg: #102a43;
  --muted: #667783;
  --border: #cbd5d2;
  --accent: #e9513d;
  --accent-2: #087f8c;
  --danger: #ba3225;
  --success: #19724b;
  --marker: #f4cd4b;
  --ink: #102a43;
  --paper: #fbfcf8;
  --r: 5px;
  --r-sm: 3px;
  --shadow: 0 1px 0 rgb(16 42 67 / 0.08), 0 6px 18px rgb(16 42 67 / 0.06);
  --shadow-lift: 0 2px 0 rgb(16 42 67 / 0.1), 0 14px 28px rgb(16 42 67 / 0.12);
}

body {
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(rgb(16 42 67 / .055) .7px, transparent .7px);
  background-size: 7px 7px;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
}
h1 { font-size: clamp(34px, 5vw, 56px); line-height: .96; font-weight: 600; letter-spacing: -.045em; margin: 18px 0 28px; }
h2 { font-size: clamp(23px, 3vw, 31px); font-weight: 600; letter-spacing: -.025em; }
h3 { font-size: 20px; }

a { color: var(--accent-2); text-underline-offset: 3px; }
.container { max-width: 1040px; padding: 42px 28px 72px; }
.container-wide { max-width: 1680px; }
.empty { max-width: 760px; line-height: 1.7; }

.nav {
  min-height: 74px;
  padding: 10px 28px;
  gap: 38px;
  border: 0;
  border-bottom: 3px solid var(--ink);
  background: rgb(251 252 248 / .94);
  backdrop-filter: blur(16px);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 180px;
  padding: 0;
  color: var(--ink);
  text-decoration: none;
}
.nav-brand::after { display: none; }
.nav-brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 42px;
  background: var(--ink);
  color: var(--paper);
  font: italic 700 29px/1 Georgia, serif;
  transform: rotate(-3deg);
  box-shadow: 4px 4px 0 var(--marker);
}
.nav-brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.nav-brand-copy strong { font: 700 19px/1 Georgia, serif; letter-spacing: -.02em; }
.nav-brand-copy small { margin-top: 5px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font: 600 9px/1.1 "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.nav nav { gap: 2px; }
.nav nav a {
  position: relative;
  padding: 10px 12px;
  border-radius: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.nav nav a:hover { background: transparent; color: var(--ink); }
.nav nav a.active { background: transparent; color: var(--ink); }
.nav nav a.active::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; bottom: 4px;
  height: 5px;
  z-index: -1;
  background: var(--marker);
  transform: rotate(-1deg);
}
.nav-logout button { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }

.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--ink); }
.page-heading h1 { margin: 6px 0 20px; }
.page-heading > p { max-width: 360px; margin: 0 0 22px; color: var(--muted); }
.page-kicker, .form-kicker, .login-kicker {
  color: var(--accent);
  font: 800 10px/1 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.alert { border-bottom: 1px solid currentColor; font-weight: 650; }
.container .alert { border-radius: 0; border-left: 5px solid currentColor; }

.card, .insight-accordion, .post-card {
  border: 1px solid var(--border);
  border-top: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.card { padding: 28px; }
.card label { color: var(--ink); font-size: 12px; letter-spacing: .02em; }
.card input:not([type="checkbox"]):not([type="radio"]), .card select, .card textarea,
.inline-form input, .post-detail-form textarea, .post-detail-form input {
  border: 1px solid #aebbb8;
  border-radius: 2px;
  background: white;
}
.card input:focus, .card select:focus, .card textarea:focus { border-color: var(--accent-2); box-shadow: 3px 3px 0 rgb(8 127 140 / .2); }
.card button:not(.btn-approve):not(.btn-reject):not(.btn-link):not(.btn-ghost), .inline-form button, .kanban-manual-form button {
  border-radius: 2px;
  background: var(--ink);
  box-shadow: 3px 3px 0 var(--marker);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card button:not(.btn-approve):not(.btn-reject):not(.btn-link):not(.btn-ghost):hover, .inline-form button:hover, .kanban-manual-form button:hover {
  filter: none; transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--marker);
}
.btn-ghost, .row-actions button { border-color: var(--ink); border-radius: 2px; }

.tabs { gap: 0; padding: 0 0 16px; border-bottom: 1px solid var(--border); }
.tab { border: 0; border-radius: 0; background: transparent; font-weight: 700; }
.tab.active { background: var(--ink); color: white; }

.table { background: var(--paper); border-top: 3px solid var(--ink); }
.table th { background: var(--ink); color: white; font-family: "SFMono-Regular", Consolas, monospace; letter-spacing: .09em; }
.table tbody tr:hover { background: rgb(244 205 75 / .13); }

.kanban-board {
  position: relative;
  gap: 12px;
  padding: 14px 2px 22px;
  scrollbar-color: var(--ink) transparent;
}
.kanban-board::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 18px, transparent 18px 25px);
}
.kanban-column {
  flex-basis: 238px;
  min-width: 238px;
  border: 1px solid #b9c5c2;
  border-top: 0 !important;
  border-radius: 2px;
  background: rgb(251 252 248 / .74);
  box-shadow: none;
  overflow: visible;
}
.kanban-column-header {
  min-height: 54px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  font-family: Georgia, serif;
  font-size: 15px;
}
.kanban-column:nth-child(1) .kanban-column-header::before { content: "PAUTA"; }
.kanban-column:nth-child(2) .kanban-column-header::before { content: "FAZENDO"; }
.kanban-column:nth-child(3) .kanban-column-header::before { content: "REVISÃO"; }
.kanban-column:nth-child(4) .kanban-column-header::before { content: "PRONTO"; }
.kanban-column:nth-child(5) .kanban-column-header::before { content: "NO AR"; }
.kanban-column:nth-child(6) .kanban-column-header::before { content: "ARQUIVO"; }
.kanban-column:nth-child(7) .kanban-column-header::before { content: "ATENÇÃO"; }
.kanban-column-header::before {
  position: absolute;
  margin-top: -25px;
  padding: 3px 7px;
  background: var(--ink);
  color: white;
  font: 800 8px/1 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .12em;
}
.kanban-column:nth-child(3) .kanban-column-header::before,
.kanban-column:nth-child(4) .kanban-column-header::before { background: var(--accent); }
.kanban-column:nth-child(5) .kanban-column-header::before { background: var(--success); }
.kanban-count { border-radius: 2px; background: var(--marker); color: var(--ink); font-family: "SFMono-Regular", Consolas, monospace; }
.kanban-column-body { min-height: 140px; padding: 10px; }
.kanban-card {
  border: 1px solid #c9d2cf;
  border-radius: 1px;
  background: white;
  padding: 9px;
  box-shadow: 2px 2px 0 rgb(16 42 67 / .08);
}
a.kanban-card:hover { border-color: var(--ink); box-shadow: 4px 5px 0 var(--marker); transform: translate(-1px, -2px) rotate(-.3deg); }
.kanban-card img { border-radius: 0; filter: saturate(.92) contrast(1.02); }
.kanban-card-reason { border-left: 2px solid var(--marker); padding-left: 7px; font-style: normal; }
.kanban-stage-badge, .status-badge, .tag-funnel, .tag-content-type { border-radius: 1px; font-family: "SFMono-Regular", Consolas, monospace; }
.kanban-manual-add { border-color: var(--ink); border-radius: 1px; background: rgb(244 205 75 / .12); }

.post-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.post-card { border-radius: 2px; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.post-card img { filter: saturate(.92); }
.example-type { color: var(--accent); font-family: "SFMono-Regular", Consolas, monospace; }

.btn-approve, .btn-reject { border-radius: 2px; box-shadow: 3px 3px 0 var(--ink); }
.btn-approve { background: var(--success); }
.btn-reject { background: var(--accent); }
.post-detail-image img, .blog-preview { border-radius: 2px; }
.post-calendar-day { border-radius: 1px; }

.center { background: var(--ink); }
.login-shell { width: min(960px, 100%); display: grid; grid-template-columns: 1.15fr .85fr; background: var(--paper); box-shadow: 12px 12px 0 var(--marker); }
.login-intro { min-height: 530px; padding: 64px; display: flex; flex-direction: column; justify-content: flex-end; background: var(--accent-2); color: white; position: relative; overflow: hidden; }
.login-intro::before { content: "P"; position: absolute; top: -90px; right: -25px; color: rgb(255 255 255 / .1); font: italic 500 420px/1 Georgia, serif; }
.login-intro h1 { position: relative; margin: 18px 0 24px; color: white; font-size: clamp(54px, 8vw, 86px); }
.login-intro h1 em { color: var(--marker); font-weight: inherit; }
.login-intro p { position: relative; max-width: 400px; margin: 0; font-size: 17px; }
.login-kicker { color: var(--marker); }
.login-card { align-self: center; border: 0; box-shadow: none; padding: 48px; }
.login-card h2 { margin: 10px 0 28px; font-size: 34px; }

@media (max-width: 900px) {
  .nav { gap: 16px; padding-inline: 18px; }
  .nav nav a { padding-inline: 8px; font-size: 12px; }
  .nav-brand { min-width: auto; }
  .nav-brand-copy small { display: none; }
}

@media (max-width: 767px) {
  .container { padding: 30px 16px 56px; }
  .nav { min-height: 64px; border-bottom-width: 2px; }
  .nav-brand-mark { width: 33px; height: 36px; font-size: 25px; }
  .nav-brand-copy strong { font-size: 18px; }
  .tabbar { background: var(--ink); border-top: 0; }
  .tabbar-item { color: #aab8c0; }
  .tabbar-item.active { color: white; }
  .tabbar-item.active::before { background: var(--marker); border-radius: 0; }
  .page-heading { display: block; }
  .page-heading h1 { font-size: 40px; }
  .page-heading > p { margin-top: -10px; }
  .kanban-board { margin-inline: -16px; padding-inline: 16px; }
  .kanban-board::before { left: 16px; right: 16px; }
  .kanban-column { flex-basis: 84vw; min-width: 84vw; }
  .login-shell { grid-template-columns: 1fr; box-shadow: 7px 7px 0 var(--marker); }
  .login-intro { min-height: 260px; padding: 36px 30px; }
  .login-intro h1 { font-size: 52px; margin-block: 12px 18px; }
  .login-intro::before { font-size: 270px; top: -55px; }
  .login-card { padding: 36px 30px 42px; }
}

/* ==========================================================================
   POSTARA — desktop-first product system
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --fg: #1c1d24;
  --muted: #737986;
  --border: #e1e4ea;
  --accent: #087e72;
  --accent-2: #087e72;
  --danger: #d94f3b;
  --success: #29845f;
  --marker: #ff775f;
  --ink: #1c1d24;
  --paper: #ffffff;
  --r: 12px;
  --r-sm: 8px;
  --shadow: 0 2px 7px rgb(29 31 39 / .045);
  --shadow-lift: 0 10px 28px rgb(29 31 39 / .11);
  --sidebar-w: 224px;
  --topbar-h: 64px;
}

body {
  min-height: 100vh;
  background: var(--bg);
  background-image: none;
  color: var(--fg);
  font-family: Inter, "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

h1, h2, h3 { color: var(--fg); font-family: inherit; }
h1 { margin: 0; font-size: clamp(28px, 3vw, 36px); font-weight: 700; line-height: 1.12; letter-spacing: -.04em; }
h2 { font-size: 23px; font-weight: 700; letter-spacing: -.025em; }
h3 { font-size: 17px; font-weight: 650; }
a { color: var(--accent); }

.container {
  width: auto;
  max-width: 1080px;
  margin: 0 0 0 var(--sidebar-w);
  padding: 38px 34px 72px;
}
.container-wide { max-width: none; }

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 24px 14px 16px;
  border: 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: none;
}
.nav-brand {
  min-width: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 8px;
  color: var(--fg);
}
.nav-brand-mark {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  padding: 5px;
  border-radius: 8px;
  background: var(--accent);
  box-shadow: none;
  transform: none;
}
.nav-brand-mark i { display: block; width: 4px; border-radius: 4px; background: white; }
.nav-brand-mark i:nth-child(1) { height: 9px; }
.nav-brand-mark i:nth-child(2) { height: 16px; }
.nav-brand-mark i:nth-child(3) { height: 12px; }
.nav-brand-copy { line-height: 1.1; }
.nav-brand-copy strong { font: 750 20px/1 inherit; letter-spacing: -.04em; }
.nav-brand-copy small { margin-top: 4px; color: var(--muted); font: 600 9px/1 inherit; letter-spacing: .05em; text-transform: uppercase; }
.sidebar-toggle {
  position: absolute;
  top: 28px;
  right: -13px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  box-shadow: 0 3px 9px rgb(28 29 36 / .08);
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, transform .22s ease;
}
.sidebar-toggle:hover { border-color: #a9d3cd; color: var(--accent); }
.sidebar-toggle svg { width: 15px; height: 15px; transition: transform .22s ease; }

.app-sidebar nav { display: flex; flex: 0; flex-direction: column; gap: 3px; margin-top: 32px; }
.nav-section-label { margin: 0 11px 8px; color: #9297a2; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.app-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 8px;
  color: #626875;
  font-size: 13px;
  font-weight: 550;
}
.app-sidebar nav a:hover { color: var(--fg); background: #f2f4f6; }
.app-sidebar nav a.active { color: #086b62; background: #e5f4f1; }
.app-sidebar nav a.active::after { display: none; }
.nav-icon { display: grid; place-items: center; width: 18px; height: 18px; }
.nav-icon svg { width: 18px; height: 18px; }

.nav-logout {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 12px 7px 0;
  border-top: 1px solid var(--border);
}
.nav-account-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #087e72, #43b5a4);
  color: white;
  font-size: 10px;
  font-weight: 700;
}
.nav-account-copy { display: flex; flex-direction: column; min-width: 0; }
.nav-account-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.nav-account-copy small { color: var(--muted); font-size: 9px; }
.nav-logout button { padding: 4px; color: var(--muted); font-size: 10px; letter-spacing: 0; text-transform: none; }

.app-topbar {
  height: var(--topbar-h);
  margin-left: var(--sidebar-w);
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / .85);
  color: var(--muted);
  font-size: 12px;
  backdrop-filter: blur(14px);
}
.app-topbar strong { color: var(--fg); }
.topbar-status { display: flex; align-items: center; gap: 7px; }
.topbar-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgb(41 132 95 / .12); }
.app-topbar + .alert, .app-sidebar ~ .alert { margin-left: var(--sidebar-w); }

html.sidebar-collapsed { --sidebar-w: 72px; }
html.sidebar-collapsed .app-sidebar { padding-inline: 10px; }
html.sidebar-collapsed .nav-brand { justify-content: center; padding: 0; }
html.sidebar-collapsed .nav-brand-copy,
html.sidebar-collapsed .nav-section-label,
html.sidebar-collapsed .nav-account-copy,
html.sidebar-collapsed .nav-logout button { display: none; }
html.sidebar-collapsed .app-sidebar nav a { justify-content: center; padding-inline: 0; font-size: 0; }
html.sidebar-collapsed .nav-icon { width: 22px; height: 22px; }
html.sidebar-collapsed .nav-icon svg { width: 20px; height: 20px; }
html.sidebar-collapsed .nav-logout { display: flex; justify-content: center; grid-template-columns: 1fr; }
html.sidebar-collapsed .sidebar-toggle { transform: translateX(1px); }
html.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
  padding-bottom: 0;
  border: 0;
}
.page-heading h1 { margin: 4px 0 0; }
.page-heading > p { max-width: 390px; margin: 0; color: var(--muted); }
.page-kicker, .form-kicker, .login-kicker { color: var(--accent); font: 700 10px/1 inherit; letter-spacing: .07em; text-transform: uppercase; }

.card, .insight-accordion, .post-card {
  border: 1px solid var(--border);
  border-top: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card { padding: 26px; }
.card label { color: #4f5562; font-size: 12px; letter-spacing: 0; }
.card input:not([type="checkbox"]):not([type="radio"]), .card select, .card textarea,
.inline-form input, .post-detail-form textarea, .post-detail-form input {
  border: 1px solid #d8dce3;
  border-radius: var(--r-sm);
  background: #fafbfc;
}
.card input:focus, .card select:focus, .card textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(8 126 114 / .12); }
.card button:not(.btn-approve):not(.btn-reject):not(.btn-link):not(.btn-ghost), .inline-form button, .kanban-manual-form button {
  border-radius: var(--r-sm);
  background: var(--accent);
  box-shadow: 0 5px 14px rgb(8 126 114 / .15);
}
.card button:not(.btn-approve):not(.btn-reject):not(.btn-link):not(.btn-ghost):hover, .inline-form button:hover, .kanban-manual-form button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgb(8 126 114 / .2); }
.btn-ghost, .row-actions button { border-color: #d8dce3; border-radius: var(--r-sm); }

.tabs { gap: 4px; padding: 4px; border: 0; border-radius: 10px; background: #e9ecef; }
.tab { padding: 8px 12px; border-radius: 7px; color: var(--muted); font-size: 12px; }
.tab.active { background: white; color: var(--fg); box-shadow: 0 1px 4px rgb(28 29 36 / .1); }

.table { overflow: hidden; border: 1px solid var(--border); border-top: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.table th { background: #f1f3f6; color: #6e7480; font-family: inherit; font-size: 10px; letter-spacing: .06em; }
.table tbody tr:hover { background: #f5faf9; }

.kanban-board {
  gap: 12px;
  padding: 0 0 16px;
  overflow-x: auto;
  scrollbar-color: #b7bdc7 transparent;
}
.kanban-board::before { display: none; }
.kanban-column {
  flex: 1 0 230px;
  min-width: 230px;
  padding: 9px;
  border: 0;
  border-top: 0 !important;
  border-radius: 12px;
  background: #eceef2;
  box-shadow: none;
  overflow: hidden;
}
.kanban-column-header {
  min-height: 42px;
  padding: 6px 4px 10px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
}
.kanban-column-header::before { display: inline-block; position: static; width: 7px; height: 7px; margin: 0 7px 0 0; padding: 0; border-radius: 50%; content: "" !important; background: #8d94a0; vertical-align: 1px; }
.kanban-column:nth-child(1) .kanban-column-header::before { background: #087e72; }
.kanban-column:nth-child(2) .kanban-column-header::before { background: #4c8df6; }
.kanban-column:nth-child(3) .kanban-column-header::before { background: #ff9a58; }
.kanban-column:nth-child(4) .kanban-column-header::before { background: #29845f; }
.kanban-column:nth-child(5) .kanban-column-header::before { background: #45a27c; }
.kanban-column:nth-child(6) .kanban-column-header::before { background: #959ca7; }
.kanban-column:nth-child(7) .kanban-column-header::before { background: var(--danger); }
.kanban-count { margin-left: auto; border-radius: 9px; background: #dde0e6; color: #747a85; font-family: inherit; font-size: 10px; }
.kanban-column-body { min-height: 120px; gap: 8px; padding: 0; }
.kanban-card {
  padding: 11px;
  border: 1px solid #dfe2e8;
  border-radius: 9px;
  background: white;
  box-shadow: 0 2px 7px rgb(29 31 39 / .04);
}
a.kanban-card:hover { border-color: #aad7d1; box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.kanban-card img { margin: -5px -5px 10px; width: calc(100% + 10px); border-radius: 7px; filter: none; }
.kanban-card p { line-height: 1.45; }
.kanban-card-angle { font-weight: 650; }
.kanban-card-reason { margin-top: 7px !important; padding-left: 0; border: 0; color: var(--muted); font-style: normal; }
.kanban-stage-badge, .status-badge, .tag-funnel, .tag-content-type { border-radius: 5px; font-family: inherit; letter-spacing: .03em; }
.kanban-manual-add { border-color: #c7ccd4; border-radius: 8px; background: rgb(255 255 255 / .45); }
.kanban-manual-add summary { color: var(--accent); }

.post-grid { gap: 18px; }
.post-card { border-radius: var(--r); }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.post-card img { filter: none; }
.example-type { color: var(--accent); font-family: inherit; }
.btn-approve, .btn-reject { border-radius: var(--r-sm); box-shadow: none; }
.btn-approve { background: var(--success); }
.btn-reject { background: var(--danger); }
.post-detail-image img, .blog-preview, .post-calendar-day { border-radius: var(--r-sm); }

.center { background: #eef3f2; }
.login-shell { width: min(980px, 100%); overflow: hidden; grid-template-columns: 1.08fr .92fr; border: 1px solid var(--border); border-radius: 20px; background: white; box-shadow: 0 28px 70px rgb(28 40 39 / .15); }
.login-intro { min-height: 560px; padding: 58px; justify-content: flex-end; background: #0b625b; }
.login-intro::before { content: ""; top: -90px; right: -80px; width: 340px; height: 340px; border: 70px solid rgb(255 255 255 / .06); border-radius: 50%; }
.login-brand { position: absolute; top: 42px; left: 52px; display: flex; align-items: center; gap: 10px; }
.login-brand .nav-brand-mark { background: white; }
.login-brand .nav-brand-mark i { background: #0b625b; }
.login-brand strong { color: white; font-size: 21px; letter-spacing: -.04em; }
.login-intro h1 { margin: 15px 0 22px; color: white; font-family: inherit; font-size: clamp(46px, 6vw, 70px); font-weight: 700; line-height: .98; }
.login-intro h1 em { color: #72d2c3; font-style: normal; }
.login-intro p { max-width: 390px; font-size: 16px; color: rgb(255 255 255 / .76); }
.login-kicker { color: #72d2c3; }
.login-card { padding: 52px; }
.login-card h2 { margin: 8px 0 30px; font-size: 28px; }

@media (max-width: 900px) {
  :root { --sidebar-w: 72px; }
  .app-sidebar { padding-inline: 10px; }
  .nav-brand { justify-content: center; padding: 0; }
  .nav-brand-copy, .nav-section-label, .nav-account-copy, .nav-logout button { display: none; }
  .app-sidebar nav a { justify-content: center; padding: 0; font-size: 0; }
  .nav-icon { width: 22px; height: 22px; }
  .nav-icon svg { width: 20px; height: 20px; }
  .nav-logout { display: flex; justify-content: center; grid-template-columns: 1fr; }
  .sidebar-toggle { display: none; }
}

@media (max-width: 767px) {
  :root { --sidebar-w: 0px; --topbar-h: 58px; }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }
  .app-sidebar { position: sticky; width: 100%; min-height: 58px; height: 58px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .app-sidebar nav, .app-sidebar .nav-logout { display: none; }
  .nav-brand { justify-content: flex-start; }
  .nav-brand-copy { display: flex; }
  .nav-brand-copy small { display: none; }
  .app-topbar { display: none; }
  .container { margin-left: 0; padding: 28px 16px 56px; }
  .app-topbar + .alert, .app-sidebar ~ .alert { margin-left: 0; }
  .tabbar { display: grid; background: #162421; }
  .tabbar-item { color: #9eaaa7; }
  .tabbar-item.active { color: white; }
  .tabbar-item.active::before { background: #54b9aa; }
  .page-heading { display: block; }
  .page-heading > p { margin-top: 10px; }
  .kanban-board { margin: 0 -16px; padding: 0 16px 10px; }
  .kanban-column { flex-basis: 84vw; min-width: 84vw; }
  .login-shell { grid-template-columns: 1fr; border-radius: 14px; }
  .login-intro { min-height: 280px; padding: 34px 28px; }
  .login-brand { top: 26px; left: 28px; }
  .login-intro h1 { font-size: 45px; }
  .login-card { padding: 36px 28px 42px; }
}
.carousel-preview {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 72%);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 14px;
}

.brand-token-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
}

.field-help {
  margin: -6px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* ---- Postara public landing -------------------------------------------------
   Signature: the Research Engine. The product's research-to-production flow is
   the hero image, using signal orange only where an opportunity becomes action.
   -------------------------------------------------------------------------- */

.landing {
  --land-ink: #10201e;
  --land-green: #0a5d55;
  --land-mint: #80dec8;
  --land-orange: #ff6433;
  --land-paper: #f4f7f1;
  --land-line: #cdd8d2;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: var(--land-paper);
  color: var(--land-ink);
  font-family: Arial, Helvetica, sans-serif;
}
.landing * { box-sizing: border-box; }
.landing a { color: inherit; }
.landing-nav {
  width: min(1240px, calc(100% - 48px));
  height: 82px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--land-line);
}
.landing-logo { display: inline-flex; align-items: center; gap: 10px; width: max-content; text-decoration: none; }
.landing-logo strong { font-size: 23px; letter-spacing: -.055em; }
.landing-logo-mark { width: 34px; height: 34px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 7px; border-radius: 9px; background: var(--land-green); transform: rotate(-3deg); }
.landing-logo-mark i { display: block; width: 4px; border-radius: 3px; background: white; }
.landing-logo-mark i:nth-child(1) { height: 8px; }
.landing-logo-mark i:nth-child(2) { height: 17px; }
.landing-logo-mark i:nth-child(3) { height: 12px; }
.landing-nav nav { display: flex; gap: 34px; }
.landing-nav nav a, .landing-login { color: #51615e; font-size: 13px; font-weight: 700; text-decoration: none; }
.landing-nav nav a:hover, .landing-login:hover { color: var(--land-green); }
.landing-nav-actions { display: flex; justify-content: flex-end; align-items: center; gap: 22px; }
.landing-button { display: inline-flex; align-items: center; justify-content: center; gap: 24px; min-height: 54px; padding: 0 24px; background: var(--land-orange); color: white !important; text-decoration: none; font-size: 14px; font-weight: 800; border: 0; border-radius: 4px; box-shadow: 5px 5px 0 var(--land-ink); transition: transform .18s ease, box-shadow .18s ease; }
.landing-button:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--land-ink); }
.landing-button span { font-size: 20px; line-height: 1; }
.landing-button-small { min-height: 42px; padding: 0 17px; gap: 14px; box-shadow: none; }
.landing-button-small:hover { transform: none; box-shadow: inset 0 0 0 2px rgb(16 32 30 / .2); }
.landing-hero { width: min(1240px, calc(100% - 48px)); min-height: 690px; margin: 0 auto; display: grid; grid-template-columns: .88fr 1.12fr; gap: 72px; align-items: center; padding: 72px 0 80px; }
.landing-eyebrow, .landing-kicker { margin: 0 0 22px; color: var(--land-green); font-size: 11px; line-height: 1; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.landing-eyebrow { display: flex; align-items: center; gap: 9px; }
.landing-eyebrow > span { width: 8px; height: 8px; border-radius: 50%; background: var(--land-orange); box-shadow: 0 0 0 5px rgb(255 100 51 / .13); }
.landing-hero h1 { margin: 0; font-size: clamp(56px, 6.4vw, 91px); line-height: .89; letter-spacing: -.068em; font-weight: 900; }
.landing-hero h1 em { color: var(--land-green); font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.landing-lead { max-width: 560px; margin: 30px 0 32px; color: #4b5c58; font-size: 19px; line-height: 1.55; }
.landing-hero-actions { display: flex; align-items: center; gap: 30px; }
.landing-text-link { padding: 10px 0; color: var(--land-ink); font-size: 13px; font-weight: 800; text-decoration: none; border-bottom: 1px solid var(--land-ink); }
.landing-proofline { display: flex; align-items: center; gap: 8px; margin: 24px 0 0; color: #66736f; font-size: 11px; font-weight: 700; }
.landing-proofline span { color: var(--land-green); }
.landing-proofline i { width: 3px; height: 3px; border-radius: 50%; background: #aab5b0; }
.landing-engine { position: relative; background: #fff; border: 1px solid #bac8c2; box-shadow: 18px 18px 0 #cfe1da; transform: rotate(1deg); }
.landing-engine::before { content: ""; position: absolute; z-index: -1; width: 76px; height: 76px; top: -36px; right: -31px; border-radius: 50%; border: 16px solid var(--land-orange); }
.engine-topbar { display: flex; justify-content: space-between; padding: 15px 18px; background: var(--land-ink); color: white; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.engine-live { color: var(--land-mint); }
.engine-live i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--land-mint); animation: landing-pulse 1.8s infinite; }
.engine-query { display: grid; grid-template-columns: auto 1fr 45px; align-items: center; gap: 10px; margin: 20px; padding: 8px 8px 8px 15px; background: #edf3ef; border: 1px solid #d4ded9; }
.engine-query span { color: #788580; font-size: 11px; }
.engine-query strong { font-size: 13px; }
.engine-query button { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 2px; background: var(--land-orange); color: white; font-size: 20px; cursor: pointer; }
.engine-body { display: grid; grid-template-columns: 1fr 32px 1.05fr; align-items: center; padding: 8px 20px 26px; }
.engine-signal, .engine-output { min-width: 0; }
.engine-label { color: #74817d; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.engine-signal p { margin: 15px 0 25px; font-family: Georgia, "Times New Roman", serif; font-size: 21px; line-height: 1.25; }
.engine-meter { height: 6px; overflow: hidden; background: #e1e8e4; }
.engine-meter i { display: block; width: 84%; height: 100%; background: var(--land-orange); transform-origin: left; }
.engine-signal small { display: block; margin-top: 8px; color: var(--land-green); font-size: 9px; font-weight: 800; }
.engine-arrow { color: var(--land-orange); text-align: center; font-size: 21px; }
.engine-output { padding: 14px; background: var(--land-green); color: white; }
.engine-output-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.engine-output .engine-label { color: #a7d7cd; }
.engine-ready { padding: 4px 6px; background: var(--land-mint); color: var(--land-ink); font-size: 7px; font-weight: 900; }
.engine-video { position: relative; min-height: 210px; padding: 23px 18px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; background: linear-gradient(155deg, #243d39, #092d29); }
.engine-video::before, .engine-video::after { content: ""; position: absolute; border: 1px solid rgb(128 222 200 / .28); border-radius: 50%; }
.engine-video::before { width: 220px; height: 220px; top: -125px; right: -95px; }
.engine-video::after { width: 110px; height: 110px; top: -50px; right: -40px; background: rgb(128 222 200 / .08); }
.engine-video strong { position: relative; font-size: 22px; line-height: 1.04; letter-spacing: -.04em; }
.engine-video strong em { color: var(--land-mint); font-family: Georgia, serif; font-weight: 400; }
.engine-play { position: absolute; top: 18px; left: 18px; display: grid; place-items: center; width: 32px; height: 32px; padding-left: 2px; border-radius: 50%; background: var(--land-orange); font-size: 9px; }
.engine-video > span { position: absolute; right: 10px; bottom: 10px; padding: 3px 5px; background: rgb(0 0 0 / .45); font-size: 8px; }
.engine-assets { display: flex; justify-content: space-between; gap: 5px; padding-top: 12px; font-size: 8px; font-weight: 800; }
.engine-footer { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 12px; border-top: 1px solid #dbe3df; color: #6b7874; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.engine-footer i { width: 3px; height: 3px; border-radius: 50%; background: var(--land-orange); }
.landing-engine.is-running .engine-meter i { animation: landing-meter 1.1s ease both; }
.landing-engine.is-running .engine-output { animation: landing-result .55s .65s ease both; }
.landing-strip { display: flex; align-items: center; justify-content: space-around; gap: 22px; padding: 17px 24px; overflow: hidden; background: var(--land-orange); color: white; font-size: 10px; font-weight: 900; letter-spacing: .1em; white-space: nowrap; }
.landing-strip i { font-size: 12px; }
.landing-section { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 125px 0; }
.landing-problem { display: grid; grid-template-columns: 1.35fr .65fr; gap: 80px; align-items: end; }
.landing h2 { margin: 0; font-size: clamp(42px, 5vw, 67px); line-height: 1; letter-spacing: -.055em; }
.landing-section-intro { margin: 0 0 5px; color: #52625e; font-size: 17px; line-height: 1.65; }
.landing-before-after { padding-top: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.landing-before-after article { min-height: 430px; padding: 38px; border: 1px solid var(--land-line); }
.compare-label { display: inline-block; margin-bottom: 34px; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.before-card { background: #e8ede9; color: #64716d; }
.before-card ul { margin: 0; padding: 0; list-style: none; }
.before-card li { display: grid; grid-template-columns: 35px 1fr auto; gap: 12px; padding: 16px 0; border-bottom: 1px solid #cbd5d0; font-size: 13px; }
.before-card li b { color: #9aa5a1; font-size: 9px; }
.before-card li em { font-style: normal; font-size: 10px; }
.landing-before-after footer { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 32px; }
.landing-before-after footer span { font-size: 11px; font-weight: 800; }
.landing-before-after footer strong { font-size: 33px; letter-spacing: -.05em; }
.after-card { position: relative; background: var(--land-green); color: white; box-shadow: 9px 9px 0 var(--land-mint); }
.after-card .compare-label { color: var(--land-mint); }
.after-prompt { margin: 0 0 22px; padding: 16px; background: rgb(255 255 255 / .1); border-left: 3px solid var(--land-orange); font-family: Georgia, serif; font-size: 17px; line-height: 1.4; }
.after-result { padding: 24px; background: white; color: var(--land-ink); }
.after-result span { color: var(--land-orange); font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.after-result strong, .after-result small { display: block; }
.after-result strong { margin: 9px 0; font-size: 23px; letter-spacing: -.04em; }
.after-result small { color: #687671; line-height: 1.4; }
.after-card footer strong { color: var(--land-mint); }
.landing-process { width: 100%; max-width: none; padding: 125px max(24px, calc((100vw - 1120px) / 2)); background: var(--land-ink); color: white; }
.landing-process-title { display: grid; grid-template-columns: .7fr 1.3fr; gap: 80px; margin-bottom: 85px; }
.landing-process .landing-kicker { color: var(--land-mint); }
.landing-process ol { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; list-style: none; border-top: 1px solid #40514e; }
.landing-process li { position: relative; padding: 35px 34px 0 0; border-right: 1px solid #40514e; }
.landing-process li:not(:first-child) { padding-left: 34px; }
.landing-process li::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--land-orange); }
.landing-process li:not(:first-child)::before { left: 34px; }
.landing-process li > span { color: var(--land-mint); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.landing-process h3 { min-height: 64px; margin: 19px 0 16px; font-size: 24px; line-height: 1.1; letter-spacing: -.035em; }
.landing-process li p { margin: 0; color: #9fadaa; font-size: 14px; line-height: 1.65; }
.landing-deliverables { display: grid; grid-template-columns: .8fr 1.2fr; gap: 100px; align-items: center; }
.deliverables-copy > p:not(.landing-kicker) { margin: 27px 0 32px; color: #55645f; font-size: 16px; line-height: 1.7; }
.landing-button-dark { background: var(--land-ink); }
.deliverables-stack { display: grid; gap: 10px; }
.deliverables-stack article { display: grid; grid-template-columns: 55px 1fr; gap: 16px; padding: 26px; background: white; border: 1px solid var(--land-line); transition: transform .2s ease, border-color .2s ease; }
.deliverables-stack article:hover { transform: translateX(-8px); border-color: var(--land-green); }
.deliverables-stack article > span { color: var(--land-orange); font-family: Georgia, serif; font-size: 26px; }
.deliverables-stack small { display: block; margin-bottom: 7px; color: var(--land-green); font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.deliverables-stack strong { font-size: 20px; letter-spacing: -.03em; }
.deliverables-stack p { margin: 8px 0 0; color: #65736f; font-size: 13px; line-height: 1.5; }
.landing-control { padding-top: 25px; padding-bottom: 125px; }
.landing-control h2 em { color: var(--land-green); font-family: Georgia, serif; font-weight: 400; }
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; margin-top: 50px; padding-top: 38px; border-top: 1px solid var(--land-line); }
.control-grid > p { margin: 0; color: #52615d; font-family: Georgia, serif; font-size: 22px; line-height: 1.55; }
.control-grid ul { margin: 0; padding: 0; list-style: none; }
.control-grid li { padding: 13px 0; border-bottom: 1px solid var(--land-line); font-size: 13px; font-weight: 700; }
.control-grid li span { margin-right: 13px; color: var(--land-green); }
.landing-faq { display: grid; grid-template-columns: .75fr 1.25fr; gap: 100px; border-top: 1px solid var(--land-line); }
.faq-list details { border-bottom: 1px solid var(--land-line); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 23px 0; font-size: 16px; font-weight: 800; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary span { color: var(--land-orange); font-size: 24px; font-weight: 400; transition: transform .2s ease; }
.faq-list details[open] summary span { transform: rotate(45deg); }
.faq-list details p { max-width: 610px; margin: -5px 0 24px; color: #5e6c68; font-size: 14px; line-height: 1.65; }
.landing-final { position: relative; padding: 110px 24px; overflow: hidden; background: var(--land-green); color: white; text-align: center; }
.landing-final .landing-kicker { color: var(--land-mint); }
.landing-final h2 { position: relative; font-size: clamp(55px, 7vw, 95px); }
.landing-final h2 em { color: var(--land-mint); font-family: Georgia, serif; font-weight: 400; }
.landing-final > p:not(.landing-kicker) { position: relative; margin: 25px 0 28px; color: #bcd5cf; }
.landing-final .landing-button { position: relative; }
.landing-button-light { background: white; color: var(--land-green) !important; }
.landing-final small { position: relative; display: block; margin-top: 20px; color: #a4c6be; font-size: 10px; }
.final-orbit { position: absolute; width: 500px; height: 500px; top: -230px; right: -130px; border: 80px solid rgb(255 255 255 / .045); border-radius: 50%; }
.landing-footer { min-height: 130px; display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 35px; align-items: center; padding: 30px max(24px, calc((100vw - 1240px) / 2)); background: var(--land-ink); color: white; }
.landing-footer .landing-logo-mark { background: white; }
.landing-footer .landing-logo-mark i { background: var(--land-green); }
.landing-footer p { color: #90a19d; font-size: 12px; }
.landing-footer > div { display: flex; gap: 22px; }
.landing-footer > div a { color: #c1cdca; font-size: 11px; text-decoration: none; }
.landing-footer > small { color: #71817d; font-size: 10px; }
@keyframes landing-pulse { 50% { opacity: .35; } }
@keyframes landing-meter { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes landing-result { from { opacity: .35; transform: translateX(9px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .landing *, .landing *::before, .landing *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (max-width: 920px) {
  .landing-nav { grid-template-columns: 1fr auto; }
  .landing-nav nav { display: none; }
  .landing-hero { grid-template-columns: 1fr; padding-top: 65px; }
  .landing-hero-copy { max-width: 700px; }
  .landing-engine { width: min(680px, 100%); justify-self: center; }
  .landing-problem, .landing-process-title, .landing-deliverables, .landing-faq { grid-template-columns: 1fr; gap: 45px; }
  .landing-process ol { gap: 35px; border-top: 0; }
  .landing-process li, .landing-process li:not(:first-child) { padding: 28px 20px 0 0; border-top: 1px solid #40514e; border-right: 0; }
  .landing-process li::before, .landing-process li:not(:first-child)::before { top: -5px; left: 0; }
  .landing-process h3 { min-height: 82px; }
  .landing-deliverables { align-items: start; }
}
@media (max-width: 640px) {
  .landing-nav { width: calc(100% - 32px); height: 70px; }
  .landing-nav-actions { gap: 14px; }
  .landing-login { display: none; }
  .landing-button-small { min-height: 39px; padding: 0 13px; font-size: 11px; }
  .landing-hero { width: calc(100% - 32px); min-height: 0; gap: 55px; padding: 55px 0 70px; }
  .landing-hero h1 { font-size: clamp(49px, 15vw, 67px); }
  .landing-lead { margin-top: 25px; font-size: 17px; }
  .landing-hero-actions { align-items: stretch; flex-direction: column; gap: 16px; }
  .landing-text-link { align-self: flex-start; }
  .landing-proofline { flex-wrap: wrap; line-height: 1.6; }
  .landing-engine { box-shadow: 9px 9px 0 #cfe1da; }
  .landing-engine::before { width: 50px; height: 50px; top: -25px; right: -20px; border-width: 10px; }
  .engine-query { grid-template-columns: 1fr 42px; }
  .engine-query span { grid-column: 1 / -1; }
  .engine-body { grid-template-columns: 1fr; gap: 18px; }
  .engine-arrow { transform: rotate(90deg); }
  .engine-video { min-height: 190px; }
  .landing-section { width: calc(100% - 32px); padding: 85px 0; }
  .landing h2 { font-size: 43px; }
  .landing-problem { gap: 30px; }
  .landing-before-after { padding-top: 0; grid-template-columns: 1fr; }
  .landing-before-after article { min-height: 0; padding: 26px; }
  .landing-process { width: 100%; padding: 85px 16px; }
  .landing-process-title { margin-bottom: 55px; }
  .landing-process ol { grid-template-columns: 1fr; }
  .landing-process h3 { min-height: 0; }
  .landing-deliverables { gap: 55px; }
  .deliverables-stack article { grid-template-columns: 40px 1fr; padding: 20px; }
  .landing-control { padding-top: 10px; }
  .control-grid { grid-template-columns: 1fr; gap: 32px; margin-top: 35px; }
  .landing-final { padding: 85px 16px; }
  .landing-final h2 { font-size: 54px; }
  .landing-footer { grid-template-columns: 1fr auto; gap: 20px; }
  .landing-footer p { grid-column: 1 / -1; margin: 0; }
  .landing-footer > div { grid-column: 1; }
}

.brand-token-grid label {
  display: grid;
  gap: 6px;
}

.brand-token-grid input[type="color"] {
  width: 100%;
  min-height: 44px;
  padding: 3px;
}

.carousel-preview-slide {
  margin: 0;
  scroll-snap-align: start;
}

.carousel-preview-slide img {
  display: block;
  width: 100%;
  border-radius: 10px;
}

.carousel-preview-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: zoom-in;
}
.carousel-preview-open:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.carousel-lightbox {
  width: min(1180px, calc(100vw - 32px));
  max-width: none;
  height: calc(100vh - 32px);
  max-height: none;
  padding: 0;
  border: 1px solid rgb(255 255 255 / .18);
  border-radius: 14px;
  background: #121019;
  color: white;
}
.carousel-lightbox::backdrop { background: rgb(10 8 16 / .88); backdrop-filter: blur(8px); }
.carousel-lightbox-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid rgb(255 255 255 / .12); }
.carousel-lightbox-toolbar div { display: flex; align-items: center; gap: 12px; }
.carousel-lightbox-toolbar a { color: #9ee7dc; font-size: 13px; }
.carousel-lightbox-toolbar button, .carousel-lightbox-stage button { border: 1px solid rgb(255 255 255 / .2); background: rgb(255 255 255 / .08); color: white; }
.carousel-lightbox-stage { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; align-items: center; gap: 14px; height: calc(100% - 58px); padding: 14px; }
.carousel-lightbox-stage img { width: auto; max-width: 100%; height: 100%; max-height: 100%; margin: auto; object-fit: contain; }
.carousel-lightbox-stage button { width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font-size: 22px; }
@media (max-width: 600px) {
  .carousel-lightbox-toolbar a { display: none; }
  .carousel-lightbox-stage { grid-template-columns: 38px minmax(0, 1fr) 38px; gap: 5px; padding: 8px; }
  .carousel-lightbox-stage button { width: 36px; height: 36px; }
}

.carousel-preview-slide figcaption {
  margin-top: 7px;
  color: var(--muted, #6b6672);
  font-size: 0.8rem;
}

.post-detail-carousel {
  min-width: 0;
}
