/* ThreadPoint Social Media Watch — product site (smw-web layer).
 * Brand tokens match the ThreadPoint identity: Racing Sans One headings,
 * Source Sans 3 body, primary #ac2929 / secondary #144579.
 */
:root {
  --tp-primary: #ac2929;      /* brand red */
  --tp-primary-dark: #8c1f1f;
  --tp-secondary: #144579;    /* brand blue */
  --tp-secondary-dark: #0f3560;
  --tp-ink: #333131;
  --tp-ink-soft: #666262;
  --tp-bg: #f8f6f6;
  --tp-card: #ffffff;
  --tp-border: #e5e0e0;
  --tp-ok: #1e7e34;
  --tp-amber: #b45309;      /* beta accent (SMW-29) */
  --tp-amber-bg: #fdf3e7;
  --tp-amber-line: #f0d9b8;
  --tp-warn: #9a6700;
  --tp-err: #ac2929;
  --tp-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Source Sans 3", -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--tp-ink);
  background: var(--tp-bg);
  line-height: 1.55;
}
h1, h2, h3, .brand { font-family: "Racing Sans One", Georgia, serif; font-weight: 400; }

/* beta mode (SMW-29) — the pill in the header + the amber bar */
.beta-badge {
  display: inline-block; padding: 2px 8px; margin-left: 8px;
  border: 1.5px solid var(--tp-amber); border-radius: 999px;
  color: var(--tp-amber); font-family: "Source Sans 3", sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: .8px; line-height: 1.4;
  vertical-align: middle; white-space: nowrap;
}
.watch-tabs .tab { border: 1px solid var(--tp-border); border-bottom: none; color: var(--tp-ink-soft); background: transparent; }
.watch-tabs .tab.active { background: var(--tp-card); color: var(--tp-primary); font-weight: 700; border-color: var(--tp-border); margin-bottom: -1px; }
.delivery-row.dimmed { opacity: .45; }
.delivery-row input:disabled { cursor: not-allowed; }

.beta-bar {
  background: var(--tp-amber-bg); border-bottom: 1px solid var(--tp-amber-line);
  color: #92400e; text-align: center; font-size: 13px; padding: 6px 16px;
}

/* header */
.site-header {
  background: var(--tp-card);
  border-bottom: 1px solid var(--tp-border);
  position: sticky; top: 0; z-index: 10;
}
.header-inner {
  max-width: 1080px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tp-primary); font-size: 21px; }
