/* ============================================================
   SENTINEL · ARGUS · BRAND + SHELL
   ────────────────────────────────────────────────────────────
   The "magistrate's chamber" treatment of the whole app shell.
   Layered on top of styles.css + styles-extra.css — overrides
   the header, tabs, kickers, ingest cards, signal cards, and
   method strip without touching the existing tab modules.

   Direction A · Argus, the all-seeing watcher.
   Sentinel stays as the system name; Argus is the second-layer
   identity that runs through the masthead, colophon, and copy.
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   FONTS — add Frank Ruhl Libre for the masthead serif moments.
   The font is loaded in index.html / login.html.
   ──────────────────────────────────────────────────────────── */
:root {
  --font-serif: 'Heebo', system-ui, sans-serif;
}

/* ────────────────────────────────────────────────────────────
   APP SHELL · base
   ──────────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ────────────────────────────────────────────────────────────
   APP HEADER · the masthead
   ──────────────────────────────────────────────────────────── */
.app-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 22px 0 18px;
  margin: 0 -28px;
  padding-left: 28px;
  padding-right: 28px;
  border-bottom: 1px solid var(--slate-1);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
/* Replace the old "B" gradient square with the actual pumpkin logo. */
.app-brand-mark {
  display: none;             /* hide legacy square */
}
.app-brand .brand-pumpkin {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.app-brand .brand-glyph {
  width: 26px;
  height: 26px;
  color: var(--gold);
  opacity: 0.9;
  flex-shrink: 0;
}
.app-brand .brand-wordmark {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.app-brand .brand-line-1 {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}
.app-brand .brand-line-2 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ivory);
}
.app-brand .brand-line-2 .sub-name {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate-3);
  margin-right: 10px;
  padding-right: 10px;
  border-right: 1px solid var(--slate-2);
}

.app-tagline {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--gold);
  text-align: center;
  letter-spacing: 0.04em;
  line-height: 1.4;
  max-width: 320px;
  text-wrap: balance;
  border-right: 1px solid var(--slate-1);
  border-left: 1px solid var(--slate-1);
  padding: 4px 22px;
  justify-self: center;
}

/* Replace the old user block — quieter, two-line */
.app-user {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 11.5px;
  color: var(--ivory-dim);
  line-height: 1.5;
}
.app-user #user-email {
  color: var(--ivory);
  font-weight: 500;
}
.app-user .session-meta {
  font-family: var(--font-display);
  font-size: 9.5px;
  color: var(--slate-3);
  letter-spacing: 0.08em;
}
.app-user .app-signout {
  background: transparent;
  border: 1px solid var(--slate-2);
  color: var(--ivory-dim);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 120ms, color 120ms, background 120ms;
}
.app-user .app-signout:hover {
  border-color: var(--rose);
  color: var(--rose);
  background: rgba(224, 115, 140, 0.05);
}

/* ────────────────────────────────────────────────────────────
   TABS · refined editorial nav with Roman numerals
   ──────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  padding: 0;
  margin: 0 -28px 28px;
  padding: 0 28px;
  border-bottom: 1px solid var(--slate-1);
  background: rgba(255, 255, 255, 0.012);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  background: transparent;
  border: none;
  color: var(--slate-3);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 16px 18px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 140ms, border-color 140ms;
  white-space: nowrap;
  cursor: pointer;
}
.tab:hover { color: var(--ivory); }
.tab.is-active {
  color: var(--ivory);
  border-bottom-color: var(--gold);
}
.tab .tab-num {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0;
  text-transform: none;
}
.tab .tab-label {
  /* the human-readable Hebrew label */
}
.tab .tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  background: var(--teal);
  color: var(--bg-0);
}
.tab .tab-badge--zero {
  background: var(--slate-1);
  color: var(--slate-3);
}

/* ────────────────────────────────────────────────────────────
   APP MAIN
   ──────────────────────────────────────────────────────────── */
.app-main {
  flex: 1;
  padding-bottom: 56px;
}

/* ────────────────────────────────────────────────────────────
   KICKERS — globally restyled from `// mono` to editorial caps.
   The legacy `// ` prefix in the text gets quietly hidden via
   .kicker-clean variants; the old strings keep working but lose
   the prefix visually if it's the first node.
   ──────────────────────────────────────────────────────────── */
