/* app.css — Briefly app shell, input form, and brief result display */

/* ── Hidden attribute override ─────────────────────────────────────── */
/* Author-stylesheet display values override the UA hidden behavior.
   This ensures [hidden] always wins regardless of other display rules. */
[hidden] {
  display: none !important;
}

/* ── App Shell ──────────────────────────────────────────────────────── */

.app-body {
  min-height: 100vh;
  background: var(--bg-primary);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--fg-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

.app-header-tag {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.app-main {
  padding: 48px 24px 80px;
}

.app-container {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ── Panels ─────────────────────────────────────────────────────────── */

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.panel-header {
  padding: 44px 48px 32px;
  border-bottom: 1px solid var(--border);
}

.panel-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.panel-title .gradient-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.panel-subtitle {
  color: var(--fg-secondary);
  font-size: 16px;
  line-height: 1.6;
  max-width: 560px;
}

/* ── Form ───────────────────────────────────────────────────────────── */

.brief-form {
  padding: 36px 48px 44px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.label-icon {
  color: var(--accent);
  font-size: 15px;
  font-weight: 400;
}

.label-hint {
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--fg-muted);
  margin-left: auto;
}

.form-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.form-input::placeholder {
  color: var(--fg-muted);
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input.input-error {
  border-color: #ff4d6d;
  box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.12);
}

.competitor-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Buttons ────────────────────────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 32px rgba(124, 106, 255, 0.3); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-generate {
  align-self: flex-start;
  min-width: 200px;
}

.btn-arrow {
  font-size: 18px;
  transition: transform 0.2s ease;
}
.btn-primary:hover .btn-arrow { transform: translateX(4px); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--fg-primary); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-outline:hover { background: var(--accent); color: #fff; }

.btn-sm { padding: 8px 16px; font-size: 13px; }

.form-error {
  color: #ff4d6d;
  font-size: 14px;
  line-height: 1.5;
  padding: 12px 16px;
  background: rgba(255, 77, 109, 0.08);
  border: 1px solid rgba(255, 77, 109, 0.2);
  border-radius: 8px;
}

/* ── Status View ────────────────────────────────────────────────────── */

.status-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 72px 48px;
  gap: 20px;
}

.status-spinner {
  width: 56px;
  height: 56px;
  margin-bottom: 8px;
}

.spinner-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}

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

.status-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.status-desc {
  color: var(--fg-secondary);
  font-size: 15px;
  max-width: 400px;
  line-height: 1.6;
}

.status-steps {
  display: flex;
  gap: 32px;
  margin-top: 16px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  transition: color 0.3s ease;
}

.step[data-state="active"] { color: var(--accent-bright); }
.step[data-state="done"] { color: #4ade80; }

.step-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fg-muted);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.step[data-state="active"] .step-dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 1.5s ease-in-out infinite;
}

.step[data-state="done"] .step-dot {
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

/* ── Brief View ─────────────────────────────────────────────────────── */

.brief-view {
  display: flex;
  flex-direction: column;
}

.brief-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  flex-wrap: wrap;
  gap: 12px;
}

.brief-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brief-tag {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid rgba(124, 106, 255, 0.25);
}

.brief-url {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  color: var(--fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
}

.brief-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Scrape confidence badge ────────────────────────────────────────── */

.scrape-badge {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  flex-shrink: 0;
}

.scrape-badge--ok {
  background: rgba(74, 222, 128, 0.1);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.scrape-badge--partial {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

/* ── Pricing caveat callout ─────────────────────────────────────────── */

.pricing-caveat {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  margin: 0 0 20px;
  background: rgba(251, 191, 36, 0.07);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-left: 3px solid #fbbf24;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-secondary);
}

.pricing-caveat-icon {
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Markdown rendering ─────────────────────────────────────────────── */

.brief-content {
  padding: 48px 52px;
  overflow-y: auto;
  color: var(--fg-primary);
  font-size: 15px;
  line-height: 1.75;
}

.brief-content h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brief-content h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 40px 0 14px;
  color: var(--accent-bright);
}

.brief-content h2:first-of-type { margin-top: 0; }

.brief-content h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 10px;
  color: var(--fg-primary);
}

.brief-content p {
  margin: 0 0 16px;
  color: var(--fg-secondary);
}

.brief-content ul, .brief-content ol {
  padding-left: 24px;
  margin: 0 0 16px;
  color: var(--fg-secondary);
}

.brief-content li { margin-bottom: 6px; }

.brief-content strong { color: var(--fg-primary); font-weight: 600; }
.brief-content em { color: var(--fg-secondary); font-style: italic; }

.brief-content code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--accent-bright);
}

.brief-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0 28px;
  font-size: 14px;
}

