/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #F8F6F0;
  --fg: #1A1A1A;
  --muted: #6B6B6B;
  --accent: #FF4D00;
  --accent-light: #FFF0E6;
  --border: #E8E4DC;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: white; }

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
}

/* === NAV === */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 246, 240, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
}

/* === HERO === */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px 60px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  background: var(--accent-light);
  padding: 5px 12px;
  border-radius: 20px;
}
.hero-headline {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--fg);
  letter-spacing: -0.02em;
}
.hero-sub {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 420px;
}

/* === INBOX CARD === */
.inbox-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
}
.inbox-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FAFAF8;
}
.inbox-dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #FF5F57; }
.dot-yellow { background: #FEBC2E; }
.dot-green { background: #28C840; }
.inbox-title { font-size: 12px; color: var(--muted); font-weight: 500; }

.email-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.email-item:last-child { border-bottom: none; }
.email-item.email-new { background: #FFFBF8; }
.email-meta { display: flex; justify-content: space-between; margin-bottom: 3px; }
.email-from { font-size: 12px; font-weight: 600; color: var(--fg); }
.email-time { font-size: 11px; color: var(--muted); }
.email-subject { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.email-ai-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #28C840;
  font-weight: 500;
}
.ai-badge {
  background: #E8FFF0;
  color: #28C840;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.email-flag { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--accent); font-weight: 500; }
.flag-icon { font-size: 13px; }

/* === FEATURES === */
.features {
  background: white;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 24px;
}
.features-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.feature-card {}
.feature-icon { margin-bottom: 16px; }
.feature-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
  font-family: 'Fraunces', serif;
}
.feature-card p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
}

/* === HOW IT WORKS === */
.howitworks {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px;
}
.how-header { margin-bottom: 60px; }
.how-header h2 {
  font-size: clamp(30px, 4vw, 44px);
  margin-bottom: 16px;
  font-family: 'Fraunces', serif;
}
.how-header p {
  font-size: 17px;
  color: var(--muted);
  max-width: 440px;
  line-height: 1.65;
}
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid var(--border);
  padding-left: 40px;
}
.step {
  position: relative;
  padding-bottom: 48px;
}
.step:last-child { padding-bottom: 0; }
.step::before {
  content: '';
  position: absolute;
  left: calc(-40px - 6px);
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
}
.step-number {
  font-family: 'Fraunces', serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.step-body h4 {
  font-size: 20px;
  margin-bottom: 8px;
  font-family: 'Fraunces', serif;
}
.step-body p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
}

/* === MANIFESTO === */
.manifesto {
  background: var(--fg);
  color: white;
  padding: 80px 24px;
}
.manifesto-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.manifesto-mark { margin-bottom: 32px; display: flex; justify-content: center; }
.manifesto blockquote p {
  font-family: 'Fraunces', serif;
  font-size: clamp(22px, 3.5vw, 34px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 24px;
}
.manifesto-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  line-height: 1.65;
}

/* === CLOSING === */
.closing {
  background: var(--accent-light);
  padding: 80px 24px;
  text-align: center;
}
.closing-inner { max-width: 600px; margin: 0 auto; }
.closing h2 {
  font-size: clamp(26px, 3.5vw, 40px);
  font-family: 'Fraunces', serif;
  margin-bottom: 20px;
  color: var(--fg);
}
.closing-sub {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.65;
}

/* === FOOTER === */
.footer {
  background: white;
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
}
.footer p { font-size: 13px; color: var(--muted); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero { padding: 48px 20px 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-content { order: 1; }
  .hero-visual { order: 0; }
  .features { padding: 48px 20px; }
  .features-grid { grid-template-columns: 1fr; gap: 32px; }
  .howitworks { padding: 48px 20px; }
  .manifesto { padding: 60px 20px; }
  .closing { padding: 60px 20px; }
  .steps { padding-left: 28px; }
  .step::before { left: calc(-28px - 6px); }
}

/* === PRICING PAGE === */
.pricing-hero {
  max-width: 700px;
  margin: 0 auto;
  padding: 72px 24px 48px;
  text-align: center;
}
.pricing-hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.pricing-hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  font-family: 'Fraunces', serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--fg);
}
.pricing-hero p {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 480px;
  margin: 0 auto;
}

