/* ==========================================================================
   Rolio — shared mobile app design system (app.css)
   iOS 17 Contacts aesthetic. Mobile-first. Light mode. Self-contained.
   Consumed by every app/ page. NO external requests.
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------ */
:root {
  --bg:           #F2F2F7;
  --bg-elevated:  #FFFFFF;
  --label:        #1C1C1E;
  --label-2:      #8E8E93;
  --label-3:      #C7C7CC;
  --separator:    rgba(60, 60, 67, 0.20);
  --fill:         rgba(118, 118, 128, 0.12);
  --tint:         #007AFF;
  --green:        #34C759;
  --red:          #FF3B30;
  --nav-bg:       rgba(249, 249, 249, 0.92);

  /* internal helpers */
  --press:        rgba(60, 60, 67, 0.10);
  --island:       #050506;
  --font: -apple-system, "SF Pro Text", "SF Pro Display", system-ui,
          "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---- Reset -------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

input,
textarea,
button,
select {
  font: inherit;
  color: inherit;
  margin: 0;
}

a { color: var(--tint); }

/* ==========================================================================
   Phone frame + page backdrop
   ========================================================================== */
body.is-app {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1200px 800px at 50% -10%, #f3f4f8 0%, #e7e8ee 55%, #dfe1e8 100%);
  font-family: var(--font);
  color: var(--label);
  font-size: 17px;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 390px;
  height: 844px;
  background: var(--bg);
  border-radius: 46px;
  overflow: hidden;
  /* dark bezel ring + soft outer drop shadow */
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.06),
    0 0 0 11px #1c1c1f,
    0 0 0 12.5px #303034,
    0 38px 70px -20px rgba(15, 18, 30, 0.45),
    0 18px 38px -22px rgba(15, 18, 30, 0.40);
}

/* ---- Status bar --------------------------------------------------------- */
.statusbar {
  position: relative;
  flex: 0 0 auto;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.2px;
  color: var(--label);
  z-index: 30;
}

/* Dynamic Island — CSS-only, always present */
.statusbar::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 112px;
  height: 33px;
  background: var(--island);
  border-radius: 19px;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.04);
}

.statusbar__time {
  font-variant-numeric: tabular-nums;
  padding-left: 4px;
  z-index: 1;
}

.statusbar__icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 1;
}

.statusbar__icons svg { display: block; }

/* ---- Screen (scroll region) -------------------------------------------- */
.screen {
  flex: 1 1 auto;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  -webkit-overflow-scrolling: touch;
}

/* ---- Home indicator ----------------------------------------------------- */
.homebar {
  flex: 0 0 auto;
  width: 134px;
  height: 5px;
  margin: 0 auto 8px;
  border-radius: 3px;
  background: var(--label);
  opacity: 0.85;
  z-index: 30;
}

/* ---- Compact phones: full-bleed ---------------------------------------- */
@media (max-width: 480px) {
  body.is-app {
    display: block;
    background: var(--bg);
  }
  .phone {
    width: 100vw;
    height: 100vh;        /* fallback */
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 8px;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--separator);
}

.navbar__left,
.navbar__right {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  height: 44px;
}
.navbar__left  { justify-content: flex-start; }
.navbar__right { justify-content: flex-end; }

.navbar__title {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  height: 44px;
  max-width: 62%;
  display: flex;
  align-items: center;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

/* ---- Nav buttons -------------------------------------------------------- */
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  padding: 6px 8px;
  background: none;
  border: none;
  color: var(--tint);
  font-size: 17px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-btn:active { opacity: 0.45; }

.nav-btn--back svg {
  width: 12px;
  height: 21px;
  margin-right: 1px;
}

.nav-btn--add {
  padding: 6px 8px;
}
.nav-btn--add svg {
  width: 26px;
  height: 26px;
}

.nav-btn--done {
  font-weight: 600;
}

/* ---- Large title -------------------------------------------------------- */
.large-title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
  padding: 6px 16px 4px;
  color: var(--label);
}

/* ==========================================================================
   Search (decorative)
   ========================================================================== */
.search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  margin: 8px 16px;
  padding: 0 8px;
  border-radius: 10px;
  background: var(--fill);
  color: var(--label-2);
  font-size: 17px;
  user-select: none;
}
.search svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
  flex: 0 0 auto;
}

/* ==========================================================================
   Grouped list + rows
   ========================================================================== */
.list { padding: 0 16px; }

.group {
  background: var(--bg-elevated);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 35px;
}

/* Generic row */
.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 11px 16px;
  color: var(--label);
  font-size: 17px;
}