.brief-content th {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: var(--bg-secondary);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.brief-content td {
  padding: 12px 16px;
  color: var(--fg-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.brief-content tr:last-child td { border-bottom: none; }

.brief-content td:first-child { color: var(--fg-primary); font-weight: 500; }

.brief-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.brief-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 0 0 16px;
  background: var(--bg-secondary);
  border-radius: 0 8px 8px 0;
  color: var(--fg-secondary);
}

/* ── Error View ─────────────────────────────────────────────────────── */

.error-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 72px 48px;
  gap: 16px;
}

.error-icon {
  font-size: 40px;
  color: #ff4d6d;
  line-height: 1;
}

.error-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}

.error-message {
  color: var(--fg-secondary);
  font-size: 15px;
  max-width: 440px;
  line-height: 1.6;
}

/* ── History Panel ──────────────────────────────────────────────────── */

.history-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
}

.history-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 20px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.history-empty {
  font-size: 14px;
  color: var(--fg-muted);
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
  gap: 12px;
}

.history-item:hover { background: var(--bg-secondary); }

.history-item-url {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  color: var(--fg-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.history-item-status {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  flex-shrink: 0;
}

.status-completed { background: rgba(74, 222, 128, 0.1); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.2); }
.status-pending   { background: var(--accent-glow); color: var(--accent-bright); border: 1px solid rgba(124, 106, 255, 0.2); }
.status-processing{ background: rgba(251, 191, 36, 0.1); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.2); }
.status-failed    { background: rgba(255, 77, 109, 0.1); color: #ff4d6d; border: 1px solid rgba(255, 77, 109, 0.2); }

.history-item-date {
  font-size: 12px;
  color: var(--fg-muted);
  flex-shrink: 0;
}

/* ── Auth controls ──────────────────────────────────────────────────── */

.app-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.auth-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-email {
  font-size: 13px;
  color: var(--fg-muted);
  font-family: var(--font-display);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Login modal ────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  max-width: 420px;
  width: 100%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.modal-close:hover { border-color: var(--fg-secondary); color: var(--fg-primary); }

.modal-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--fg-primary);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.modal-subtitle {
  color: var(--fg-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-full { width: 100%; }

.form-success {
  color: #4ade80;
  font-size: 14px;
  line-height: 1.5;
  padding: 12px 16px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 8px;
}

/* ── Notify option ──────────────────────────────────────────────────── */

.notify-group {
  gap: 12px;
}

.notify-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--fg-secondary);
}

.notify-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.notify-email-row {
  padding-left: 26px;
}

.form-input--sm {
  padding: 10px 14px;
  font-size: 14px;
}

/* ── Save toast ─────────────────────────────────────────────────────── */

.save-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-top: none;
  font-size: 13px;
  color: #4ade80;
}

.save-toast-icon {
  font-size: 15px;
  flex-shrink: 0;
}

/* ── App layout with sidebar ────────────────────────────────────────── */

.app-layout {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

/* My Briefs sidebar */
.my-briefs-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  min-height: calc(100vh - 65px);
  padding: 24px 0;
  position: sticky;
  top: 65px;
  overflow-y: auto;
  max-height: calc(100vh - 65px);
}