.pricing-tiers {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.pricing-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  position: relative;
}
.pricing-card.popular {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 32px rgba(255,77,0,0.12);
}
.pricing-popular-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
}
.pricing-card-tier {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.pricing-card h2 {
  font-size: 24px;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  margin-bottom: 4px;
}
.pricing-card-tagline {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}
.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 6px;
}
.pricing-price .amount {
  font-family: 'Fraunces', serif;
  font-size: 48px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
}
.pricing-price .currency {
  font-size: 22px;
  font-weight: 600;
  color: var(--muted);
  align-self: flex-start;
  margin-top: 8px;
}
.pricing-price .period {
  font-size: 14px;
  color: var(--muted);
}
.pricing-card .pricing-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
  line-height: 1.55;
}
.pricing-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}
.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pricing-features li {
  font-size: 14px;
  color: var(--fg);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
}
.pricing-features li .check {
  color: #28C840;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}
.pricing-features li.inactive {
  color: var(--muted);
}
.pricing-features li.inactive .check {
  color: var(--border);
}
.pricing-cta {
  margin-top: 28px;
  display: block;
  width: 100%;
  text-align: center;
  background: var(--accent);
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.pricing-cta:hover { opacity: 0.85; }
.pricing-cta.secondary {
  background: transparent;
  color: var(--fg);
  border: 1.5px solid var(--border);
}
.pricing-cta.secondary:hover { background: var(--bg); }

.pricing-faq {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.pricing-faq h2 {
  font-size: 30px;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  text-align: center;
  margin-bottom: 40px;
}
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
  cursor: pointer;
}
.faq-a {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  display: none;
}
.faq-item.open .faq-a { display: block; }

/* === DRAFT QUEUE PAGE === */
.page-header {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.page-header h1 {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 600;
}
.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-light);
  color: var(--accent);
  padding: 5px 12px;
  border-radius: 20px;
}

.draft-queue-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.draft-count {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}

.draft-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.draft-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FAFAF8;
}
.draft-from { font-size: 13px; font-weight: 600; color: var(--fg); }
.draft-subject { font-size: 12px; color: var(--muted); margin-left: auto; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-time { font-size: 11px; color: var(--muted); white-space: nowrap; }

.classification-tag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}
.classification-tag.client_inquiry { background: #FFF3E0; color: #E65100; }
.classification-tag.follow_up { background: #E3F2FD; color: #1565C0; }
.classification-tag.action_needed { background: #FCE4EC; color: #C62828; }
.classification-tag.fyi { background: #F1F8E9; color: #33691E; }

.draft-body-wrap {
  padding: 20px;
}
.draft-original {
  font-size: 12px;
  color: var(--muted);
  border-left: 3px solid var(--border);
  padding-left: 12px;
  margin-bottom: 20px;
  line-height: 1.6;
}
.draft-original strong { color: var(--fg); display: block; margin-bottom: 4px; }

.draft-reply-area {
  width: 100%;
  min-height: 140px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg);
  resize: vertical;
  background: #FAFAF8;
}
.draft-reply-area:focus { outline: none; border-color: var(--accent); }

.draft-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: #FAFAF8;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', system-ui, sans-serif;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn-send {
  background: var(--accent);
  color: white;
}
.btn-discard {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.send-status {
  font-size: 12px;
  color: #28C840;
  font-weight: 500;
  margin-left: auto;
  display: none;
}
.send-status.visible { display: flex; align-items: center; gap: 5px; }

/* Add Account Panel */
.add-account-section {
  margin-bottom: 24px;
  padding: 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-group input, .form-group select {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: 'DM Sans', system-ui, sans-serif;
  background: #FAFAF8;
}
.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--accent);
}
.full-width { grid-column: 1 / -1; }