/* ==========================================================================
   FORTAL MARKETING INTELLIGENCE , design system
   Aesthetic: Spotify Design editorial
   - Off-white paper, near-black ink, single confident green accent
   - Inter (Variable) standing in for Circular Std at display sizes
   - Oversized headlines, tight leading, generous bands of whitespace
   - No shadows, no gradients, no card chrome , content carries itself
   - Pill buttons, single-line rules, bold flat colour where it earns it
   ========================================================================== */

:root {
  /* Palette */
  --paper:        #f6f6f4;     /* Off-white page */
  --paper-2:      #efeeea;     /* Subtle band */
  --paper-3:      #e6e5e0;     /* Hover / pressed */
  --ink:          #121212;     /* Spotify black */
  --ink-2:        #2c2c2c;
  --ink-3:        #6a6a6a;
  --ink-4:        #a0a0a0;
  --rule:         #121212;
  --rule-soft:    #d8d7d2;

  --green:        #1ed760;     /* Spotify green */
  --green-press:  #1ab84e;
  --green-soft:   #d6f5e2;
  --green-ink:    #0e3b1d;

  --warn:         #d4a72c;
  --danger:       #c1432a;

  /* Type */
  --display:  'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sans:     'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:     'IBM Plex Mono', 'JetBrains Mono', 'Menlo', 'Consolas', monospace;
  --serif:    var(--display);  /* keep .serif class working; same family */

  /* Type scale (Spotify Design's display sizes are big , embrace it) */
  --t-mega:   clamp(3.5rem, 9vw, 7.5rem);
  --t-h1:     clamp(2.6rem, 5.5vw, 4.4rem);
  --t-h2:     clamp(1.6rem, 2.6vw, 2.2rem);
  --t-h3:     1.2rem;
  --t-body:   1rem;
  --t-small:  0.875rem;
  --t-eyebrow: 0.72rem;

  --shell-max: 1280px;
  --gutter:    36px;

  /* Inter optical settings , gives the warm, slightly geometric feel */
  font-feature-settings: 'cv11', 'ss03', 'ss01';
  font-variant-ligatures: common-ligatures;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: var(--t-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--ink-4);
}
a:hover {
  color: var(--green-press);
  text-decoration-color: var(--green);
}

/* Headings , Inter at heavy weight is the workhorse */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.02;
  color: var(--ink);
}
h1 { font-size: var(--t-h1); font-weight: 900; letter-spacing: -0.03em; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -0.015em; line-height: 1.15; }
h4 { font-size: 1rem; }

p { font-size: var(--t-body); }

.mono {
  font-family: var(--mono);
  font-size: 0.85em;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--display);
  font-size: var(--t-eyebrow);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Keep the class working but restyle to match: no actual serif, just heavier display */
.serif { font-family: var(--display); font-weight: 700; letter-spacing: -0.015em; }


/* ============================ Layout ===================================== */

.shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.masthead {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 28px 0 24px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--rule-soft);
}

.brand {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--green-press); }
.brand .dot { color: var(--green); }

.masthead .meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-3);
  text-align: right;
  line-height: 1.5;
}

.signout { display: inline; }
.signout button {
  margin-left: 10px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--ink-3);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.signout button:hover { color: var(--ink); }

.platform-tag {
  font-family: var(--display);
  font-size: var(--t-eyebrow);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
  text-align: center;
}

.platform-switcher {
  display: inline-flex;
  gap: 4px;
  background: var(--ink);
  padding: 4px;
  border-radius: 999px;
}
.platform-switcher a {
  padding: 8px 22px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: -0.01em;
  color: var(--paper);
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.12s ease, color 0.12s ease;
}
.platform-switcher a:hover { color: var(--green); }
.platform-switcher a.active {
  background: var(--paper);
  color: var(--ink);
}


/* ============================ Tabs ======================================= */

.tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--rule-soft);
  margin: 36px 0 32px;
  padding-bottom: 0;
}
.tab {
  background: none;
  border: none;
  padding: 14px 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: var(--ink-3);
  cursor: pointer;
  position: relative;
  transition: color 0.12s ease;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); }
