:root {
  --navy: #0F2137;
  --blue: #2B6CB0;
  --amber: #D4920B;
  --mid: #4A90C4;
  --ink: #3D4F5F;
  --ice: #EBF2FA;
  --grey: #E8ECF0;
  --page: #F7F9FC;
  --white: #fff;
  --green: #1F8A5B;
  --red: #C0392B;
  --line: #D7DEE6;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font: 15px/1.5 "Open Sans", system-ui, sans-serif; }
h1, h2, h3, .brand-name, .mark, .num { font-family: Montserrat, system-ui, sans-serif; color: var(--navy); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); }
[hidden] { display: none !important; }

/* header */
.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 1040px; margin: 0 auto; padding: 14px 16px 0; }
.brand { display: flex; gap: 12px; align-items: center; }
.mark { width: 40px; height: 40px; border-radius: 10px; background: var(--amber); color: var(--navy); display: grid; place-items: center; font-weight: 900; font-size: 18px; }
.brand-name { color: #fff; font-weight: 800; font-size: 19px; line-height: 1.1; }
.brand-sub { color: #A9BCD3; font-size: 13px; }
.tabs { display: flex; gap: 4px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { background: none; border: 0; color: #A9BCD3; padding: 10px 12px; font-weight: 700; white-space: nowrap; border-bottom: 3px solid transparent; }
.tabs button.on { color: #fff; border-bottom-color: var(--amber); }
.lock { font-size: 12px; }

main { max-width: 1040px; margin: 0 auto; padding: 20px 16px 80px; }
.view { display: none; }
.view.on { display: block; }

/* shared */
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: #6B7C8D; font-size: 13px; }
.btn { border: 1px solid var(--line); background: #fff; color: var(--navy); border-radius: 10px; padding: 8px 14px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
.btn:hover { border-color: var(--mid); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.amber { background: var(--amber); border-color: var(--amber); color: var(--navy); }
.btn.ghost { background: none; }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; background: var(--grey); color: var(--ink); white-space: nowrap; }
.chip.due { background: #FCEBD0; color: #8A5A00; }
.chip.late { background: #F9DEDA; color: var(--red); }
.chip.hot { background: var(--amber); color: var(--navy); }
.chip.warm { background: #FCEBD0; color: #8A5A00; }
.chip.stage-Decision { background: #DDF1E7; color: var(--green); }
.chip.stage-Consideration { background: var(--ice); color: var(--blue); }
.chip.stage-Awareness { background: var(--grey); color: var(--ink); }
.chip.ok { background: #DDF1E7; color: var(--green); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; color: var(--ink); }
.pill.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); }

/* today */
.hero { display: flex; gap: 20px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.hero h1 { margin: 0; font-size: 26px; font-weight: 900; }
.hero p { margin: 4px 0 0; }
.meter { min-width: 240px; flex: 0 1 320px; }
.meter-top { display: flex; justify-content: space-between; font-weight: 700; color: var(--navy); font-size: 14px; }
.bar { height: 10px; background: var(--grey); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .3s; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.stat { padding: 12px 14px; }
.stat .num { font-size: 24px; font-weight: 900; line-height: 1.1; }
.stat .lbl { font-size: 12px; color: #6B7C8D; font-weight: 600; }

.people { display: grid; gap: 12px; }
.person { padding: 16px; display: grid; grid-template-columns: auto 1fr; gap: 14px; }
.person.done { background: #F4FAF7; border-color: #BFE3D0; }
.check { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: #fff; display: grid; place-items: center; color: transparent; font-weight: 900; margin-top: 2px; }
.check:hover { border-color: var(--green); }
.done .check, .check.on { background: var(--green); border-color: var(--green); color: #fff; }
.p-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.p-name { font-family: Montserrat, sans-serif; font-weight: 800; font-size: 18px; color: var(--navy); background: none; border: 0; padding: 0; text-align: left; }
.p-name:hover { color: var(--blue); }
.p-how { font-size: 13px; color: #6B7C8D; margin-top: 2px; }
.p-pain { margin-top: 8px; font-size: 14px; }
.p-pain b { color: var(--navy); }
.p-mid { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.score { display: inline-flex; align-items: center; gap: 8px; }
.score .lbl { font-size: 12px; font-weight: 700; color: #6B7C8D; }
.sc-ctl { display: inline-flex; align-items: center; gap: 6px; }
.sc-mid { display: inline-grid; justify-items: center; gap: 3px; }
.score .pm { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 800; color: var(--navy); line-height: 1; }
.score .pm:hover { border-color: var(--mid); }
.score .val { min-width: 34px; text-align: center; font-family: Montserrat, sans-serif; font-weight: 900; color: var(--navy); font-size: 16px; }
.score .val small { font-size: 11px; color: #9AA9B8; font-weight: 700; }
.dots { display: inline-flex; gap: 2px; }
.dots i { width: 6px; height: 9px; border-radius: 2px; background: var(--grey); }
.dots i.f { background: var(--blue); }
.dots.x i.f { background: var(--amber); }
.p-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.p-actions .btn { min-width: 108px; justify-content: center; }
.ico { width: 16px; height: 16px; flex: none; }
.p-next { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.p-next .when { font-weight: 700; color: var(--navy); margin-right: 4px; }
.p-next .pill { padding: 3px 10px; font-size: 12px; }
.p-next input[type=date] { border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; font-size: 12px; }
.p-step { margin-top: 6px; font-size: 13px; }
.more { text-align: center; margin: 22px 0 0; }
.empty { padding: 30px; text-align: center; }

/* list */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.search { flex: 1 1 220px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; }
.toolbar select { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; }
.bulk { position: sticky; top: 104px; z-index: 5; background: var(--navy); color: #fff; border-radius: 12px; padding: 10px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.bulk .btn { border-color: transparent; }
table.list { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #6B7C8D; padding: 10px 12px; background: var(--ice); white-space: nowrap; }
.list th button { background: none; border: 0; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; padding: 0; }
.list td { padding: 10px 12px; border-top: 1px solid var(--grey); vertical-align: middle; font-size: 14px; }
.list tr:hover td { background: #FAFCFE; }
.list .nm { font-weight: 700; color: var(--navy); background: none; border: 0; padding: 0; text-align: left; }
.list .nm:hover { color: var(--blue); }
.list .sub { font-size: 12px; color: #6B7C8D; }
.list input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--blue); }
.list .score .pm { width: 24px; height: 24px; }
.list .score .val { min-width: 22px; font-size: 15px; }
.count { font-weight: 700; color: var(--navy); }

/* events */
.events { display: grid; gap: 12px; }
.event { padding: 16px; display: grid; grid-template-columns: 74px 1fr auto; gap: 16px; align-items: center; }
.ev-date { text-align: center; background: var(--ice); border-radius: 12px; padding: 8px 4px; }
.ev-date .d { font-family: Montserrat, sans-serif; font-weight: 900; font-size: 22px; color: var(--navy); line-height: 1; }
.ev-date .m { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--blue); }
.ev-title { font-family: Montserrat, sans-serif; font-weight: 800; color: var(--navy); font-size: 16px; }
.ev-meta { font-size: 13px; color: #6B7C8D; margin-top: 2px; }
.ev-tags { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.note-box { background: var(--ice); border-radius: 12px; padding: 12px 14px; font-size: 13px; margin: 0 0 16px; }

/* your words (locked) */
.locked { position: relative; overflow: hidden; padding: 28px; }
.locked h2 { margin: 0 0 6px; font-size: 24px; font-weight: 900; }
.locked .lead { font-size: 16px; max-width: 620px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.step { background: var(--ice); border-radius: 12px; padding: 14px; }
.step .num { font-size: 22px; font-weight: 900; color: var(--amber); }
.step b { color: var(--navy); display: block; margin: 2px 0 4px; }
.preview { position: relative; display: grid; gap: 10px; margin-top: 8px; }
.preview .msg { filter: blur(3.5px); user-select: none; }
.price { background: var(--ice); border-radius: 12px; padding: 12px 14px; font-size: 15px; color: var(--navy); margin-bottom: 14px; }
.price b { font-size: 18px; }
.find-row { display: flex; gap: 10px 16px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; flex-wrap: wrap; min-width: 0; }
.find-match { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; filter: blur(3.5px); user-select: none; min-width: 0; max-width: 100%; }
.find-match .muted { display: block; font-size: 13px; }
.find-pic { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--amber), var(--mid)); flex: none; }
/* find on instagram (live) */
.finder { padding: 22px; }
.finder h2 { margin: 0 0 6px; font-size: 24px; font-weight: 900; }
.btn.wide { width: 100%; }
.f-ok { background: #E3F4EA; color: #1E6B3F; border-radius: 12px; padding: 12px 14px; margin: 8px 0 14px; font-size: 15px; }
.f-names { background: var(--ice); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 14px; color: var(--ink); }
.f-from { margin: 0 0 2px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.f-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--ink); background: var(--ice); border-radius: 10px; padding: 8px 12px; margin: 8px 0 14px; }
.f-q { margin: 0; font-size: 21px; font-weight: 900; color: var(--navy); }
.f-cand { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 10px; background: #fff; }
.f-who { display: flex; gap: 10px; align-items: center; min-width: 0; }
.f-who > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.f-who .muted { display: block; font-size: 13px; }
.f-pic { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; background: var(--ice); border: 1px solid var(--line); }
.f-ini { display: grid; place-items: center; font-weight: 800; font-size: 24px; color: var(--navy); }
.f-bio { font-size: 14px; margin: 8px 0 0; color: var(--ink); }
.f-cand .row { margin-top: 10px; }
.f-other { margin-top: 14px; }
.f-done { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
.f-done p { margin: 0 0 10px; }
.preview .veil { position: absolute; inset: 0; display: grid; place-items: center; }
.veil-in { background: var(--navy); color: #fff; border-radius: 14px; padding: 16px 20px; text-align: center; box-shadow: 0 10px 30px rgba(15,33,55,.25); max-width: 340px; }
.veil-in b { font-family: Montserrat, sans-serif; display: block; font-size: 16px; margin-bottom: 4px; }

/* sheet (modal) */
.sheet-wrap { position: fixed; inset: 0; background: rgba(15,33,55,.45); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.sheet { background: #fff; border-radius: 18px; width: min(640px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(15,33,55,.35); }
.sh-head { position: sticky; top: 0; background: #fff; padding: 16px 18px 12px; border-bottom: 1px solid var(--grey); z-index: 2; }
.sh-head h3 { margin: 0; font-size: 18px; font-weight: 800; }
.sh-x { position: absolute; right: 12px; top: 10px; border: 0; background: var(--grey); width: 32px; height: 32px; border-radius: 50%; font-size: 18px; color: var(--navy); }
.sh-body { padding: 14px 18px 18px; }
.sh-foot { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--grey); padding: 12px 18px; }
.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field label { font-size: 12px; font-weight: 700; color: #6B7C8D; text-transform: uppercase; letter-spacing: .04em; }
.field select, .field input, .field textarea { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; width: 100%; }
.field textarea { min-height: 70px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.msg { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.msg-text { font-size: 15px; color: var(--navy); white-space: pre-wrap; }
.msg-text mark { background: #FCEBD0; color: #8A5A00; border-radius: 4px; padding: 0 3px; }
.msg-meta { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.msg-from { font-size: 12px; color: #6B7C8D; flex: 1 1 180px; }
.msg-from b { color: var(--ink); }
.msg.used { border-color: var(--green); background: #F4FAF7; }
.qr { display: grid; grid-template-columns: 200px 1fr; gap: 14px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; }
.qr svg { width: 200px; height: 200px; background: #fff; border-radius: 8px; }
.qr b { display: block; color: var(--navy); font-size: 14px; margin-bottom: 2px; }
.ig-open { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.ig-open .btn { justify-content: center; padding: 12px; }
.hint { font-size: 13px; background: var(--ice); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.hist { font-size: 13px; margin: 0; padding-left: 18px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 60; box-shadow: 0 8px 24px rgba(15,33,55,.3); max-width: calc(100% - 32px); }

.settings { display: grid; gap: 14px; max-width: 720px; }
.settings .card { padding: 18px; }
.settings h3 { margin: 0 0 4px; font-size: 16px; font-weight: 800; }
.settings p { margin: 0 0 12px; font-size: 14px; }
.drop { display: block; cursor: pointer; border: 2px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; background: var(--page); }
.drop.over { border-color: var(--blue); background: var(--ice); }

@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat .num { font-size: 20px; }
  .steps { grid-template-columns: 1fr; }
  .event { grid-template-columns: 60px 1fr; }
  .event .ev-btn { grid-column: 1 / -1; }
  .event .ev-btn .btn { width: 100%; justify-content: center; }
  .grid2 { grid-template-columns: 1fr; }
  .bulk { top: 96px; }
  /* list table becomes stacked rows */
  table.list thead { display: none; }
  table.list, .list tbody, .list tr, .list td { display: block; width: 100%; }
  .list tr { position: relative; padding: 10px 12px 10px 44px; border-top: 1px solid var(--grey); }
  .list tr:first-child { border-top: 0; }
  .list td { border: 0; padding: 2px 0; }
  .list td.c-check { position: absolute; left: 12px; top: 12px; width: auto; }
  .list td.c-scores { display: flex; gap: 14px; flex-wrap: wrap; padding-top: 6px; }
  .list td[data-k]::before { content: attr(data-k) ": "; font-size: 12px; color: #6B7C8D; font-weight: 700; }
  .p-actions .btn { flex: 1 1 30%; min-width: 0; }
}
@media (max-width: 420px) {
  .person { grid-template-columns: 1fr; }
  .person .check { position: absolute; }
  .person { position: relative; }
  .person .p-body { padding-left: 42px; }
  .score .lbl { font-size: 11px; }
}

.list .btn { white-space: nowrap; }

/* add an event */
.grid3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 0 12px; }
.chip.new { background: #DDF1E7; color: var(--green); }
.chip.mine { background: var(--navy); color: #fff; }
#ev-drop { display: block; cursor: pointer; margin-bottom: 10px; }
#ev-drop b { color: var(--navy); }
.paste { margin-bottom: 14px; font-size: 14px; }
.paste summary { cursor: pointer; font-weight: 700; color: var(--blue); padding: 4px 0; }
.paste textarea { width: 100%; min-height: 110px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; margin: 8px 0; }
.hint.ok { background: #DDF1E7; color: #165E3E; }
.hint.warn { background: #FCEBD0; color: #8A5A00; }
.field .found { border-color: var(--green); background: #F4FAF7; }
.okbox { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; font-weight: 600; color: var(--navy); background: var(--ice); padding: 10px 12px; border-radius: 10px; }
.okbox input { margin-top: 3px; }
@media (max-width: 760px) {
  .grid3 { grid-template-columns: 1fr 1fr; }
  .grid3 .field:first-child { grid-column: 1 / -1; }
  .qr { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .p-mid .score .lbl { min-width: 84px; }
  /* 16px stops iPhone from zooming in when a field is tapped */
  .field input, .field select, .field textarea, .search, .toolbar select, .paste textarea { font-size: 16px; }
}

/* import */
.imp-opt { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; font: inherit; color: var(--ink); }
.imp-opt:hover { border-color: var(--mid); }
.imp-opt > b, .imp-opt summary > b { display: block; font-family: Montserrat, sans-serif; color: var(--navy); font-size: 16px; }
.imp-opt > span, .imp-opt summary > span { display: block; font-size: 13px; color: #6B7C8D; margin-top: 2px; }
.imp-opt summary { list-style: none; }
.imp-opt summary::-webkit-details-marker { display: none; }
.imp-opt textarea { width: 100%; min-height: 120px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; margin: 10px 0 8px; font-size: 16px; }
.imp-steps { margin: 10px 0 0; padding-left: 20px; font-size: 14px; }
.imp-steps li { margin-bottom: 6px; }
.imp-tpl { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--ice); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin: 4px 0 10px; }
.imp-help { font-size: 14px; }
.imp-help summary { cursor: pointer; font-weight: 700; color: var(--blue); }
.imp-help ul { padding-left: 18px; margin: 8px 0; }
.imp-list { border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; margin-bottom: 12px; }
.imp-row { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--grey); }
.imp-list .muted { padding: 8px 0; }

/* sign-in */
body.gated .top, body.gated main { display: none; }
#gate { min-height: 100vh; min-height: 100dvh; background: var(--navy); display: grid; place-items: center; padding: 24px 16px; }
.gate-card { background: #fff; border-radius: 20px; padding: 28px 22px; width: min(400px, 100%); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.gate-card .mark { margin: 0 auto 10px; width: 52px; height: 52px; font-size: 22px; border-radius: 12px; }
.gate-card h1 { margin: 0; font-size: 26px; font-weight: 900; }
.gate-card form { display: grid; gap: 10px; margin-top: 20px; text-align: left; }
.gate-card label { font-size: 14px; font-weight: 600; color: var(--navy); }
.gate-card input { font-size: 18px; border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; width: 100%; }
.btn.big { justify-content: center; padding: 14px; font-size: 16px; border-radius: 12px; }
.pw { position: relative; }
.pw input { padding-right: 64px; }
.pw .link { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.gate-card .link { background: none; border: 0; padding: 0; color: var(--navy); font-weight: 700; text-decoration: underline; font-size: 14px; }
.gate-foot { margin-top: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--ink); }
.gate-card .small-note { font-size: 13px; margin-top: -4px; }
.gate-msg { margin-top: 12px; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.gate-msg.warn { background: #FCEBD0; color: #8A5A00; }
.gate-msg.ok { background: #E3F4EA; color: #1E6B3F; }
.gate-card .small { margin-top: 18px; font-size: 13px; }