.sidebar-header {
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.my-briefs-list {
  display: flex;
  flex-direction: column;
  padding: 8px 8px;
  gap: 2px;
}

.sidebar-empty {
  font-size: 13px;
  color: var(--fg-muted);
  padding: 8px 12px;
}

.sidebar-item {
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 0.15s ease;
  min-width: 0;
}

.sidebar-item:hover { background: var(--bg-secondary); }
.sidebar-item--pending { opacity: 0.6; }

.sidebar-item-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}

.sidebar-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-item-status {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 100px;
}

.sidebar-item-date {
  font-size: 11px;
  color: var(--fg-muted);
}

/* App main grows to fill remaining space */
.app-layout .app-main {
  flex: 1;
  min-width: 0;
}

/* ── Sidebar tabs ───────────────────────────────────────────────────── */

.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 12px;
  gap: 2px;
}

.sidebar-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--fg-muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 4px 12px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.sidebar-tab:hover { color: var(--fg-primary); }

.sidebar-tab--active {
  color: var(--fg-primary);
  border-bottom-color: var(--accent);
}

.activity-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #ff4d6d;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 100px;
  line-height: 1;
}

.sidebar-panel {
  display: flex;
  flex-direction: column;
}

/* ── Activity feed ──────────────────────────────────────────────────── */

.activity-feed {
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 4px;
}

