/* ui.css — the shared design system for every app page (buyer, agent portal, kit tools, pilot editor).
   Same visual language as the landing page: system type, quiet surfaces, one strong accent per screen.
   Brand colors come from --brand / --accent (set per brokerage), so everything stays white-label. */

/* ---------- tokens ---------- */
:root, .themed {
  --brand: #102b43; --brand-ink: #fff; --accent: #159a91; --accent-ink: #14181a;
  --brand-soft: color-mix(in srgb, var(--brand) 7%, #fff);
  --brand-mid: color-mix(in srgb, var(--brand) 18%, #fff);
  --brand-deep: color-mix(in srgb, var(--brand) 85%, #000);
  --accent-soft: color-mix(in srgb, var(--accent) 16%, #fff);
}
:root {
  --bg: #f5f3f0;            /* warm, quiet page */
  --fill: #efede9;          /* inputs, inset areas */
  --surface: #fff;
  --text: #1d1d1f; --muted: #6e6e73; --faint: #8e8e93;
  --line: #e6e3de;
  --ok: #248a3d; --ok-bg: #e7f4ea;
  --warn-text: #8a4b00; --warn-bg: #fdf0dc;
  --danger: #c4161c;
  --r-card: 20px; --r-ctl: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 28px -14px rgba(0,0,0,.12);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--font); letter-spacing: -.011em; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; letter-spacing: -.022em; }
h1 { font-weight: 700; } h2, h3 { font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: .5rem; top: -4rem; z-index: 100; background: var(--text); color: #fff; padding: .6rem 1rem; border-radius: 10px; }
.skip-link:focus { top: .5rem; }
.wrap { width: min(1100px, 100% - 2rem); margin-inline: auto; }
.nw { white-space: nowrap; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

/* ---------- buttons & links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .6rem 1.2rem; border: 0; border-radius: 980px;
  background: var(--brand); color: var(--brand-ink); font: 600 .98rem/1.2 var(--font); letter-spacing: -.01em; text-decoration: none; cursor: pointer; transition: opacity .15s, transform .15s, background .15s; }
.btn:hover { opacity: .9; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-lg { min-height: 52px; padding: .8rem 1.6rem; font-size: 1.05rem; }
.btn-sm { min-height: 36px; padding: .4rem .95rem; font-size: .9rem; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--brand); padding-inline: .7rem; }
.btn-ghost:hover { background: color-mix(in srgb, var(--brand) 7%, transparent); opacity: 1; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: 600 inherit var(--font); font-size: inherit; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.round { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.round:hover { background: var(--brand-mid); text-decoration: none; }
.round .ic { width: 18px; height: 18px; }

/* ---------- forms ---------- */
label, .label { display: block; margin-bottom: .35rem; font-size: .9rem; font-weight: 600; }
.hint { color: var(--muted); font-size: .88rem; font-weight: 400; }
.field { margin-bottom: 1rem; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="date"], select, textarea {
  width: 100%; min-height: 46px; padding: .6rem .85rem; font: 400 1rem var(--font); color: var(--text);
  background: var(--fill); border: 1px solid transparent; border-radius: var(--r-ctl); transition: background .15s, border-color .15s, box-shadow .15s; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
input[disabled] { color: var(--muted); }
.check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 400; font-size: .9rem; color: var(--muted); }
.check input { width: 22px; height: 22px; flex: none; margin-top: .1rem; accent-color: var(--brand); }
.error, .err-text { color: var(--danger); font-size: .9rem; font-weight: 600; }
.err-text { min-height: 1.2em; }
input[type="file"] { font: .88rem var(--font); max-width: 100%; }
input[type="color"] { width: 52px; height: 44px; padding: 3px; border: 0; border-radius: 12px; background: var(--fill); cursor: pointer; }

/* ---------- surfaces ---------- */
.panel { background: var(--surface); border-radius: var(--r-card); padding: 1.25rem; box-shadow: var(--shadow); }
.panel h2 { font-size: 1.2rem; margin-bottom: .8rem; }
.panel > h2 + .sub, .sub { color: var(--muted); font-size: .92rem; }
.panel > h2 + .sub { margin-top: -.45rem; }
.stack { display: grid; gap: 1.1rem; }
.stack > * { min-width: 0; }
.progress { height: 6px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.pill { display: inline-block; font-size: .72rem; font-weight: 600; border-radius: 99px; padding: .05rem .5rem; margin-left: .35rem; background: var(--brand-soft); color: var(--brand); vertical-align: middle; }

/* ---------- top bars ---------- */
.demo-bar { background: #1d1d1f; color: #d2d2d7; font-size: .76rem; text-align: center; padding: .35rem 1rem; }
.demo-bar a { color: #fff; text-decoration: underline; }
.brand-head { background: var(--brand); color: var(--brand-ink); }
.brand-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 64px; padding-block: .55rem; }
.brand-id { display: flex; align-items: center; gap: .65rem; min-width: 0; color: inherit; font-weight: 600; font-size: 1.02rem; letter-spacing: -.01em; }
.brand-id:hover { text-decoration: none; }
.brand-id img { width: 36px; height: 36px; border-radius: 9px; object-fit: contain; flex: none; }
.brand-id.wide img { width: auto; height: 46px; max-width: min(200px, 52vw); border-radius: 0; }
.agent-chip { display: flex; align-items: center; gap: .6rem; font-size: .85rem; line-height: 1.25; text-align: right; flex: none; }
.agent-chip img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-ink) 35%, transparent); }
.agent-chip small { display: block; opacity: .75; }
.agent-chip .who { display: none; }
@media (min-width: 480px) { .agent-chip .who { display: block; } }
.portal-head .wrap { flex-wrap: wrap; gap: .4rem 1rem; }
.portal-nav { display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.portal-nav::-webkit-scrollbar { display: none; }
.portal-nav a { color: var(--brand-ink); font-size: .9rem; font-weight: 500; padding: .4rem .75rem; border-radius: 99px; white-space: nowrap; opacity: .78; }
.portal-nav a:hover { opacity: 1; text-decoration: none; background: color-mix(in srgb, var(--brand-ink) 12%, transparent); }
.portal-nav a[aria-current="page"] { opacity: 1; font-weight: 600; background: color-mix(in srgb, var(--brand-ink) 16%, transparent); }
@media (max-width: 640px) { .portal-head .wrap { padding-bottom: .45rem; } .portal-nav { width: 100%; margin-inline: -.4rem; } }

/* ======================= BUYER PAGE ======================= */
.buyer-main { padding: 1.25rem 0 3rem; }
.buyer-grid { display: grid; gap: 1.1rem; }
.buyer-grid > * { min-width: 0; }
@media (min-width: 960px) { .buyer-grid { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 1.75rem; align-items: start; } .buyer-aside { position: sticky; top: 1rem; } }
.family-banner { display: flex; gap: .6rem; align-items: flex-start; background: var(--surface); border-radius: 16px; padding: .85rem 1rem; font-size: .93rem; box-shadow: var(--shadow); }
.family-banner .ic { color: var(--brand); margin-top: .15rem; }

.deal-hero { padding: 0; }
.deal-hero .hi { color: var(--muted); margin: 0 0 .6rem; padding-inline: .2rem; font-size: .95rem; }
.hero-photo { position: relative; aspect-ratio: 16 / 9; margin-bottom: .9rem; border-radius: 22px; overflow: hidden; background: var(--fill); box-shadow: var(--shadow); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 58%, rgba(0,0,0,.34)); pointer-events: none; }
.hero-photo-tag { position: absolute; left: .85rem; bottom: .8rem; z-index: 1; display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; border-radius: 99px;
  background: rgba(255,255,255,.9); color: #1d1d1f; font-size: .84rem; font-weight: 600; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
@media (min-width: 700px) { .hero-photo { aspect-ratio: 2.3 / 1; } }
.hero-track { background: var(--surface); border-radius: 24px; padding: 20px 20px 16px; margin: 0 0 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 18px 40px -20px color-mix(in srgb, var(--brand) 40%, rgba(0,0,0,.35)); }
.hero-facts { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: .4rem 1.5rem; padding: 0 .25rem; }
.hero-facts h1 { font-size: clamp(1.25rem, 4.5vw, 1.55rem); margin: 0; }
.hero-facts .loc { margin: .1rem 0 0; color: var(--muted); }
.hero-close { display: flex; flex-direction: column; }
.countdown { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; color: var(--brand); }
.close-date { font-size: .88rem; color: var(--muted); }
.agent-note { margin-top: 1rem; background: var(--surface); border-radius: 16px; padding: .85rem 1rem; font-size: .95rem; box-shadow: var(--shadow); }
.agent-note b { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .1rem; }
.keys-cta { margin-top: 1rem; }

/* progress list */
.parallel-note { display: flex; gap: .5rem; align-items: flex-start; color: var(--muted); font-size: .9rem; margin: -.3rem 0 1.1rem; }
.parallel-note strong { color: var(--text); font-weight: 600; }
.stages { list-style: none; margin: 0; padding: 0; }
.stage { position: relative; }
.seg { position: absolute; left: 13px; top: 42px; bottom: -2px; width: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.seg-fill { display: block; height: 100%; background: var(--brand); transform: scaleY(0); transform-origin: top; transition: transform .6s ease; }
.ready .stage.is-done .seg-fill { transform: scaleY(1); transition-delay: calc(var(--i) * 80ms); }
.stage:last-child .seg { display: none; }
.stage-h { margin: 0; font: inherit; }
.stage-btn { width: 100%; display: flex; align-items: center; gap: .8rem; padding: .5rem .2rem .5rem 0; min-height: 52px; background: none; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; border-radius: 12px; }
.marker { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 700; background: var(--fill); color: var(--muted); position: relative; z-index: 1; }
.is-done .marker { background: var(--brand); color: var(--brand-ink); }
.is-current .marker { background: #fff; color: var(--brand); box-shadow: inset 0 0 0 2.5px var(--brand), 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
.stage-t { flex: 1; min-width: 0; }
.stage-name { display: block; font-weight: 500; line-height: 1.3; }
.is-current .stage-name { font-weight: 700; font-size: 1.05rem; }
.is-future .stage-name { color: var(--muted); }
.stage-meta { display: block; font-size: .82rem; color: var(--muted); }
.tag-overlap { font-size: .8rem; color: var(--faint); margin-left: .3rem; }
.chev { width: 20px; height: 20px; flex: none; color: var(--faint); transition: rotate .2s; }
.stage-btn[aria-expanded="true"] .chev { rotate: 180deg; }
.stage-btn:hover .stage-name { color: var(--brand); }
.stage-panel { margin: .2rem 0 1rem 40px; animation: ui-reveal .3s ease; }
@keyframes ui-reveal { from { opacity: 0; translate: 0 -4px; } }
.is-current .stage-panel { background: var(--bg); border-radius: 16px; padding: 1rem 1.05rem; }
.stage-panel section { margin-bottom: 1rem; }
.stage-panel section:last-child { margin-bottom: 0; }
.stage-panel h4 { font-size: .84rem; font-weight: 600; color: var(--muted); margin-bottom: .2rem; letter-spacing: 0; }
.stage-panel p { margin: 0 0 .5rem; }
.stage-panel dl { margin: 0 0 .5rem; display: grid; gap: .15rem; }
.stage-panel dt { font-weight: 600; font-size: .9rem; }
.stage-panel dd { margin: 0 0 .35rem; color: var(--muted); }
.reassure { font-weight: 500; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li + li { border-top: 1px solid var(--line); }
.todo label { display: flex; gap: .7rem; align-items: flex-start; margin: 0; padding: .55rem 0; font-weight: 400; cursor: pointer; }
.todo input { width: 22px; height: 22px; flex: none; margin-top: .05rem; accent-color: var(--brand); }
.todo input:checked + span { text-decoration: line-through; color: var(--faint); }
.todo-static { margin: 0; padding-left: 1.2rem; }
.nothing, .allset { display: flex; gap: .45rem; align-items: center; color: var(--ok); font-weight: 600; margin: 0; }
.allset { margin-top: .5rem; animation: ui-reveal .3s ease; }

/* aside: grouped lists */
.dates, .team { list-style: none; margin: 0; padding: 0; }
.dates li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; font-size: .95rem; }
.dates li + li, .team li + li { border-top: 1px solid var(--line); }
.dates .d-when { text-align: right; color: var(--muted); font-size: .86rem; flex: none; }
.dates .d-when b { display: block; color: var(--text); font-weight: 600; }
.dates li.is-next .d-label { font-weight: 600; }
.dates li.is-next .d-when b { color: var(--brand); }
.dates .passed { color: var(--faint); }
.dates .passed .d-when b { color: var(--muted); font-weight: 500; }
.team li { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .75rem 0; }
.team li:first-child { padding-top: .1rem; }
.team .role { font-size: .78rem; color: var(--muted); }
.team .nm { font-weight: 600; }
.team .co { color: var(--muted); font-size: .88rem; }
.team .acts { display: flex; gap: .45rem; flex: none; }

/* text updates + phone preview */
.sms-form .consent { margin: .5rem 0 1rem; }
.sms-demo-note { font-size: .8rem; color: var(--faint); }
.sms-preview { margin-top: 1.25rem; }
.phone { width: 260px; max-width: 100%; aspect-ratio: 9 / 16; margin-inline: auto; padding: 10px; border-radius: 40px; background: #111; position: relative; box-shadow: 0 24px 50px -20px rgba(0,0,0,.4); }
.phone::before { content: ""; position: absolute; top: 18px; left: 50%; translate: -50% 0; width: 76px; height: 22px; border-radius: 99px; background: #000; z-index: 2; }
.phone-screen { height: 100%; border-radius: 31px; overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.sms-head { padding: 46px 14px 10px; text-align: center; background: #f5f5f7; border-bottom: 1px solid #e5e5ea; font-size: .8rem; }
.sms-head small { display: block; color: var(--muted); font-size: .7rem; }
.sms-body { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.bubble { align-self: flex-start; max-width: 90%; padding: 9px 12px; border-radius: 18px 18px 18px 5px; background: #e9e9eb; color: #111; font-size: .8rem; line-height: 1.4; white-space: pre-line; }
.bubble-time { margin: 2px 0 0; text-align: center; font-size: .68rem; color: var(--faint); }
.disclaimer { font-size: .82rem; color: var(--faint); padding: .25rem .2rem; margin: 0; }
.page-foot { text-align: center; font-size: .8rem; color: var(--faint); padding: 1rem 0 2rem; }
.page-foot a { color: var(--muted); }

/* ======================= AGENT PORTAL ======================= */
.agent-main { padding: 1.25rem 0 3rem; }
.page-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; }
.page-title h1 { font-size: clamp(1.7rem, 5vw, 2.2rem); margin: 0; }
.page-title p { margin: 0; color: var(--muted); }
.title-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.agent-grid { display: grid; gap: 1.5rem; }
.agent-grid > * { min-width: 0; }
@media (min-width: 980px) { .agent-grid { grid-template-columns: minmax(0, 1.4fr) minmax(340px, 1fr); align-items: start; } .brand-panel { position: sticky; top: 1rem; } }
.deals { display: grid; gap: .9rem; }
.deal { background: var(--surface); border-radius: var(--r-card); padding: 1.1rem 1.15rem; box-shadow: var(--shadow); }
.deal.just-moved { animation: ui-glow 1.2s ease; }
@keyframes ui-glow { 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 25%, transparent), var(--shadow); } }
.deal-top { display: flex; align-items: center; gap: .75rem; }
.deal-top h3 { flex: 1; min-width: 0; margin: 0; font-size: 1.1rem; }
.deal-thumb { width: 50px; height: 50px; border-radius: 12px; object-fit: cover; flex: none; }
.deal-link { color: inherit; }
.deal-link:hover { color: var(--brand); }
.deal .addr { color: var(--muted); font-size: .92rem; margin: .1rem 0 .7rem; }
.flag { display: inline-flex; align-items: center; gap: .3rem; flex: none; white-space: nowrap; font-size: .78rem; font-weight: 600; color: var(--warn-text); background: var(--warn-bg); border-radius: 99px; padding: .15rem .6rem; }
.flag .ic { width: 14px; height: 14px; }
.attn { color: var(--warn-text); font-size: .9rem; margin: -.3rem 0 .75rem; }
.stage-line { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.stage-line strong { color: var(--text); font-weight: 600; }
.deal-meta { display: flex; flex-wrap: wrap; gap: .2rem .9rem; font-size: .86rem; color: var(--muted); margin: .45rem 0 .8rem; }
.last-update { font-size: .85rem; color: var(--muted); margin: -.3rem 0 .9rem; }
.stale-chip { color: var(--warn-text); font-weight: 600; }
.deal-actions { display: grid; gap: .25rem; }
@media (min-width: 560px) { .deal-actions { grid-template-columns: 1fr auto; align-items: center; } }
.deal-actions .btn-lg { width: 100%; }
.details-link { grid-column: 1 / -1; font-size: .88rem; font-weight: 600; padding: .35rem 0 0; text-align: center; }
.done-msg { display: flex; align-items: center; justify-content: center; gap: .4rem; color: var(--ok); font-weight: 600; padding: .8rem; }
.current-badge { display: inline-flex; align-items: center; gap: .3rem; margin-left: .45rem; font-size: .82rem; font-weight: 600; border-radius: 99px; padding: .12rem .6rem; vertical-align: middle; }
.current-badge .ic { width: 14px; height: 14px; }
.current-badge.ok { background: var(--ok-bg); color: var(--ok); }
.current-badge.due { background: var(--warn-bg); color: var(--warn-text); }

/* dialogs */
dialog { width: min(520px, 94vw); padding: 0; border: 0; border-radius: 22px; color: var(--text); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); }
dialog::backdrop { background: rgba(20, 18, 16, .38); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.dlg-in { padding: 1.5rem; }
.dlg-in h2 { font-size: 1.35rem; }
.move-row { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; background: var(--bg); border-radius: 14px; padding: .7rem .9rem; margin-bottom: 1rem; font-size: .93rem; }
.move-row b { color: var(--brand); }
.sms-prev-label { font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .35rem; }
.sms-prev { background: #e9e9eb; color: #111; border-radius: 18px 18px 18px 5px; padding: .8rem 1rem; font-size: .9rem; white-space: pre-line; margin-bottom: 1rem; }
.dlg-actions { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.counter { text-align: right; font-size: .78rem; color: var(--faint); }
#newdeal { width: min(600px, 96vw); }
.nd-grid { display: grid; gap: 0 .9rem; }
@media (min-width: 560px) { .nd-grid { grid-template-columns: 1fr 1fr; } .nd-grid .full { grid-column: 1 / -1; } }
.nd-more { background: var(--bg); border-radius: 14px; padding: .75rem .95rem; margin-bottom: 1rem; }
.nd-more summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.sent-check { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin-bottom: .8rem; background: var(--brand); color: var(--brand-ink); }
.sent-check .ic { width: 26px; height: 26px; }
#nd-done .dlg-actions { display: grid; grid-template-columns: 1fr 1fr; }
#nd-done .dlg-actions .btn { width: 100%; }
.photo-pick { display: flex; align-items: center; gap: .75rem; }
.photo-pick img { width: 72px; height: 48px; object-fit: cover; border-radius: 9px; }

/* branding panel */
.brand-panel h2 { font-size: 1.25rem; }
.presets { display: grid; gap: 0; margin-bottom: 1.1rem; background: var(--bg); border-radius: 14px; overflow: hidden; }
.preset { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 54px; padding: .55rem .85rem; background: none; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.preset + .preset { border-top: 1px solid var(--line); }
.preset[aria-pressed="true"] { background: var(--surface); box-shadow: inset 3px 0 0 var(--brand); }
.preset .sw { display: flex; }
.preset .sw i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; }
.preset .sw i + i { margin-left: -7px; }
.preset small { display: block; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.colorfield { display: flex; align-items: center; gap: .6rem; }
.colorfield code { font-size: .85rem; color: var(--muted); }
.upload { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.upload img { width: 46px; height: 46px; border-radius: 10px; object-fit: contain; background: var(--fill); }
.upload img.round { border-radius: 50%; object-fit: cover; }
.contrast-note { font-size: .84rem; margin: -.4rem 0 1rem; }
.contrast-note.bad { color: var(--danger); font-weight: 600; }
.contrast-note.good { color: var(--ok); }
.preview { border-radius: 16px; overflow: hidden; margin: 1rem 0; background: var(--bg); }
.preview .brand-head .wrap { width: 100%; min-height: 54px; padding-inline: .9rem; }
.preview .brand-id { font-size: .92rem; }
.preview .brand-id img, .preview .agent-chip img { width: 30px; height: 30px; }
.preview .pv-body { padding: .9rem; }
.preview .pv-body .progress { margin: .5rem 0 .8rem; }
.preview .pv-body strong { font-size: 1.15rem; font-weight: 700; color: var(--brand); }
.save-row { display: flex; gap: .4rem; flex-wrap: wrap; }

/* deal details */
.back-link { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; margin-bottom: .8rem; }
.deal-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: .8rem 1.5rem; margin-bottom: 1.25rem; }
.deal-head h1 { font-size: clamp(1.6rem, 5vw, 2.2rem); margin: 0; }
.deal-head .addr { color: var(--muted); margin: .2rem 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-b, .chip-n { font-size: .84rem; font-weight: 600; border-radius: 99px; padding: .22rem .75rem; }
.chip-b { background: var(--brand); color: var(--brand-ink); }
.chip-n { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.deal-grid { display: grid; gap: 1.1rem; }
.deal-grid > * { min-width: 0; }
@media (min-width: 960px) { .deal-grid { grid-template-columns: minmax(0, 1.2fr) minmax(320px, 1fr); align-items: start; } }
.mini-stages { list-style: none; margin: 0 0 1rem; padding: 0; }
.mini-stages li { display: flex; align-items: center; gap: .65rem; padding: .3rem 0; color: var(--muted); font-size: .95rem; }
.mini-stages i { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 .72rem var(--font); background: var(--fill); }
.mini-stages li.d { color: var(--text); } .mini-stages li.d i { background: var(--brand); color: var(--brand-ink); }
.mini-stages li.c { color: var(--text); font-weight: 600; } .mini-stages li.c i { background: #fff; color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }
.mini-stages .you { font-size: .72rem; font-weight: 600; color: var(--brand); background: var(--brand-soft); border-radius: 99px; padding: .05rem .5rem; margin-left: .35rem; }
.adv-panel { margin-top: .9rem; background: var(--bg); border-radius: 16px; padding: 1rem; }
.adv-panel .sms-prev { background: #fff; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; gap: .7rem; padding: .6rem 0; font-size: .94rem; }
.activity li + li { border-top: 1px solid var(--line); }
.activity small { color: var(--muted); }
.a-ic { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--brand); }
.a-ic .ic { width: 15px; height: 15px; }
.link-row code { display: block; margin-bottom: .7rem; padding: .6rem .8rem; border-radius: 12px; background: var(--bg); font-size: .8rem; overflow-wrap: anywhere; color: var(--muted); }
.btn-row { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.kd-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: .5rem; margin-bottom: .5rem; }
.kd-row input { min-height: 44px; }
fieldset.ct { border: 0; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
fieldset.ct legend { font-weight: 600; margin-bottom: .45rem; padding: 0; }
fieldset.ct input { min-height: 44px; }
.house-prev { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; }
.house-empty { display: flex; gap: .75rem; align-items: center; background: var(--bg); border-radius: 14px; padding: 1rem; color: var(--muted); }
.house-empty .ic { width: 26px; height: 26px; color: var(--brand); }
.house-empty p { margin: 0; font-size: .92rem; }
label.btn:has(+ input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }

/* brokerage */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1.25rem; }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile-s { background: var(--surface); border-radius: 18px; padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.tile-s b { display: block; font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -.035em; }
.tile-s span { color: var(--muted); font-size: .88rem; }
.tile-s.warn b { color: var(--warn-text); }
.broker-grid { display: grid; gap: 1.1rem; }
.broker-grid > * { min-width: 0; }
@media (min-width: 960px) { .broker-grid { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); align-items: start; } }
.tbl-wrap { overflow-x: auto; margin: 0 -.25rem; }
.tbl { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; padding: .5rem; font-size: .78rem; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.tbl td { padding: .7rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .current-badge { margin-left: 0; }
.tbl tr.invited td { color: var(--muted); }
.pill-soft { font-size: .8rem; font-weight: 600; color: var(--brand); background: var(--brand-soft); border-radius: 99px; padding: .15rem .6rem; }
.brand-mini { display: flex; align-items: center; gap: .55rem; }
.brand-mini .sw-b, .brand-mini .sw-a { width: 26px; height: 26px; flex: none; border-radius: 50%; }
.brand-mini .sw-b { background: var(--brand); } .brand-mini .sw-a { background: var(--accent); margin-left: -14px; border: 2px solid #fff; }
.chips-f { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; margin-bottom: .9rem; background: var(--fill); border-radius: 11px; }
.chip-f { min-height: 34px; padding: .3rem .8rem; border: 0; border-radius: 9px; background: transparent; color: var(--text); font: 600 .86rem var(--font); cursor: pointer; }
.chip-f[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* ======================= CELEBRATIONS (celebrate.js) ======================= */
.fx-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 300; }
.fx-modal { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; padding: 16px; background: rgba(20, 18, 16, .42); opacity: 0; transition: opacity .2s; }
.fx-modal.show { opacity: 1; }
.fx-card { width: min(400px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 28px 24px 22px; border-radius: 26px; background: #fff; color: var(--text); text-align: center; box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); transform: scale(.94); transition: transform .35s cubic-bezier(.2, 1.3, .4, 1); }
.fx-modal.show .fx-card { transform: scale(1); }
.fx-card.fx-wide { width: min(460px, 100%); }
.fx-emoji { font-size: 60px; line-height: 1; margin-bottom: 12px; animation: fx-pop .6s cubic-bezier(.2, 1.6, .4, 1) both .1s; }
@keyframes fx-pop { from { transform: scale(.3) rotate(-15deg); opacity: 0; } }
.fx-card h2 { font-size: 1.55rem; margin-bottom: .35rem; }
.fx-card p { color: var(--muted); }
.fx-actions { display: grid; gap: .45rem; margin-top: 1.1rem; }
.fx-actions .btn { width: 100%; }
.fx-preview-wrap { margin: .8rem 0; padding: 10px; border-radius: 16px; background: var(--bg); }
.fx-preview { width: 100%; max-width: 300px; aspect-ratio: 4 / 5; margin: auto; border-radius: 10px; background: var(--fill); }
.fx-addr { justify-content: center; text-align: left; color: var(--text); margin-bottom: .3rem; }
.fx-note { margin: .2rem 0 0; font-size: .8rem; }
.fx-banner { position: fixed; left: 12px; right: 12px; top: 14px; z-index: 260; width: fit-content; margin-inline: auto; display: flex; align-items: center; gap: .6rem; padding: .5rem 1.05rem .5rem .5rem;
  background: rgba(255,255,255,.94); color: var(--text); border-radius: 99px; box-shadow: 0 10px 30px -8px rgba(0,0,0,.25); font-weight: 600; font-size: .93rem; translate: 0 -160%; transition: translate .45s cubic-bezier(.2, 1.3, .4, 1); cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.fx-banner.show { translate: 0 0; }
.fx-check { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-size: .9rem; animation: fx-pop .5s cubic-bezier(.2, 1.6, .4, 1) both .25s; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 20px; z-index: 200; translate: -50% 160%; display: flex; gap: 1rem; align-items: center; max-width: min(92vw, 460px);
  padding: .8rem 1.1rem; border-radius: 16px; background: rgba(29, 29, 31, .94); color: #fff; font-size: .94rem; box-shadow: 0 12px 30px -10px rgba(0,0,0,.4); transition: translate .3s cubic-bezier(.2, .9, .3, 1.2); }
.toast.show { translate: -50% 0; }
.toast button { padding: .3rem .5rem; border: 0; background: none; color: #ffd28a; font: 600 .94rem var(--font); cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
#logo-thumb { background: var(--brand); padding: 4px; }

/* ======================= APPLE PASS ======================= */
:root { --bg: #f5f5f7; --line: #e3e3e8; --muted: #6e6e73; --shadow: none; }
body { font-size: 17px; letter-spacing: -.016em; }

/* frosted white header, like the landing page nav */
.brand-head { position: sticky; top: 0; z-index: 50; color: var(--text); background: rgba(255, 255, 255, .78);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(0, 0, 0, .08); }
.brand-head .wrap { min-height: 54px; padding-block: .4rem; }
.brand-id { color: var(--text); font-size: .98rem; }
.brand-id img { width: 30px; height: 30px; border-radius: 8px; }
.brand-id.wide img { height: 38px; width: auto; max-width: 170px; padding: 5px 11px; border-radius: 10px; background: var(--brand); object-fit: contain; }
.agent-chip { color: var(--text); }
.agent-chip small { opacity: 1; color: var(--muted); }
.agent-chip img { width: 32px; height: 32px; box-shadow: none; }
.portal-nav a { color: var(--text); opacity: .7; font-size: .88rem; }
.portal-nav a:hover { opacity: 1; background: var(--fill); }
.portal-nav a[aria-current="page"] { opacity: 1; background: var(--fill); }
.demo-bar { background: #f5f5f7; color: var(--muted); border-bottom: 1px solid var(--line); }
.demo-bar a { color: var(--text); }
.demo-home { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.demo-home img { height: 16px; width: auto; }
/* full-color product logo: no colored backing behind it */
.brand-id.wide.plain img { background: none !important; padding: 0 !important; border-radius: 0 !important; }
.powered-mark { height: 12px; width: auto; vertical-align: -1px; margin-right: 4px; display: inline; }

/* flat surfaces: white on light grey, no shadows */
.panel, .deal, .tile-s, .family-banner, .agent-note, .chip-n { box-shadow: none; }
.panel { border-radius: 18px; padding: 1.15rem 1.25rem; }
.deal { border-radius: 18px; }

/* iOS-style group headings above each panel */
.group > .group-h { font-size: 1.4rem; font-weight: 700; letter-spacing: -.025em; margin: 0 0 .6rem .2rem; }
.group > .panel > .sub:first-child { margin-top: 0; }

/* buyer hero: large title first */
.deal-hero .hi { margin: .4rem 0 .15rem; padding: 0 .2rem; font-size: .95rem; }
.hero-title { font-size: clamp(2rem, 7vw, 2.75rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.08; margin: 0; padding: 0 .2rem; }
.hero-sub { color: var(--muted); margin: .35rem 0 1.1rem; padding: 0 .2rem; font-size: 1rem; }
.hero-sub b { color: var(--brand); font-weight: 600; }
.hero-track { border-radius: 22px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .04), 0 18px 40px -24px color-mix(in srgb, var(--brand) 45%, rgba(0,0,0,.35)); }

/* agent: large titles */
.page-title h1 { font-size: clamp(2rem, 6vw, 2.6rem); letter-spacing: -.035em; }
.deal-head h1 { font-size: clamp(2rem, 6vw, 2.6rem); letter-spacing: -.035em; }
.deal-top h3 { font-size: 1.5rem; font-weight: 700; line-height: 1.15; letter-spacing: -.03em; }
/* Advance: compact, sized to its label, sitting beside "View as buyer" */
.deal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.deal-actions .btn-adv { min-height: 40px; padding: .45rem 1rem; font-size: .92rem; width: auto; }
.deal-actions .btn-ghost { min-height: 40px; padding: .45rem 1rem; font-size: .92rem; }
.deal-actions .details-link { flex-basis: 100%; }
.preview .brand-id img, .brand-head .brand-id:not(.wide) img { background: var(--brand); }

/* ======================= CALENDARS ======================= */
.group-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .6rem; }
.group-row .group-h { margin: 0 0 0 .2rem; }
.cal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.gcal summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .9rem; list-style: none; }
.gcal summary::-webkit-details-marker { display: none; }
.gcal summary::after { content: " ›"; }
.gcal[open] summary::after { content: " ⌄"; }
.gcal ul { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .35rem; font-size: .9rem; }
.cal-note { margin: .6rem 0 0; font-size: .8rem; }

/* agent: next 14 days */
.upcoming { margin-bottom: 1.25rem; }
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda > li { display: grid; grid-template-columns: 92px 1fr; gap: .75rem; padding: .6rem 0; }
.agenda > li + li { border-top: 1px solid var(--line); }
.ag-day { font-weight: 600; font-size: .9rem; color: var(--muted); }
.ag-day.soon { color: var(--brand); }
.agenda ul, .cal-agenda ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.agenda ul li, .cal-agenda li { display: flex; gap: .55rem; align-items: baseline; font-size: .95rem; }
.ag-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--accent); transform: translateY(-1px); }
.ag-dot.is-close { background: var(--brand); }

/* brokerage: month calendar */
.cal-tools { display: flex; gap: .5rem; align-items: center; }
.cal-tools select { min-height: 38px; width: auto; padding: .35rem 2rem .35rem .8rem; font-size: .9rem; }
.cal { container-type: inline-size; }
.cal-head { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.cal-head h3 { margin: 0 .3rem; font-size: 1.15rem; min-width: 9.5rem; text-align: center; }
.cal-nav { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--fill); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.cal-nav:hover { background: var(--line); }
.cal-legend { margin-left: auto; display: flex; gap: .9rem; font-size: .82rem; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.cal-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.cal-legend i.is-close { background: var(--brand); }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-week span { text-align: center; font-size: .75rem; font-weight: 600; color: var(--faint); padding-bottom: .3rem; }
.cal-day { min-height: 54px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; border-radius: 12px; background: var(--bg);
  font: inherit; color: inherit; cursor: pointer; text-align: left; min-width: 0; }
.cal-day:hover { background: var(--fill); }
.cal-day.is-other { opacity: .45; }
.cal-n { font-size: .88rem; font-weight: 600; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.is-today .cal-n { background: var(--brand); color: var(--brand-ink); }
.cal-day.is-sel { background: #fff; box-shadow: inset 0 0 0 2px var(--brand); }
.cal-evs { display: none; }
.cal-dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cal-dots i.is-close { background: var(--brand); }
@container (min-width: 640px) {
  .cal-day { min-height: 96px; align-items: stretch; padding: 6px; }
  .cal-n { align-self: flex-end; }
  .cal-dots { display: none; }
  .cal-evs { display: grid; gap: 3px; }
  .cal-ev { display: block; font-size: .72rem; line-height: 1.25; padding: 2px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    background: var(--accent-soft); color: var(--text); }
  .cal-ev.is-close { background: var(--brand); color: var(--brand-ink); }
  .cal-more { font-size: .7rem; color: var(--muted); padding-left: 4px; }
}
.cal-agenda { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.cal-agenda h4 { margin: 0 0 .5rem; font-size: 1rem; }
.cal-actions { flex-direction: column; align-items: stretch; }
.cal-actions .btn { width: 100%; }
.gcal summary { text-align: center; }
.gcal summary::after { content: "›"; display: inline-block; margin-left: .3rem; transition: rotate .2s; }
.gcal[open] summary::after { content: "›"; rotate: 90deg; }
.gcal ul { background: var(--bg); border-radius: 12px; padding: .5rem .8rem; }
.gcal li + li { border-top: 1px solid var(--line); padding-top: .35rem; }

/* ---------- larger brokerage logos ---------- */
.brand-head .wrap { min-height: 66px; }
.brand-id img { width: 42px; height: 42px; border-radius: 11px; }
.brand-id.wide img { height: 54px; max-width: min(250px, 60vw); padding: 7px 14px; border-radius: 12px; }
@media (max-width: 480px) { .brand-id.wide img { height: 48px; max-width: 58vw; padding: 6px 12px; } }
.preview .brand-id img { width: 34px; height: 34px; }
.preview .brand-id.wide img { width: auto; height: 40px; }
.brand-head .wrap { min-height: 74px; }
.brand-id.wide img { height: 62px; max-width: min(260px, 62vw); padding: 7px 12px; }
@media (max-width: 480px) { .brand-id.wide img { height: 54px; } }
.preview .brand-id.wide img { height: 42px; }

/* ======================= FIRST-OPEN INTRO (buyer page) ======================= */
.intro { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; color: var(--brand-ink); cursor: pointer;
  background: radial-gradient(120% 90% at 50% 42%, color-mix(in srgb, var(--brand) 78%, #fff) 0%, var(--brand) 55%, color-mix(in srgb, var(--brand) 80%, #000) 100%);
  transition: transform .8s cubic-bezier(.76, 0, .24, 1), border-radius .8s cubic-bezier(.76, 0, .24, 1); will-change: transform; }
.intro.out { transform: translateY(-104%); border-radius: 0 0 50% 50% / 0 0 7% 7%; }
.intro-inner { display: grid; justify-items: center; gap: 20px; padding: 24px; }
.intro-logo { position: relative; display: grid; place-items: center; animation: intro-in .7s cubic-bezier(.2, .8, .2, 1) both, intro-pulse 1.1s ease-in-out .6s 1; }
.intro-logo img { display: block; height: 104px; width: auto; max-width: 72vw; border-radius: 22px; filter: drop-shadow(0 10px 30px rgba(0,0,0,.25)); }
.intro-logo::after { content: ""; position: absolute; inset: -22px; border-radius: 34px; pointer-events: none;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); animation: intro-halo 1.2s ease-out .65s 1; }
.intro-hello { margin: 0; font-size: 1.05rem; font-weight: 500; letter-spacing: .01em; opacity: 0; animation: intro-text .6s ease .45s forwards; }
@keyframes intro-in { from { opacity: 0; transform: scale(.9); filter: blur(6px); } }
@keyframes intro-pulse { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.045); } }
@keyframes intro-halo { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 100% { box-shadow: 0 0 0 28px transparent; } }
@keyframes intro-text { from { opacity: 0; transform: translateY(6px); } to { opacity: .9; transform: none; } }
/* the page beneath rises gently into place as the intro leaves */
.intro-rise #main { animation: intro-rise .9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes intro-rise { from { opacity: .4; transform: translateY(18px) scale(.99); } }
@media (prefers-reduced-motion: reduce) { .intro { display: none; } }

/* ======================= LOCAL CHECKLIST ======================= */
.kind { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: 0; border-radius: 99px; padding: .1rem .55rem; background: var(--fill); color: var(--text); white-space: nowrap; }
.kind-law { background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand-mid); }
.kind-contract { background: var(--accent-soft); color: var(--warn-text); }
.kind-recommended { background: var(--ok-bg); color: var(--ok); }
.draft-chip { display: inline-block; font-size: .68rem; font-weight: 600; border-radius: 99px; padding: .08rem .5rem; background: var(--warn-bg); color: var(--warn-text); white-space: nowrap; }

/* buyer */
.local .li-h { font-size: .95rem; font-weight: 700; letter-spacing: -.01em; margin: 1.3rem 0 .5rem; }
.local .li-h:first-of-type { margin-top: .9rem; }
.local .li-note { margin: -.2rem 0 .6rem; font-size: .85rem; color: var(--muted); }
.local .li { border-top: 1px solid var(--line); }
.local .li:last-of-type { border-bottom: 1px solid var(--line); }
.local .li > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: .15rem .75rem; padding: .85rem .1rem; align-items: start; }
.local .li > summary::-webkit-details-marker { display: none; }
.local .li > summary .li-top { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .35rem; }
.local .li > summary strong { font-size: 1rem; line-height: 1.3; letter-spacing: -.015em; }
.local .li > summary small { color: var(--muted); font-size: .8rem; white-space: nowrap; align-self: center; }
.local .li > summary::after { content: ""; display: none; }
.local .li[open] > summary strong { color: var(--brand); }
.li-body { padding: 0 .1rem 1rem; font-size: .95rem; line-height: 1.5; }
.li-body p { margin: 0 0 .6rem; }
.li-todo { background: var(--brand-soft); border-radius: 12px; padding: .65rem .8rem; }
.li-meta { color: var(--muted); font-size: .85rem; }
.li-src { font-size: .8rem; color: var(--muted); }
.li-src a { text-decoration: underline; text-underline-offset: 2px; }
.li-date { display: block; margin-top: .15rem; color: var(--faint); }
.li-foot { margin: 1.1rem 0 0; }

/* agent: new-deal dialog */
.nd-local { border: 0; padding: 0; margin: 0 0 .2rem; min-width: 0; }
.nd-local legend { font-size: .85rem; font-weight: 600; padding: 0; margin-bottom: .45rem; }
.nd-flags { display: grid; gap: .4rem; }
.chk { display: flex; align-items: center; gap: .55rem; font-size: .92rem; font-weight: 500; margin: 0; min-height: 36px; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.local-prev { margin-top: .7rem; background: var(--brand-soft); border-radius: 14px; padding: .8rem .9rem; font-size: .88rem; }
.local-prev:empty { display: none; }
.lp-count { margin: 0 0 .45rem; }
.lp-list { margin: 0; padding: 0; list-style: none; display: grid; gap: .35rem; }
.lp-list li { line-height: 1.35; }
.lp-layers { margin: .6rem 0 0; font-size: .8rem; color: var(--muted); }
.hint#nd-guess { margin: .3rem 0 0; }

/* agent: deal page panel */
.lc-flags { display: grid; gap: .3rem; margin: .3rem 0 .6rem; }
.lc-list { list-style: none; margin: .7rem 0 0; padding: 0; }
.lc-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: .6rem; align-items: center; padding: .7rem 0; border-top: 1px solid var(--line); }
.lc-row.is-hidden { opacity: .55; }
.lc-done { margin: 0; display: grid; place-items: center; min-width: 32px; min-height: 32px; }
.lc-done input { width: 20px; height: 20px; accent-color: var(--brand); }
.lc-t { display: flex; flex-wrap: wrap; gap: .3rem .4rem; align-items: baseline; line-height: 1.3; }
.lc-main small { color: var(--muted); font-size: .8rem; }
.lc-add { margin-top: .9rem; }
.lc-add > summary { cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--brand); }
.lc-addgrid { display: grid; grid-template-columns: 1fr; gap: .5rem; margin-top: .6rem; }
@media (min-width: 560px) { .lc-addgrid { grid-template-columns: 1fr 170px auto; } }
.lbl { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .4rem; }

/* embedded in a phone mockup (landing page): no demo bar, no scrolling */
.embed .demo-bar, .embed .skip-link { display: none; }
.embed, .embed body { overflow: hidden; }