.kicker {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}

/* Editorial section eyebrow used in tab headers */
.tab-eyebrow {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.tab-eyebrow .num {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--slate-2);
}

/* Page-title block sitting under the eyebrow */
.tab-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--ivory);
  text-wrap: balance;
}
.tab-lede {
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ivory-dim);
  margin: 0 0 28px;
  max-width: 700px;
  text-wrap: pretty;
}

/* ────────────────────────────────────────────────────────────
   COLOPHON · the method strip at the foot
   ──────────────────────────────────────────────────────────── */
.method-strip {
  margin: 0 -28px;
  padding: 18px 28px 20px;
  border-top: 1px solid var(--slate-1);
  background: rgba(0, 0, 0, 0.18);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}
.method-strip .colophon-method {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  flex: 1;
  min-width: 0;
}
.method-strip .colophon-label {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--gold);
  white-space: nowrap;
}
.method-strip .colophon-mark {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--slate-3);
  white-space: nowrap;
  font-weight: 500;
}
/* Each layer is a small tracked-caps token */
.method-strip .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.method-strip .chip .chip-num {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.method-strip .chip-dot { display: none; }
.method-strip .chip-sep {
  display: inline-block;
  width: 1px;
  height: 12px;
  background: var(--slate-2);
  vertical-align: middle;
  opacity: 0.5;
  margin: 0 4px;
}

/* ────────────────────────────────────────────────────────────
   STREAM — refined ingest cards (still functional, less boxy)
   ──────────────────────────────────────────────────────────── */
.ingest-card {
  background: var(--bg-1);
  border: 1px solid var(--slate-1);
  border-radius: 4px;
  padding: 22px 24px;
  margin-bottom: 22px;
}
.ingest-card h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.005em;
  margin: 0 0 4px;
  color: var(--ivory);
}
.ingest-card .sub {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ivory-dim);
  line-height: 1.6;
  margin: 0 0 16px;
}
.ingest-card textarea {
  width: 100%;
  min-height: 110px;
  background: var(--bg-0);
  border: 1px solid var(--slate-1);
  border-radius: 3px;
  padding: 12px 14px;
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.65;
  resize: vertical;
}
.ingest-card textarea:focus {
  outline: none;
  border-color: var(--teal);
}
.ingest-card .ingest-row {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 10px;
  margin-top: 12px;
}
.ingest-card .ingest-row input,
.ingest-card .ingest-row select {
  background: var(--bg-0);
  border: 1px solid var(--slate-1);
  border-radius: 3px;
  padding: 10px 12px;
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: 13px;
}
.ingest-card .ingest-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ingest-card .btn {
  background: var(--teal);
  color: var(--bg-0);
  border: none;
  border-radius: 3px;
  padding: 10px 22px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: filter 120ms;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.ingest-card .btn:hover { filter: brightness(1.08); }
.ingest-card .btn:disabled { background: var(--slate-2); color: var(--ivory-dim); cursor: not-allowed; }
.ingest-card .btn--ghost {
  background: transparent;
  border: 1px solid var(--slate-2);
  color: var(--ivory);
}
.ingest-card .btn--ghost:hover {
  border-color: var(--ivory-dim);
  background: rgba(255,255,255,0.03);
}

/* URL ingest card variant: keep its accent */
.url-ingest-card {
  background: linear-gradient(180deg, var(--bg-1), rgba(94, 234, 212, 0.025));
  border-color: rgba(94, 234, 212, 0.25);
}

/* ────────────────────────────────────────────────────────────
   SIGNAL CARDS — broadsheet column feel
   ──────────────────────────────────────────────────────────── */
.signals-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.signal-card {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--slate-1);
  border-radius: 0;
  padding: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.signal-card:last-child { border-bottom: none; }
.signal-card.is-inbox {
  background: linear-gradient(180deg, transparent, rgba(167, 139, 250, 0.025));
  padding-right: 14px;
  padding-left: 14px;
  margin: 0 -14px;
  border-radius: 3px;
  border-left: 2px solid var(--purple);
  border-bottom: 1px solid var(--slate-1);
}

.signal-card .signal-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.signal-card .signal-head .num {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.06em;
  font-weight: 500;
}
.signal-card .signal-head h3 {
  flex: 1;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--ivory);
  text-wrap: pretty;
}
.signal-card .signal-head .mono {
  font-family: var(--font-display);
  font-size: 10.5px;
  color: var(--slate-3);
}
.signal-card .signal-summary {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ivory-dim);
  text-wrap: pretty;
}
.signal-card .signal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 2px;
}
.signal-card .signal-chip {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 0;
  background: transparent;
  border: none;
  color: var(--ivory-dim);
  white-space: nowrap;
}
.signal-card .signal-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--slate-1);
  align-items: center;
}
.signal-card .signal-action {
  background: transparent;
  border: 1px solid var(--slate-2);
  color: var(--ivory-dim);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 2px;
  letter-spacing: 0.04em;
  transition: all 140ms;
  cursor: pointer;
}
.signal-card .signal-action:hover {
  color: var(--ivory);
  border-color: var(--ivory-dim);
}
.signal-card .signal-action.is-approve:hover { color: var(--teal); border-color: var(--teal); }
.signal-card .signal-action.is-archive:hover { color: var(--gold); border-color: var(--gold); }
.signal-card .signal-action.is-delete:hover  { color: var(--rose); border-color: var(--rose); }
.signal-card .signal-source-link {
  margin-right: auto;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--slate-3);
  text-decoration: none;
}
.signal-card .signal-source-link:hover { color: var(--ivory-dim); }