.tab.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.18s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ============================ Buttons ==================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.005em;
  padding: 12px 28px;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: transform 0.08s ease, background 0.12s ease, color 0.12s ease;
  text-decoration: none;
}
.btn:hover { transform: scale(1.04); background: #000; }
.btn:active { transform: scale(0.99); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--green); color: var(--ink); }
.btn-primary:hover { background: var(--green-press); color: var(--ink); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink-4);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-ghost.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn-sm {
  padding: 7px 16px;
  font-size: 0.78rem;
}


/* ============================ Inputs ===================================== */

.input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 0.95rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule-soft);
  border-radius: 6px;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.input:focus {
  outline: none;
  border-color: var(--ink);
  background: #fff;
}
.input::placeholder { color: var(--ink-4); }

select.input {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23121212' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

input[type="checkbox"] {
  accent-color: var(--green);
  width: 18px;
  height: 18px;
}

.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.filter-bar .input { max-width: 360px; flex: 1; min-width: 200px; }


/* ============================ Cards (containers, NOT items) ============== */

.card {
  background: var(--paper);
  padding: 28px;
  border: 1px solid var(--rule-soft);
  border-radius: 10px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.divider-rule {
  height: 1px;
  background: var(--rule-soft);
  border: none;
  margin: 28px 0;
}


/* ============================ Stats row ================================== */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  margin: 20px 0 36px;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
}
.stat-block {
  padding: 22px 28px 22px 0;
  border-right: 1px solid var(--rule-soft);
}
.stat-block:last-child { border-right: none; padding-right: 0; }
.stat-block .eyebrow { display: block; margin-bottom: 8px; }
.stat-block .value {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.2rem;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink);
}
.stat-block .sub {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-3);
  margin-top: 8px;
  letter-spacing: -0.005em;
}


/* ============================ Suggested searches ========================= */

.suggested-searches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.suggested-pill {
  text-align: left;
  padding: 14px 18px;
  border: 1px solid var(--rule-soft);
  background: var(--paper);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--sans);
}
.suggested-pill:hover {
  border-color: var(--ink);
  background: var(--paper-2);
}
.suggested-pill .label {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.suggested-pill .term {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--ink-3);
}


/* ============================ Scrape form ================================ */

.scrape-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.scrape-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.scrape-field .eyebrow { margin-bottom: 0; }


/* ============================ Item card ================================== */

.item-card {
  padding: 24px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.item-card:last-child { border-bottom: none; }

.item-card .head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}
.item-card .title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
  flex: 1;
}
.item-card .title:hover { color: var(--green-press); }

.item-card .score {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  white-space: nowrap;
  text-transform: uppercase;
  flex-shrink: 0;
  padding-top: 6px;
}
.item-card .score .num {
  font-weight: 700;
  color: var(--ink);
  margin-left: 4px;
}

.item-meta {
  font-size: 0.88rem;
  color: var(--ink-3);
  margin-bottom: 14px;
  line-height: 1.4;
}
.item-meta strong { color: var(--ink); font-weight: 600; }
.item-meta em {
  font-style: normal;
  color: var(--green-ink);
  background: var(--green-soft);
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
}

.item-emails {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink);
  background: var(--green-soft);
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
  display: inline-block;
  letter-spacing: -0.01em;
}

.item-card .snippet {
  font-size: 0.95rem;
  color: var(--ink-2);
  line-height: 1.55;
  margin-bottom: 16px;
  max-width: 70ch;
}

.item-card .analysis {
  border-left: 3px solid var(--green);
  padding: 4px 0 4px 18px;
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.item-card .field { font-size: 0.92rem; line-height: 1.5; color: var(--ink-2); }
.item-card .field .label {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}

.phrases { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.phrase {
  font-family: var(--mono);
  font-size: 0.76rem;
  background: var(--paper-2);
  color: var(--ink-2);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--rule-soft);
}

.item-card .footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  flex-wrap: wrap;
  gap: 12px;
}
.item-card .footer .meta {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--ink-3);
}
.item-card .footer .actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}


/* ============================ Status pills =============================== */

.status-pill {
  display: inline-block;
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-3);
}
.status-pill.unreviewed  { background: var(--paper-2); color: var(--ink-3); }
.status-pill.interesting { background: var(--green-soft); color: var(--green-ink); }
.status-pill.to_contact  { background: var(--ink); color: var(--green); }
.status-pill.pitched     { background: var(--green); color: var(--ink); }
.status-pill.dismissed   { background: var(--paper-2); color: var(--ink-4); text-decoration: line-through; }