/* Anchor / tappable rows */
a.row,
.contact-row {
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
a.row:active,
.contact-row:active,
.row--tappable:active { background: var(--press); }

.row__chevron {
  margin-left: auto;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  color: var(--label-3);
}
.row__chevron svg { width: 8px; height: 13px; }

/* Inset hairline separators (drawn as an inset bottom line) */
.group > .row:not(:last-child)::after,
.group > .field:not(:last-child)::after,
.group > .contact-row:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 0;
  bottom: 0;
  height: 0.5px;
  background: var(--separator);
  pointer-events: none;
}
/* Avatar rows inset the line to the start of the text (44px avatar + 16px pad + 12px gap) */
.group > .contact-row:not(:last-child)::after { left: 72px; }

/* Contact row */
.contact-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 9px 16px;
}
.contact-row__name {
  flex: 1 1 auto;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-row__name b,
.contact-row__name strong { font-weight: 600; }

/* ==========================================================================
   Avatar
   ========================================================================== */
.avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  user-select: none;
  background: linear-gradient(135deg, var(--label-3), var(--label-2));
}
.avatar--lg {
  width: 64px;
  height: 64px;
  font-size: 25px;
}
.avatar--xl {
  width: 96px;
  height: 96px;
  font-size: 38px;
  font-weight: 600;
}

/* ==========================================================================
   Forms (edit + new)
   ========================================================================== */
.contact-form {
  padding: 16px 0 24px;
}

.avatar-edit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  position: relative;
}
.avatar-edit .avatar { cursor: pointer; }
.avatar-edit__btn {
  background: none;
  border: none;
  color: var(--tint);
  font-size: 15px;
  cursor: pointer;
  padding: 2px 6px;
}
.avatar-edit__btn:active { opacity: 0.45; }

/* Photo picker popover — floats over the form (no layout shift).
   Anchored under the avatar via .avatar-edit (position: relative). */
.photo-picker {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: 220px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 0.5px solid var(--separator);
  border-radius: 14px;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.25);
}
.photo-picker[hidden],
.photo-picker.is-hidden { display: none !important; }
.photo-picker__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.swatch {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.08);
  transition: transform 0.08s ease;
}
.swatch:active { transform: scale(0.92); }
.swatch--active,
.swatch[aria-pressed="true"] {
  box-shadow:
    inset 0 0 0 0.5px rgba(0, 0, 0, 0.08),
    0 0 0 2px var(--bg-elevated),
    0 0 0 4px var(--tint);
}

/* Fields */
.field {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-height: 44px;
  padding: 9px 16px;
}
.field__label {
  font-size: 13px;
  line-height: 1.2;
  color: var(--label-2);
}
.field__input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--label);
  font-size: 17px;
  line-height: 1.3;
  padding: 2px 0;
  outline: none;
}
.field__input::placeholder { color: var(--label-3); }

.field__textarea {
  width: 100%;
  min-height: 80px;
  border: none;
  background: transparent;
  color: var(--label);
  font-size: 17px;
  line-height: 1.35;
  padding: 4px 0;
  outline: none;
  resize: none;
  font-family: inherit;
}
.field__textarea::placeholder { color: var(--label-3); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.06s ease, opacity 0.12s ease, filter 0.12s ease;
}
.btn:active { transform: scale(0.985); }

.btn--primary {
  background: var(--tint);
  color: #fff;
  width: 100%;
}
.btn--primary:active { filter: brightness(0.92); }

.btn--secondary {
  background: var(--fill);
  color: var(--tint);
}
.btn--secondary:active { background: var(--press); }

.btn--text {
  background: transparent;
  color: var(--tint);
  font-weight: 500;
  padding: 10px 16px;
}
.btn--text:active { opacity: 0.45; }

.btn--destructive { color: var(--red); }

.btn--block {
  display: block;
  width: 100%;
}

/* Provider (auth) buttons */
.provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border: none;
  border-radius: 14px;
  background: var(--fill);
  color: var(--label);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.06s ease, filter 0.12s ease, background 0.12s ease;
}
.provider-btn:active { transform: scale(0.985); background: var(--press); }

