/* ResiLane — design tokens and components.
   Layout concept: an all-white dashboard where color means "who". Four party lanes (buyer blue,
   seller teal, professional purple) run through chips, bubbles and timelines. Gold marks the Hub; black marks admin.
   Committed light theme by design. */
:root {
  --ink: #17243A;
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --soft: #F6F8FB;
  --line: #E6EAF1;
  --line-strong: #CDD5E1;
  --text: #17243A;
  --muted: #5A6880;

  --buyer: #2563EB;   --buyer-ink: #1D4FD8;  --buyer-tint: #EBF2FF;
  --seller: #0F9D83;  --seller-ink: #087A66; --seller-tint: #E2F7F2;
  --pro: #7952B8;     --pro-ink: #6A40AE;    --pro-tint: #F3EDFC;
  --admin: #111418;   --admin-ink: #111418;  --admin-tint: #ECEDEF;
  --hub: #C78B28;     --hub-ink: #8A5B0F;    --hub-tint: #FDF4E2;   --on-hub: #FFFFFF;

  --ok: #16834A;      --ok-tint: #E5F6EC;
  --warn: #B25E00;    --warn-tint: #FFF2DE;
  --bad: #C8261C;     --bad-tint: #FDECEA;
  --block: #4B5565;   --block-tint: #EEF1F5;
  --info: #1D4FD8;    --info-tint: #EBF2FF;
  --demo: #7A4D00;    --demo-tint: #FFF7DD;  --demo-line: #F0CF7C;

  --accent: var(--ink); --accent-ink: var(--ink); --accent-tint: var(--soft); --on-accent: #FFFFFF;
  --lanes: linear-gradient(90deg, var(--buyer) 0 25%, var(--seller) 25% 50%, var(--pro) 50% 75%, var(--hub) 75% 100%);

  --font-ui: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 36, 58, .04), 0 6px 20px rgba(23, 36, 58, .05);
  --focus: 0 0 0 3px rgba(37, 99, 235, .4);
  --base-size: 15px;
  color-scheme: light;
}

body[data-role="buyer"]        { --accent: var(--buyer);  --accent-ink: var(--buyer-ink);  --accent-tint: var(--buyer-tint); }
body[data-role="seller"]       { --accent: var(--seller); --accent-ink: var(--seller-ink); --accent-tint: var(--seller-tint); }
body[data-role="professional"] { --accent: var(--pro);    --accent-ink: var(--pro-ink);    --accent-tint: var(--pro-tint); }
body[data-role="admin"]        { --accent: var(--admin);  --accent-ink: var(--admin-ink);  --accent-tint: var(--admin-tint); }
/* Hub pages take the gold accent whatever the dashboard, so its buttons and active states read as the Hub. */
body[data-hub="1"]          { --accent: var(--hub); --accent-ink: var(--hub-ink); --accent-tint: var(--hub-tint); --on-accent: var(--on-hub); }