/* ============================ Pagination ================================= */

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 28px 0;
  flex-wrap: wrap;
}
.pagination .info {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-3);
}


/* ============================ Stories grid =============================== */

.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
  border-radius: 12px;
  overflow: hidden;
}
.story-card {
  position: relative;
  background: var(--paper);
  padding: 28px;
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  flex-direction: column;
  min-height: 240px;
}
.story-card:hover { background: var(--paper-2); }

.story-card .number {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}
.story-card .title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 12px;
}
.story-card .desc {
  font-size: 0.92rem;
  color: var(--ink-2);
  line-height: 1.5;
  flex: 1;
}
.story-card .angle {
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--green-soft);
  border-radius: 6px;
  font-size: 0.86rem;
  color: var(--green-ink);
  font-weight: 500;
}
.story-card .footer-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-3);
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--rule-soft);
}
.story-card .outlier-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  font-family: var(--display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--green);
  padding: 4px 10px;
  border-radius: 999px;
}


/* ============================ Modal ====================================== */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(18,18,18,0.45);
  z-index: 1000;
  padding: 60px 24px;
  overflow-y: auto;
  backdrop-filter: blur(2px);
}
.modal-backdrop.open { display: block; }

.modal {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  background: var(--paper);
  border-radius: 12px;
  padding: 48px 56px;
}
.modal .close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-3);
  cursor: pointer;
  letter-spacing: 0.1em;
}
.modal .close:hover { color: var(--ink); }

.modal-eyebrow { margin-bottom: 12px; }
.modal h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  font-weight: 900;
}
.modal-desc {
  font-size: 1.08rem;
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 60ch;
  margin-bottom: 14px;
}
.modal-angle {
  padding: 14px 16px;
  background: var(--green-soft);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--green-ink);
  margin: 14px 0 8px;
  font-weight: 500;
}
.member-list { margin-top: 6px; }


/* ============================ Progress ================================== */

.progress-block {
  background: var(--ink);
  color: var(--paper);
  padding: 18px 22px;
  border-radius: 10px;
  margin-bottom: 24px;
}
.progress-block .label {
  font-family: var(--display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}
.progress-track {
  height: 6px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--green);
  transition: width 0.3s ease;
}
.progress-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-4);
  margin-top: 10px;
}


/* ============================ Empty state ================================ */

.empty-state {
  text-align: center;
  padding: 80px 24px;
  border: 1px dashed var(--rule-soft);
  border-radius: 12px;
}
.empty-state h3 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.empty-state p {
  color: var(--ink-3);
  max-width: 50ch;
  margin: 0 auto;
}


/* ============================ Company card =============================== */

.company-card {
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 14px;
  transition: border-color 0.12s ease;
}
.company-card:hover { border-color: var(--ink); }

.company-card .head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  margin-bottom: 16px;
}
.company-card .title {
  font-family: var(--display);
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 8px;
}
.company-card .metrics {
  display: flex;
  gap: 24px;
  flex-shrink: 0;
}
.company-card .metric { text-align: right; }
.company-card .metric .eyebrow {
  display: block;
  margin-bottom: 4px;
  font-size: 0.66rem;
}
.company-card .metric .value {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1;
}
.company-card .metric .sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  margin-top: 4px;
}

.company-buyers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 0;
  border-top: 1px solid var(--rule-soft);
  margin-top: 14px;
}
.company-buyers .role-buyer {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--ink);
  background: var(--paper-2);
  padding: 4px 10px;
  border-radius: 999px;
}

.company-card .footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--rule-soft);
}
.company-card .footer .meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-3);
}
.company-card .footer a { color: var(--green-press); }

.company-roles {
  border-top: 1px solid var(--rule-soft);
  margin-top: 18px;
  padding-top: 6px;
}
.company-roles[hidden] { display: none; }

.company-card-mini {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 0.92rem;
  color: var(--ink-2);
}
.company-card-mini:last-child { border-bottom: none; }
.company-card-mini strong { color: var(--ink); font-weight: 700; }


/* ============================ Responsive ================================= */