.provider-btn--google {
  background: #fff;
  color: var(--label);
  border: 0.5px solid var(--separator);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.provider-btn--google:active { background: #fafafa; }

/* Sign in with Apple — the platform's black pill. */
.provider-btn--apple {
  background: #000;
  color: #fff;
}
.provider-btn--apple:active { background: #1a1a1a; }

.provider-btn__icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.provider-btn__icon svg { width: 22px; height: 22px; display: block; }

/* ==========================================================================
   Auth screen
   ========================================================================== */
.auth {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  padding: 24px;
}
.auth__logo {
  align-self: center;
  width: 76px;
  height: 76px;
  border-radius: 18px;
  background: linear-gradient(160deg, #2a9bff, var(--tint));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(0, 122, 255, 0.55);
  margin-bottom: 4px;
}
.auth__logo svg { width: 40px; height: 40px; }
.auth__title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin: 0;
}
.auth__sub {
  text-align: center;
  color: var(--label-2);
  font-size: 16px;
  margin: -6px 0 6px;
}

/* Divider with centered "or" */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--label-2);
  font-size: 14px;
  margin: 2px 0;
  text-transform: lowercase;
}

/* ---- Combo field: a grouped input with an inline circular submit on the right
   (e.g. the phone sign-in field). Reuses .group (white card) + .field. -------- */
.combo-field {
  display: flex;
  align-items: center;
}
.combo-field .field {
  flex: 1 1 auto;
  min-width: 0;
}
.combo-field__submit {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  margin: 0 7px 0 4px;
  border: none;
  border-radius: 50%;
  background: var(--tint);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease, filter 0.12s ease;
}
.combo-field__submit:active { transform: scale(0.92); }
.combo-field__submit svg { width: 20px; height: 20px; display: block; }
.divider::before,
.divider::after {
  content: "";
  flex: 1 1 auto;
  height: 0.5px;
  background: var(--separator);
}

/* ==========================================================================
   Code input (verify)
   ========================================================================== */
.code-input {
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: center;
}
.code-box {
  width: 46px;
  height: 56px;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  color: var(--label);
  background: var(--bg-elevated);
  border: 0.5px solid var(--separator);
  border-radius: 10px;
  outline: none;
  caret-color: var(--tint);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.code-box:focus {
  border-color: var(--tint);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

/* Narrow phones (<=380px): keep all six boxes inside the .auth padding. */
@media (max-width: 380px) {
  .auth { padding-left: 18px; padding-right: 18px; }
  .code-input { gap: 8px; }
  .code-box { width: 42px; }
}

/* ==========================================================================
   API nod (contact.html only)
   ========================================================================== */
.api-id,
.mono {
  font-family: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  color: var(--label);
  letter-spacing: -0.2px;
}

/* ==========================================================================
   Focus-visible rings (keyboard accessibility)
   ========================================================================== */
.field__input:focus-visible,
.field__textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.18);
  border-radius: 6px;
}
.btn:focus-visible,
.provider-btn:focus-visible,
.nav-btn:focus-visible,
.swatch:focus-visible,
.avatar-edit__btn:focus-visible,
a.row:focus-visible,
.contact-row:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.45);
}
.code-box:focus-visible {
  border-color: var(--tint);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.25);
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.muted   { color: var(--label-2); }
.center  { text-align: center; }
.stack   { display: flex; flex-direction: column; }
.spacer  { flex: 1 1 auto; }
.pad     { padding: 16px; }
.is-hidden { display: none !important; }

/* ==========================================================================
   Enrich + Outreach (simulated AI features)
   Additive. Reuses the existing tokens, .group, .avatar, .btn primitives.
   ========================================================================== */

/* ---- Loader (the two intentional 2s spinners) -------------------------- */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 62vh;
  padding: 40px 24px;
  text-align: center;
}
.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--fill);
  border-top-color: var(--tint);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader__label {
  margin: 0;                 /* reset UA <p> block margin so the element choice
                                (div vs p) never shifts the spinner-to-label gap */
  color: var(--label-2);
  font-size: 15px;
  line-height: 1.3;
}

/* ---- Fact review rows -------------------------------------------------- */
.fact {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 11px 16px;
  transition: background 0.2s ease;
}
/* Hairline between stacked facts (matches the .row inset). */
.group > .fact:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 0;
  bottom: 0;
  height: 0.5px;
  background: var(--separator);
  pointer-events: none;
}
.fact__main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fact__label {
  font-size: 13px;
  line-height: 1.2;
  color: var(--label-2);
}
.fact__value {
  font-size: 17px;
  line-height: 1.3;
  color: var(--label);
  overflow-wrap: anywhere;
  transition: color 0.2s ease;
}
.fact__main .avatar { margin-top: 4px; }

.fact__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.fact-btn {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--fill);
  color: var(--label-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease, background 0.18s ease, color 0.18s ease;
}
.fact-btn:active { transform: scale(0.9); background: var(--press); }
.fact-btn svg { width: 15px; height: 15px; display: block; }