.activity-item {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.activity-item:hover {
  background: var(--bg-secondary);
  border-color: var(--border);
}

.activity-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.activity-item-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.activity-item-type {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 100px;
  flex-shrink: 0;
  white-space: nowrap;
}

.type-pricing_change   { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.2); }
.type-feature_launch   { background: rgba(99,102,241,0.12); color: #818cf8; border: 1px solid rgba(99,102,241,0.2); }
.type-messaging_update { background: rgba(52,211,153,0.1);  color: #34d399; border: 1px solid rgba(52,211,153,0.2); }
.type-new_content      { background: rgba(96,165,250,0.1);  color: #60a5fa; border: 1px solid rgba(96,165,250,0.2); }
.type-general_change   { background: var(--bg-secondary);   color: var(--fg-muted); border: 1px solid var(--border); }

.activity-item-summary {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.activity-item-date {
  font-size: 11px;
  color: var(--fg-muted);
  margin-top: 4px;
}

/* ── Alert preferences ──────────────────────────────────────────────── */

.alert-prefs {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.alert-prefs-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 10px;
}

.alert-prefs-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.alert-pref-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-secondary);
  cursor: pointer;
}

.alert-pref-option input[type="radio"] {
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── Emerging Alternatives ──────────────────────────────────────────── */

.emerging-feed {
  padding: 8px 0;
  overflow-y: auto;
  flex: 1;
}

.emerging-section {
  margin-bottom: 8px;
}

.emerging-section-heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 16px 6px;
  border-bottom: 1px solid var(--border);
}

/* Classification colour tokens */
.emerging-class--direct   { color: #f87171; border-color: rgba(248, 113, 113, 0.2); }
.emerging-class--adjacent { color: #fbbf24; border-color: rgba(251, 191, 36, 0.2); }
.emerging-class--indirect { color: #60a5fa; border-color: rgba(96, 165, 250, 0.2); }
.emerging-class--stealth  { color: #c084fc; border-color: rgba(192, 132, 252, 0.2); }

.emerging-card {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.emerging-card:hover {
  background: rgba(255,255,255,0.03);
}

.emerging-card--saved {
  opacity: 0.75;
}

.emerging-card-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.emerging-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emerging-card-link {
  color: inherit;
  text-decoration: none;
}

.emerging-card-link:hover {
  text-decoration: underline;
  color: var(--accent);
}

.emerging-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.emerging-source-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  color: var(--fg-muted);
}

.emerging-score {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-muted);
}

.emerging-date {
  font-size: 11px;
  color: var(--fg-muted);
  margin-left: auto;
}

.emerging-rationale {
  margin-top: 8px;
  font-size: 12px;
}

.emerging-rationale summary {
  cursor: pointer;
  color: var(--fg-muted);
  font-size: 11px;
  letter-spacing: 0.03em;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.emerging-rationale summary::before {
  content: '▸';
  transition: transform 0.15s;
}

.emerging-rationale[open] summary::before {
  transform: rotate(90deg);
}

.emerging-rationale p {
  margin: 6px 0 0;
  color: var(--fg-secondary);
  line-height: 1.5;
  font-size: 12px;
}

.emerging-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.btn-xs {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
}

.emerging-saved-badge {
  margin-top: 8px;
  font-size: 11px;
  color: #4ade80;
}

.emerging-badge {
  background: #c084fc;
}

/* Radar status bar */
.radar-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  margin: 0 0 10px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 8px;
  gap: 8px;
}

.radar-last-scan {
  font-size: 11px;
  color: var(--fg-muted);
}

.radar-trigger-btn {
  flex-shrink: 0;
  font-size: 11px;
  padding: 3px 10px;
  color: #6366f1;
  border-color: rgba(99, 102, 241, 0.3);
}

.radar-trigger-btn:hover {
  background: rgba(99, 102, 241, 0.1);
}

/* Dismiss prompt */
.dismiss-prompt {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.dismiss-prompt-label {
  font-size: 11px;
  color: var(--fg-muted);
  margin: 0;
  width: 100%;
}

/* ── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .my-briefs-sidebar {
    display: none; /* Collapse sidebar on small screens */
  }
}

@media (max-width: 640px) {
  .app-header { padding: 16px 20px; }
  .app-main { padding: 24px 16px 60px; }
  .panel-header { padding: 28px 24px 20px; }
  .brief-form { padding: 24px 24px 32px; }
  .status-view { padding: 52px 24px; }
  .status-steps { flex-direction: column; gap: 14px; align-items: flex-start; }
  .brief-content { padding: 28px 24px; }
  .brief-toolbar { padding: 16px 20px; }
  .brief-actions { flex-wrap: wrap; }
  .btn-generate { width: 100%; justify-content: center; }
  .app-header-right { gap: 10px; }
  .user-email { display: none; }
  .app-header-tag { display: none; }
}

/* ── Share dropdown menu ──────────────────────────────────────────────────── */

.share-menu-wrapper {
  position: relative;
  display: inline-block;
}

.share-toggle-btn {
  display: flex;
  align-items: center;
  gap: 4px;
}

.share-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #1a1a2e;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  min-width: 188px;
  z-index: 200;
  overflow: hidden;
  animation: shareDropIn 0.12s ease;
}

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

.share-option {
  display: block;
  width: 100%;
  padding: 11px 16px;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--fg-secondary);
  font-size: 13px;
  font-family: var(--font-display);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.share-option:last-child { border-bottom: none; }
.share-option:hover { background: rgba(99,102,241,0.1); color: var(--fg-primary); }

.share-option--twitter { color: #1d9bf0; }
.share-option--twitter:hover { background: rgba(29,155,240,0.1); color: #60b4f7; }

.share-option--linkedin { color: #0a66c2; }
.share-option--linkedin:hover { background: rgba(10,102,194,0.1); color: #4da0e8; }

/* ── Upgrade Modal ───────────────────────────────────────────────────────── */
.modal-card--wide {
  max-width: 620px;
}

.upgrade-header {
  text-align: center;
  margin-bottom: 24px;
}

.upgrade-header-badge {
  display: inline-block;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.upgrade-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--fg-primary);
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}

.upgrade-subtitle {
  font-size: 14px;
  color: var(--fg-muted);
  margin: 0;
}

/* Side-by-side comparison */
.upgrade-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.upgrade-compare-col {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.upgrade-compare-col--pro {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.06);
}

.upgrade-compare-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--fg-muted);
  margin-bottom: 12px;
}

.upgrade-compare-label--pro {
  color: #818cf8;
}

.upgrade-stat-list,
.upgrade-unlock-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upgrade-stat-list li {
  font-size: 13px;
  color: var(--fg-secondary);
}

.upgrade-stat-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg-primary);
  margin-right: 4px;
}

.upgrade-unlock-list li {
  font-size: 13px;
  color: var(--fg-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.upgrade-check {
  color: #4ade80;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

/* Concierge form */
.upgrade-form-section {
  margin-bottom: 16px;
}

.upgrade-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.upgrade-cta {
  font-size: 15px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  transition: opacity 0.15s;
}

.upgrade-cta:hover:not(:disabled) {
  opacity: 0.9;
}

.upgrade-guarantee {
  text-align: center;
  font-size: 12px;
  color: var(--fg-muted);
  margin: 10px 0 0;
}

/* Post-submit confirmation */
.upgrade-confirm {
  text-align: center;
  padding: 8px 0 16px;
}

.upgrade-confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.upgrade-confirm-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg-primary);
  margin: 0 0 8px;
}

.upgrade-confirm-body {
  font-size: 13px;
  color: var(--fg-secondary);
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto;
}

.upgrade-footer {
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

@media (max-width: 520px) {
  .upgrade-compare { grid-template-columns: 1fr; }
  .upgrade-form-row { grid-template-columns: 1fr; }
  .modal-card--wide { padding: 24px 16px; }
}

/* ── Soft cap warning banner ─────────────────────────────────────────────── */
.cap-warning-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--fg-secondary);
  margin-bottom: 14px;
}

.cap-warning-sep {
  color: var(--border);
}

.cap-warning-cta {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.15s;
}

.cap-warning-cta:hover {
  text-decoration-color: var(--accent);
}

/* ── LinkedIn Share Modal ──────────────────────────────────────────────────── */
.linkedin-modal {
  max-width: 660px;
}

.linkedin-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.linkedin-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(10, 102, 194, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.linkedin-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--fg-primary);
  margin: 0 0 4px;
}

.linkedin-modal-subtitle {
  font-size: 13px;
  color: var(--fg-secondary);
  margin: 0;
}

.linkedin-card-preview {
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.linkedin-card-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-secondary);
  font-size: 13px;
  padding: 24px;
}

