/* ============================================================
   Leaddit theme for the dashboard (/app) and status pages.
   Loads after site.css and biz.css and swaps their tokens and
   type for the Leaddit look (light only).
   ============================================================ */

@font-face { font-family: 'Geist'; src: url('/fonts/geist.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/fonts/geist-mono.woff2') format('woff2'); font-weight: 400 600; font-display: swap; }

:root, :root[data-theme="light"] {
  --ink: #121a33;
  --ink-2: #5e6683;
  --ink-3: rgba(18,26,51,.5);
  --paper: #ffffff;
  --cloud: #eef0f6;
  --line: rgba(18,26,51,.1);
  --flare: #3346c6;
  --flare-ink: #3346c6;
  --flare-wash: rgba(51,70,198,.08);
  --on-ink: #ffffff;
  --hero-bg: #121a33;
  --hero-ink: #ffffff;
  --go: #1f9d63;
  --stop: #cf3f57;
  --display: 'Fraunces', Georgia, serif;
  --body: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --shadow-1: 0 1px 1px rgba(18,26,51,.08), 0 4px 10px -4px rgba(18,26,51,.14);
  --shadow-2: 0 1px 1px rgba(18,26,51,.06), 0 8px 16px -8px rgba(18,26,51,.14), 0 30px 60px -30px rgba(18,26,51,.28);
  color-scheme: light;
}

body { background: #eef0f6; color: #2b3350; }
body.app-body, body.status-page {
  background-image: radial-gradient(rgba(18,26,51,.055) 1px, transparent 1.2px);
  background-size: 22px 22px;
}

/* Serif headings, set light, instead of the old wide sans */
.display, h1, .h2, .h3, .panel-title, .page-head h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-stretch: 100%;
  font-weight: 400;
  letter-spacing: -.025em;
}
.status-card h1, .signin h1 { font-size: clamp(36px, 5vw, 52px); }