/* State modifiers */
.fact--accepted { background: rgba(52, 199, 89, 0.10); }
.fact--accepted .fact-btn--confirm { background: var(--green); color: #fff; }

.fact--rejected .fact__value {
  color: var(--label-3);
  text-decoration: line-through;
}
.fact--rejected .fact-btn--deny { background: var(--red); color: #fff; }

/* ---- Save bar (sticky, reveals on first confirm/deny) ------------------ */
.save-bar {
  position: sticky;
  bottom: 0;
  z-index: 15;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--separator);
  /* Plays once when .is-hidden is removed (display flips none -> block). */
  animation: save-bar-in 0.3s ease both;
}
@keyframes save-bar-in {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Outreach message cards -------------------------------------------- */
/* Like .group: no horizontal margin — relies on the .list parent's 16px
   padding (the established inset convention) so it never double-insets. */
.msg-card {
  background: var(--bg-elevated);
  border-radius: 14px;
  padding: 16px;
  margin: 0 0 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.msg__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.msg__subject {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.3;
  color: var(--label);
  margin-bottom: 4px;
}
.msg__body {
  color: var(--label-2);
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-line;   /* preserve the body's \n line breaks */
  margin-bottom: 14px;
}
.msg__send { display: flex; }
.msg__send .btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.msg__send .btn svg { width: 16px; height: 16px; flex: 0 0 auto; }

/* ---- Tags / pills ------------------------------------------------------ */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 14px;
  background: var(--fill);
  color: var(--label-2);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.tag svg { width: 13px; height: 13px; display: block; }
.tag--tint {
  background: rgba(0, 122, 255, 0.12);
  color: var(--tint);
}

/* ---- Social row (LinkedIn) --------------------------------------------- */
.social-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 11px 16px;
  color: var(--tint);
  font-size: 17px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.social-row:active { background: var(--press); }
.group > .social-row:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 54px;
  right: 0;
  bottom: 0;
  height: 0.5px;
  background: var(--separator);
  pointer-events: none;
}
.social-row__icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tint);
}
.social-row__icon svg { width: 26px; height: 26px; display: block; }
.social-row__handle {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--tint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Feature actions (Enrich + Outreach buttons under notes) ----------- */
/* Sits inside the form's .list (between the notes + API groups), so it takes
   the parent's 16px inset — bottom margin only, matching .group spacing. */
.feature-actions {
  display: flex;
  flex-wrap: wrap;          /* lets a full-width action wrap onto its own row */
  gap: 10px;
  margin: 0 0 35px;
}
.feature-actions .btn {
  flex: 1 1 0;
  min-width: 0;             /* allow shrink so the 2-button row never overflows */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.feature-actions .btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
/* A full-width action (Import) takes a whole row beneath the 2-button row.
   Overrides .btn--block's display:block back to inline-flex for icon+label
   centering while forcing a 100% flex-basis so it wraps below Enrich/Outreach. */
.feature-actions .btn--block {
  flex: 1 1 100%;
}

/* ---- Sent confirmation ------------------------------------------------- */
.sent {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 56px 32px 32px;
}
.sent__check {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(52, 199, 89, 0.55);
  margin-bottom: 6px;
}
.sent__check svg { width: 38px; height: 38px; display: block; }
.sent__title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin: 0;
}
.sent__sub {
  color: var(--label-2);
  font-size: 16px;
  line-height: 1.35;
  margin: 0 0 8px;
}
.sent .btn { width: 100%; }

/* ---- Reduced-motion: no spin, no slide --------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
  .save-bar { animation: none; }
}

/* ==========================================================================
   FEED — topical news -> warm leads -> outreach
   Additive. Reuses tokens, .group, .avatar, .tag, .btn primitives.
   Warm palette uses iOS system orange (#FF9500) literals — there is no
   --orange token in the design system, so it is referenced directly here.
   ========================================================================== */

/* ---- Source story bubbles (top of feed) -------------------------------- */
.source-bubbles {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 12px 16px 14px;
  margin-bottom: 8px;
  overflow-x: auto;
  border-bottom: 0.5px solid var(--separator);
  -webkit-overflow-scrolling: touch;
}
/* Decorative header bubbles (non-interactive <div>s) — no tappable affordances
   (no :active dim / tap-highlight reset) so they don't read as false targets. */
.source-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  width: 70px;
}
.source-bubble__img {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background-color: var(--fill);   /* fallback before the data: URI paints */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* story-style ring: a page-matching gap, then a tint ring */
  box-shadow:
    0 0 0 2.5px var(--bg),
    0 0 0 4.5px var(--tint);
}
.source-bubble__name {
  max-width: 100%;
  font-size: 12px;
  line-height: 1.2;
  color: var(--label);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Tweet card -------------------------------------------------------- */
.tweet {
  display: block;
  background: var(--bg-elevated);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  color: inherit;
  text-decoration: none;
}
a.tweet,
.tweet--tappable {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
a.tweet:active,
.tweet--tappable:active { background: var(--press); }

.tweet__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.tweet__head .avatar { width: 44px; height: 44px; }
.tweet__id {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.tweet__namerow {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.tweet__name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--label);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tweet__verified {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  color: var(--tint);
}
.tweet__verified svg { width: 14px; height: 14px; display: block; }
.tweet__meta {
  display: flex;
  align-items: center;
  min-width: 0;
}
.tweet__handle,
.tweet__time {
  font-size: 14px;
  line-height: 1.2;
  color: var(--label-2);
}
.tweet__handle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* the iOS " · " separator between handle + time (page emits them separately) */
.tweet__time { flex: 0 0 auto; }
.tweet__time::before { content: "·"; margin: 0 4px; }

.tweet__text {
  font-size: 15px;
  line-height: 1.35;
  color: var(--label);
  white-space: pre-wrap;          /* preserve the \n\n paragraph break */
  overflow-wrap: anywhere;
  margin: 0 0 12px;
}
.tweet__mention { color: var(--tint); }

.tweet__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 290px;
  color: var(--label-2);
}
.tweet__action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  line-height: 1;
}
.tweet__action svg { width: 16px; height: 16px; display: block; flex: 0 0 auto; }

/* ---- Lead badge (warm-lead indicator on a tweet) ----------------------- */
.lead-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 7px 12px;
  border: none;
  border-radius: 16px;
  background: rgba(255, 149, 0, 0.12);   /* warm wash */
  color: #FF3B30;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lead-badge svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: #FF9500;       /* flame/bolt stays orange even when the label is red */
}
.lead-badge:active { background: rgba(255, 149, 0, 0.22); }
.lead-badge--none {
  background: var(--fill);
  color: var(--label-2);
  cursor: default;
}
.lead-badge--none svg { color: var(--label-3); }