.brand img { height: 34px; width: auto; }
.nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--tp-secondary); text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 6px 10px; border-radius: 6px;
}
.nav a.active { background: var(--tp-secondary); color: #fff; }
.nav a:not(.active):hover { background: #eef2f8; }

main { max-width: 1080px; margin: 0 auto; padding: 26px 20px 60px; }

/* landing hero */
.hero {
  background: linear-gradient(135deg, #fdf0f0 0%, #eef2f8 100%);
  border: 1px solid var(--tp-border);
  border-radius: 14px;
  padding: 44px 36px;
  margin: 4px 0 26px;
}
.hero h1 { font-size: 34px; color: var(--tp-primary); margin: 0 0 10px; }
.hero p { font-size: 17px; color: var(--tp-ink-soft); max-width: 640px; margin: 0 0 22px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 10px 20px; border-radius: 8px;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; font-family: "Source Sans 3", sans-serif;
}
.btn.primary { background: var(--tp-primary); color: #fff; }
.btn.primary:hover { background: var(--tp-primary-dark); }
.btn.secondary { background: var(--tp-card); color: var(--tp-secondary); border-color: var(--tp-secondary); }
.btn.secondary:hover { background: #eef2f8; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 0 0 26px; }
.step { background: var(--tp-card); border: 1px solid var(--tp-border); border-radius: 10px; padding: 18px; }
.step b { display: block; color: var(--tp-primary); font-size: 15px; margin-bottom: 6px; }
.step span { color: var(--tp-ink-soft); font-size: 14px; }

/* forms */
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; color: var(--tp-ink); }
input[type=text], input[type=email], input[type=number], input[type=password] {
  width: 100%; max-width: 460px; padding: 9px 12px; border: 1px solid var(--tp-border);
  border-radius: 8px; font-size: 15px; font-family: inherit; background: var(--tp-card); color: var(--tp-ink);
}
input:focus { outline: 2px solid var(--tp-secondary); outline-offset: 1px; }
.interval { display: flex; flex-wrap: wrap; gap: 14px; margin: 4px 0 4px; }
.interval label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; cursor: pointer; margin: 0; }
.actions { display: flex; gap: 10px; margin-top: 18px; }

/* cards / tables */
.card { background: var(--tp-card); border: 1px solid var(--tp-border); border-radius: 10px; padding: 20px; }
.card h2 { margin: 0 0 12px; font-size: 20px; color: var(--tp-secondary); }
table { width: 100%; border-collapse: collapse; background: var(--tp-card); border: 1px solid var(--tp-border); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--tp-border); font-size: 14px; }
th { background: #faf8f8; color: var(--tp-ink-soft); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
tr:last-child td { border-bottom: none; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: #f7f9fc; }

/* The watches/runs tables — the UI/UX table rules: the two tables share
   the SAME first five columns (keyword · platform · type · interval ·
   status) with identical heading text AND column widths, plus a shared
   WHEN column (scheduled watches = the next scheduled run; recent runs =
   the run time). Fixed widths, no-wrap headers, the truncation bubble
   (hover-into shows the full text, leave dismisses). */
table.cols-watches, table.cols-runs { table-layout: fixed; }
.cols-watches .c-kw, .cols-runs .c-kw { width: 26%; }
.cols-watches .c-pf, .cols-runs .c-pf { width: 10%; }
.cols-watches .c-ty, .cols-runs .c-ty { width: 11%; }
.cols-watches .c-iv, .cols-runs .c-iv { width: 11%; }
.cols-watches .c-st, .cols-runs .c-st { width: 12%; }
.cols-watches .c-when, .cols-runs .c-when { width: 15%; }
.cols-watches .c-act { width: 15%; }
.cols-runs .c-res { width: 15%; }
th { white-space: nowrap; }
td.cell-kw { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.cell-actions { white-space: nowrap; }
td.cell-actions .btn, td .chip { white-space: nowrap; }
.cell-popover {
  position: fixed; z-index: 50; max-width: 320px;
  background: #fff; border: 1px solid var(--tp-secondary); border-radius: 6px;
  padding: 8px 10px; font-size: 13px; line-height: 1.45; color: var(--tp-ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .14); pointer-events: none; white-space: normal;
}

/* status badges + banners */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.ok { background: #e6f4ea; color: var(--tp-ok); }
.badge.warn { background: #fdf3d8; color: var(--tp-warn); }
.badge.err { background: #fdecea; color: var(--tp-err); }
.banner { padding: 10px 14px; border-radius: 8px; font-size: 14px; margin: 0 0 14px; }
.banner.warn { background: #fdf6ec; border-left: 3px solid var(--tp-warn); color: var(--tp-ink); }
.banner.err { background: #fdecea; border-left: 3px solid var(--tp-err); color: var(--tp-ink); }
.banner.ok { background: #e6f4ea; border-left: 3px solid var(--tp-ok); color: var(--tp-ink); }

pre.result {
  background: #1e1e1e; color: #d8d8d8; padding: 14px; border-radius: 8px;
  font-family: var(--tp-mono); font-size: 13px; overflow: auto; white-space: pre-wrap;
  margin: 14px 0 0;
}
pre.result .ok { color: #6ee77a; }
pre.result .err { color: #ff8080; }
.muted { color: var(--tp-ink-soft); font-size: 13px; }
/* header account chip (Account P1) */
.account-chip { position: relative; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px; border: 1px solid var(--tp-border); border-radius: 999px; background: var(--tp-card); }
.account-chip:hover { border-color: var(--tp-secondary); }
.account-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--tp-secondary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.account-meta { display: flex; flex-direction: column; line-height: 1.15; }
.account-meta b { font-size: 13px; color: var(--tp-ink); }
.account-email { font-size: 11px; color: var(--tp-ink-soft); }
.account-caret { color: var(--tp-ink-soft); display: inline-flex; align-items: center; }
.account-menu { position: absolute; top: calc(100% + 6px); right: 0; background: var(--tp-card); border: 1px solid var(--tp-border); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.12); min-width: 180px; z-index: 50; overflow: hidden; }
.account-menu a { display: block; padding: 10px 14px; color: var(--tp-ink); text-decoration: none; font-size: 14px; }
.account-menu a:hover { background: #eef2f8; }
.empty { padding: 26px; text-align: center; color: var(--tp-ink-soft); }

footer { border-top: 1px solid var(--tp-border); padding: 12px; text-align: center; color: var(--tp-ink-soft); font-size: 12px; }