/* Logo */
.logo { font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-stretch: 100%; letter-spacing: -.02em; color: #121a33; }
.logo svg { width: 28px; height: 28px; }

/* Nav */
.app-nav, .status-page .nav { background: rgba(238,240,246,.82); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(18,26,51,.1); }

/* Buttons: indigo primary, white ghost */
.btn { border-radius: 10px; }
.btn-primary { background: #3346c6; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 1px rgba(18,26,51,.2), 0 10px 22px -12px rgba(51,70,198,.7); }
.btn-primary:hover { background: #2b3db0; }
.btn-ghost { background: #fff; color: #121a33; box-shadow: 0 0 0 1px rgba(18,26,51,.1), 0 1px 1px rgba(18,26,51,.06); }

/* Fields and cards */
.field { background: #fff; color: #121a33; border-radius: 10px; box-shadow: 0 0 0 1px rgba(18,26,51,.1), inset 0 1px 2px rgba(18,26,51,.05); }
.field:focus { box-shadow: 0 0 0 2px #3346c6; }
.panel, .project-card, .tier { background: #f9fafd; box-shadow: 0 0 0 1px rgba(18,26,51,.1); border-radius: 18px; }
.tier[data-featured] { background: #fff; box-shadow: 0 0 0 2px #3346c6; }
.tier-price { font-family: 'Fraunces', Georgia, serif; font-weight: 400; font-stretch: 100%; }
.signin { max-width: 460px; margin: 0 auto; padding: 72px 0; }
.signin form { display: grid; gap: 10px; margin-top: 24px; }
.signin p { color: #5e6683; }
.status-card p { color: #5e6683; }
.status-mark[data-tone="neutral"] { background: #121a33; }

/* ---- Sign in: a card on faint concentric rings (a signal being picked up) ---- */
.signin-stage {
  position: relative;
  min-height: calc(100vh - 66px);
  min-height: calc(100dvh - 66px);
  display: grid;
  place-items: center;
  padding: 24px 0;
  isolation: isolate;
  overflow: hidden;
}
.signin-stage::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: min(1100px, 160vw); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: -1;
  background: repeating-radial-gradient(circle at center, transparent 0 63px, rgba(51,70,198,.12) 63px 64px);
  -webkit-mask-image: radial-gradient(circle at center, #000 18%, transparent 68%);
          mask-image: radial-gradient(circle at center, #000 18%, transparent 68%);
  pointer-events: none;
}
/* The "signal": the logo's apricot dot, sitting on one ring */
.signin-stage::after {
  content: "";
  position: absolute;
  /* on the 320px ring, up and to the right of the card */
  left: calc(50% + 257px); top: calc(50% - 188px);
  width: 10px; height: 10px; border-radius: 50%;
  background: #ff8a4c;
  box-shadow: 0 0 0 6px rgba(255,138,76,.16);
  z-index: -1;
  animation: signin-ping 2.8s ease-out infinite;
}
@keyframes signin-ping {
  0% { box-shadow: 0 0 0 0 rgba(255,138,76,.35); }
  70%, 100% { box-shadow: 0 0 0 14px rgba(255,138,76,0); }
}
.app-main:has(.signin-stage) { padding: 0; }
.signin-card {
  width: 100%; max-width: 440px;
  background: #fff;
  border-radius: 22px;
  padding: 36px 36px 28px;
  box-shadow: 0 0 0 1px rgba(18,26,51,.08), 0 1px 2px rgba(18,26,51,.06), 0 24px 60px -28px rgba(18,26,51,.35);
}
.signin-badge { width: 44px; height: 44px; margin-bottom: 20px; }
.signin-badge svg { width: 100%; height: 100%; display: block; }
.signin-badge.is-sent { display: grid; place-items: center; border-radius: 12px; background: rgba(51,70,198,.08); color: #3346c6; }
.signin-badge.is-sent svg { width: 24px; height: 24px; }
.signin-card h1 { font-size: clamp(34px, 4.4vw, 44px); line-height: 1.05; }
.signin-card > p { margin-top: 10px; color: #5e6683; }
.signin-card > p strong { color: #121a33; font-weight: 600; overflow-wrap: anywhere; }
.signin-card form { display: grid; gap: 10px; margin-top: 24px; }
.signin-card .form-note { margin-top: 12px; }
.signin-tip { font-size: 14px; }
.signin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 24px; }
.signin-actions .btn:disabled { opacity: .6; cursor: default; }
.signin-foot { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(18,26,51,.08); font-size: 13px; }
.signin-foot a { color: #3346c6; }
@media (max-width: 560px) {
  .signin-card { padding: 28px 22px 22px; border-radius: 18px; }
  .signin-stage::after { left: calc(50% + 120px); top: calc(50% - 230px); }
}
@media (prefers-reduced-motion: reduce) { .signin-stage::after { animation: none; } }

/* ---- Phones ---- */
/* The website box stacks; a flex: 1 field in a column collapses to no height */
@media (max-width: 560px) { .url-form .field { flex: none; } }
.url-form { background: rgba(18,26,51,.05); }

/* Project tabs: fit four on a phone */
@media (max-width: 440px) {
  .tabs { gap: 0; }
  .tabs a { padding: 0 11px; }
}

/* Tables become cards on phones: name and chip on top, notes below, numbers in a row */
@media (max-width: 640px) {
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody { display: block; }
  .table-stack tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 14px 0; border-top: 1px solid var(--line); }
  .table-stack td { display: block; padding: 0; border: 0; text-align: left !important; }
  .table-stack td.stack-head { flex: 1; min-width: 0; font-weight: 600; }
  .table-stack td.stack-full { flex-basis: 100%; overflow-wrap: anywhere; }
  .table-stack td[data-label] { font-size: 13px; }
  .table-stack td[data-label]::before { content: attr(data-label) " "; color: var(--ink-3); font-family: var(--body); }
}

/* ---- Guides and privacy (doc pages) ---- */
.doc-page .nav-links { gap: 24px; }
@media (max-width: 720px) { .doc-page .nav-links { gap: 8px; } }
@media (max-width: 420px) { .doc-page .doc-cta-btn { display: none; } }
.doc-page .footer .logo { font-size: 20px; }
/* Tables read as stacked rows on phones: the first cell is the heading */
@media (max-width: 640px) {
  .doc-table thead { display: none; }
  .doc-table table, .doc-table tbody, .doc-table tr, .doc-table td { display: block; }
  .doc-table tr { padding: 14px 16px; border-top: 1px solid var(--line); }
  .doc-table tr:first-child { border-top: 0; }
  .doc-table td { padding: 0; border: 0; }
  .doc-table td + td { margin-top: 6px; }
}
.doc-tldr { background: #fff; box-shadow: 0 0 0 1px rgba(18,26,51,.08), 0 1px 2px rgba(18,26,51,.05); border-left: 3px solid #3346c6; }
.doc .guide-item { background: #fff; }
.doc-cta { background: #fff; box-shadow: 0 0 0 1px rgba(18,26,51,.08), 0 18px 40px -24px rgba(18,26,51,.3); }
.doc-cta strong { font-family: 'Fraunces', Georgia, serif; font-stretch: 100%; font-weight: 500; font-size: 24px; color: #121a33; }
.doc .doc-cta .btn { color: #fff; }
.url-form { border-radius: 14px; }
.url-form .field { height: 48px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px rgba(18,26,51,.1); }
.url-form .field:focus { box-shadow: 0 0 0 2px #3346c6; }
@media (max-width: 560px) { .url-form { border-radius: 14px; } }

/* ---- Billing ---- */
.plan-now-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.eyebrow { font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #3346c6; }
.plan-now-name { margin-top: 6px; font: 400 34px/1.1 'Fraunces', Georgia, serif; letter-spacing: -.02em; color: #121a33; }
.plan-now-head .muted { margin-top: 6px; color: #5e6683; }
.meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.meter { padding: 14px 16px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px rgba(18,26,51,.08); }
.meter-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: #5e6683; }
.meter-top b { font-weight: 600; color: #121a33; }
.meter-track { display: block; height: 6px; margin-top: 10px; border-radius: 3px; background: #e5e8f1; overflow: hidden; }
.meter-track i { display: block; height: 100%; border-radius: 3px; background: #3346c6; }
.meter small { display: block; margin-top: 8px; font-size: 12px; color: rgba(18,26,51,.5); }
.plan-now .hint { margin-top: 14px; }
.plan-now .hint + .hint { margin-top: 4px; }
@media (max-width: 720px) { .meters { grid-template-columns: 1fr; } }

.plans-free { margin-top: 36px; }
.tiers.tiers-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; }
@media (max-width: 860px) { .tiers.tiers-3 { grid-template-columns: 1fr; } }
.tier .btn, .tier > .hint { margin-top: auto; }
.tier ul { margin: 18px 0 22px; }

.wu-switch { display: inline-flex; align-items: center; gap: 12px; margin-top: 16px; padding: 10px 16px 10px 12px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px rgba(18,26,51,.1); font-size: 15px; font-weight: 500; color: #121a33; cursor: pointer; }
.wu-switch small { display: block; font-size: 13px; font-weight: 400; color: #5e6683; }
.wu-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wu-switch .track { position: relative; flex: none; width: 40px; height: 24px; border-radius: 999px; background: #e5e8f1; box-shadow: inset 0 0 0 1px rgba(18,26,51,.1); transition: background .2s; }
.wu-switch .track i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(18,26,51,.2); transition: transform .2s; }
.wu-switch input:checked + .track { background: #ff8a4c; box-shadow: none; }
.wu-switch input:checked + .track i { transform: translateX(16px); }
.wu-switch input:focus-visible + .track { outline: 2px solid #3346c6; outline-offset: 3px; }

.alt { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; padding: 16px 20px; border-radius: 14px; background: #f9fafd; box-shadow: 0 0 0 1px rgba(18,26,51,.1); }
.alt b { display: block; font-weight: 600; color: #121a33; }
.alt span { display: block; font-size: 14px; color: #5e6683; }
.alt a { flex: none; font-size: 14px; font-weight: 500; color: #3346c6; }

.change-plan { margin-top: 24px; }
.change-plan summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: #121a33; list-style: none; }
.change-plan summary::-webkit-details-marker { display: none; }
.change-plan summary::after { content: '+'; color: #3346c6; font-size: 20px; line-height: 1; }
.change-plan[open] summary::after { content: '−'; }
.change-plan > .hint { margin-top: 8px; }

/* ---- App header: plain links, the plan sits inside Billing ---- */
.app-nav-right { gap: 18px; }
.nav-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: #5e6683; text-decoration: none; }
.nav-link:hover { color: #121a33; }
.nav-link .plan-pill { height: 24px; padding: 0 9px; font-size: 12px; }
@media (max-width: 560px) { .app-nav-right { gap: 12px; } .nav-link .plan-pill { display: none; } }

/* ---- Thread filters: quiet text tabs under the project tabs ---- */
.filters { gap: 2px; margin-bottom: 16px; border-bottom: 1px solid rgba(18,26,51,.1); }
.filters button { height: 36px; padding: 0 12px; border-radius: 0; background: transparent; box-shadow: none; color: #5e6683; font-weight: 500; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.filters button:hover { color: #121a33; }
.filters button[aria-pressed="true"] { background: transparent; color: #121a33; box-shadow: none; border-bottom-color: #3346c6; }

/* ---- One-time account question under a copied draft ---- */
.ask { position: relative; margin-top: 12px; padding: 16px 44px 16px 18px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px rgba(51,70,198,.25), 0 8px 20px -14px rgba(51,70,198,.5); }
.ask p { font-size: 14px; color: #5e6683; }
.ask .ask-q { font-weight: 600; color: #121a33; }
.ask .ask-q + p { margin-top: 4px; }
.ask-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ask-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: #5e6683; font-size: 20px; line-height: 1; cursor: pointer; }
.ask-x:hover { background: #eef0f6; color: #121a33; }

/* ---- Automate replies (Warm-up guide) ---- */
.auto { display: grid; gap: 16px; }
.auto-hero h2 { margin-top: 8px; font: 400 clamp(28px, 3vw, 36px)/1.1 'Fraunces', Georgia, serif; letter-spacing: -.02em; color: #121a33; }
.auto-lead { margin-top: 10px; max-width: 46em; font-size: 16px; color: #5e6683; }
.auto-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; font-size: 14px; color: #121a33; }
.auto-facts li::before { content: '✓'; margin-right: 8px; color: #1f9d63; font-weight: 700; }
.auto-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; }
.auto-plan { margin-top: 14px; font-size: 14px; color: #5e6683; }
.auto-plan b { color: #121a33; font-weight: 600; }
.auto-plan a { color: #3346c6; }
.auto-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .auto-grid { grid-template-columns: 1fr; } }
.auto-steps { list-style: none; display: grid; gap: 16px; margin-top: 16px; }
.auto-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; }
.auto-steps .sn { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #3346c6; color: #fff; font: 600 13px var(--mono); }
.auto-steps b { display: block; font-weight: 600; color: #121a33; line-height: 28px; }
.auto-steps p { font-size: 14px; color: #5e6683; }
.auto-steps a { color: #3346c6; }
.auto-kv { display: grid; gap: 12px; margin-top: 16px; }
.auto-kv dt { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: rgba(18,26,51,.5); }
.auto-kv dd { margin-top: -8px; font-size: 14px; color: #5e6683; }
.auto-kv dd b { color: #121a33; font-weight: 600; }
.auto-subs { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(18,26,51,.08); }
.auto-subs .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.auto-subs .hint { margin-top: 10px; }

/* Five project tabs: let them scroll sideways on narrow phones rather than squash */
.tabs { -webkit-overflow-scrolling: touch; }
.auto > .panel, .auto-grid > .panel { margin-top: 0; }

/* ---- Draft kind: mention my product, or a casual reply ---- */
.draft-kind { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px rgba(18,26,51,.1); }
.draft-kind button { height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font: 500 14px var(--body); color: #5e6683; cursor: pointer; }
.draft-kind button[aria-checked="true"] { background: #121a33; color: #fff; }
.draft-kind button:focus-visible { outline: 2px solid #3346c6; outline-offset: 2px; }
.draft-kind + .hint { margin-top: -4px; }
.edit-grid .draft-kind { justify-self: start; }
.toggle[hidden] { display: none; }
.link-opts { display: grid; gap: 8px; }
.link-opts[hidden], .toggle-sub[hidden] { display: none; }
.toggle-sub { margin-left: 26px; font-size: 14px; }
.toggle-sub small { display: block; color: #5e6683; font-size: 12.5px; }
.toggle-sub { align-items: flex-start; }