/* ---- Reason pill (the warm connection reason) -------------------------- */
.reason-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 14px;
  background: rgba(255, 149, 0, 0.14);
  color: #B25000;        /* darker warm tone for legibility on the wash */
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.reason-tag svg { width: 13px; height: 13px; display: block; }

/* ---- Context header (banner on leads + warm-outreach) ------------------ */
.context-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-elevated);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.context-header__headline {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--label);
}

/* ---- Lead row (inside a .group) ---------------------------------------- */
.lead-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 16px;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.lead-row:active { background: var(--press); }
/* hairline inset to the start of the text (44px avatar + 16px pad + 12px gap) */
.group > .lead-row:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 72px;
  right: 0;
  bottom: 0;
  height: 0.5px;
  background: var(--separator);
  pointer-events: none;
}
.lead-row__main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lead-row__name {
  font-size: 17px;
  letter-spacing: -0.2px;
  color: var(--label);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lead-row__sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.lead-row__last {
  font-size: 13px;
  line-height: 1.2;
  color: var(--label-2);
}

/* ---- Channel cards (email + SMS drafts on warm-outreach) --------------- */
.channel-card {
  background: var(--bg-elevated);
  border-radius: 14px;
  padding: 16px;
  margin: 0 0 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.channel-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.channel-card__icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--tint);
}
.channel-card__icon svg { width: 18px; height: 18px; display: block; }
.channel-card__icon--email { background: var(--tint); }
.channel-card__icon--sms   { background: var(--green); }
.channel-card__title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--label);
}
.channel-card__subject {
  font-size: 15px;
  font-weight: 600;
  color: var(--label);
  margin-bottom: 6px;
}
.channel-card__body {
  color: var(--label-2);
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-line;          /* preserve the draft's \n line breaks */
  margin-bottom: 14px;
}
/* SMS chat bubble — an outgoing iMessage-style green bubble, right-aligned */
.channel-card__bubble {
  display: block;
  width: -webkit-fit-content;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 14px auto;          /* push to the trailing edge */
  padding: 10px 14px;
  background: var(--green);
  color: #fff;
  font-size: 15px;
  line-height: 1.4;
  border-radius: 18px;
  border-bottom-right-radius: 5px;
  white-space: pre-line;
}
.channel-card .btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.channel-card .btn svg { width: 16px; height: 16px; flex: 0 0 auto; }

/* ==========================================================================
   PERMISSIONS — post-auth Email + SMS priming + faux iOS system alert
   Additive. Reuses tokens, .btn, .is-hidden.
   ========================================================================== */