.linkedin-card-img {
  width: 100%;
  height: auto;
  display: block;
}

.spinner-ring--sm {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

.linkedin-post-section {
  margin-bottom: 20px;
}

.linkedin-post-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-primary);
  margin-bottom: 8px;
}

.linkedin-post-hint {
  font-weight: 400;
  color: var(--fg-muted);
}

.linkedin-post-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-secondary);
  font-size: 13px;
  padding: 12px 0;
}

.linkedin-post-textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg-primary);
  font-size: 14px;
  line-height: 1.6;
  padding: 12px 14px;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.15s;
}

.linkedin-post-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.linkedin-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.linkedin-post-cta {
  background: #0a66c2;
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
  text-decoration: none;
}

.linkedin-post-cta:hover:not([style*="pointer-events:none"]) {
  background: #0860b8;
  opacity: 1;
}

@media (max-width: 520px) {
  .linkedin-modal { max-width: 100%; }
  .linkedin-modal-actions { flex-direction: column; }
  .linkedin-post-cta { width: 100%; text-align: center; justify-content: center; }
}

/* ── Sales Objection Counters ──────────────────────────────────────────── */

/* Section wrapper injected by JS after "Sales Objection Counters" h2 */
.objection-section {
  margin: 0 0 32px;
}

.objection-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.objection-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-secondary);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.objection-copy-btn:hover {
  border-color: var(--accent);
  color: var(--fg-primary);
  background: var(--accent-glow);
}

.objection-paywall {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}

.objection-paywall-blur {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
  opacity: 0.5;
}

.objection-paywall-gate {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(to bottom, rgba(10,10,15,0) 0%, rgba(10,10,15,0.85) 50%, rgba(10,10,15,0.98) 100%);
  text-align: center;
  padding: 24px;
}

.objection-paywall-label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-primary);
  letter-spacing: -0.01em;
}

.objection-paywall-sub {
  font-size: 13px;
  color: var(--fg-secondary);
  max-width: 320px;
  line-height: 1.5;
}

