:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --ink: #15231f;
  --ink-2: #3b4a45;
  --muted: #6b7773;
  --line: #e4dfd5;
  --line-strong: #cfc8ba;
  --primary: #0e6b5c;
  --primary-strong: #0a5044;
  --primary-soft: #e3f1ed;
  --accent: #f2b544;
  --accent-soft: #fdf1d6;
  --danger: #b4452a;
  --danger-soft: #fbe8e2;
  --success: #1f7a4d;
  --success-soft: #e2f3e9;
  --info: #2b5fa8;
  --info-soft: #e4ecf8;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(21, 35, 31, 0.08);
  --font-head: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.25rem; border-radius: 999px; border: 1px solid transparent;
  font: 600 0.95rem var(--font-body); cursor: pointer; text-decoration: none !important;
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-strong); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: #ecab2f; }
.btn-lg { padding: 0.95rem 1.6rem; font-size: 1.05rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---- Top navigation ---- */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(246, 244, 239, 0.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--primary) 0%, #1b9c86 100%); display: grid; place-items: center; color: #fff; font-size: 0.95rem; font-weight: 800; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--ink-2); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-cta { display: flex; gap: 0.6rem; align-items: center; }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ---- Hero ---- */
.hero { padding: clamp(3rem, 8vw, 6.5rem) 0 3rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.8rem; border-radius: 999px; background: var(--accent-soft); color: #7a4e05; font-weight: 600; font-size: 0.8rem; letter-spacing: 0.02em; text-transform: uppercase; margin-bottom: 1.2rem; }
.hero p.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 36rem; }
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-note { color: var(--muted); font-size: 0.9rem; margin-top: 1rem; }

/* Illustrative inbox card */
.demo-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.demo-head { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.demo-body { padding: 1.1rem; display: grid; gap: 0.85rem; }
.demo-msg { padding: 0.85rem 1rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.92rem; }
.demo-msg strong { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.25rem; font-weight: 600; }
.demo-steps { display: grid; gap: 0.5rem; }
.demo-step { display: flex; align-items: center; gap: 0.6rem; font-size: 0.86rem; color: var(--ink-2); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot-ok { background: var(--success); }
.dot-info { background: var(--info); }
.dot-warn { background: var(--accent); }
.demo-reply { border-left: 3px solid var(--primary); }

/* ---- Sections ---- */
.section { padding: 3.5rem 0; }
.section-head { max-width: 40rem; margin-bottom: 2rem; }
.section-head p { color: var(--ink-2); font-size: 1.05rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.card h3 { margin-top: 0.4rem; }
.card p { color: var(--ink-2); margin-bottom: 0; font-size: 0.95rem; }
.step-num { width: 34px; height: 34px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-strong); display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; }
.icon { width: 36px; height: 36px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-strong); display: grid; place-items: center; font-size: 1.1rem; }
.band { background: var(--ink); color: #e9efec; border-radius: 22px; padding: 2.5rem; }
.band h2 { color: #fff; }
.band p { color: #b9c6c1; }
.band .card { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.12); }
.band .card h3 { color: #fff; }
.band .card p { color: #c7d2cd; }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pill { padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 0.9rem; font-weight: 500; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem 1.1rem; margin-bottom: 0.7rem; }
.faq summary { cursor: pointer; font-weight: 600; font-family: var(--font-head); }
.faq p { margin: 0.7rem 0 0; color: var(--ink-2); }
.cta-final { text-align: center; padding: 4rem 0; }
.footer { border-top: 1px solid var(--line); padding: 2rem 0; color: var(--muted); font-size: 0.9rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer a { color: var(--ink-2); margin-left: 1rem; }

/* ---- Auth pages ---- */
.auth-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 2rem 1rem; }
.auth-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 2rem; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 0.3rem; }
.auth-card .sub { color: var(--muted); margin-bottom: 1.4rem; }
.field { display: grid; gap: 0.35rem; margin-bottom: 1rem; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea, .field select {
  width: 100%; padding: 0.7rem 0.85rem; border-radius: 10px; border: 1px solid var(--line-strong);
  background: #fff; font: 400 0.95rem var(--font-body); color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.field .hint { font-size: 0.8rem; color: var(--muted); }
.form-error { display: none; background: var(--danger-soft); color: var(--danger); border-radius: 10px; padding: 0.7rem 0.9rem; font-size: 0.9rem; margin-bottom: 1rem; }
.form-error.show { display: block; }
.auth-foot { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 1.2rem; }
.legal { padding: 3rem 0; max-width: 46rem; }
.legal h2 { font-size: 1.3rem; margin-top: 2rem; }
.legal ul, .legal ol { padding-left: 1.3rem; }
.legal li { margin: 0.4rem 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.92rem; }
.legal th, .legal td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { font-weight: 600; color: var(--ink-2); }

/* ---- Pricing / plans (shared by the marketing page and Settings > Billing) ---- */
.seg { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); }
.seg a, .seg button { appearance: none; border: 0; background: transparent; color: var(--ink-2); font: 600 0.85rem var(--font-body); padding: 0.4rem 0.9rem; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none; }
.seg .active { background: var(--ink); color: #fff; }
.seg .save { font-size: 0.7rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 999px; background: var(--accent-soft); color: #7a4e05; }
.seg .active .save { background: var(--accent); color: var(--ink); }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 0.35rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.plan-card.is-featured { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.plan-card.is-current { background: var(--surface-2); }
.plan-flag { position: absolute; top: -0.7rem; left: 1.5rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.25rem 0.6rem; border-radius: 999px; background: var(--primary); color: #fff; }
.plan-name { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }
.plan-price { display: flex; align-items: baseline; gap: 0.15rem; margin-top: 0.3rem; }
.plan-price .amt { font-size: 2.3rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.plan-price .per { color: var(--muted); font-weight: 500; }
.plan-billed { color: var(--muted); font-size: 0.85rem; min-height: 1.2em; }
.plan-tag { color: var(--ink-2); font-size: 0.95rem; margin: 0.6rem 0 0.2rem; }
.plan-features { list-style: none; padding: 0; margin: 0.4rem 0 1rem; display: grid; gap: 0.45rem; font-size: 0.92rem; color: var(--ink-2); }
.plan-features li { padding-left: 1.4rem; position: relative; }
.plan-features li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }
.plan-action { margin-top: auto; }
.plan-action .btn { width: 100%; justify-content: center; }
.pricing-foot { color: var(--muted); font-size: 0.9rem; margin-top: 1.2rem; }
.pricing-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.pricing-head .section-head { margin-bottom: 0; }
@media (max-width: 900px) { .plan-grid { grid-template-columns: 1fr; max-width: 30rem; } }
.card h3 .hint { font-size: 0.8rem; color: var(--muted); font-weight: 500; font-family: var(--font-body); }

/* ---- Product screenshots + founder note ---- */
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.shot figcaption { margin-top: 0.7rem; color: var(--ink-2); font-size: 0.9rem; }
.founder-note { max-width: 46rem; padding: 2rem; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.founder-note p { color: var(--ink-2); font-size: 1.02rem; line-height: 1.6; margin: 0; }

/* ---- Notices on auth pages ---- */
.notice { padding: 0.8rem 1rem; border-radius: 10px; font-size: 0.9rem; margin-bottom: 1rem; }
.notice.ok { background: var(--success-soft); color: var(--success); }
.notice.warn { background: var(--accent-soft); color: #6d4404; }
.notice.info { background: var(--info-soft); color: var(--info); }

/* ---- Utilities (replace inline style attributes; CSP forbids them) ---- */
.w-full { width: 100%; }
.is-hidden { display: none; }
.text-muted { color: var(--muted); }
.text-ink-2 { color: var(--ink-2); }
.mb-1 { margin-bottom: 1rem; }
.mt-06 { margin-top: .6rem; }
.mt-08 { margin-top: .8rem; }
.mt-1 { margin-top: 1rem; }
.mt-14 { margin-top: 1.4rem; }
.back-link { font-size: .85rem; }