.perm-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-elevated);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: background 0.2s ease, opacity 0.2s ease;
}
.perm-card__icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--tint);
}
.perm-card__icon svg { width: 24px; height: 24px; display: block; }
.perm-card__icon--email { background: var(--tint); }
.perm-card__icon--sms   { background: var(--green); }
.perm-card__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.perm-card__title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--label);
}
.perm-card__desc {
  font-size: 14px;
  line-height: 1.3;
  color: var(--label-2);
}
.perm-card__action { flex: 0 0 auto; }
/* compact Allow button (overrides the block .btn--primary width) */
.perm-card__action .btn {
  width: auto;
  padding: 8px 16px;
  font-size: 15px;
  border-radius: 10px;
}
/* granted / denied inline status (replaces the Allow button) */
.perm-card__granted {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.perm-card__granted svg { width: 18px; height: 18px; display: block; }
.perm-card__denied {
  color: var(--label-2);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}
/* card states */
.perm-card--granted { background: rgba(52, 199, 89, 0.10); }
.perm-card--denied  { opacity: 0.55; }

/* ---- Faux iOS system permission alert ---------------------------------- */
.ios-alert {
  /* absolute (not fixed): the alert is a child of .phone (position: relative),
     so inset:0 confines the dim backdrop + box to the phone frame and clips it
     to the bezel via .phone's overflow:hidden. fixed would dim the whole
     browser viewport on the desktop phone-mock. */
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.32);
  animation: ios-alert-fade 0.18s ease both;
}
.ios-alert__box {
  width: 270px;
  max-width: 100%;
  background: rgba(250, 250, 250, 0.94);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 20px 60px -12px rgba(0, 0, 0, 0.5);
  animation: ios-alert-pop 0.18s ease both;
}
.ios-alert__title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--label);
  padding: 18px 16px 4px;
}
.ios-alert__msg {
  font-size: 13px;
  line-height: 1.35;
  color: var(--label-2);
  padding: 0 16px 16px;
}
.ios-alert__actions {
  display: flex;
  border-top: 0.5px solid var(--separator);
}
.ios-alert__btn {
  flex: 1 1 0;
  padding: 11px 8px;
  background: none;
  border: none;
  color: var(--tint);
  font-size: 17px;
  line-height: 1.25;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ios-alert__btn:active { background: var(--press); }
.ios-alert__btn + .ios-alert__btn { border-left: 0.5px solid var(--separator); }
.ios-alert__btn--bold { font-weight: 600; }

@keyframes ios-alert-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ios-alert-pop {
  from { opacity: 0; transform: scale(1.12); }
  to   { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   IMPORT — paste / screenshots -> resolve -> tags
   Additive. Reuses .loader/.spinner, .field__textarea, .tag, .btn.
   ========================================================================== */
.paste-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 160px;
  padding: 14px;
  border: 1px solid var(--separator);
  border-radius: 14px;
  background: var(--bg-elevated);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.paste-area:focus-within {
  border-color: var(--tint);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}
/* the borderless textarea fills the zone (reuses .field__textarea base) */
.paste-area .field__textarea {
  flex: 1 1 auto;
  min-height: 120px;
  padding: 0;
}
.paste-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.paste-thumb {
  flex: 0 0 auto;
  width: 92px;
  height: 66px;
  border-radius: 10px;
  overflow: hidden;
  background-color: var(--fill);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 0.5px solid var(--separator);
}
.paste-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.import-results {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.import-tags {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* Each resolved tag: the saved chip (kept in the header) + enrich-style yes/no.
   State is binary — "added" (default, confirm filled green) or "denied"
   (deny filled red), and a denied tag's chip fades out + strikes through to
   signal it won't be saved. */
.import-tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.import-tag-row .tag {
  transition: opacity 0.2s ease;
}
.import-tag-row.is-denied .tag {
  opacity: 0.3;
  text-decoration: line-through;
}
.import-tag-row.is-added .fact-btn--confirm {
  background: var(--green);
  color: #fff;
}
.import-tag-row.is-denied .fact-btn--deny {
  background: var(--red);
  color: #fff;
}

/* ---- Reduced-motion for the new alert animations ----------------------- */
@media (prefers-reduced-motion: reduce) {
  .ios-alert,
  .ios-alert__box { animation: none; }
}

/* ==========================================================================
   NOTES LOG — date-stamped running log + inline "Add note" (contact edit)
   Additive. Reuses .group, .combo-field, .field, .fact primitives + tokens.
   ========================================================================== */
.notes-log { margin-top: 8px; }
.notes-log__title {
  padding: 2px 4px 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.1px;
  color: var(--label-2);
}
/* The add-note row reuses .combo-field; tighten the gap above the log group. */
.notes-log__add .group { margin-bottom: 12px; }

/* ==========================================================================
   TONE SELECTOR — rewrites the outreach drafts client-side (draft screen)
   Additive. Reuses tokens + the press feel. iOS segmented-control pills.
   ========================================================================== */
.tone {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 14px;
}
.tone__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--label-2);
}
.tone__options {
  display: flex;
  gap: 6px;
  padding: 3px;
  background: var(--fill);
  border-radius: 12px;
}
.tone__btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 6px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--label);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease, transform 0.06s ease;
}
.tone__btn:active { transform: scale(0.96); }
.tone__btn.is-active {
  background: var(--bg-elevated);
  color: var(--tint);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   SOCIAL ENRICHMENT ON CREATE
   Additive. Reuses tokens, .group, .social-row, .save-bar, .btn primitives.
   ========================================================================== */

/* ---- Header socials-search overlay (pinned over the navbar) ------------ */
/* Lives in the layout, positioned within .phone just below the 52px status
   bar so it floats over the read view's navbar center. pointer-events stay off
   the container so the navbar's back/Done buttons remain tappable. */
.socials-search {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
  pointer-events: none;
}
.socials-search__loader,
.socials-search__chip {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 58%;
  height: 30px;
  padding: 0 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.socials-search__loader {
  background: rgba(0, 122, 255, 0.12);
  color: var(--tint);
}
.socials-search__pulse {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tint);
  animation: socials-pulse 1.2s ease-in-out infinite;
}
@keyframes socials-pulse {
  0%, 100% { opacity: 1;    transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.6); }
}
.socials-search__chip {
  background: var(--tint);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0, 122, 255, 0.4);
  animation: socials-chip-in 0.3s ease both;
}
.socials-search__chip:active { filter: brightness(0.92); }
.socials-search__name { overflow: hidden; text-overflow: ellipsis; }
.socials-search__spark { flex: 0 0 auto; font-size: 12px; }
@keyframes socials-chip-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---- Socials confirm page ---------------------------------------------- */
.socials-intro {
  padding: 16px 16px 4px;
}
.socials-intro__lead {
  margin: 0;
  color: var(--label-2);
  font-size: 15px;
  line-height: 1.4;
}
.socials-intro__lead strong { color: var(--label); font-weight: 600; }
.socials-intro__lead--empty strong:last-child { color: var(--label-2); }

