:root {
  --saffron: #E0701A;
  --rose: #C2410C;
  --rose-dark: #9A3412;
  --marigold: #F6A623;
  --ink: #2a1a12;
  --ink-soft: #6b5b50;
  --bg: #fff8ef;
  --card: #ffffff;
  --line: #f0e4d6;
  --good: #14a44d;
  --warn: #f0932b;
  --bad: #e02f3a;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(194, 65, 12, 0.10);
  --shadow-lg: 0 20px 50px rgba(42, 26, 18, 0.18);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; border: none; }
input, select, textarea { font-family: inherit; }

/* ---------- loader ---------- */
.loader { display: flex; align-items: center; justify-content: center; height: 100vh; }
.spinner { width: 40px; height: 40px; border: 3px solid var(--line); border-top-color: var(--rose); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- landing ---------- */
.landing { min-height: 100vh; display: flex; flex-direction: column; }
.hero {
  flex: 1; padding: 56px 28px 40px; text-align: center; color: #fff;
  background: radial-gradient(120% 90% at 50% 0%, #ff5a78 0%, var(--rose) 45%, var(--rose-dark) 100%);
  border-radius: 0 0 40px 40px; position: relative; overflow: hidden;
}
.hero::after { content: "🕉️"; position: absolute; font-size: 220px; opacity: .07; right: -30px; bottom: -50px; transform: rotate(-15deg); }
.logo { font-size: 38px; font-weight: 800; letter-spacing: -1px; display: flex; gap: 8px; align-items: center; justify-content: center; }
.hero h1 { font-size: 34px; line-height: 1.15; margin: 28px 0 14px; font-weight: 800; letter-spacing: -1px; }
.hero p { font-size: 17px; opacity: .92; margin: 0 0 8px; line-height: 1.5; }
.hero .tag { display: inline-block; margin-top: 18px; background: rgba(255,255,255,.18); padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.features { padding: 28px 22px 8px; display: grid; gap: 14px; }
.feature { background: var(--card); border-radius: var(--radius); padding: 18px; display: flex; gap: 14px; align-items: flex-start; box-shadow: var(--shadow); }
.feature .ic { font-size: 26px; }
.feature h3 { margin: 0 0 4px; font-size: 16px; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.45; }
.landing-cta { padding: 18px 22px 34px; display: grid; gap: 10px; }

/* ---------- buttons ---------- */
.btn { width: 100%; padding: 16px; border-radius: 16px; font-size: 16px; font-weight: 700; transition: transform .08s, box-shadow .2s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--rose); color: #fff; box-shadow: var(--shadow); }
.btn-ghost { background: #fff; color: var(--rose); border: 1.5px solid var(--line); }
.btn-block { background: transparent; color: var(--ink-soft); font-weight: 600; padding: 12px; font-size: 14px; }
.btn-sm { width: auto; padding: 10px 18px; font-size: 14px; border-radius: 12px; }

/* ---------- forms / auth ---------- */
.screen { padding: 24px 22px 110px; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.screen-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.screen-head h2 { font-size: 24px; margin: 0; letter-spacing: -.5px; }
.back { font-size: 22px; background: none; color: var(--ink); padding: 4px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px;
  font-size: 15px; background: #fff; color: var(--ink); outline: none; transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--rose); }
.field textarea { resize: vertical; min-height: 90px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.muted { color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.center { text-align: center; }
.err { color: var(--bad); font-size: 14px; margin: 8px 0; min-height: 18px; }

/* ---------- discover / swipe ---------- */
.deck { position: relative; height: calc(100vh - 230px); min-height: 420px; margin-top: 8px; }
.card {
  position: absolute; inset: 0; background: var(--card); border-radius: 26px; overflow: hidden;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; will-change: transform;
}
.card .photo { flex: 1; background: linear-gradient(135deg, #ffd9c0, #ffb3c6); position: relative; display: flex; align-items: flex-end; min-height: 0; }
.card .photo img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.card .ph-fallback { font-size: 90px; margin: auto; opacity: .5; }
.photo-dots { position: absolute; top: 12px; left: 0; right: 0; display: flex; gap: 5px; justify-content: center; padding: 0 16px; z-index: 3; }
.photo-dots span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.4); max-width: 60px; }
.photo-dots span.on { background: #fff; }
.tap-l, .tap-r { position: absolute; top: 0; bottom: 30%; width: 40%; z-index: 3; }
.tap-l { left: 0; } .tap-r { right: 0; }
.card .score { position: absolute; top: 16px; right: 16px; background: rgba(20,16,30,.62); color: #fff; padding: 7px 13px; border-radius: 999px; font-weight: 700; font-size: 14px; backdrop-filter: blur(6px); display: flex; gap: 5px; align-items: center; }
.card .score b { color: var(--marigold); }
.card .info { position: relative; z-index: 2; width: 100%; padding: 20px; background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,.05) 80%, transparent); color: #fff; }
.card .info h3 { margin: 0; font-size: 23px; font-weight: 800; }
.card .info .sub { opacity: .9; font-size: 14px; margin-top: 3px; }
.card .info .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { background: rgba(255,255,255,.22); padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.card .reasons { margin-top: 12px; display: grid; gap: 5px; }
.card .reasons .r { font-size: 13px; opacity: .95; display: flex; gap: 6px; align-items: center; }
.card .body { padding: 0; }
.swipe-actions { display: flex; justify-content: center; gap: 18px; margin-top: 18px; }
.sa { width: 62px; height: 62px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); font-size: 26px; display: flex; align-items: center; justify-content: center; transition: transform .1s; }
.sa:active { transform: scale(.9); }
.sa.pass { color: var(--ink-soft); }
.sa.like { color: var(--rose); }
.sa.super { color: var(--marigold); font-size: 28px; }
.sa.why { font-size: 24px; width: 54px; height: 54px; align-self: center; }
.empty { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.empty .big { font-size: 56px; margin-bottom: 12px; }

/* ---------- compatibility / why modal ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(20,16,30,.5); display: flex; align-items: flex-end; justify-content: center; z-index: 60; animation: fade .2s; }
.sheet { background: #fff; width: 100%; max-width: 480px; border-radius: 26px 26px 0 0; padding: 26px 22px calc(26px + env(safe-area-inset-bottom)); animation: up .28s cubic-bezier(.2,.8,.2,1); }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
.sheet h3 { margin: 0 0 6px; font-size: 20px; }
.sheet .narr { background: var(--bg); border-radius: 16px; padding: 16px; font-size: 15px; line-height: 1.55; color: var(--ink); }
.bigscore { text-align: center; margin: 10px 0 16px; }
.bigscore .num { font-size: 46px; font-weight: 800; color: var(--rose); }
.bigscore .lbl { color: var(--ink-soft); font-size: 13px; }

/* ---------- matches list ---------- */
.match-row { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--card); border-radius: 18px; margin-bottom: 10px; box-shadow: var(--shadow); }
.avatar { width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(135deg, var(--marigold), var(--rose)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 20px; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.match-row .meta { flex: 1; min-width: 0; }
.match-row .meta h4 { margin: 0; font-size: 16px; }
.match-row .meta p { margin: 2px 0 0; font-size: 13px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- chat ---------- */
.chat-wrap { display: flex; flex-direction: column; height: 100vh; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 5; }
.chat-head h4 { margin: 0; font-size: 16px; flex: 1; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.bubble { max-width: 78%; padding: 11px 14px; border-radius: 18px; font-size: 15px; line-height: 1.4; word-wrap: break-word; }
.bubble.them { background: #fff; align-self: flex-start; border-bottom-left-radius: 5px; box-shadow: 0 2px 6px rgba(0,0,0,.05); }
.bubble.me { background: var(--rose); color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }
.icebreakers { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; background: #fff; border-top: 1px solid var(--line); }
.ib-chip { flex-shrink: 0; background: var(--bg); border: 1.5px solid var(--line); color: var(--ink); padding: 9px 14px; border-radius: 14px; font-size: 13px; max-width: 240px; text-align: left; line-height: 1.3; }
.chat-input { display: flex; gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 22px; outline: none; font-size: 15px; }
.chat-input button { width: 46px; height: 46px; border-radius: 50%; background: var(--rose); color: #fff; font-size: 20px; flex-shrink: 0; }
.safety-banner { margin: 0 16px 8px; padding: 10px 14px; border-radius: 12px; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.safety-banner.medium { background: #fff4e0; color: #9a6500; }
.safety-banner.high { background: #ffe3e3; color: #a31621; }

/* ---------- profile builder ---------- */
.ai-build { background: linear-gradient(135deg, #fff, #fff2ec); border: 1.5px solid var(--line); border-radius: 18px; padding: 18px; margin-bottom: 18px; }
.ai-build h3 { margin: 0 0 4px; font-size: 16px; display: flex; align-items: center; gap: 7px; }
.ai-build p { margin: 0 0 12px; font-size: 13px; color: var(--ink-soft); }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.pill.on { background: var(--rose); color: #fff; border-color: var(--rose); }

/* ---------- tabbar ---------- */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: flex; background: #fff; border-top: 1px solid var(--line); padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); z-index: 40; }
.tab { flex: 1; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--ink-soft); padding: 4px; }
.tab span { font-size: 22px; filter: grayscale(1); opacity: .6; }
.tab.active { color: var(--rose); }
.tab.active span { filter: none; opacity: 1; }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 14px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .3s; z-index: 100; max-width: 90%; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.match { background: linear-gradient(135deg, var(--rose), var(--marigold)); }

.section-title { font-size: 13px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .5px; margin: 22px 0 10px; }

/* ---------- photo grid ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo-cell { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--line); display: flex; align-items: center; justify-content: center; }
.photo-cell img { width: 100%; height: 100%; object-fit: cover; }
.photo-cell.loading { border: 1.5px dashed var(--rose); }
.photo-del { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; background: rgba(20,16,30,.6); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.photo-main { position: absolute; bottom: 5px; left: 5px; background: var(--rose); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.photo-add { aspect-ratio: 1; border-radius: 14px; border: 1.5px dashed var(--line); background: #fff; color: var(--rose); font-size: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.photo-add small { font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.divider { height: 1px; background: var(--line); margin: 20px 0; }
.inline-spin { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle; }

/* "Interested in you" strip on Discover */
.admirers-strip { margin: 0 0 14px; }
.admirers-title { font-size: 13px; font-weight: 700; color: var(--rose); margin: 0 0 8px; }
.admirers-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.admirers-row::-webkit-scrollbar { display: none; }
.admirer-card { position: relative; flex: 0 0 auto; width: 124px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.admirer-super { position: absolute; top: 8px; right: 10px; font-size: 14px; }
.admirer-photo { width: 64px; height: 64px; border-radius: 50%; margin: 2px auto 8px; overflow: hidden; background: linear-gradient(135deg, var(--rose), #ff8fa3); display: flex; align-items: center; justify-content: center; }
.admirer-photo img { width: 100%; height: 100%; object-fit: cover; }
.admirer-init { color: #fff; font-size: 26px; font-weight: 700; }
.admirer-name { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admirer-like { width: 100%; padding: 7px 10px; font-size: 12px; }

/* ======================= AI Pandit components ======================= */
.hero .om { font-size: 56px; line-height: 1; }
.hero .sub { font-size: 15px; opacity: .9; margin: 14px 4px 0; }
.hero .cta { display: grid; gap: 10px; margin: 26px 0 6px; }
.hero .cta .btn-ghost { background: rgba(255,255,255,.16); color: #fff; border: 1.5px solid rgba(255,255,255,.4); }
.feat { display: grid; gap: 10px; padding: 22px; }
.feat .f { background: var(--card); border-radius: 16px; padding: 14px; display: flex; gap: 12px; align-items: flex-start; box-shadow: var(--shadow); text-align: left; }
.feat .f span { font-size: 22px; }
.feat .f b { display: block; font-size: 15px; color: var(--ink); }
.feat .f small { color: var(--ink-soft); font-size: 12.5px; }

.link-back { font-size: 22px; background: none; color: var(--ink); padding: 2px 8px 2px 0; line-height: 1; }
.muted { color: var(--ink-soft); }
.small { font-size: 12px; }
.muted.small, .muted .small { font-weight: 500; }

.screen-head { justify-content: space-between; }
.screen-head h2 { flex: 1; }
.btn-add { background: var(--rose); color: #fff; font-weight: 700; padding: 9px 16px; border-radius: 999px; font-size: 14px; }

/* candidate rows */
.cand-row, .match-row, .prop, .rec { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.cand-row { display: flex; gap: 12px; align-items: center; padding: 12px; margin-bottom: 10px; }
.cand-row .meta { flex: 1; min-width: 0; }
.cand-row h4, .rec-id h4, .prop .meta h4 { margin: 0 0 2px; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cand-row p, .prop .meta p { margin: 0 0 5px; color: var(--ink-soft); font-size: 13px; }
.chev { color: var(--ink-soft); font-size: 22px; }
.gtag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.gtag.m { background: #e7f0ff; color: #1d4ed8; }
.gtag.f { background: #ffe7f0; color: #be185d; }

.avatar { width: 48px; height: 48px; border-radius: 50%; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: 20px; background: linear-gradient(135deg, var(--saffron), var(--marigold)); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 60px; height: 60px; font-size: 24px; }
.avatar.xl { width: 84px; height: 84px; font-size: 34px; margin: 0 auto 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { background: #fbeede; color: var(--rose-dark); font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }

/* recommendations */
.forwhom { background: #fbeede; border-radius: 14px; padding: 12px 14px; font-size: 14px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn-edit { margin-left: auto; background: #fff; border: 1px solid var(--line); color: var(--rose); font-weight: 600; padding: 6px 12px; border-radius: 999px; font-size: 12px; }
.rec { padding: 14px; margin-bottom: 14px; }
.rec-top { display: flex; gap: 12px; align-items: flex-start; }
.rec-id { flex: 1; min-width: 0; }
.rec-id p { margin: 0 0 6px; color: var(--ink-soft); font-size: 13px; }
.listedby { font-size: 12px; color: var(--saffron); font-weight: 600; margin: 4px 0 0; }
.guna { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; }
.guna .gn { font-size: 22px; font-weight: 800; line-height: 1; }
.guna .gl { font-size: 10px; opacity: .9; }
.guna.good { background: var(--good); } .guna.ok { background: var(--warn); } .guna.low { background: var(--bad); } .guna.na { background: #9aa0a6; }
.rec-sub { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 8px; }
.gverdict { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.gverdict.good { background: #e6f6ec; color: var(--good); } .gverdict.ok { background: #fdf0e1; color: var(--warn); } .gverdict.low { background: #fde8e9; color: var(--bad); } .gverdict.na { background: #eee; color: #666; }
.gotra { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.gotra.ok { background: #e6f6ec; color: var(--good); } .gotra.bad { background: #fde8e9; color: var(--bad); }
.koots { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.koot { background: #f6efe7; color: var(--ink-soft); font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 8px; }
.koot.zero { background: #fde8e9; color: var(--bad); }
.flags { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.flag { font-size: 12px; color: var(--bad); font-weight: 600; }
.rec-actions { display: flex; gap: 8px; }
.rec-actions .btn { flex: 1; }
.rec-why-out { margin-top: 10px; font-size: 13.5px; line-height: 1.5; color: var(--ink); background: #faf3ec; border-radius: 12px; padding: 12px; }
.rec-why-out:empty { display: none; }
.disclaimer { font-size: 11.5px; color: var(--ink-soft); text-align: center; margin: 6px 12px 0; line-height: 1.5; }

/* proposals */
.prop { padding: 14px; margin-bottom: 12px; }
.prop-top { display: flex; gap: 12px; align-items: flex-start; }
.prop .meta { flex: 1; min-width: 0; }
.pstatus { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pstatus.pending { background: #fdf0e1; color: var(--warn); }
.pstatus.accepted { background: #e6f6ec; color: var(--good); }
.pstatus.declined { background: #eee; color: #777; }
.reveal { margin-top: 10px; background: #e6f6ec; border-radius: 12px; padding: 12px; font-size: 14px; color: #0d5; color: var(--ink); }
.prop-actions { display: flex; gap: 8px; margin-top: 10px; }
.prop-actions .btn { flex: 1; }

/* checkbox rows */
.chk { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink); padding: 8px 0; }
.chk input { width: 18px; height: 18px; accent-color: var(--rose); }

/* account */
.acct { text-align: center; padding: 16px 0; }
.acct h3 { margin: 0 0 2px; }
.acct-rows { margin: 20px 0; text-align: left; }
.ar { display: flex; justify-content: space-between; padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ar span { color: var(--ink-soft); }

.btn-sm { padding: 11px 14px; font-size: 14px; }

/* ======================= responsive: tablet + desktop ======================= */
/* Tablet: widen the shell and show match/candidate/proposal cards in 2 columns. */
@media (min-width: 720px) {
  #app { max-width: 760px; }
  .screen { padding: 28px 28px 120px; }
  .screen-head h2 { font-size: 27px; }

  #clist, #plist,
  #rwrap > div:not(.forwhom):not(.empty) {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px; align-items: start;
  }
  #clist .empty, #plist .empty, #plist .section-title { grid-column: 1 / -1; }
  .cand-row, .rec, .prop { margin-bottom: 0; }

  /* keep forms / auth / account at a comfortable reading width */
  .screen.auth, #cf, .acct { max-width: 600px; margin-left: auto; margin-right: auto; }
  .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* Desktop: full-website layout with a top navigation bar. */
@media (min-width: 1000px) {
  #app { max-width: 1160px; }

  /* turn the bottom tabbar into a sticky top nav with brand */
  #tabbar.tabbar {
    top: 0; bottom: auto; left: 0; right: 0; transform: none;
    width: 100%; max-width: none; justify-content: center; gap: 6px;
    border-top: none; border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 14px rgba(42, 26, 18, 0.05);
    padding: 12px 24px;
  }
  #tabbar.tabbar::before {
    content: "🕉️ AI Pandit"; position: absolute; left: 28px; top: 50%;
    transform: translateY(-50%); font-weight: 800; font-size: 20px;
    color: var(--rose); letter-spacing: -.5px;
  }
  .tab {
    flex: 0 0 auto; flex-direction: row; gap: 8px;
    padding: 9px 20px; border-radius: 999px; font-size: 15px;
  }
  .tab span { font-size: 18px; filter: none; opacity: .85; }
  .tab.active { background: #fbeede; }
  .tab.active span { opacity: 1; }

  /* clear the fixed top nav */
  .screen { padding: 100px 36px 56px; }
  .screen-head h2 { font-size: 30px; }

  /* denser grids on wide screens */
  #clist, #plist { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #rwrap > div:not(.forwhom):not(.empty) { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  #cf { max-width: 720px; }
  .toast { bottom: auto; top: 84px; }

  /* landing: centered hero band with content capped for readability */
  .hero { padding: 80px 28px 64px; border-radius: 0 0 48px 48px; }
  .hero > * { max-width: 760px; margin-left: auto; margin-right: auto; }
  .hero h1 { font-size: 52px; }
  .hero .sub { font-size: 18px; }
  .hero .cta { grid-template-columns: 1fr 1fr; max-width: 560px; }
  .feat { grid-template-columns: repeat(2, 1fr); max-width: 820px; margin: 30px auto 0; }
}

/* ======================= professional landing (.site) ======================= */
body.landing #app { max-width: none; margin: 0; }

.site { background: #fff; color: var(--ink); min-height: 100vh; overflow-x: hidden; }
.site .nav-in, .site .hero2-in, .site .section-in, .site .foot-in {
  max-width: 1080px; margin: 0 auto; padding-left: 22px; padding-right: 22px;
}
.site .hero2-in > * { min-width: 0; }

/* nav */
.site .nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site .nav-in { display: flex; align-items: center; gap: 16px; height: 64px; }
.site .brand { font-weight: 800; font-size: 20px; letter-spacing: -.5px; display: flex; align-items: center; gap: 6px; color: var(--rose-dark); }
.site .brand span { color: var(--ink); }
.site .nav-links { display: none; gap: 26px; margin-left: 16px; }
.site .nav-links a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 15px; }
.site .nav-links a:hover { color: var(--rose); }
.site .nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.site .navlink { background: none; color: var(--ink); font-weight: 600; font-size: 15px; padding: 8px 10px; }
.site .navlink:hover { color: var(--rose); }

/* hero */
.site .hero2 { background: radial-gradient(130% 120% at 100% -10%, #ffe9d3 0%, #fff6ec 38%, #fff 70%); }
.site .hero2-in { display: grid; gap: 34px; padding-top: 48px; padding-bottom: 52px; }
.site .eyebrow { display: inline-block; background: #fbeede; color: var(--rose-dark); font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 999px; }
.site .hero2-copy h1 { font-size: 33px; line-height: 1.12; letter-spacing: -1px; margin: 18px 0 16px; font-weight: 800; }
.site .hero2-copy h1 em { color: var(--rose); font-style: normal; }
.site .lead { font-size: 16.5px; line-height: 1.55; color: var(--ink-soft); margin: 0 0 24px; max-width: 560px; }
.site .hero2-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.site .hero2-cta .btn { width: auto; }
.site .hero2-cta .btn-ghost { border-color: var(--line); color: var(--rose-dark); background: #fff; }
.site .trust { display: flex; flex-wrap: wrap; gap: 14px 20px; margin-top: 24px; color: var(--ink-soft); font-size: 13.5px; font-weight: 600; }

/* product mockup */
.site .hero2-art { display: flex; justify-content: center; }
.site .mock { position: relative; width: 100%; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 20px; }
.site .mock-tag { position: absolute; top: -13px; left: 20px; background: var(--good); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.site .mock-head { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.site .mock-ava { width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, var(--saffron), var(--marigold)); color: #fff; font-weight: 700; font-size: 21px; display: flex; align-items: center; justify-content: center; }
.site .mock-id { flex: 1; } .site .mock-id b { display: block; font-size: 16px; } .site .mock-id span { font-size: 13px; color: var(--ink-soft); }
.site .mock-score { text-align: center; background: var(--good); color: #fff; border-radius: 12px; padding: 7px 11px; min-width: 56px; }
.site .mock-score b { font-size: 20px; display: block; line-height: 1; } .site .mock-score small { font-size: 9.5px; opacity: .9; }
.site .mock-rows { margin: 16px 0 12px; display: grid; gap: 9px; }
.site .mock-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-soft); }
.site .mock-row b { color: var(--ink); font-weight: 700; } .site .mock-row b.ok { color: var(--good); }
.site .mock-koots { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.site .mock-koots i { background: #f6efe7; color: var(--ink-soft); font-style: normal; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 8px; }
.site .mock-cta { width: 100%; background: var(--rose); color: #fff; font-weight: 700; padding: 13px; border-radius: 14px; font-size: 14px; box-shadow: var(--shadow); }

/* feature + steps sections */
.site .section { padding: 56px 0; }
.site .section.alt { background: #fff8ef; }
.site .section-h { text-align: center; max-width: 640px; margin: 0 auto 34px; }
.site .section-h h2 { font-size: 27px; letter-spacing: -.5px; margin: 0 0 10px; line-height: 1.2; }
.site .section-h p { color: var(--ink-soft); font-size: 16px; margin: 0; line-height: 1.5; }
.site .cards, .site .steps { display: grid; gap: 16px; grid-template-columns: 1fr; }
.site .card { position: static; inset: auto; display: block; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 24px; overflow: visible; }
.site .card .ic { font-size: 28px; }
.site .card h3 { margin: 13px 0 7px; font-size: 17px; }
.site .card p { margin: 0; color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; }
.site .step { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.site .snum { width: 38px; height: 38px; border-radius: 50%; background: var(--rose); color: #fff; font-weight: 800; font-size: 17px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.site .step h3 { margin: 0 0 7px; font-size: 17px; } .site .step p { margin: 0; color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; }
.site .section-cta { text-align: center; margin-top: 32px; }
.site .section-cta .btn { width: auto; }

/* footer */
.site .foot { background: #2a1a12; color: #fff; padding: 44px 0; }
.site .foot .brand, .site .foot .brand span { color: #fff; }
.site .foot p { color: rgba(255,255,255,.72); font-size: 14px; max-width: 540px; margin: 14px 0; line-height: 1.55; }
.site .foot small { color: rgba(255,255,255,.42); }

@media (min-width: 860px) {
  .site .nav-links { display: flex; }
  .site .hero2-in { grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; padding-top: 76px; padding-bottom: 80px; }
  .site .hero2-copy h1 { font-size: 50px; }
  .site .mock { max-width: 380px; }
  .site .lead { font-size: 18px; }
  .site .section { padding: 72px 0; }
  .site .section-h h2 { font-size: 34px; }
  .site .cards, .site .steps { grid-template-columns: repeat(3, 1fr); }
}