@media (max-width: 880px) {
  :root { --gutter: 22px; }
  .masthead {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .masthead .meta { text-align: left; }
  .platform-tag { text-align: left; }
  .stat-block { border-right: none; border-bottom: 1px solid var(--rule-soft); padding: 18px 0; }
  .stat-block:last-child { border-bottom: none; }
  .scrape-form { grid-template-columns: 1fr; }
  .company-card .head { grid-template-columns: 1fr; }
  .company-card .metrics { justify-content: space-between; }
  .company-card .metric { text-align: left; }
  .modal { padding: 28px 22px; }
  .tabs { gap: 16px; overflow-x: auto; padding-bottom: 4px; }
  .tab { white-space: nowrap; }
  .masthead > * { min-width: 0; }
  .platform-switcher { max-width: 100%; overflow-x: auto; }
  .platform-switcher a { padding: 8px 14px; white-space: nowrap; }
}

/* ============================ Validation feedback ======================== */

/* Inline hint that lives directly under the search-term input. Stays
   subtle when the term is fine; goes amber/red as it gets too narrow. */
.field-hint {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: -0.005em;
  color: var(--ink-3);
  min-height: 1.1em;       /* reserve space so layout doesn't jump */
  transition: color 0.12s ease;
}
.field-hint.is-warning { color: var(--warn); }
.field-hint.is-error   { color: var(--danger); }

.input.is-warning {
  border-color: var(--warn);
  background: #fffbe9;
}
.input.is-warning:focus { border-color: var(--warn); }

.input.is-error {
  border-color: var(--danger);
  background: #fdebe6;
}
.input.is-error:focus { border-color: var(--danger); }

/* Form-level error , pinned next to the Start scrape button. Short
   sentences only; longer messages should still wrap cleanly. */
.form-error {
  flex: 1;
  min-width: 240px;
  max-width: 60ch;
  padding: 10px 14px;
  background: #fdebe6;
  border: 1px solid var(--danger);
  border-radius: 8px;
  font-size: 0.86rem;
  color: var(--danger);
  line-height: 1.4;
}

/* ============================ Cancel inside progress ===================== */

.progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.progress-row .label { margin-bottom: 0; }

/* The .btn defaults paint dark-on-light. Inside the dark progress block
   we need the inverse: a clear, contained button on a charcoal field. */
.btn.progress-cancel {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(246, 246, 244, 0.4);
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.btn.progress-cancel:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
  transform: none;
}
.btn.progress-cancel:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
/* ===========================================================================
 * Posts platform additions
 *
 * The Posts UI mostly reuses jobs/leads classes , .item-card, .company-card,
 * .stat-block, .filter-bar. The styles below cover what's specific:
 *   - replied / dm_sent status pills (different from to_contact / pitched).
 *   - .top-posts list inside .company-card (used on Authors tab).
 *   - small tweaks where the same class needs to read slightly differently
 *     for posts (engagement counters, longer search-term inputs).
 * =========================================================================== */

/* Status pills for the posts-specific workflow.
 * Existing rules cover .status-pill.unreviewed / .interesting / .dismissed;
 * we just need replied + dm_sent here. Colours are picked to be visually
 * distinct from the jobs workflow's to_contact (blue-ish) / pitched (purple),
 * since one common confusion would be staring at a green-on-green status
 * and not knowing which platform you're on. */
.status-pill.replied {
  background: #e8f1ff;
  color: #1f4e9c;
  border-color: #c2d4f0;
}
.status-pill.dm_sent {
  background: #efe4ff;
  color: #5d2bb3;
  border-color: #d6c2f0;
}

/* Authors tab , top-posts preview list inside the author card. */
.company-card .top-posts {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.company-card .top-post {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: var(--paper-2);
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.45;
}
.company-card .top-post .mono {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  padding-top: 2px;
  min-width: 36px;
}
.company-card .top-post .snip {
  color: var(--ink-2);
}

/* The post card's score strip ends up wider than a job's because we add
 * an ENG token. Let the score row wrap on small viewports instead of
 * pushing the title to 60% width. */
.item-card .score {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 12px;
}

/* Posts keyword inputs are longer than job-search ones (boolean queries
 * with quoted phrases). Don't truncate at the same width as job search. */
[data-panel="scraper"] #search-term {
  font-family: var(--mono);
  font-size: 0.95rem;
}