.objection-paywall-btn {
  margin-top: 4px;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.objection-paywall-btn:hover { opacity: 0.88; }

/* Individual objection card */
.objection-card {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.objection-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.objection-category-badge {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 100px;
  flex-shrink: 0;
}

.objection-cat--pricing    { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.2); }
.objection-cat--feature    { background: rgba(99,102,241,0.12);  color: #818cf8; border: 1px solid rgba(99,102,241,0.2); }
.objection-cat--brand      { background: rgba(244,114,182,0.12); color: #f472b6; border: 1px solid rgba(244,114,182,0.2); }
.objection-cat--integration{ background: rgba(52,211,153,0.1);   color: #34d399; border: 1px solid rgba(52,211,153,0.2); }
.objection-cat--fit        { background: rgba(96,165,250,0.1);   color: #60a5fa; border: 1px solid rgba(96,165,250,0.2); }

.objection-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.objection-row {
  display: grid;
  gap: 3px;
}

.objection-row-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.objection-row-label--objection { color: #f87171; }
.objection-row-label--counter   { color: #4ade80; }
.objection-row-label--land      { color: var(--accent-bright); }

.objection-row-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-secondary);
}

.objection-row-text strong { color: var(--fg-primary); }

/* Competitor group heading inside objection section */
.objection-competitor-heading {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-primary);
  padding: 8px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.objection-competitor-heading::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ── Shared Brief Conversion Banner ──────────────────────────────────────── */
.shared-brief-banner {
  background: linear-gradient(90deg, rgba(99,102,241,0.15), rgba(99,102,241,0.08));
  border-bottom: 1px solid rgba(99,102,241,0.2);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.shared-brief-banner-text {
  font-size: 13px;
  color: var(--fg-secondary);
}

.shared-brief-banner-cta {
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.shared-brief-banner-cta:hover {
  opacity: 0.88;
}

@media (max-width: 520px) {
  .shared-brief-banner { padding: 10px 16px; gap: 10px; }
  .shared-brief-banner-text { font-size: 12px; }
}

/* ── Artifact chain breadcrumb ──────────────────────────────────────── */

.artifact-chain {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0 14px;
  margin-bottom: 4px;
}

.artifact-chain-step {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: none;
  cursor: default;
  text-decoration: none;
  transition: opacity 0.15s, background 0.15s;
  letter-spacing: 0.01em;
}

.artifact-chain-step--active {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
  cursor: default;
}

.artifact-chain-step--done {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  cursor: pointer;
}

.artifact-chain-step--done:hover {
  opacity: 0.85;
  background: rgba(34, 197, 94, 0.2);
}

.artifact-chain-step--ghost {
  background: rgba(99, 102, 241, 0.06);
  color: #52525b;
  cursor: pointer;
  border: 1px dashed rgba(99, 102, 241, 0.3);
}

.artifact-chain-step--ghost:hover {
  color: #6366f1;
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
}

.artifact-chain-sep {
  color: #3f3f46;
  font-size: 12px;
  font-weight: 500;
  user-select: none;
}

/* ── Post-artifact CTA strip ────────────────────────────────────────── */

.post-brief-cta {
  margin-top: 32px;
  padding: 20px 24px;
  background: #111118;
  border: 1px solid #27272a;
  border-radius: 12px;
}

.post-brief-cta-label {
  font-size: 11px;
  font-weight: 600;
  color: #52525b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.post-brief-cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.post-brief-cta-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  min-width: 180px;
}

.post-brief-cta-btn .cta-icon {
  font-size: 18px;
  margin-bottom: 2px;
}

.post-brief-cta-btn .cta-sub {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.7;
  white-space: normal;
  line-height: 1.4;
}

.post-brief-cta--loop {
  border-color: rgba(99, 102, 241, 0.2);
  background: rgba(99, 102, 241, 0.04);
}

@media (max-width: 600px) {
  .artifact-chain { flex-wrap: wrap; gap: 4px; }
  .post-brief-cta-actions { flex-direction: column; }
  .post-brief-cta-btn { min-width: unset; width: 100%; }
}

/* ── Home Feed ──────────────────────────────────────────────────────── */

.home-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Greeting strip */
.feed-greeting {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feed-greeting-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--fg-primary);
  letter-spacing: -0.02em;
}

.feed-stat-strip {
  font-size: 13px;
  color: var(--fg-muted);
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

/* Feed sections */
.feed-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.feed-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}

.feed-section-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-primary);
  letter-spacing: -0.01em;
  flex: 1;
}

.feed-section-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.feed-section-badge--purple {
  background: rgba(124, 106, 255, 0.15);
  color: var(--accent-bright);
}

.feed-section-badge--new {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.feed-section-body {
  padding: 12px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

.feed-empty {
  font-size: 13px;
  color: var(--fg-muted);
  font-style: italic;
  padding: 8px 0;
}

/* Change cards */
.feed-change-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feed-change-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.feed-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge--amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge--indigo { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.badge--green { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge--blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.badge--grey { background: rgba(255, 255, 255, 0.06); color: var(--fg-muted); }
.feed-badge--source { background: rgba(255, 255, 255, 0.06); color: var(--fg-secondary); }
.feed-badge--class { background: rgba(124, 106, 255, 0.1); color: var(--accent-bright); }

.feed-change-host {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-secondary);
  font-family: var(--font-display);
}

.feed-change-time {
  font-size: 12px;
  color: var(--fg-muted);
  margin-left: auto;
}

.feed-change-summary {
  font-size: 13px;
  color: var(--fg-secondary);
  line-height: 1.5;
}

.feed-change-link {
  font-size: 12px;
  color: var(--accent-bright);
  text-decoration: none;
  font-weight: 600;
  align-self: flex-start;
  transition: color 0.15s;
}

.feed-change-link:hover { color: #fff; }

/* Emerging alternative cards */
.feed-alt-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feed-alt-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.feed-alt-score {
  font-size: 11px;
  color: var(--fg-muted);
  margin-left: auto;
}

.feed-alt-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--fg-primary);
  letter-spacing: -0.01em;
}

.feed-alt-url {
  font-size: 12px;
  color: var(--fg-muted);
}

.feed-alt-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* Suggestion cards */
.feed-sugg-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feed-sugg-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-bright);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.feed-sugg-desc {
  font-size: 13px;
  color: var(--fg-secondary);
}

.feed-sugg-host {
  font-size: 12px;
  color: var(--fg-muted);
}

/* CTA card (no watches) */
.feed-cta-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(124, 106, 255, 0.06);
  border: 1px solid rgba(124, 106, 255, 0.2);
  border-radius: 10px;
  padding: 14px 16px;
}

.feed-cta-icon { font-size: 24px; flex-shrink: 0; }

.feed-cta-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: var(--fg-secondary);
}

.feed-cta-text strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--fg-primary);
}

/* Pulse card */
.feed-pulse-card {
  background: rgba(124, 106, 255, 0.06);
  border: 1px solid rgba(124, 106, 255, 0.15);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feed-pulse-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--fg-primary);
  letter-spacing: -0.01em;
}