* { box-sizing: border-box; }
html { font-size: var(--base-size); background: var(--bg); }
html.text-lg { --base-size: 17px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-ui); font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased; }
html.reduce-motion *, html.reduce-motion *::before { transition: none !important; animation: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before { transition: none !important; animation: none !important; } }
html.underline-links a { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; line-height: 1.2; text-wrap: balance; color: var(--ink); }
h1 { font-size: 1.85rem; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 1.18rem; font-weight: 750; letter-spacing: -.01em; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent-ink); }
.mono { font-family: var(--font-mono); font-size: .88em; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.tnum { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: .72rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 40px; padding: .5rem 1.05rem; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; text-decoration: none;
  background: var(--accent); color: var(--on-accent); transition: filter .15s, background .15s, transform .1s;
  box-shadow: 0 1px 2px rgba(23, 36, 58, .1);
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; filter: none; transform: none; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: none; }
.btn.secondary:hover { background: var(--soft); border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--accent-ink); border-color: transparent; padding-inline: .6rem; box-shadow: none; }
.btn.ghost:hover { background: var(--accent-tint); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.navy { background: var(--ink); color: #fff; }
.btn.sm { min-height: 32px; padding: .3rem .75rem; font-size: .84rem; border-radius: 8px; }
.btn.block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

label { font-weight: 600; font-size: .9rem; }
.field { display: grid; gap: .3rem; min-width: 0; }
.field .hint { font-size: .82rem; color: var(--muted); font-weight: 400; }
.field .err { font-size: .82rem; color: var(--bad); font-weight: 650; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="email"], input[type="tel"], input[type="search"], select, textarea {
  font: inherit; font-size: .95rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 10px; padding: .55rem .75rem; min-height: 42px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: #AEB9CA; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--accent); }
textarea { min-height: 84px; resize: vertical; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); background: var(--bad-tint); }
.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 500; font-size: .92rem; }
.check input { width: 18px; height: 18px; margin-top: .15rem; accent-color: var(--accent); flex: none; }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-prefix input { padding-left: 1.6rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }

/* ---------- Badges & party chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem; padding: .16rem .6rem; border-radius: 999px;
  font-size: .76rem; font-weight: 750; white-space: nowrap; border: 1px solid transparent; line-height: 1.5;
}
.badge .ic { font-size: .8em; }
.b-ok { background: var(--ok-tint); color: var(--ok); }
.b-warn { background: var(--warn-tint); color: var(--warn); }
.b-bad { background: var(--bad-tint); color: var(--bad); }
.b-block { background: var(--block-tint); color: var(--block); border-style: dashed; border-color: var(--block); }
.b-info { background: var(--info-tint); color: var(--info); }
.b-neutral { background: var(--soft); color: var(--muted); border-color: var(--line); }
.b-role { background: var(--accent); color: var(--on-accent); }
/* Party chips are solid so parties read apart at a glance */
.b-buyer { background: var(--buyer); color: #fff; }
.b-seller { background: var(--seller); color: #fff; }
.b-pro { background: var(--pro); color: #fff; }
.b-admin { background: var(--admin); color: #fff; }
.b-hub { background: var(--hub); color: var(--on-hub); }
.demo-tag {
  display: inline-flex; align-items: center; gap: .35rem; padding: .12rem .5rem; border-radius: 6px;
  background: var(--demo-tint); color: var(--demo); border: 1px solid var(--demo-line);
  font-size: .72rem; font-weight: 750; letter-spacing: .02em; white-space: nowrap;
}
.demo-note { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem .9rem; border-radius: 10px; background: var(--demo-tint); color: var(--text); border: 1px solid var(--demo-line); font-size: .86rem; }
.demo-note strong { color: var(--demo); }

.legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- Shell ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  display: flex; align-items: center; gap: 1rem; min-height: 64px;
  padding-block: .55rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.topbar::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--lanes); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: #fff; }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.01em; font-size: 1.12rem; background: none; border: 0; cursor: pointer; padding: 0; font-family: inherit; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; }
.brand-mark svg { width: 32px; height: 32px; }
.topnav { display: flex; gap: .2rem; }
.topnav button { background: none; border: 0; color: var(--muted); font: inherit; font-size: .9rem; font-weight: 650; padding: .45rem .75rem; border-radius: 8px; cursor: pointer; }
.topnav button:hover { color: var(--ink); background: var(--soft); }
.topnav button[aria-current="page"] { color: var(--accent-ink); background: var(--accent-tint); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.role-select select {
  background: var(--accent); color: var(--on-accent); border: 0; min-height: 38px; padding: .3rem 2rem .3rem .85rem; width: auto;
  font-weight: 750; font-size: .86rem; border-radius: 999px; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='white' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center;
}
.btn.hub { background: var(--hub); color: var(--on-hub); }
.role-select select option { color: var(--ink); background: #fff; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: var(--soft); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .count { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; border-radius: 10px; background: #E5484D; color: #fff; font-size: .7rem; font-weight: 800; display: grid; place-items: center; padding: 0 5px; border: 2px solid #fff; }
.menu-btn { display: none; }
.demo-pill { background: var(--demo-tint); color: var(--demo); border: 1px solid var(--demo-line); padding: .2rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; white-space: nowrap; }

.routebar {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between;
  padding-block: .4rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: var(--soft); border-bottom: 1px solid var(--line); font-size: .78rem; color: var(--muted);
}
.routebar .mono { color: var(--ink); }

.layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100vh - 100px); }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 1.1rem .85rem; display: flex; flex-direction: column; gap: .3rem; }
.sidebar .ws { padding: .85rem .9rem; margin-bottom: .6rem; border-radius: 12px; background: var(--accent-tint); }
.sidebar .ws .role { display: inline-block; font-weight: 800; letter-spacing: .1em; font-size: .7rem; padding: .15rem .5rem; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.sidebar .ws .who { font-weight: 750; margin-top: .45rem; color: var(--ink); }
.sidebar nav { display: grid; gap: .15rem; }
.side-link { display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; padding: .58rem .75rem; border-radius: 10px; background: none; border: 0; color: var(--ink); font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; }
.side-link:hover { background: var(--soft); }
.side-link[aria-current="page"] { background: var(--accent); color: var(--on-accent); }
.side-link .n { margin-left: auto; font-size: .72rem; font-weight: 800; background: var(--accent-tint); color: var(--accent-ink); border-radius: 999px; padding: 0 .5rem; }
.side-link[aria-current="page"] .n { background: rgba(255,255,255,.9); }
.side-foot { margin-top: auto; padding: .9rem .4rem 0; border-top: 1px solid var(--line); display: grid; gap: .5rem; font-size: .78rem; color: var(--muted); }

.main { min-width: 0; padding-block: 1.75rem 5rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.main-inner { max-width: 1180px; margin: 0 auto; display: grid; gap: 1.35rem; }
.page-head { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; justify-content: space-between; }
.page-head .sub { color: var(--muted); margin-top: .35rem; }
.scrim { display: none; }

/* ---------- Cards & layout pieces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.25rem; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.card-head p { color: var(--muted); font-size: .86rem; margin-top: .15rem; }
.callout { border: 1px solid var(--accent); background: linear-gradient(0deg, var(--accent-tint), var(--accent-tint)), var(--surface); }
.cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1.35rem; align-items: start; }
.cols-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.35rem; align-items: start; }
.stack { display: grid; gap: 1.1rem; align-content: start; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.stat { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; display: grid; gap: .2rem; text-align: left; font: inherit; color: inherit; cursor: pointer; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.stat::after { content: ""; position: absolute; top: 1rem; right: 1rem; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.stat:hover { border-color: var(--accent); transform: translateY(-1px); }
.stat .k { font-size: .82rem; color: var(--muted); font-weight: 650; }
.stat .v { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent-ink); line-height: 1.1; letter-spacing: -.02em; }
.stat .s { font-size: .78rem; color: var(--muted); }

.list { display: grid; }
.row { display: flex; gap: .75rem; align-items: center; padding: .75rem 0; border-top: 1px solid var(--line); min-width: 0; flex-wrap: wrap; }
.row:first-child { border-top: 0; padding-top: 0; }
.row .grow { flex: 1; min-width: 160px; }
.row .title { font-weight: 650; }
.row .meta { font-size: .82rem; color: var(--muted); }
.empty { padding: 1.6rem 1rem; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 12px; display: grid; gap: .6rem; justify-items: center; background: var(--soft); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: .7rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 750; background: var(--soft); }
tbody tr:hover td { background: #FAFBFD; }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { background: none; border: 0; font: inherit; font-weight: 650; font-size: .9rem; padding: .65rem .9rem; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--accent-ink); border-bottom-color: var(--accent); }

.progress { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; border: 1px solid var(--line); }
.progress > span { display: block; height: 100%; background: var(--accent); transition: width .4s; border-radius: 99px; }

/* ---------- Property cards ---------- */
.prop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.prop { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); min-width: 0; transition: transform .15s, box-shadow .15s; }
.prop:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(23, 36, 58, .09); }
.prop-img { position: relative; aspect-ratio: 16 / 10; max-width: 100%; display: grid; place-items: center; }
.prop-img svg { width: 46%; height: auto; opacity: .95; }
.prop-img .save { position: absolute; top: .55rem; right: .55rem; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); cursor: pointer; font-size: 1.05rem; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.prop-img .save[aria-pressed="true"] { color: #E5484D; }
.prop-img .tagline { position: absolute; left: .55rem; bottom: .55rem; }
.prop-body { padding: .85rem .95rem 1rem; display: grid; gap: .3rem; flex: 1; }
.prop-body .price { font-size: 1.18rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.prop-body .addr { font-weight: 650; }
.prop-body .facts { font-size: .84rem; color: var(--muted); }
.prop-body .btn-row { margin-top: auto; padding-top: .5rem; }
.svc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 1rem; align-items: start; }
.svc-cart { position: sticky; top: 80px; }
.svc-list { display: grid; gap: .5rem; }
.svc { display: flex; gap: .8rem; align-items: center; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; }
.svc.on { border-color: var(--accent); background: var(--accent-tint); }
.svc.free { background: var(--ok-tint, #EAF7F2); }
.svc-side { display: grid; gap: .3rem; justify-items: end; text-align: right; }
.svc-tags { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .3rem; }
.svc-bundles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; }
.svc-bundle { display: grid; gap: .25rem; text-align: left; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; cursor: pointer; }
.svc-bundle:hover { border-color: var(--accent); }
@media (max-width: 900px) { .svc-layout { grid-template-columns: minmax(0, 1fr); } .svc-cart { position: static; } }
.update-bar { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; justify-content: center; background: var(--ink); color: #fff; padding: .6rem .9rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.acct-wrap { position: relative; }
.acct-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.acct-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.14); padding: .4rem; display: grid; z-index: 40; }
.acct-who { display: grid; gap: .1rem; padding: .6rem .7rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; overflow-wrap: anywhere; }
.acct-panel button { text-align: left; background: none; border: 0; padding: .6rem .7rem; border-radius: 8px; font: inherit; cursor: pointer; color: var(--ink); min-height: 40px; }
.acct-panel button:hover { background: var(--soft); }
.acct-panel .acct-out { color: var(--bad); font-weight: 700; }
.avail-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.avail-row .check { min-width: 130px; }
.avail-row select { width: auto; }
.cal-wrap { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 1.2rem; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); }
.cal-day { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; font: inherit; font-size: .9rem; border: 1px solid transparent; background: none; color: var(--line-strong); position: relative; }
button.cal-day { cursor: pointer; color: var(--ink); }
.cal-day.open { background: var(--buyer-tint); color: var(--buyer-ink); font-weight: 700; }
.cal-day.event::after { content: ""; position: absolute; bottom: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--hub); }
.cal-day.mine { border-color: var(--buyer); }
.cal-day.today { text-decoration: underline; }
.cal-day.sel { background: var(--buyer); color: #fff; }
.cal-legend { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .5rem; }
.cal-legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .3rem; vertical-align: middle; }
.lg.open { background: var(--buyer-tint); border: 1px solid var(--buyer); } .lg.event { background: var(--hub); border-radius: 50%; } .lg.mine { border: 2px solid var(--buyer); }
.cal-panel { display: grid; gap: .6rem; align-content: start; }
.cal-slots { display: flex; flex-wrap: wrap; gap: .4rem; }
.cal-slot { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .45rem .8rem; font: inherit; font-weight: 600; cursor: pointer; min-height: 38px; }
.cal-slot.sel { background: var(--buyer); border-color: var(--buyer); color: #fff; }
.cal-slot:disabled { opacity: .45; text-decoration: line-through; cursor: not-allowed; }
@media (max-width: 680px) { .cal-wrap { grid-template-columns: minmax(0, 1fr); } }
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; padding: 1.5rem; }
.calc-controls { display: grid; gap: 1.1rem; align-content: start; }
.calc-toggle { display: inline-flex; padding: 4px; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; justify-self: start; }
.calc-toggle button { border: 0; background: none; padding: .55rem 1.1rem; border-radius: 999px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; min-height: 40px; }
.calc-toggle button.on { background: var(--tone); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.calc input[type=range] { width: 100%; accent-color: var(--tone); margin-top: .4rem; }
.calc-scale { display: flex; justify-content: space-between; }
.calc-result { display: grid; gap: .9rem; align-content: start; padding: 1.25rem; border-radius: 14px; background: var(--tone-tint); border: 1px solid var(--line); }
.calc-big { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.05; color: var(--tone-ink); letter-spacing: -.02em; }
.calc-bars { display: grid; gap: .8rem; }
.calc-bar-label { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .3rem; }
.calc-bar { height: 12px; border-radius: 999px; background: #fff; overflow: hidden; border: 1px solid var(--line); }
.calc-bar span { display: block; height: 100%; background: #9AA4B2; border-radius: 999px; transition: width .2s ease; }
.calc-bar.rl span { background: var(--tone); }
@media (max-width: 760px) { .svc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 1rem; align-items: start; }
.svc-cart { position: sticky; top: 80px; }
.svc-list { display: grid; gap: .5rem; }
.svc { display: flex; gap: .8rem; align-items: center; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; }
.svc.on { border-color: var(--accent); background: var(--accent-tint); }
.svc.free { background: var(--ok-tint, #EAF7F2); }
.svc-side { display: grid; gap: .3rem; justify-items: end; text-align: right; }
.svc-tags { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .3rem; }
.svc-bundles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; }
.svc-bundle { display: grid; gap: .25rem; text-align: left; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; cursor: pointer; }
.svc-bundle:hover { border-color: var(--accent); }
@media (max-width: 900px) { .svc-layout { grid-template-columns: minmax(0, 1fr); } .svc-cart { position: static; } }
.update-bar { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; justify-content: center; background: var(--ink); color: #fff; padding: .6rem .9rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.acct-wrap { position: relative; }
.acct-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.acct-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.14); padding: .4rem; display: grid; z-index: 40; }
.acct-who { display: grid; gap: .1rem; padding: .6rem .7rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; overflow-wrap: anywhere; }
.acct-panel button { text-align: left; background: none; border: 0; padding: .6rem .7rem; border-radius: 8px; font: inherit; cursor: pointer; color: var(--ink); min-height: 40px; }
.acct-panel button:hover { background: var(--soft); }
.acct-panel .acct-out { color: var(--bad); font-weight: 700; }
.avail-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.avail-row .check { min-width: 130px; }
.avail-row select { width: auto; }
.cal-wrap { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 1.2rem; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); }
.cal-day { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; font: inherit; font-size: .9rem; border: 1px solid transparent; background: none; color: var(--line-strong); position: relative; }
button.cal-day { cursor: pointer; color: var(--ink); }
.cal-day.open { background: var(--buyer-tint); color: var(--buyer-ink); font-weight: 700; }
.cal-day.event::after { content: ""; position: absolute; bottom: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--hub); }
.cal-day.mine { border-color: var(--buyer); }
.cal-day.today { text-decoration: underline; }
.cal-day.sel { background: var(--buyer); color: #fff; }
.cal-legend { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .5rem; }
.cal-legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .3rem; vertical-align: middle; }
.lg.open { background: var(--buyer-tint); border: 1px solid var(--buyer); } .lg.event { background: var(--hub); border-radius: 50%; } .lg.mine { border: 2px solid var(--buyer); }
.cal-panel { display: grid; gap: .6rem; align-content: start; }
.cal-slots { display: flex; flex-wrap: wrap; gap: .4rem; }
.cal-slot { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .45rem .8rem; font: inherit; font-weight: 600; cursor: pointer; min-height: 38px; }
.cal-slot.sel { background: var(--buyer); border-color: var(--buyer); color: #fff; }
.cal-slot:disabled { opacity: .45; text-decoration: line-through; cursor: not-allowed; }
@media (max-width: 680px) { .cal-wrap { grid-template-columns: minmax(0, 1fr); } }
.calc { grid-template-columns: minmax(0, 1fr); padding: 1rem; } }
.offer-tip { display: grid; gap: .3rem; padding: .7rem .9rem; border-radius: 10px; border: 1px solid var(--hub); border-left-width: 5px; background: var(--hub-tint); font-size: .92rem; }
.offer-tip-label { font-weight: 800; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--hub-ink); }
.offer-tip a { color: var(--hub-ink); font-weight: 700; }
.thumb { width: 64px; height: 48px; border-radius: 8px; flex: none; display: inline-grid; place-items: center; overflow: hidden; vertical-align: middle; }
.thumb svg { width: 55%; height: auto; }
.thumb.sm { width: 44px; height: 33px; border-radius: 6px; }
.thumb.lg { width: 96px; height: 72px; border-radius: 10px; }
.ls-body { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 1rem; align-items: start; }
.ls-photo { border-radius: 10px; overflow: hidden; }
@media (max-width: 640px) { .svc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 1rem; align-items: start; }
.svc-cart { position: sticky; top: 80px; }
.svc-list { display: grid; gap: .5rem; }
.svc { display: flex; gap: .8rem; align-items: center; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; }
.svc.on { border-color: var(--accent); background: var(--accent-tint); }
.svc.free { background: var(--ok-tint, #EAF7F2); }
.svc-side { display: grid; gap: .3rem; justify-items: end; text-align: right; }
.svc-tags { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .3rem; }
.svc-bundles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; }
.svc-bundle { display: grid; gap: .25rem; text-align: left; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; cursor: pointer; }
.svc-bundle:hover { border-color: var(--accent); }
@media (max-width: 900px) { .svc-layout { grid-template-columns: minmax(0, 1fr); } .svc-cart { position: static; } }
.update-bar { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; justify-content: center; background: var(--ink); color: #fff; padding: .6rem .9rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.acct-wrap { position: relative; }
.acct-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.acct-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.14); padding: .4rem; display: grid; z-index: 40; }
.acct-who { display: grid; gap: .1rem; padding: .6rem .7rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; overflow-wrap: anywhere; }
.acct-panel button { text-align: left; background: none; border: 0; padding: .6rem .7rem; border-radius: 8px; font: inherit; cursor: pointer; color: var(--ink); min-height: 40px; }
.acct-panel button:hover { background: var(--soft); }
.acct-panel .acct-out { color: var(--bad); font-weight: 700; }
.avail-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.avail-row .check { min-width: 130px; }
.avail-row select { width: auto; }
.cal-wrap { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 1.2rem; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); }
.cal-day { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; font: inherit; font-size: .9rem; border: 1px solid transparent; background: none; color: var(--line-strong); position: relative; }
button.cal-day { cursor: pointer; color: var(--ink); }
.cal-day.open { background: var(--buyer-tint); color: var(--buyer-ink); font-weight: 700; }
.cal-day.event::after { content: ""; position: absolute; bottom: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--hub); }
.cal-day.mine { border-color: var(--buyer); }
.cal-day.today { text-decoration: underline; }
.cal-day.sel { background: var(--buyer); color: #fff; }
.cal-legend { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .5rem; }
.cal-legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .3rem; vertical-align: middle; }
.lg.open { background: var(--buyer-tint); border: 1px solid var(--buyer); } .lg.event { background: var(--hub); border-radius: 50%; } .lg.mine { border: 2px solid var(--buyer); }
.cal-panel { display: grid; gap: .6rem; align-content: start; }
.cal-slots { display: flex; flex-wrap: wrap; gap: .4rem; }
.cal-slot { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .45rem .8rem; font: inherit; font-weight: 600; cursor: pointer; min-height: 38px; }
.cal-slot.sel { background: var(--buyer); border-color: var(--buyer); color: #fff; }
.cal-slot:disabled { opacity: .45; text-decoration: line-through; cursor: not-allowed; }
@media (max-width: 680px) { .cal-wrap { grid-template-columns: minmax(0, 1fr); } }
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; padding: 1.5rem; }
.calc-controls { display: grid; gap: 1.1rem; align-content: start; }
.calc-toggle { display: inline-flex; padding: 4px; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; justify-self: start; }
.calc-toggle button { border: 0; background: none; padding: .55rem 1.1rem; border-radius: 999px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; min-height: 40px; }
.calc-toggle button.on { background: var(--tone); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.calc input[type=range] { width: 100%; accent-color: var(--tone); margin-top: .4rem; }
.calc-scale { display: flex; justify-content: space-between; }
.calc-result { display: grid; gap: .9rem; align-content: start; padding: 1.25rem; border-radius: 14px; background: var(--tone-tint); border: 1px solid var(--line); }
.calc-big { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.05; color: var(--tone-ink); letter-spacing: -.02em; }
.calc-bars { display: grid; gap: .8rem; }
.calc-bar-label { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .3rem; }
.calc-bar { height: 12px; border-radius: 999px; background: #fff; overflow: hidden; border: 1px solid var(--line); }
.calc-bar span { display: block; height: 100%; background: #9AA4B2; border-radius: 999px; transition: width .2s ease; }
.calc-bar.rl span { background: var(--tone); }
@media (max-width: 760px) { .svc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 1rem; align-items: start; }
.svc-cart { position: sticky; top: 80px; }
.svc-list { display: grid; gap: .5rem; }
.svc { display: flex; gap: .8rem; align-items: center; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; }
.svc.on { border-color: var(--accent); background: var(--accent-tint); }
.svc.free { background: var(--ok-tint, #EAF7F2); }
.svc-side { display: grid; gap: .3rem; justify-items: end; text-align: right; }
.svc-tags { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .3rem; }
.svc-bundles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; }
.svc-bundle { display: grid; gap: .25rem; text-align: left; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; cursor: pointer; }
.svc-bundle:hover { border-color: var(--accent); }
@media (max-width: 900px) { .svc-layout { grid-template-columns: minmax(0, 1fr); } .svc-cart { position: static; } }
.update-bar { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; justify-content: center; background: var(--ink); color: #fff; padding: .6rem .9rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.acct-wrap { position: relative; }
.acct-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.acct-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.14); padding: .4rem; display: grid; z-index: 40; }
.acct-who { display: grid; gap: .1rem; padding: .6rem .7rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; overflow-wrap: anywhere; }
.acct-panel button { text-align: left; background: none; border: 0; padding: .6rem .7rem; border-radius: 8px; font: inherit; cursor: pointer; color: var(--ink); min-height: 40px; }
.acct-panel button:hover { background: var(--soft); }
.acct-panel .acct-out { color: var(--bad); font-weight: 700; }
.avail-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.avail-row .check { min-width: 130px; }
.avail-row select { width: auto; }
.cal-wrap { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 1.2rem; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); }
.cal-day { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; font: inherit; font-size: .9rem; border: 1px solid transparent; background: none; color: var(--line-strong); position: relative; }
button.cal-day { cursor: pointer; color: var(--ink); }
.cal-day.open { background: var(--buyer-tint); color: var(--buyer-ink); font-weight: 700; }
.cal-day.event::after { content: ""; position: absolute; bottom: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--hub); }
.cal-day.mine { border-color: var(--buyer); }
.cal-day.today { text-decoration: underline; }
.cal-day.sel { background: var(--buyer); color: #fff; }
.cal-legend { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .5rem; }
.cal-legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .3rem; vertical-align: middle; }
.lg.open { background: var(--buyer-tint); border: 1px solid var(--buyer); } .lg.event { background: var(--hub); border-radius: 50%; } .lg.mine { border: 2px solid var(--buyer); }
.cal-panel { display: grid; gap: .6rem; align-content: start; }
.cal-slots { display: flex; flex-wrap: wrap; gap: .4rem; }
.cal-slot { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .45rem .8rem; font: inherit; font-weight: 600; cursor: pointer; min-height: 38px; }
.cal-slot.sel { background: var(--buyer); border-color: var(--buyer); color: #fff; }
.cal-slot:disabled { opacity: .45; text-decoration: line-through; cursor: not-allowed; }
@media (max-width: 680px) { .cal-wrap { grid-template-columns: minmax(0, 1fr); } }
.calc { grid-template-columns: minmax(0, 1fr); padding: 1rem; } }
.offer-tip { display: grid; gap: .3rem; padding: .7rem .9rem; border-radius: 10px; border: 1px solid var(--hub); border-left-width: 5px; background: var(--hub-tint); font-size: .92rem; }
.offer-tip-label { font-weight: 800; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--hub-ink); }
.offer-tip a { color: var(--hub-ink); font-weight: 700; }
.thumb { width: 64px; height: 48px; border-radius: 8px; flex: none; display: inline-grid; place-items: center; overflow: hidden; vertical-align: middle; }
.thumb svg { width: 55%; height: auto; }
.thumb.sm { width: 44px; height: 33px; border-radius: 6px; }
.thumb.lg { width: 96px; height: 72px; border-radius: 10px; }
.ls-body { grid-template-columns: minmax(0, 1fr); } }
.share-row { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .3rem; }
.share-ic { width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; text-decoration: none; }
.share-ic:hover { filter: brightness(.9); }
.fit-line { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.hero-img { border-radius: var(--radius); aspect-ratio: 21 / 9; max-width: 100%; display: grid; place-items: center; }
.hero-img svg { width: 22%; min-width: 90px; }

/* ---------- Stepper / milestones / tasks ---------- */
.stepper { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .25rem; list-style: none; margin: 0; padding-left: 0; }
.stepper li { flex: 1 0 auto; }
.stepper button { width: 100%; display: flex; align-items: center; gap: .45rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .45rem .7rem; font: inherit; font-size: .82rem; font-weight: 650; color: var(--muted); cursor: pointer; white-space: nowrap; }
.stepper button[disabled] { cursor: not-allowed; }
.stepper .num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); font-size: .75rem; font-weight: 800; }
.stepper .done button { color: var(--ink); }
.stepper .done .num { background: var(--ok); color: #fff; }
.stepper .current button { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-tint); }
.stepper .current .num { background: var(--accent); color: var(--on-accent); }