/* ────────────────────────────────────────────────────────────
   INBOX / SOURCES TOOLBARS · refresh
   ──────────────────────────────────────────────────────────── */
.inbox-toolbar,
.sources-toolbar {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--slate-1);
  border-radius: 3px;
  padding: 14px 18px;
  margin-bottom: 22px;
}
.sources-toolbar .meta {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}
.sources-toolbar .meta strong { color: var(--ivory); }

/* ────────────────────────────────────────────────────────────
   GENERIC BUTTONS (outside the ingest card)
   ──────────────────────────────────────────────────────────── */
.btn {
  background: var(--teal);
  color: var(--bg-0);
  border: none;
  border-radius: 3px;
  padding: 8px 16px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: filter 120ms;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { background: var(--slate-2); color: var(--ivory-dim); cursor: not-allowed; filter: none; }
.btn--ghost {
  background: transparent;
  border: 1px solid var(--slate-2);
  color: var(--ivory);
  font-weight: 500;
}
.btn--ghost:hover {
  border-color: var(--ivory-dim);
  background: rgba(255,255,255,0.03);
}

/* ────────────────────────────────────────────────────────────
   LOGIN PAGE · brand alignment
   ──────────────────────────────────────────────────────────── */
.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--slate-1);
}
.login-brand-mark {
  /* replaced by inline image; hide the legacy gradient square */
  display: none;
}
.login-brand .login-pumpkin {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}
.login-brand .login-glyph {
  width: 22px;
  height: 22px;
  color: var(--gold);
  opacity: 0.9;
  flex-shrink: 0;
}
.login-brand-title {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}
.login-brand-sub {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ivory);
  margin-top: 2px;
}
.login-brand-sub .sub-name {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate-3);
  margin-right: 8px;
  padding-right: 8px;
  border-right: 1px solid var(--slate-2);
}

/* ────────────────────────────────────────────────────────────
   QUERY TAB HEAD — keep clean, drop legacy kicker
   ──────────────────────────────────────────────────────────── */
.query-tab-head h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 30px;
  letter-spacing: -0.015em;
}
.query-tab-head .lede {
  font-family: var(--font-display);
  font-size: 14.5px;
}

/* ────────────────────────────────────────────────────────────
   THINKING / LOADING — minor refresh
   ──────────────────────────────────────────────────────────── */
.thinking-label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
}

/* ────────────────────────────────────────────────────────────
   MOBILE / NARROW
   ──────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .app-header {
    grid-template-columns: auto 1fr;
    gap: 16px;
  }
  .app-tagline { display: none; }
  .app-user { font-size: 10.5px; }
  .app-user .session-meta { display: none; }
}
