/* Local Home Builders Online - site styles (no framework) */
:root {
  --bg: #f3f5f9; --card: #fff; --ink: #1d2433; --ink-2: #3d4659; --muted: #6b7489; --line: #e1e6ef;
  --navy: #0d1b3d; --navy-2: #1b2c5a; --blue: #2557d6; --blue-soft: #eaf0ff; --green: #12935a; --green-soft: #e6f6ee;
  --amber: #b26a00; --amber-soft: #fff5e3; --red: #c62828; --red-soft: #fdecec; --gold: #f5b041;
  --shadow: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04); --radius: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 8px; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; margin: 0 0 10px; }
h3 { font-size: 1.02rem; margin: 0 0 8px; }
p { margin: 0 0 12px; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
code { background: #eef1f6; padding: 1px 5px; border-radius: 5px; font-size: .9em; }

/* ---------- header */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.topbar-in { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.topbar-in.wide { max-width: 1520px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); min-width: 0; margin-right: auto; }
.brand:hover { text-decoration: none; }
.logo-mark { width: 38px; height: 38px; flex: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand b { font-size: 1.05rem; letter-spacing: -.01em; white-space: nowrap; }
.brand small { color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logins { display: flex; gap: 8px; flex-wrap: wrap; }
.logins .btn { min-height: 38px; }
.logins .login-buyer { background: var(--blue); border-color: var(--blue); color: #fff; }
.logins .login-realtor { background: var(--navy); border-color: var(--navy); color: #fff; }
.logins .login-builder { background: #fff; color: var(--navy); border-color: var(--navy); }
.logins .login-buyer:hover, .logins .login-realtor:hover { color: #fff; filter: brightness(1.12); }
.mainnav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mainnav a { color: var(--ink-2); font-weight: 600; font-size: .92rem; padding: 7px 10px; border-radius: 9px; }
.mainnav a:hover { background: #f1f4f9; text-decoration: none; }
.mainnav a.on { background: var(--blue-soft); color: #1a3c99; }
.mainnav a.who { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; font-size: .88rem; font-weight: 700; color: var(--ink); }
.mainnav a.who::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: #eef1f6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233d4659' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.5-4 4.5-6 8-6s6.5 2 8 6'/%3E%3C/svg%3E") center/14px no-repeat; }
.role-badge { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; background: #eef1f6; color: var(--ink-2); }
.role-badge.r-realtor { background: #e8eefb; color: #1a3c99; }
.role-badge.r-rep { background: #fff1db; color: #8a5200; }
.role-badge.r-buyer { background: var(--green-soft); color: #0b6b41; }
.role-badge.r-admin { background: var(--navy); color: #fff; }
.mainnav .signout { color: var(--muted); }
.menu-btn { display: none; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 11px; font: inherit; font-weight: 700; cursor: pointer; color: var(--ink); }
.menu-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 899px) {
  .menu-btn { display: inline-flex; }
  .mainnav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 6px 0 4px; }
  .mainnav.open { display: flex; }
  .mainnav a { padding: 11px 10px; }
  .mainnav a.who { margin: 4px 0; }
}
@media (max-width: 640px) {
  .brand small { display: none; }
  .logins { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .logins .btn { padding: 8px 4px; font-size: .82rem; }
}

/* ---------- layout */
.main { max-width: 1180px; margin: 0 auto; padding: 18px 16px 30px; }
.main.wide { max-width: 1520px; padding-top: 12px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.card.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.card.mid { max-width: 820px; margin-left: auto; margin-right: auto; }
.card h1 + .muted { margin-top: -2px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } .card { padding: 16px; } }
.section-t { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 22px 0 10px; font-weight: 800; border-top: 1px solid var(--line); padding-top: 16px; }
.section-t:first-child, form > h3.section-t:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { margin: 0; }
.page-head.mid { max-width: 820px; margin-left: auto; margin-right: auto; }

/* ---------- forms */
.fld { display: block; margin-bottom: 13px; }
.fld > span:first-child { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 5px; color: var(--ink-2); }
.req { color: var(--red); font-style: normal; }
.help { display: block; font-size: .8rem; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=url], input[type=search], input[type=date], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid #cfd6e3; border-radius: 10px;
  padding: 10px 12px; min-height: 44px; outline: none; transition: border-color .12s, box-shadow .12s;
}
select { appearance: none; -webkit-appearance: none; padding-right: 32px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7489' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center/16px; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,87,214,.15); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; margin: 6px 0 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--blue); }
.errors { background: var(--red-soft); color: #8e1b1b; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: .92rem; }
.errors ul { margin: 0; padding-left: 18px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 9px 16px; border-radius: 10px;
  border: 1px solid #cfd6e3; background: #fff; color: var(--ink); font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { text-decoration: none; border-color: #b7c1d4; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: #1d48b8; border-color: #1d48b8; color: #fff; }
.btn-dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); color: #fff; }
.btn-call { background: var(--green); border-color: var(--green); color: #fff; }
.btn-call:hover { color: #fff; filter: brightness(1.06); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--red); border-color: #efc1c1; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: .86rem; }
.btn-lg { min-height: 52px; padding: 12px 22px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.linkish { border: 0; background: none; color: var(--blue); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }

/* ---------- flash + pills */
.flash { max-width: 1180px; margin: 0 auto 12px; padding: 11px 15px; border-radius: 11px; font-weight: 600; font-size: .95rem; }
.flash-ok { background: var(--green-soft); color: #0b6b41; }
.flash-err { background: var(--red-soft); color: #8e1b1b; }
.flash-info { background: var(--blue-soft); color: #1a3c99; }
.pill { display: inline-block; font-size: .74rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #eef1f6; color: var(--ink-2); }
.st { display: inline-block; font-size: .75rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.st-sent, .st-admin { background: #eef1f6; color: var(--ink-2); }
.st-received { background: var(--amber-soft); color: #8a5200; }
.st-registered { background: var(--green-soft); color: #0b6b41; }
.st-declined { background: var(--red-soft); color: #8e1b1b; }
.st-pending { background: var(--amber-soft); color: #8a5200; }
.st-approved { background: var(--green-soft); color: #0b6b41; }
.st-rejected, .st-disabled { background: var(--red-soft); color: #8e1b1b; }

/* ---------- tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .sub { display: block; color: var(--muted); font-size: .82rem; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: 4px; }

/* ---------- tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 7px 13px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); color: var(--ink-2); font-weight: 700; font-size: .88rem; }
.tabs a:hover { text-decoration: none; }
.tabs a.on { background: var(--navy); color: #fff; }
.tabs a small { color: var(--muted); font-weight: 700; margin-left: 4px; }
.tabs a.on small { color: #b9c6ea; }

/* ---------- auth pages */
.auth { max-width: 460px; margin: 10px auto; }
.auth .role-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; }
.auth .role-tabs a { text-align: center; padding: 9px 4px; border-radius: 10px; background: #fff; box-shadow: var(--shadow); font-weight: 700; color: var(--ink-2); font-size: .9rem; }
.auth .role-tabs a.on { background: var(--navy); color: #fff; }
.auth .role-tabs a:hover { text-decoration: none; }
.auth-alt { text-align: center; margin-top: 14px; font-size: .95rem; }
.auth-perks { margin: 4px 0 16px; padding: 0; list-style: none; font-size: .92rem; color: var(--ink-2); }
.auth-perks li { padding-left: 24px; position: relative; margin-bottom: 5px; }
.auth-perks li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }

/* ---------- photo picker */
.photo-pick { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.photo-pick .ph { width: 84px; height: 84px; border-radius: 50%; background: var(--blue-soft) center/cover no-repeat; flex: none; display: grid; place-items: center; color: #2548b8; font-weight: 800; font-size: 1.3rem; border: 2px dashed #b8c6ec; overflow: hidden; }
.photo-pick .ph.has { border: 0; }
.photo-pick .ph img { width: 100%; height: 100%; object-fit: cover; }
.photo-pick input[type=file] { font-size: .88rem; max-width: 100%; }

/* ---------- builder rep: community picker */
.cpick { border: 1px solid #cfd6e3; border-radius: 12px; background: #fff; }
.cpick-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cpick-head input[type=search] { flex: 1 1 200px; min-height: 38px; padding: 7px 10px; }
.cpick-all { font-weight: 800; }
.cpick-list { max-height: 300px; overflow-y: auto; padding: 4px 6px; }
.cpick-list label { display: flex; align-items: flex-start; gap: 9px; padding: 7px 6px; border-radius: 8px; cursor: pointer; font-size: .93rem; }
.cpick-list label:hover { background: #f5f7fb; }
.cpick-list input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--blue); }
.cpick-list small { display: block; color: var(--muted); font-size: .8rem; }
.cpick.all .cpick-list { opacity: .5; pointer-events: none; }
.cpick-empty { padding: 16px; color: var(--muted); font-size: .92rem; }
.cpick-count { font-size: .82rem; color: var(--muted); margin-left: auto; }

/* ---------- score meter */
.meter { height: 10px; background: #e7ebf3; border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, #f5b041, #12935a); border-radius: 99px; }
.score-big { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.score-list { list-style: none; padding: 0; margin: 10px 0 0; font-size: .9rem; }
.score-list li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.score-list li.done { color: var(--muted); }
.score-list li.done b { color: var(--green); }
.score-list li b { white-space: nowrap; }

/* ---------- modal */
.modal { position: fixed; inset: 0; z-index: 90; display: none; align-items: flex-start; justify-content: center; padding: 30px 12px; background: rgba(13,27,61,.45); overflow-y: auto; }
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: 16px; width: min(560px, 100%); box-shadow: 0 20px 60px rgba(13,27,61,.35); padding: 20px; position: relative; }
.modal-x { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #eef1f6; cursor: pointer; font-size: 22px; line-height: 1; color: var(--ink-2); }
.modal-box h2 { padding-right: 40px; }
.to-line { display: flex; align-items: center; gap: 10px; background: #f5f7fb; border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; font-size: .92rem; }
.to-line .ini { width: 40px; height: 40px; border-radius: 50%; background: var(--blue-soft); color: #2548b8; display: grid; place-items: center; font-weight: 800; flex: none; }

/* ---------- rep cards (Builder Reps page, registrations) */
.rep-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: grid; grid-template-columns: 52px 1fr; gap: 12px 14px; align-content: start; min-width: 0; }
.rep-card .ini { width: 52px; height: 52px; border-radius: 50%; background: var(--blue-soft); color: #2548b8; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; }
.rep-card h3 { margin: 0; font-size: 1.08rem; }
.rep-card .rc-sub { color: var(--muted); font-size: .88rem; }
.rep-card .rc-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.rep-card .rc-body { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; font-size: .92rem; min-width: 0; overflow-wrap: anywhere; }
.rep-card .rc-model { background: #f6f8fc; border-radius: 10px; padding: 9px 11px; }
.rep-card .rc-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.rep-card .rc-soc { display: flex; gap: 6px; flex-wrap: wrap; }
.rep-card .rc-soc a { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #f1f4f9; color: var(--navy); }
.rep-card .rc-soc svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badge-model { background: #fff1db; color: #8a5200; }
.badge-feat { background: #fdf3c7; color: #7a5b00; }
.badge-score { background: #e8eefb; color: #1a3c99; }
.rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }

/* ---------- builders page */
.b-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.b-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 10px; border-top: 4px solid var(--bc, var(--navy)); }
.b-card-h { display: flex; align-items: center; gap: 12px; }
.b-card-h img { width: 64px; height: 44px; object-fit: contain; flex: none; }
.b-card-h h3 { margin: 0; }
.b-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.b-stats div { background: #f6f8fc; border-radius: 10px; padding: 7px 8px; text-align: center; }
.b-stats b { display: block; font-size: 1.1rem; }
.b-stats b.rng { font-size: .9rem; line-height: 1.35; padding-top: 2px; }
.b-stats span { font-size: .74rem; color: var(--muted); font-weight: 700; }
.b-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }

/* ---------- footer */
.foot { border-top: 1px solid var(--line); background: #fff; margin-top: 10px; }
.foot-in { max-width: 1180px; margin: 0 auto; padding: 18px 16px 26px; color: var(--muted); font-size: .9rem; }
.foot-in p { margin: 0 0 6px; }
.eho { white-space: nowrap; }

/* ---------- quiz (buyer registration) */
.quiz { max-width: 440px; margin: 0 auto; background: #fff; border-radius: 18px; box-shadow: 0 6px 30px rgba(13,27,61,.12); overflow: hidden; }
.quiz-bar { height: 6px; background: #e6e9ef; }
.quiz-bar i { display: block; height: 100%; background: var(--navy); width: 0; transition: width .25s ease; }
.quiz-in { padding: 14px 22px 24px; }
.quiz-back { border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; padding: 6px 0; display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; }
.quiz-back[hidden] { display: none; }
.quiz-back::before { content: ""; width: 8px; height: 8px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.quiz-step { display: none; }
.quiz-step.on { display: block; animation: qin .22s ease; }
@keyframes qin { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.quiz-intro { text-align: center; color: var(--ink-2); font-size: 1.05rem; margin: 10px auto 4px; max-width: 280px; }
.quiz-art { display: block; margin: 8px auto 4px; width: 120px; height: 104px; }
.quiz-q { text-align: center; font-size: 1.32rem; font-weight: 800; line-height: 1.3; margin: 8px 0 16px; }
.quiz-hint { text-align: center; color: var(--muted); margin: -10px 0 12px; font-size: .9rem; }
.quiz-opts { display: flex; flex-direction: column; gap: 12px; }
.quiz-opt { display: block; width: 100%; min-height: 54px; padding: 13px 14px; border: 1.5px solid #1d2433; border-radius: 8px; background: #fff; font: inherit; font-weight: 700; font-size: 1.02rem; color: var(--ink); cursor: pointer; text-align: center; transition: background .1s, color .1s; }
.quiz-opt:hover { background: #f4f6fa; }
.quiz-opt.sel { background: var(--navy); border-color: var(--navy); color: #fff; }
.quiz-next { margin-top: 16px; }
.quiz .fld > span:first-child { font-size: .85rem; }
.quiz-fine { font-size: .78rem; color: var(--muted); line-height: 1.4; }
.tour-photo { border-radius: 12px; overflow: hidden; aspect-ratio: 16/10; background: #e6ebf3; margin-bottom: 14px; }
.tour-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tour-h { font-size: 1.28rem; font-weight: 700; line-height: 1.3; margin: 0 0 6px; }
.tour-sub { font-size: .95rem; color: var(--ink-2); margin: 0 0 2px; }
.tour-picks { display: flex; gap: 8px; margin: 12px 0 4px; overflow-x: auto; padding-bottom: 4px; }
.tour-pick { flex: none; width: 112px; border: 1.5px solid #cfd6e3; border-radius: 10px; background: #fff; padding: 0; overflow: hidden; cursor: pointer; text-align: left; font: inherit; }
.tour-pick img { width: 100%; height: 62px; object-fit: cover; display: block; }
.tour-pick span { display: block; padding: 5px 7px; font-size: .74rem; font-weight: 700; line-height: 1.25; }
.tour-pick.sel { border-color: var(--navy); box-shadow: 0 0 0 2px var(--navy); }
.days { display: flex; gap: 10px; overflow-x: auto; padding: 14px 2px 6px; scroll-snap-type: x mandatory; }
.day { flex: none; width: 84px; min-height: 64px; border: 1.5px solid #c9ced8; border-radius: 10px; background: #fff; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; scroll-snap-align: start; color: var(--ink); }
.day small { font-size: .85rem; }
.day b { font-size: 1.02rem; }
.day.sel { border: 2px solid var(--ink); }
.day svg { width: 18px; height: 18px; fill: currentColor; }
.tour-to { font-size: .95rem; margin: 12px 0 0; }

/* ---------- misc */
.notice { background: var(--amber-soft); border: 1px solid #f3d9a6; color: #6b4200; border-radius: 12px; padding: 11px 14px; font-size: .92rem; margin-bottom: 14px; }
.notice-blue { background: var(--blue-soft); border-color: #cfdcfb; color: #1a3c99; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: .93rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; word-break: break-word; }
.ini-av { width: 44px; height: 44px; border-radius: 50%; background: var(--blue-soft); color: #2548b8; display: inline-grid; place-items: center; font-weight: 800; flex: none; }
.av { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.row { display: flex; gap: 12px; align-items: center; }
.stack > * + * { margin-top: 10px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.stat b { display: block; font-size: 1.6rem; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-weight: 700; font-size: .82rem; }
.stat.hot { border-left: 4px solid var(--amber); }

/* ---------- v1.1: Contact Builder Rep + messages */
.prefs { display: flex; gap: 8px; flex-wrap: wrap; }
.pref { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #cfd6e3; border-radius: 10px; padding: 8px 12px; cursor: pointer; font-weight: 600; font-size: .92rem; }
.pref input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); }
.pref:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); color: #1a3c99; }
.msg-card.is-new { border-left: 4px solid var(--amber); }
.msg-body { background: #f3f6fe; border-left: 4px solid var(--blue); border-radius: 0 10px 10px 0; padding: 11px 14px; white-space: normal; overflow-wrap: anywhere; }
.health { list-style: none; padding: 0; margin: 8px 0 12px; }
.health li { padding: 6px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 10px; align-items: baseline; }
.health b.ok { color: var(--green); } .health b.bad { color: var(--red); } .health b.unk { color: var(--muted); }

/* ---------- v1.2: Log in as + demo accounts */
.imp-bar { background: linear-gradient(90deg, #3b2a00, #5c4000); color: #fff; }
.imp-in { max-width: 1180px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.imp-in.wide { max-width: 1520px; }
.imp-in > svg { width: 22px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 2; flex: none; }
.imp-t { flex: 1; min-width: 220px; font-size: .92rem; }
.imp-note { display: block; font-size: .8rem; color: #f3dfb2; margin-top: 2px; }
.imp-bar form { margin: 0; }
.imp-bar .btn { background: var(--gold); border-color: var(--gold); color: #241900; min-height: 36px; }
.imp-bar .btn:hover { background: #ffc35c; border-color: #ffc35c; }
.demo-badge { display: inline-block; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 6px; background: #f1e8ff; color: #5b2ca0; vertical-align: middle; }
.btn-as { background: #fff8eb; border-color: #f0d49c; color: #6b4200; }
.btn-as:hover { background: #ffefcc; border-color: #e5bf6f; color: #6b4200; }
.btn-as svg { width: 16px; height: 16px; }
.tbl td .btn-sm { white-space: nowrap; }
.mini-meter { display: inline-block; width: 70px; height: 7px; background: #e3e7ef; border-radius: 99px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.mini-meter i { display: block; height: 7px; background: var(--green); border-radius: 99px; }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.demo-grid .card { margin: 0; }
.u-acts { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .imp-in { gap: 8px; padding: 7px 12px; flex-wrap: nowrap; }
  .imp-note { display: none; }
  .imp-t { min-width: 0; font-size: .86rem; }
  .imp-bar .btn { min-height: 32px; padding: 5px 10px; font-size: .8rem; white-space: nowrap; }
}
.stack > form { display: block !important; }
.stack > form .btn-block { width: 100%; }
.tbl tr.grp td { background: #f6f8fc; padding: 8px 10px; }
.notice-green { background: var(--green-soft); border-color: #b9e4cc; color: #0b5c38; }

/* ---------- v1.3: points + share link */
.pts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.pts-grid > div { background: #f6f8fc; border-radius: 12px; padding: 11px 13px; }
.pts-grid b { display: block; font-size: 1.4rem; letter-spacing: -.02em; }
.pts-grid span { color: var(--ink-2); font-weight: 700; font-size: .84rem; line-height: 1.3; display: block; }
.pts-grid small { color: var(--muted); font-weight: 600; }
.share-row { display: flex; gap: 8px; }
.share-row input { flex: 1; min-width: 0; font-weight: 700; color: #0b6b41; background: #f2fbf6; border-color: #b9e4cc; }
@media (max-width: 520px) { .share-row { flex-direction: column; } }
.rep-card img.rc-photo { object-fit: cover; padding: 0; background: #e9edf5; box-shadow: 0 0 0 2px #fff, 0 1px 6px rgba(13,27,61,.2); }
.rep-card.rc-f { box-shadow: var(--shadow), 0 0 0 2px #f0d98a inset; }
.badge-f { background: #fdf3c7; color: #7a5b00; }
.badge-y { background: var(--green-soft); color: #0b6b41; }
.badge-t { background: #e8eefb; color: #1a3c99; }
.badge-r { background: #eef1f6; color: var(--ink-2); }

/* ---------- v1.4: the demo site bar (demo.php) */
.demo-bar { background: linear-gradient(90deg, #3a1f6e, #5b2ca0); color: #fff; }
.demo-in { max-width: 1180px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.demo-in.wide { max-width: 1520px; }
.demo-tag { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: #fff; color: #5b2ca0; border-radius: 6px; padding: 3px 8px; }
.demo-seg { display: inline-flex; background: rgba(255,255,255,.14); border-radius: 999px; padding: 3px; gap: 2px; }
.demo-seg a { color: #fff; font-weight: 700; font-size: .9rem; padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
.demo-seg a:hover { text-decoration: none; background: rgba(255,255,255,.14); }
.demo-seg a.on { background: #fff; color: #3a1f6e; }
.demo-who { display: inline-flex; align-items: center; gap: 6px; flex: 1; min-width: 200px; margin: 0; }
.demo-who span { font-size: .85rem; color: #e3d6fb; }
.demo-who select { max-width: 380px; min-height: 34px; padding: 4px 30px 4px 10px; font-size: .9rem; border-radius: 9px; border: 0; }
.demo-exit { color: #fff; font-weight: 700; font-size: .88rem; border: 1px solid rgba(255,255,255,.5); border-radius: 9px; padding: 6px 12px; white-space: nowrap; }
.demo-exit:hover { text-decoration: none; background: rgba(255,255,255,.12); }
@media (max-width: 640px) {
  .demo-in { gap: 8px; padding: 7px 12px; }
  .demo-seg a { padding: 6px 10px; font-size: .84rem; }
  .demo-who { order: 3; flex-basis: 100%; }
  .demo-exit { display: none; }   /* the menu has Exit demo */
  .demo-who select { max-width: none; flex: 1; }
}

/* ---------- v1.4: Featured Rep checkboxes */
.fc-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.fc-tools input[type=search] { max-width: 260px; min-height: 34px; padding: 5px 10px; }
.fc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px 14px; max-height: 460px; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: 12px; }
.fc-item { display: flex; gap: 9px; align-items: flex-start; padding: 7px 8px; border-radius: 9px; font-size: .9rem; line-height: 1.3; cursor: pointer; }
.fc-item:hover { background: #f6f8fc; }
.fc-item input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: #b8860b; }
.fc-item:has(input:checked) { background: #fffaeb; }
.fc-item[hidden] { display: none; }
.fc-me { font-size: .76rem; font-weight: 800; color: #7a5b00; }
.fc-other { font-size: .76rem; font-weight: 700; color: #8a5200; }
.fc-end { font-size: .76rem; font-weight: 700; color: var(--muted); }
.demo-launch { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; border-left: 4px solid #5b2ca0; }