.feed-pulse-snippet {
  font-size: 13px;
  color: var(--fg-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-pulse-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-bright);
  text-decoration: none;
  align-self: flex-start;
  margin-top: 2px;
}

.feed-pulse-link:hover { color: #fff; }

/* Divider between feed and generator */
.feed-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}

.feed-divider::before,
.feed-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.feed-divider-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  white-space: nowrap;
}

/* Extra small button variant */
.btn-xs {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
}

/* Mobile stacking for feed */
@media (max-width: 600px) {
  .feed-cta-card { flex-direction: column; align-items: flex-start; }
  .feed-alt-actions { flex-direction: column; }
  .feed-change-time { margin-left: 0; }
}

/* ── Publish toggle (Library) ───────────────────────────────────────── */
/* Shown below the brief toolbar for logged-in owners of completed briefs */

.lib-publish-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 6px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* iOS-style toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 20px;
  transition: background 0.18s;
  cursor: pointer;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.18s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-bright);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(16px);
}

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.lib-publish-toggle-label {
  font-size: 12px;
  color: var(--fg-secondary);
  flex: 1;
}

.lib-publish-toggle-label a {
  color: var(--accent-bright);
  text-decoration: none;
}

.lib-publish-toggle-label a:hover { text-decoration: underline; }

.lib-publish-toggle-url {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-bright);
  text-decoration: none;
  white-space: nowrap;
}