.social-confirm {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 9px 16px;
}
.group > .social-confirm:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 54px;
  right: 0;
  bottom: 0;
  height: 0.5px;
  background: var(--separator);
  pointer-events: none;
}
.social-confirm__icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tint);
}
.social-confirm__icon svg { width: 26px; height: 26px; display: block; }
.social-confirm__main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.social-confirm__label {
  font-size: 13px;
  line-height: 1.2;
  color: var(--label-2);
}
.social-confirm__handle {
  font-size: 16px;
  line-height: 1.3;
  color: var(--label);
  overflow-wrap: anywhere;
  transition: color 0.2s ease;
}
.social-confirm__toggle {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease, background 0.18s ease, color 0.18s ease;
}
.social-confirm__toggle:active { transform: scale(0.9); }
.social-confirm__toggle svg { width: 15px; height: 15px; display: block; }

/* Rejected: dim + strike the handle, neutralize the toggle. */
.social-confirm--rejected .social-confirm__handle {
  color: var(--label-3);
  text-decoration: line-through;
}
.social-confirm--rejected .social-confirm__toggle {
  background: var(--fill);
  color: var(--label-2);
}

/* Not-found: muted, no toggle. */
.social-confirm--missing { opacity: 0.55; }
.social-confirm--missing .social-confirm__icon,
.social-confirm--missing .social-confirm__handle { color: var(--label-3); }

/* ---- Reduced-motion for the socials animations ------------------------- */
@media (prefers-reduced-motion: reduce) {
  .socials-search__pulse,
  .socials-search__chip { animation: none; }
}

/* ==========================================================================
   Splash — aurora background  (feat/splash-dynamic-bg)
   The full-screen animated aurora-mesh (.splash / .splash__aurora + keyframes)
   lives in a page-inlined <style> block in app/views/pages/splash.html.erb, NOT
   here — so it ships in the splash HTML itself and is immune to asset-cache lag.
   Technique adapted from turf-monster's landing_pages/backgrounds/* partials.
   ========================================================================== */

/* ==========================================================================
   "Better+" pitch badge
   A pulsing floating tag that marks a UI element as part of the upsell
   ("Better+") tier in pitch/demo builds. Wrap the target in .better-anchor and
   render shared/_better_badge inside it; the badge floats over the top-right
   corner. Decorative (aria-hidden) + pointer-events:none, so it never blocks a
   tap on the element underneath. Lives in app.css so it's reusable on any screen.
   ========================================================================== */
.better-anchor { position: relative; }

.better-badge {
  position: absolute;
  top: -12px;
  right: -6px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  color: #ffffff;
  background: #8b5cf6;             /* violet pitch accent */
  border: 2.5px solid #8ce06b;    /* lime-green ring */
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4), 0 0 5px 0 rgba(140, 224, 107, 0.25);
  white-space: nowrap;
  pointer-events: none;
  animation: better-badge-pulse 1.8s ease-in-out infinite;
}

/* Glow pulse only — the green ring breathes brighter/softer; the badge does NOT
   change size (no transform), so layout around it stays perfectly still. */
@keyframes better-badge-pulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4), 0 0 5px 0 rgba(140, 224, 107, 0.25);
  }
  50% {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4), 0 0 16px 4px rgba(140, 224, 107, 0.75);
  }
}