.milestones { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .55rem; list-style: none; padding: 0; margin: 0; }
.ms { position: relative; display: grid; gap: .3rem; justify-items: start; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
.ms .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800; border: 2px solid var(--line-strong); background: var(--surface); color: var(--muted); }
.ms.complete { background: var(--ok-tint); border-color: transparent; }
.ms.complete .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.ms.active { border-color: var(--accent); }
.ms.active .dot { border-color: var(--accent); color: var(--on-accent); background: var(--accent); }
.ms.risk { background: var(--bad-tint); border-color: transparent; }
.ms.risk .dot { border-color: var(--bad); color: #fff; background: var(--bad); }
.ms .name { font-weight: 700; font-size: .9rem; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: 96px 1fr; gap: .8rem; padding: .6rem 0; border-top: 1px solid var(--line); font-size: .9rem; }
.timeline li:first-child { border-top: 0; }
.timeline time { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.pdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .35rem; vertical-align: middle; background: var(--line-strong); }
.pdot.buyer { background: var(--buyer); } .pdot.seller { background: var(--seller); }
.pdot.title, .pdot.lender, .pdot.inspector, .pdot.professional { background: var(--pro); }
.pdot.admin { background: var(--admin); } .pdot.system { background: var(--ink); }

.task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .75rem; align-items: start; padding: .85rem 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task.overdue { background: linear-gradient(90deg, var(--bad-tint), transparent 60%); padding-left: .7rem; border-radius: 8px; }
.task.blocked { background: repeating-linear-gradient(135deg, var(--block-tint) 0 8px, transparent 8px 16px); padding-left: .7rem; border-radius: 8px; }
.task .tbox { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line-strong); display: grid; place-items: center; background: var(--surface); cursor: pointer; color: #fff; font-size: .8rem; margin-top: .1rem; }
.task .tbox:hover:not([disabled]) { border-color: var(--accent); }
.task .tbox[aria-checked="true"] { background: var(--ok); border-color: var(--ok); }
.task .tbox[disabled] { cursor: not-allowed; opacity: .5; }
.task .t { font-weight: 650; }
.task .m { font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .3rem .75rem; margin-top: .25rem; align-items: center; }

.doc { display: flex; gap: .7rem; align-items: center; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
.doc .ficon { width: 36px; height: 42px; border-radius: 6px; background: var(--accent-tint); color: var(--accent-ink); display: grid; place-items: center; font-size: .6rem; font-weight: 800; flex: none; }
.doc .grow { min-width: 0; flex: 1; }
.doc .name { font-weight: 650; overflow-wrap: anywhere; }
.docs { display: grid; gap: .5rem; }

.versions { display: grid; gap: .75rem; }
.version { border: 1px solid var(--line); border-radius: 12px; padding: .85rem .95rem; display: grid; gap: .5rem; background: var(--surface); }
.version.latest { border-color: var(--line-strong); box-shadow: var(--shadow); }
.version .vh { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; }

.sig { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; padding: .75rem .85rem; border: 1px dashed var(--line-strong); border-radius: 12px; }
.sig.signed { border-style: solid; border-color: var(--ok); background: var(--ok-tint); }
.sig .grow { flex: 1; min-width: 160px; }

/* ---------- Messages ---------- */
.msg-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 1rem; align-items: start; }
.convo-btn { width: 100%; text-align: left; display: grid; gap: .1rem; padding: .75rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font: inherit; color: inherit; cursor: pointer; }
.convo-btn:hover { border-color: var(--line-strong); }
.convo-btn[aria-current="true"] { border-color: var(--accent); background: var(--accent-tint); }
.convo-btn .unread { font-weight: 800; }
.bubbles { display: grid; gap: .6rem; max-height: 440px; overflow-y: auto; padding: .25rem; }
.bubble { max-width: 80%; padding: .6rem .85rem; border-radius: 14px; background: var(--soft); font-size: .92rem; border: 1px solid var(--line); }
.bubble.me { justify-self: end; }
.bubble.p-buyer { background: var(--buyer); color: #fff; border-color: transparent; }
.bubble.p-seller { background: var(--seller); color: #fff; border-color: transparent; }
.bubble.p-pro { background: var(--pro); color: #fff; border-color: transparent; }
.bubble .bm { font-size: .72rem; opacity: .85; margin-top: .2rem; }

/* ---------- Landing ---------- */
.landing { display: grid; gap: 0; }
.band { padding-block: 3.5rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.band.alt { background: var(--soft); border-block: 1px solid var(--line); }
.band-inner { max-width: 1120px; margin: 0 auto; display: grid; gap: 1.75rem; }
.hero { padding-block: 3.5rem 3.75rem; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); font-weight: 700; max-width: 19ch; letter-spacing: -.01em; word-spacing: .1em; line-height: 1.28; color: #000; }
.hero .tagline-head { font-size: clamp(1.2rem, 2.2vw, 1.45rem); font-weight: 700; color: var(--ink); line-height: 1.3; }
.hero .lede { font-size: 1.15rem; color: var(--muted); max-width: 52ch; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; }
/* Hero photos: a home with the example lanes card overlapping it, and a small photo of people at the corner. */
.hero-visual { position: relative; display: grid; padding-left: 1.5rem; }
.hv-home { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; background: var(--soft); box-shadow: 0 20px 50px rgba(23, 36, 58, .12); }
.hv-people { position: absolute; left: 0; top: -1.2rem; width: 34%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; border: 4px solid var(--bg); box-shadow: 0 12px 30px rgba(23, 36, 58, .18); }
.hero-visual .lanes-card { position: relative; margin: -5.5rem 1rem 0 -1.5rem; }
@media (max-width: 560px) { .hero-visual { padding-left: .75rem; } .hero-visual .lanes-card { margin: -3rem 0 0 -.75rem; } .hv-people { width: 32%; top: -.8rem; } }
.lanes-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.2rem; display: grid; gap: .75rem; box-shadow: 0 20px 50px rgba(23, 36, 58, .08); }
.lane { display: grid; grid-template-columns: 110px 1fr; gap: .75rem; align-items: center; }
.lane .who { font-size: .8rem; font-weight: 800; color: var(--lc-ink); }
.lane .track { position: relative; height: 34px; border-radius: 10px; background: var(--lc-tint); overflow: hidden; display: flex; align-items: center; padding-left: .7rem; font-size: .8rem; font-weight: 650; color: var(--lc-ink); }
.lane .track span.fill { position: absolute; inset: 0 auto 0 0; background: var(--lc); border-radius: 10px; }
.lane .track em { position: absolute; right: .7rem; font-style: normal; color: var(--lc-ink); white-space: nowrap; }
.lane .track { justify-content: flex-end; }
.role-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.role-card { position: relative; overflow: hidden; text-align: left; display: grid; gap: .45rem; align-content: start; padding: 1.25rem 1.15rem 1.15rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); font: inherit; color: inherit; cursor: pointer; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; }
.role-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--rc); }
.role-card:hover { transform: translateY(-2px); border-color: var(--rc); box-shadow: 0 12px 32px rgba(23, 36, 58, .1); }
.role-card .rc-chip { justify-self: start; font-size: .7rem; font-weight: 800; letter-spacing: .1em; padding: .15rem .55rem; border-radius: 999px; background: var(--rc); color: var(--rc-on, #fff); }
.role-card .rc-name { font-weight: 800; color: var(--ink); font-size: 1.02rem; }
.role-card .go { font-weight: 750; color: var(--rc-ink); font-size: .86rem; }
.role-card[aria-pressed="true"] { border-color: var(--rc); box-shadow: 0 0 0 2px var(--rc); }
.how { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.how ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .45rem; }
.price-table td:first-child { font-weight: 650; }
.trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.footer { background: var(--soft); border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding-block: 2rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.footer .band-inner { gap: .6rem; }
.footer strong { color: var(--ink); }

/* ---------- Dialog, toasts, notifications ---------- */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(23, 36, 58, .3); }
dialog.wide { width: min(760px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(23, 36, 58, .35); backdrop-filter: blur(2px); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.dlg-body { padding: 1.15rem 1.25rem; display: grid; gap: .9rem; overflow-y: auto; max-height: calc(100vh - 200px); }
.dlg-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; padding: .9rem 1.25rem; border-top: 1px solid var(--line); background: var(--soft); border-radius: 0 0 18px 18px; }
.x-btn { background: none; border: 0; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted); width: 36px; height: 36px; border-radius: 8px; }
.x-btn:hover { background: var(--soft); }

.toasts { position: fixed; z-index: 100; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: .5rem; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--surface); color: var(--ink); padding: .8rem 1rem; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(23, 36, 58, .16); font-size: .9rem; display: flex; gap: .6rem; align-items: flex-start; animation: rise .25s ease-out; }
.toast .ic { width: 20px; height: 20px; flex: none; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: .72rem; font-weight: 800; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.notif-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(360px, calc(100vw - 32px)); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(23, 36, 58, .18); z-index: 40; overflow: hidden; }
.notif-panel .nh { display: flex; justify-content: space-between; align-items: center; padding: .75rem .95rem; border-bottom: 1px solid var(--line); }
.notif-panel ul { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.notif-panel li button { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: .75rem .95rem; font: inherit; font-size: .88rem; color: inherit; cursor: pointer; display: grid; gap: .15rem; }
.notif-panel li button:hover { background: var(--soft); }
.notif-panel li.unread button { background: var(--accent-tint); }
.notif-wrap { position: relative; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

.sticky-action { display: none; }
.restricted { max-width: 560px; margin: 2rem auto; text-align: center; display: grid; gap: .8rem; justify-items: center; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.checklist li { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; }
.checklist .n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--soft); border: 1px solid var(--line); display: grid; place-items: center; font-size: .72rem; font-weight: 800; }
.checklist li.done .n { background: var(--ok); border-color: var(--ok); color: #fff; }

.filters { display: grid; grid-template-columns: 2fr repeat(4, minmax(0, 1fr)); gap: .75rem; align-items: end; }
.blockers { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.blockers li { display: flex; gap: .5rem; align-items: flex-start; font-size: .9rem; }
.case-btn { width: 100%; text-align: left; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .2rem .8rem; align-items: center; padding: .85rem .95rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font: inherit; color: inherit; cursor: pointer; }
.case-btn:hover { border-color: var(--line-strong); }
.case-btn[aria-current="true"] { border-color: var(--accent); background: var(--accent-tint); }
.case-btn .cid { font-family: var(--font-mono); font-weight: 600; font-size: .85rem; }

/* ---------- The Hub (resource library) ---------- */
.aud-buying { --hc: var(--buyer); --hc-ink: var(--buyer-ink); --hc-tint: var(--buyer-tint); }
.aud-selling { --hc: var(--seller); --hc-ink: var(--seller-ink); --hc-tint: var(--seller-tint); }
.aud-both { --hc: var(--hub); --hc-ink: var(--hub-ink); --hc-tint: var(--hub-tint); }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.hub-card { text-align: left; display: flex; flex-direction: column; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font: inherit; color: inherit; cursor: pointer; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; min-width: 0; }
.hub-card:hover { transform: translateY(-2px); border-color: var(--hc); box-shadow: 0 10px 30px rgba(23, 36, 58, .09); }
/* Thumbnails are filled with the audience color and carry a white icon (gold for both audiences). */
.hub-thumb { position: relative; display: block; height: 132px; background: var(--hc) center/cover no-repeat; color: #fff; }
.hub-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(17, 20, 24, .35), transparent 55%); }
/* The content-type icon sits in a small badge filled with the audience color. */
.hub-badge { position: absolute; left: .7rem; bottom: .7rem; z-index: 1; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--hc); color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.hub-badge svg { width: 22px; height: 22px; }
.hub-body { display: grid; gap: .45rem; padding: .9rem 1rem 1rem; align-content: start; flex: 1; }
.hub-meta { display: flex; flex-wrap: wrap; gap: .25rem .6rem; align-items: center; font-size: .76rem; color: var(--muted); font-weight: 600; }
.hub-aud { color: var(--hc-ink); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; }
.hub-title { font-weight: 750; font-size: 1.02rem; color: var(--ink); line-height: 1.3; }
.hub-summary { font-size: .88rem; color: var(--muted); }
.hub-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: auto; }
.hub-tag { display: inline-block; font-size: .72rem; font-weight: 650; padding: .1rem .5rem; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); color: var(--muted); }
button.hub-tag.link { cursor: pointer; font-family: inherit; }
button.hub-tag.link:hover { border-color: var(--hub); color: var(--hub-ink); }
.hub-card.locked { cursor: pointer; }
.hub-card.locked .hub-thumb { filter: grayscale(.55) brightness(1.05); }
.hub-lock { z-index: 1; }
.hub-lock svg { width: 13px !important; height: 13px !important; }
.hub-card.locked .hub-title { color: var(--muted); }
.hub-card.locked .hub-aud { color: var(--muted); }
.hub-lock { position: absolute; top: .55rem; right: .55rem; display: inline-flex; gap: .3rem; align-items: center; padding: .15rem .55rem; border-radius: 999px; background: var(--hub); color: var(--on-hub); font-size: .7rem; font-weight: 750; filter: none; }
.hub-ghost { display: grid; gap: .35rem; }
.hub-ghost i { display: block; height: 9px; border-radius: 5px; background: var(--line); }
.hub-gate { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; background: var(--hub-tint); border-color: rgba(199, 139, 40, .35); }
.hub-gate .eyebrow { justify-self: start; padding: .15rem .6rem; border-radius: 999px; background: var(--hub); color: var(--on-hub); }
.hub-gate .eyebrow { display: inline-flex; gap: .35rem; align-items: center; }
.hub-filters { display: grid; gap: .8rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: .3rem; min-height: 32px; padding: .25rem .75rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: .84rem; font-weight: 650; cursor: pointer; }
.chip:hover:not([disabled]) { border-color: var(--hub); }
.chip.on { background: var(--hub); border-color: var(--hub); color: var(--on-hub); }
.chip:focus-visible { box-shadow: 0 0 0 3px rgba(199, 139, 40, .45); }
.chip[disabled], .chip[aria-disabled="true"] { cursor: default; color: var(--muted); background: var(--soft); }
.chip-sep { width: 1px; height: 22px; background: var(--line-strong); margin: 0 .2rem; }
.hub-article { display: grid; gap: .9rem; border-top: 4px solid var(--hc); max-width: 820px; }
.hub-article h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.lede-sm { font-size: 1.05rem; color: var(--muted); }
.prose { display: grid; gap: .8rem; max-width: 68ch; font-size: 1rem; line-height: 1.65; }
.prose h2 { margin-top: .6rem; font-size: 1.15rem; }
.prose ul { margin: 0; padding-left: 1.25rem; display: grid; gap: .3rem; }
.video-frame { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 12px; overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hub-mini { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--hc); color: #fff; flex: none; }
.hub-mini svg { width: 20px; height: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .role-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters .f-q { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; width: min(290px, 85vw); transform: translateX(-105%); transition: transform .2s; padding-top: calc(1.1rem + env(safe-area-inset-top, 0px)); padding-left: max(.85rem, env(safe-area-inset-left, 0px)); box-shadow: 0 0 40px rgba(23,36,58,.2); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(23,36,58,.35); }
  .menu-btn { display: grid; }
  .topnav { display: none; }
  .topbar { gap: .5rem; }
  .role-select select { max-width: 150px; }
  .cols-even, .how, .trust, .hero-grid, .msg-layout { grid-template-columns: minmax(0, 1fr); }
  .milestones { grid-template-columns: minmax(0, 1fr); }
  .ms { grid-template-columns: auto 1fr auto; align-items: center; }
  .sticky-action { display: flex; position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; gap: .5rem; padding: .7rem max(16px, env(safe-area-inset-right, 0px)) calc(.7rem + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(23,36,58,.08); }
  .sticky-action .btn { flex: 1 1 0; min-width: 0; min-height: 46px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; line-height: 30px; }
  .route-label { display: none; }
}
@media (max-width: 560px) {
  h1 { font-size: 1.5rem; }
  .grid-2, .grid-3, .filters { grid-template-columns: minmax(0, 1fr); }
  .role-cards { grid-template-columns: minmax(0, 1fr); }
  .top-right .demo-pill { display: none; }
  .brand .brand-text { display: none; }
  .role-select select { max-width: 132px; }
  .stat .v { font-size: 1.6rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task { grid-template-columns: auto minmax(0, 1fr); }
  .task .act { grid-column: 2; justify-items: start !important; }
  .timeline li { grid-template-columns: 1fr; gap: .1rem; }
  .lane { grid-template-columns: 84px 1fr; }
  .btn { min-height: 44px; }
  .btn.sm { min-height: 38px; }
}