.lib-publish-toggle-url:hover { text-decoration: underline; }

/* ── Pro badge (header user menu) ───────────────────────────────────────── */
.pro-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: linear-gradient(135deg, #7c6aff 0%, #a855f7 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 20px;
  line-height: 1.4;
}

/* ── Upgrade success toast (fixed bottom center) ─────────────────────────── */
.upgrade-success-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #18181f;
  border: 1px solid #7c6aff;
  border-radius: 10px;
  padding: 14px 20px;
  color: #f4f4f5;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 24px rgba(124,106,255,0.25);
  white-space: nowrap;
}

.upgrade-success-icon {
  width: 22px;
  height: 22px;
  background: #7c6aff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.upgrade-toast-close {
  background: none;
  border: none;
  color: #71717a;
  cursor: pointer;
  font-size: 12px;
  padding: 0 0 0 6px;
  line-height: 1;
}

.upgrade-toast-close:hover { color: #f4f4f5; }

/* ── Upgrade modal Stripe CTA (replaces waitlist form) ───────────────────── */
.upgrade-cta.btn-primary {
  display: block;
  text-align: center;
  text-decoration: none;
  font-size: 15px;
  padding: 14px 24px;
}

/* ── Brief Freshness Badge ────────────────────────────────────────────────── */
.freshness-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: help;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  transition: opacity 0.2s;
}
.freshness-badge:hover { opacity: 0.85; }

/* Sidebar freshness dot next to each brief */
.sidebar-freshness-dot {
  font-size: 10px;
  font-weight: 600;
  cursor: help;
  margin-left: 4px;
}

/* Refresh Brief button — subtle ghost style with amber accent when stale */
.btn-refresh-brief {
  border-color: rgba(245,158,11,0.4);
  color: #f59e0b;
}
.btn-refresh-brief:hover {
  border-color: #f59e0b;
  background: rgba(245,158,11,0.08);
}

/* ── Brief Diff Modal ─────────────────────────────────────────────────────── */
.diff-modal-card {
  max-width: 900px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.diff-modal-header {
  margin-bottom: 16px;
}
.diff-modal-badge {
  display: inline-block;
  background: rgba(99,102,241,0.15);
  color: #818cf8;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.diff-modal-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
  color: #f4f4f5;
}
.diff-modal-subtitle {
  margin: 0;
  font-size: 13px;
  color: #71717a;
}
.diff-modal-body {
  flex: 1;
  overflow-y: auto;
  border: 1px solid #27272a;
  border-radius: 8px;
  margin-bottom: 16px;
  max-height: 55vh;
}
.diff-modal-footer {
  display: flex;
  align-items: center;
  gap: 16px;
}
.diff-modal-hint {
  font-size: 12px;
  color: #52525b;
}
.diff-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 32px;
  color: #71717a;
  font-size: 13px;
}
.diff-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 200px;
}
.diff-col {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 11px;
  line-height: 1.6;
  overflow-x: auto;
}
.diff-col--before { border-right: 1px solid #27272a; }
.diff-col-header {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #52525b;
  border-bottom: 1px solid #27272a;
  background: #111118;
  position: sticky;
  top: 0;
}
.diff-line {
  padding: 0 12px;
  white-space: pre;
  color: #a1a1aa;
}
.diff-line--removed {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  text-decoration: line-through;
  text-decoration-color: rgba(239,68,68,0.4);
}
.diff-line--added {
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
}