@media (prefers-reduced-motion: reduce) {
  .better-badge { animation: none; }
}
/* ==========================================================================
   Outreach Queue — "Tinder-style" stack of contacts due for outreach.
   Self-contained + .queue*-namespaced so it never collides with app.css. Picked
   up globally via require_tree (application.css); only the /queue page uses it.
   ========================================================================== */

/* ---- Intro header ------------------------------------------------------- */
.queue-intro { padding: 6px 16px 14px; }
.queue-intro__title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--label);
}
.queue-intro__count {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--label-2);
}

/* ---- The stack ---------------------------------------------------------- */
/* No-JS default: a plain, readable vertical list of cards. */
.queue { position: relative; padding: 0 16px 16px; }

.queue-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-elevated);
  border-radius: 18px;
  padding: 20px;
  margin: 0 0 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.queue-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.queue-card__id { flex: 1 1 auto; min-width: 0; }
.queue-card__topline { display: flex; align-items: center; gap: 10px; }
.queue-card__name {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.15;
  color: var(--label);
  position: relative;
  display: block;
  overflow: hidden;
  white-space: nowrap;
}
/* Name fades-right on overflow + marquees on click (the shared `marquee` pattern). */
.queue-card__name .fact__value-inner { display: inline-block; white-space: nowrap; will-change: transform; }
.queue-card__name.is-overflowing { cursor: pointer; }
.queue-card__name.is-overflowing::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 32px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), var(--bg-elevated));
  pointer-events: none; transition: opacity 0.2s ease;
}
.queue-card__name.is-playing::after { opacity: 0; }
.queue-card__last {
  margin-top: 3px;
  font-size: 14px;
  color: var(--label-2);
  position: relative;
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}
/* Event line fades-right on overflow + marquees on click (the shared pattern). */
.queue-card__last .fact__value-inner { display: inline-block; white-space: nowrap; will-change: transform; }
.queue-card__last.is-overflowing { cursor: pointer; }
.queue-card__last.is-overflowing::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 28px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), var(--bg-elevated));
  pointer-events: none; transition: opacity 0.2s ease;
}
.queue-card__last.is-playing::after { opacity: 0; }

/* Cadence pill (Weekly / Monthly) — tint-toned, sibling to the feed reason-tag. */
.queue-cadence {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 14px;
  background: rgba(0, 122, 255, 0.12);
  color: var(--tint);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.queue-cadence svg { width: 13px; height: 13px; display: block; }

/* Suggested opener bubble. */
.queue-card__suggestion {
  background: var(--fill);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--label);
}

/* Action row: Skip + Send share the width 50/50. button_to wraps a form. */
.queue-card__actions {
  display: flex;
  gap: 10px;
}
.queue-skip { flex: 1 1 0; }

/* "Redirect" (was Skip): the label + a small count of OTHER interested contacts. */
.queue-redirect { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.queue-redirect__count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: var(--fill); color: var(--label-2);
  font-size: 12px; font-weight: 700; line-height: 1;
}
.queue-send-form { flex: 1 1 0; margin: 0; }
.queue-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.queue-send svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* ---- End state ---------------------------------------------------------- */
.queue-empty {
  text-align: center;
  padding: 56px 24px 24px;
}
.queue-empty__check {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.queue-empty__check svg { width: 34px; height: 34px; display: block; }
.queue-empty__title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--label);
}
.queue-empty__sub {
  margin: 6px 0 22px;
  color: var(--label-2);
}

/* ==========================================================================
   Enhanced (JS on): one card at a time, stacked + swipeable.
   ========================================================================== */
.queue.is-enhanced { min-height: 420px; }

.queue.is-enhanced .queue-card {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  opacity: 0;
  transform: scale(0.94) translateY(16px);
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
}
.queue.is-enhanced .queue-card.is-active {
  position: relative;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  z-index: 10;
}
.queue.is-enhanced .queue-card.is-leaving-right {
  opacity: 0;
  transform: translateX(115%) rotate(7deg);
  pointer-events: none;
}
.queue.is-enhanced .queue-card.is-leaving-left {
  opacity: 0;
  transform: translateX(-115%) rotate(-7deg);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .queue.is-enhanced .queue-card { transition: opacity 0.12s ease; }
  .queue.is-enhanced .queue-card.is-leaving-left,
  .queue.is-enhanced .queue-card.is-leaving-right { transform: none; }
}

/* List mode (Due-for-outreach): every suggestion stays in normal flow — no
   one-card-at-a-time stack — and Skip/Send slide just that card out. */
.queue-card.is-removing-right,
.queue-card.is-removing-left {
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.queue-card.is-removing-right { transform: translateX(60px); }
.queue-card.is-removing-left  { transform: translateX(-60px); }

@media (prefers-reduced-motion: reduce) {
  .queue-card.is-removing-right,
  .queue-card.is-removing-left { transition: opacity 0.12s ease; transform: none; }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
