/* Lead X visual system: shared polish for public, account, and workspace views. */
:root {
  --surface: #ffffff;
  --canvas: #f4f7f2;
  --forest: #173a2d;
  --forest-dark: #102b24;
  --leaf: #306949;
  --lime: #c9ef82;
  --text: #1a3027;
  --muted-text: #617469;
  --edge: #dce6da;
  --shadow-soft: 0 16px 44px rgba(16, 43, 36, .07);
  --shadow-raised: 0 26px 65px rgba(16, 43, 36, .13);
}

body { color: var(--text); background: var(--canvas); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button:not(:disabled), summary, a { -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .58; cursor: not-allowed; }
a, button, input, select, textarea { transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease; }
input::placeholder, textarea::placeholder { color: #819288; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid #7fb663;
  outline-offset: 3px;
}

/* Public site */
.public-header { min-height: 78px; height: auto; box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.public-nav a { padding: 12px 1px; border-bottom: 2px solid transparent; }
.public-nav a:hover, .public-nav a:focus-visible { border-color: var(--lime); }
.public-signin { padding: 11px 13px; border-radius: 8px; }
.public-signin:hover { background: rgba(255,255,255,.11); }
.public-hero { min-height: 630px; }
.public-hero-copy > p { color: #c4d5cb; }
.public-hero-note { color: #b4cabd; }
.public-preview-shell { box-shadow: 0 30px 75px rgba(4, 20, 14, .53); }
.public-section { scroll-margin-top: 20px; }
.public-section .public-section-label,
.public-feature-number,
.pricing-eyebrow { color: #3e704e; }
.public-steps li > span { color: #356543; }
.currency-option:not(.active) { color: #3f7150; }
.public-section-intro p,
.public-workflow-copy p,
.public-vision p,
.public-pricing-heading p { color: #586e5e; }
.public-feature-card p,
.public-steps p,
.pricing-card > p,
.pricing-amount span { color: #596d60; }
.pricing-disclaimer { color: #586e5e; }
.pricing-card-premium > p,
.pricing-card-premium .pricing-amount span { color: #c8ddce; }
.pricing-card-premium .pricing-eyebrow { color: #c9e8b7; }
.public-feature-card, .pricing-card { box-shadow: var(--shadow-soft); }
.public-feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-raised); }
.pricing-card { border-color: #d8e4d6; }
.pricing-card-premium { border-color: #214c38; }
.pricing-card-premium .plan-details summary, .pricing-card-premium .plan-details p { color: #f5fbf3; }
.pricing-card-premium .plan-details summary:hover { color: var(--lime); }
.plan-details summary { padding: 4px 0; }
.plan-details summary:hover { color: var(--leaf); }
.public-footer-owner a:hover { color: var(--lime); }

/* Account access: balanced two-column layout with a clearly primary form. */
#appShell.auth-mode { background: var(--canvas); }
#appShell.auth-mode .topbar { background: transparent; border-color: var(--edge); }
#appShell .auth-view {
  grid-template-columns: minmax(0, 1fr) minmax(370px, 470px);
  max-width: 1380px;
  min-height: calc(100vh - 77px);
  margin: 0 auto;
  gap: clamp(30px, 7vw, 112px);
  padding: clamp(48px, 8vh, 96px) clamp(30px, 7vw, 100px);
  align-items: center;
  background: radial-gradient(circle at 20% 75%, #e3efe0 0, transparent 43%), var(--canvas);
}
#appShell .auth-intro { max-width: 560px; }
#appShell .auth-intro h1 { font-size: clamp(46px, 5vw, 76px); line-height: 1.03; letter-spacing: -.068em; margin: 20px 0 24px; }
#appShell .auth-intro em { color: #368357; font-family: Georgia, serif; font-weight: 400; font-style: italic; }
#appShell .auth-intro p { color: var(--muted-text); font-size: 16px; line-height: 1.7; }
#appShell .auth-proof { gap: 8px; margin-top: 38px; }
#appShell .auth-proof span { background: rgba(255,255,255,.74); border-color: #d9e4d7; color: #436953; }
#appShell .auth-card {
  width: 100%;
  max-width: 470px;
  padding: clamp(28px, 3vw, 42px);
  border: 1px solid #dae5d9;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-raised);
}
#appShell .auth-card h2 { font-size: clamp(25px, 2.2vw, 31px); line-height: 1.14; letter-spacing: -.04em; margin: 12px 0 8px; }
#appShell .auth-card .muted { color: var(--muted-text); line-height: 1.55; margin-bottom: 24px; }
#appShell .auth-card label { color: #324f3d; font-size: 12px; margin-top: 17px; }
#appShell .auth-card input { height: 50px; border: 1px solid #cadaca; border-radius: 10px; background: #fff; color: var(--text); font-size: 14px; }
#appShell .auth-card input:focus { border-color: #4e9161; box-shadow: 0 0 0 4px rgba(79, 145, 97, .13); }
#appShell .auth-card .primary-button { height: 52px; margin-top: 27px; padding: 0 18px; background: var(--forest); border-radius: 10px; font-size: 13px; }
#appShell .auth-card .primary-button:hover { background: #255941; transform: translateY(-1px); box-shadow: 0 9px 20px rgba(23, 58, 45, .18); }
#appShell .auth-card .switch-button { color: var(--forest); padding: 7px 10px; border-radius: 7px; }
#appShell .auth-card .switch-button:hover { background: #edf5e9; }
#appShell .auth-card .small-note { margin-top: 21px; border-top: 1px solid #e8eee6; padding-top: 19px; color: #66796d; }
.auth-back:hover { color: var(--forest-dark); text-decoration: underline; text-underline-offset: 4px; }

/* Authenticated workspace */
#appShell .rail { width: 246px; padding: 27px 14px; background: var(--forest-dark); }
#appShell .brand { padding: 0 10px 39px; }
#appShell .rail-label { padding-left: 14px; }
#appShell .rail-link { min-height: 46px; padding: 11px 14px; margin-bottom: 4px; color: #b8cdbd; font-size: 12px; font-weight: 750; }
#appShell .rail-link span { display: inline-grid; place-items: center; width: 22px; color: #b5dab1; font-size: 19px; }
#appShell .rail-link.selected { background: #d7efbc; color: #173c2b; }
#appShell .rail-link.selected span { color: #275039; }
#appShell .rail-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 23px; margin: auto 10px 0; }
#appShell .topbar { min-height: 75px; box-shadow: 0 1px 0 rgba(18, 49, 31, .03); }
#appShell .workspace-view { max-width: 1600px; padding: 42px clamp(24px, 3vw, 54px) 90px; }
#appShell .page-heading { margin-bottom: 27px; gap: 18px; }
#appShell .page-heading h1 { font-size: clamp(33px, 3.25vw, 48px); letter-spacing: -.052em; }
#appShell .page-heading p { color: var(--muted-text); line-height: 1.55; }
#appShell .tier-pill { white-space: nowrap; border: 1px solid #d4e8c8; }
#appShell .hero-banner { min-height: 205px; border-radius: 18px; padding: 30px clamp(28px, 4vw, 52px); box-shadow: 0 16px 35px rgba(16, 51, 35, .16); }
#appShell .hero-banner h2 { font-size: clamp(30px, 2.8vw, 38px); line-height: 1.08; }
#appShell .hero-banner p { color: #d5e7d6; }
#appShell .hero-orbit { opacity: .7; transform: scale(.87); transform-origin: right center; }
#appShell .stats { margin: 16px 0 45px; gap: 13px; }
#appShell .stats article { min-height: 135px; padding: 21px 23px; border: 1px solid var(--edge); border-radius: 13px; box-shadow: var(--shadow-soft); }
#appShell .stats article:nth-child(2) { background: #f6faf1; border-color: #c8ddc2; }
#appShell .stats strong { margin: 6px 0 1px; letter-spacing: -.055em; }
#appShell .stats span { color: #496453; }
#appShell .stats small { color: #728477; }
#appShell .section-title { gap: 16px; margin-bottom: 16px; scroll-margin-top: 26px; }
#appShell .section-title h2 { letter-spacing: -.04em; }
#appShell .filters { flex-wrap: wrap; }
#appShell .filters input, #appShell .filters select { min-height: 43px; background: #fff; border-color: #cfddce; font-size: 12px; }
#appShell .table-wrap { border: 1px solid var(--edge); border-radius: 13px; box-shadow: var(--shadow-soft); }
#appShell .empty-state { margin: 0; padding: 42px 22px; color: #5f7466; font-size: 13px; }
#appShell .empty-state::before { content: '◎'; display: block; margin-bottom: 9px; color: #72a16c; font-size: 25px; }
#appShell table { min-width: 850px; }
#appShell th { background: #f8faf7; color: #55705c; font-size: 10px; letter-spacing: .09em; white-space: nowrap; }
#appShell td { color: #52675a; line-height: 1.48; }
#appShell tbody tr:hover { background: #f4f9f3; }
#appShell tbody tr:focus-within { background: #eef6e9; }
#appShell .buyer { color: var(--text); }
#appShell .opportunity-title { line-height: 1.45; }
#appShell .status-tag { white-space: nowrap; border: 1px solid #dae8cd; }
#appShell .status-tag.sent { border-color: #d3e6f2; }
#appShell .source-link { white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
#appShell .footnote { color: #63776a; line-height: 1.5; }
#appShell .team-section { box-shadow: var(--shadow-soft); }

/* One interaction language for review, email, and account dialogs. */
.review-button, .review-actions button, .draft-button, .send-button { min-height: 39px; border-radius: 9px; font-weight: 750; }
.review-button:hover, .review-actions button:hover, .draft-button:hover { transform: translateY(-1px); }
.review-dialog { border-color: #d6e3d6; padding: clamp(22px, 3.3vw, 38px); box-shadow: 0 32px 90px rgba(7, 32, 20, .35); }
.review-dialog h2 { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.035em; }
.dialog-close { width: 38px; height: 38px; color: #3b5b46; }
.dialog-close:hover { background: #e2eee1; }
.review-facts { grid-template-columns: 145px minmax(0, 1fr); line-height: 1.55; }
.review-label input, .review-label textarea, #proposalText, .team-invite-form input { border-color: #cbdacb; font-size: 13px; }
.review-label input:focus, .review-label textarea:focus, .team-invite-form input:focus { border-color: #579666; box-shadow: 0 0 0 4px rgba(87, 150, 102, .12); }
.send-panel { margin-top: 29px; }
.send-panel .small-note { text-align: left; }

@media (max-width: 1100px) {
  #appShell .rail { width: 210px; }
  #appShell .auth-view { gap: 32px; }
  #appShell .top-actions { flex-wrap: nowrap; gap: 9px; }
  #appShell .security-pill { display: none; }
  #appShell .top-actions .text-button { white-space: nowrap; font-size: 12px; }
}
@media (max-width: 950px) {
  #appShell.auth-mode .auth-view { grid-template-columns: minmax(0, .85fr) minmax(340px, 1fr); gap: 26px; padding: 44px 35px; }
  #appShell.auth-mode .auth-card { order: 0; }
  #appShell.auth-mode .auth-intro h1 { font-size: clamp(38px, 5vw, 53px); }
  #appShell.auth-mode .auth-proof { display: none; }
  #appShell .rail { width: 74px; padding-inline: 10px; }
  #appShell .rail-link { justify-content: center; font-size: 0; padding-inline: 8px; }
  #appShell .rail-link span { font-size: 20px; }
  #appShell .rail-bottom { font-size: 0; justify-content: center; }
}
@media (max-width: 700px) {
  #appShell.auth-mode .topbar { padding-left: 20px; }
  #appShell.auth-mode .auth-view { display: flex; flex-direction: column; align-items: stretch; gap: 0; min-height: calc(100vh - 65px); padding: 18px 18px 42px; }
  #appShell.auth-mode .auth-card { order: 0; align-self: center; padding: 28px 24px; }
  #appShell.auth-mode .auth-intro { order: 1; align-self: center; width: 100%; max-width: 470px; margin-top: 22px; }
  #appShell.auth-mode .auth-intro .eyebrow, #appShell.auth-mode .auth-intro h1, #appShell.auth-mode .auth-intro p, #appShell.auth-mode .auth-proof { display: none; }
  #appShell.auth-mode .auth-back { margin: 0; }
  #appShell .workspace-view { padding: 24px 18px 70px; }
  #appShell .page-heading { align-items: flex-start; }
  #appShell .page-heading h1 { font-size: 31px; }
  #appShell .page-heading p { font-size: 12px; }
  #appShell .tier-pill { padding: 8px 11px; font-size: 9px; }
  #appShell .hero-banner { min-height: 188px; padding: 26px; }
  #appShell .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 36px; }
  #appShell .stats article { min-height: 109px; padding: 13px 11px; }
  #appShell .stats span { font-size: 10px; line-height: 1.3; }
  #appShell .stats strong { font-size: 26px; }
  #appShell .stats small { display: none; }
  #appShell .section-title { align-items: flex-start; }
  #appShell .filters { width: 100%; }
  #appShell .filters input { flex: 1 1 170px; }
  #appShell .filters select { flex: 1 1 130px; }
  #appShell .mobile-workspace-nav { box-shadow: 0 5px 18px rgba(16, 43, 36, .04); }
  #appShell .mobile-workspace-nav a.selected { background: #dceecb; color: #204b34; }
  .review-facts { grid-template-columns: 100px minmax(0, 1fr); }
}
@media (max-width: 420px) {
  #appShell .stats { gap: 6px; }
  #appShell .stats article { padding: 12px 8px; }
  #appShell .stats strong { font-size: 23px; }
  #appShell .page-heading h1 { font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a, button, input, select, textarea, .public-feature-card { transition: none !important; }
}

/* Homepage-only motion: scroll guides attention without moving controls. */
@media (prefers-reduced-motion: no-preference) {
  .public-hero-visual::before {
    content: '';
    position: absolute;
    width: min(83%, 520px);
    aspect-ratio: 1;
    border: 1px solid rgba(201, 239, 130, .27);
    border-radius: 50%;
    pointer-events: none;
    transform: rotate(var(--hero-spin, 0deg));
    background: conic-gradient(from 20deg, transparent 0deg 75deg, rgba(201, 239, 130, .18) 76deg 78deg, transparent 79deg 185deg, rgba(201, 239, 130, .18) 186deg 188deg, transparent 189deg);
  }
  .motion-enhanced .public-section-intro,
  .motion-enhanced .public-feature-card,
  .motion-enhanced .public-workflow-copy,
  .motion-enhanced .public-steps li,
  .motion-enhanced .public-vision > div,
  .motion-enhanced .public-pricing-heading,
  .motion-enhanced .pricing-card,
  .motion-enhanced .public-final-cta {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .38s ease-out, transform .38s ease-out, box-shadow .2s ease;
  }
  .motion-enhanced .public-section-intro.is-visible,
  .motion-enhanced .public-feature-card.is-visible,
  .motion-enhanced .public-workflow-copy.is-visible,
  .motion-enhanced .public-steps li.is-visible,
  .motion-enhanced .public-vision > div.is-visible,
  .motion-enhanced .public-pricing-heading.is-visible,
  .motion-enhanced .pricing-card.is-visible,
  .motion-enhanced .public-final-cta.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
  .motion-enhanced .public-feature-card.is-visible:hover { transform: translateY(-4px); }
  .motion-enhanced .public-feature-card:nth-child(2),
  .motion-enhanced .pricing-card:nth-child(2) { transition-delay: 60ms; }
  .motion-enhanced .public-feature-card:nth-child(3),
  .motion-enhanced .pricing-card:nth-child(3) { transition-delay: 120ms; }
  .motion-enhanced .pricing-card:nth-child(4) { transition-delay: 180ms; }
}
