:root {
  --bg: #f6f6fb;
  --surface: #ffffff;
  --band: #f0f0fb;          /* alt section background */
  --ink: #1f1f3a;
  --muted: #6b6b85;
  --line: #e6e6f1;

  --brand: #5b5bd6;         /* periwinkle */
  --brand-d: #4845c2;
  --brand-soft: #ecebfb;

  --peach: #ff9e7a;
  --peach-soft: #ffe9e0;
  --peach-ink: #c8563a;

  --ok: #2f9e8f;
  --high: #e0664f;
  --low: #5b8aa6;

  --radius: 16px;
  --shadow: 0 1px 2px rgba(31,31,58,.04), 0 8px 24px rgba(31,31,58,.05);
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.15; margin: 0; }
.display { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-d); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
main { display: block; }

/* ---------- Top bar ---------- */
.topbar { background: rgba(255,255,255,.85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.brand-name { font-family: "Fraunces", Georgia, serif; font-size: 1.12rem; }
.logo {
  width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-family: "Fraunces", serif; font-weight: 700; font-size: 1rem;
}
.topbar nav { display: flex; align-items: center; gap: 18px; }
.topbar nav a { color: var(--muted); font-weight: 500; font-size: .95rem; }
.topbar nav a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #fff; border: none; cursor: pointer;
  padding: 11px 20px; border-radius: 12px; font: inherit; font-weight: 600; font-size: .98rem;
  transition: transform .04s ease, filter .15s ease; text-decoration: none;
}
.btn:hover { filter: brightness(1.05); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.sm { padding: 8px 14px; font-size: .9rem; border-radius: 10px; }
.btn.lg { padding: 14px 26px; font-size: 1.05rem; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--brand-soft); }
.btn.ghost:hover { background: var(--brand-soft); color: var(--brand-d); }
.btn.light { background: #fff; color: var(--brand-d); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn.ghost.loading::after, .btn.light.loading::after { border-color: rgba(91,91,214,.3); border-top-color: var(--brand); }

/* ---------- Pills ---------- */
.pill { font-size: .8rem; padding: 4px 11px; border-radius: 20px; font-weight: 600; }
.pill.ok { background: var(--brand-soft); color: var(--brand-d); }
.pill.warn { background: var(--peach-soft); color: var(--peach-ink); }

/* ---------- Shared text ---------- */
.kicker { display: inline-block; text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; font-weight: 700; color: var(--brand); margin-bottom: 14px; }
.lead { font-size: 1.12rem; color: #4a4a63; }
.lead.center { text-align: center; margin-left: auto; margin-right: auto; max-width: 580px; }
.micro { color: var(--muted); font-size: .85rem; }
.micro.center { text-align: center; }
.muted { color: var(--muted); }
em { font-style: italic; color: var(--brand); }

/* ---------- Icons ---------- */
.ico { width: 26px; height: 26px; color: var(--brand); }
.ico-sm { width: 18px; height: 18px; color: var(--ok); flex: none; }

/* ---------- Flash ---------- */
.flash { background: var(--brand-soft); border-bottom: 1px solid var(--line); }
.flash .container { padding: 12px 24px; color: var(--brand-d); font-weight: 500; }

/* ---------- Visual placeholders ---------- */
.ph {
  position: relative; width: 100%; border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, rgba(91,91,214,.05) 0 12px, rgba(91,91,214,.09) 12px 24px);
  border: 2px dashed #c9c9ea; display: grid; place-items: center; padding: 24px;
}
.ph::after { content: attr(data-label); color: #6f6f9a; font-size: .82rem; font-weight: 600; text-align: center; max-width: 80%; }
.ph-hero { aspect-ratio: 4/3; }
.ph-shot { aspect-ratio: 16/10; }

/* ================= LANDING ================= */

/* Hero */
.hero { background: radial-gradient(900px 420px at 75% -120px, var(--brand-soft), transparent 70%), linear-gradient(180deg, #efeffb, var(--bg)); padding: 64px 0 56px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero-copy h1 { font-size: 3.1rem; margin-bottom: 16px; }
.hero-copy .lead { margin-bottom: 26px; max-width: 520px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

/* Value strip */
.strip { border-bottom: 1px solid var(--line); background: var(--surface); }
.strip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 26px 24px; }
.strip-item { display: flex; gap: 12px; align-items: flex-start; }
.strip-item p { display: flex; flex-direction: column; }
.strip-item strong { font-size: .98rem; }
.strip-item span { color: var(--muted); font-size: .9rem; }

/* Sections */
.section { padding: 84px 0; }
.section.alt { background: var(--band); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: 2.2rem; margin-bottom: 10px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); }
.step-card .ico { margin-bottom: 14px; }
.step-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.step-card p { color: var(--muted); font-size: .96rem; }
.step-num { position: absolute; top: 20px; right: 22px; font-family: "Fraunces", serif; font-weight: 700; font-size: 1.4rem; color: var(--brand-soft); }

/* Showcase */
.showcase-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.showcase-copy h2 { font-size: 2.1rem; margin-bottom: 12px; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks span { font-weight: 500; }

/* Sample preview */
.preview { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 880px; margin: 0 auto; }
.preview-col { display: flex; flex-direction: column; gap: 14px; }
.col-label { font-weight: 700; font-size: .95rem; color: var(--ink); }

/* Features */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow); }
.feature .ico { margin-bottom: 14px; }
.feature h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .92rem; }

/* Connect card */
.narrow-mid { max-width: 620px; }
.connect-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.option { display: flex; gap: 14px; align-items: flex-start; border: 2px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.option:has(input:checked) { border-color: var(--brand); background: #f5f5fe; }
.option input[type=radio] { width: auto; margin-top: 3px; flex: none; accent-color: var(--brand); }
.option-body { display: flex; flex-direction: column; gap: 4px; }
.option-title { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.option-desc { color: var(--muted); font-size: .92rem; }
.rec { font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; font-weight: 700; background: var(--peach-soft); color: var(--peach-ink); padding: 2px 8px; border-radius: 6px; }
.senders { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.sub-label { font-size: .85rem; font-weight: 600; }
.senders textarea, .form textarea, .form input, .form select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.hint { font-size: .82rem; color: var(--muted); }
.connect-card .btn { margin-top: 6px; }

/* Final CTA band */
.cta-band { background: linear-gradient(120deg, var(--brand), #6f6ce0); color: #fff; padding: 72px 0; text-align: center; }
.cta-band h2 { font-size: 2.3rem; margin-bottom: 10px; }
.cta-band .lead { color: rgba(255,255,255,.9); margin-bottom: 24px; }

/* ---------- Page wrapper (app screens) ---------- */
.page { max-width: 960px; margin: 0 auto; padding: 40px 24px 64px; }
.page.narrow { max-width: 720px; }
.page.center-page { text-align: center; padding-top: 80px; }
.page .display { font-size: 2rem; margin-bottom: 8px; }

/* Setup steps list */
.steps-list { line-height: 1.8; padding-left: 20px; }
.steps-list li { margin-bottom: 10px; }
code, .copy { background: #ececf6; padding: 2px 7px; border-radius: 6px; font-size: .85rem; word-break: break-all; }
.status-row { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }

/* Connected dashboard */
.hero-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.summary { font-size: 1.08rem; margin: 6px 0; }
.meta { color: var(--muted); font-size: .9rem; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 32px 0 14px; font-size: 1.3rem; font-family: "Fraunces", serif; font-weight: 600; }
.count { background: var(--brand-soft); color: var(--brand-d); border-radius: 20px; padding: 1px 10px; font-size: .8rem; font-weight: 700; font-family: "Inter", sans-serif; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.empty { text-align: center; padding: 40px; }
.empty .btn { margin-top: 12px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.card.high { border-left: 4px solid var(--brand); }
.card.prio-high { border-left: 4px solid var(--high); }
.card h3 { font-size: 1.04rem; margin: 8px 0 6px; }
.card p { margin: 0 0 10px; color: #4c4c63; font-size: .94rem; }
.card-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-foot { display: flex; flex-wrap: wrap; gap: 10px; font-size: .82rem; color: var(--muted); }
.card-foot .due { color: var(--high); font-weight: 600; }

.tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-d); }
.tag.deadline { background: var(--peach-soft); color: var(--peach-ink); }
.tag.event { background: #e4eef5; color: var(--low); }
.tag.academic { background: #e1f0ea; color: #2f8f76; }
.tag.career { background: #ece8fb; color: #6346c9; }
.srctag { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #eef0f7; color: #5d6b86; }
.prio { font-size: .72rem; font-weight: 700; text-transform: uppercase; margin-left: auto; }
.prio.prio-high { color: var(--high); }
.prio.prio-medium { color: var(--peach-ink); }
.prio.prio-low { color: var(--low); }

/* Forms (settings) */
.form { margin-top: 8px; }
.form label { display: block; margin-bottom: 18px; font-weight: 600; }
.form small { display: block; font-weight: 400; color: var(--muted); margin: 2px 0 6px; }
.form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; }
.form legend { font-weight: 700; padding: 0 6px; }
.form .row { display: flex; gap: 12px; }
.form .row label { flex: 1; }
.form .actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
label.inline { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-bottom: 10px; }
label.inline input { width: auto; flex: none; margin-top: 4px; accent-color: var(--brand); }
.card-title { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.2rem; margin: 0 0 4px; }
.card + .card { margin-top: 20px; }

/* Preview list */
.preview-out { margin-top: 14px; }
.preview-list { list-style: none; padding: 0; margin: 8px 0 0; }
.preview-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.pv-top { display: flex; gap: 8px; align-items: center; }
.pv-subj { font-weight: 600; }
.pv-meta { color: var(--muted); font-size: .82rem; margin-top: 2px; }

/* Scanning */
.spinner { width: 46px; height: 46px; margin: 0 auto 22px; border-radius: 50%; border: 4px solid var(--brand-soft); border-top-color: var(--brand); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Footer */
.site-footer { background: #161630; color: #c9c9e0; padding: 40px 0; margin-top: 0; }
.footer-inner { display: flex; flex-direction: column; gap: 10px; }
.site-footer .brand { color: #fff; }
.site-footer .logo { background: var(--brand); }
.site-footer p { color: #9a9ac0; font-size: .9rem; max-width: 520px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .showcase-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-copy h1 { font-size: 2.4rem; }
  .steps, .strip-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .preview { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: 2rem; }
  .topbar nav a:not(.btn) { display: none; }
}
