/* The client portal. Same tokens as the agent app (next.css + glass.css): cream ground,
   white rounded boxes, ink buttons, the agent's accent for anything chosen or new.
   Nothing under 14px. No hex here: every color is a token. */

.pt { min-height: 100vh; }

/* ---------- demo strip (demo only) ---------- */
.pt-demo { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 24px; background: var(--ink); color: var(--on-dark); font-size: 15px; font-weight: 600; }
.pt-demo-as { display: flex; align-items: center; gap: 10px; }
.pt-demo-as span { opacity: 1; color: var(--on-dark); }
.pt-demo select { font: inherit; font-weight: 700; color: var(--ink); background: var(--card); border: 0; border-radius: var(--pill); padding: 6px 14px; max-width: 60vw; }
.pt-demo-back { display: inline-flex; align-items: center; gap: 6px; color: var(--on-dark); text-decoration: none; font-weight: 700; white-space: nowrap; }
.pt-demo-back svg { width: 18px; height: 18px; }

/* ---------- masthead ---------- */
.pt-top { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 16px 32px; background: color-mix(in srgb, var(--ground) 82%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: var(--hair); }
.pt-brand { font-weight: 800; font-size: 24px; letter-spacing: -0.035em; color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-nav { display: flex; gap: 6px; padding: 6px; border-radius: var(--pill); background: var(--card); border: var(--hair); }
.pt-nav-it { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: var(--pill); color: var(--ink-2); font-weight: 700; font-size: 15px; text-decoration: none; }
.pt-nav-it svg { width: 20px; height: 20px; }
.pt-nav-it:hover { color: var(--ink); background: var(--sunk); }
.pt-nav-it[aria-current="page"] { background: var(--ink); color: var(--on-dark); }
.pt-nav-it .badge { position: static; margin-left: 2px; background: var(--accent); color: var(--on-dark); }
.pt-agent { justify-self: end; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 4px 18px 4px 4px; border-radius: var(--pill); border: var(--hair); background: var(--card); font: inherit; font-weight: 700; font-size: 15px; color: var(--ink); cursor: pointer; }
.pt-agent .av { width: 44px; height: 44px; font-size: 15px; }

.pt-main { max-width: 1200px; margin: 0 auto; padding: 36px 40px 120px; display: flex; flex-direction: column; gap: 24px; }
.pt-main > .page-head { margin-bottom: 4px; }
.pt-dock { display: none; }

/* ---------- home ---------- */
.pt-greet { margin: 8px 0 4px; }
.pt-greet .greet-h { font-size: clamp(48px, 6vw, 92px); }

.pt-deal { overflow: hidden; padding: 0; }
.pt-deal-top { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 320px; }
.pt-deal-photo { border-radius: 0; min-height: 280px; }
.pt-deal-body { padding: 32px 36px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.pt-addr { margin: 0; font-weight: 800; font-size: clamp(28px, 3vw, 38px); letter-spacing: -0.035em; line-height: 1.05; }
.pt-city { margin: 0; font-size: 17px; }
.pt-nums { display: flex; flex-wrap: wrap; gap: 36px; margin: 14px 0 6px; }
.pt-nums > div { display: flex; flex-direction: column; gap: 2px; }
.pt-nums b { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.pt-nums .muted { font-size: 15px; }
.pt-deal-body .btn { align-self: flex-start; margin-top: 8px; }

/* the road to closing */
.pt-road { list-style: none; margin: 0; padding: 26px 36px 30px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; border-top: var(--hair); counter-reset: none; }
.pt-road li { position: relative; display: flex; flex-direction: column; gap: 4px; padding-top: 40px; min-width: 0; }
.pt-road li::before { content: ''; position: absolute; top: 13px; left: 0; right: -8px; height: 2px; background: var(--line); }
.pt-road li:last-child::before { right: auto; width: 14px; }
.pt-road li.done::before { background: var(--ink); }
.pt-dot { position: absolute; top: 0; left: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line); z-index: 1; }
.pt-dot svg { width: 16px; height: 16px; }
.pt-road li.done .pt-dot { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
.pt-road li.now .pt-dot { border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent); }
.pt-road li.now .pt-dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.pt-road b { font-size: 15px; line-height: 1.25; }
.pt-road li.now b { color: var(--accent); }
.pt-road span:not(.pt-dot):not(.sr) { font-size: 14px; color: var(--ink-2); font-weight: 600; }

.pt-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.pt-sec-t { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.pt-sec-t .count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--accent); color: var(--on-dark); font-size: 14px; font-weight: 800; }
.pt-sec-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.pt-sec-row .link, .pt-strip-head .link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.pt-sec-row .link svg, .pt-strip-head .link svg { width: 18px; height: 18px; }
.pt-earlier { margin: 16px 0 -8px; }

/* to-dos */
.pt-todos, .pt-docs { display: flex; flex-direction: column; }
.pt-todo, .pt-doc { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: var(--hair); }
.pt-todo:first-child, .pt-doc:first-child { border-top: 0; padding-top: 2px; }
.pt-todo-ic { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); color: var(--ink); }
.pt-todo-ic svg { width: 22px; height: 22px; }
.pt-todo-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.pt-todo-main b { font-size: 16px; }
.pt-todo-main .muted { font-size: 15px; }
.pt-todo-act { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pt-doc { width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; font: inherit; color: var(--ink); cursor: pointer; }
.pt-doc > svg { width: 20px; height: 20px; color: var(--ink-2); }
.pt-doc:hover .pt-todo-ic { background: var(--olive-soft); }

/* dates */
.pt-dates { display: flex; flex-direction: column; }
.pt-date-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-top: var(--hair); }
.pt-dates > .pt-date-row:first-child, .pt-month + .pt-date-row { border-top: 0; }
.pt-cal { flex: none; width: 58px; height: 62px; border-radius: 16px; background: var(--card-2); border: var(--hair); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.pt-cal span { font-size: 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.pt-cal b { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; margin-top: 4px; }
.pt-date-row.k-key .pt-cal { background: var(--ink); border-color: var(--ink); }
.pt-date-row.k-key .pt-cal span { color: var(--accent-lift); }
.pt-date-row.k-key .pt-cal b { color: var(--on-dark); }
.pt-date-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pt-date-main b { font-size: 16px; }
.pt-date-main .muted { font-size: 15px; }
.pt-date-row.past .pt-date-main b { color: var(--ink-2); }
.pt-date-row .tag svg { width: 16px; height: 16px; }
.pt-month { margin: 22px 0 6px; }
.pt-month:first-child { margin-top: 0; }

/* from the agent + the team */
.pt-from { display: flex; flex-direction: column; gap: 12px; }
.pt-from-head { display: flex; align-items: center; gap: 12px; }
.pt-from-head > div { flex: 1; display: flex; flex-direction: column; }
.pt-from-head .muted { font-size: 14px; }
.pt-from-subj { margin: 0; font-weight: 800; font-size: 17px; }
.pt-from-body { margin: 0; white-space: pre-wrap; line-height: 1.5; font-size: 16px; }
.pt-from .btn { align-self: flex-start; }
.pt-team { display: flex; flex-direction: column; gap: 14px; }
.pt-person { display: flex; align-items: center; gap: 12px; }
.pt-person > div { display: flex; flex-direction: column; min-width: 0; }
.pt-person .muted { font-size: 15px; }
.pt-from .av, .pt-person .av { width: 46px; height: 46px; font-size: 15px; flex: none; }

/* ---------- homes ---------- */
.pt-strip { display: flex; flex-direction: column; gap: 16px; }
.pt-strip-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pt-hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.pt-hcard { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.pt-hcard-link { display: block; }
.pt-hcard-photo { border-radius: 0; aspect-ratio: 4 / 3; }
.pt-new { position: absolute; top: 14px; left: 14px; background: var(--accent); color: var(--on-dark); }
.pt-hcard-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pt-hcard-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pt-price { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.pt-price.big { font-size: 40px; }
.pt-hcard-addr { font-weight: 800; font-size: 17px; color: var(--ink); text-decoration: none; }
.pt-hcard-addr:hover { text-decoration: underline; }
.pt-hcard-body > .muted { font-size: 15px; }
.pt-note-q { margin: 6px 0 0; padding-left: 12px; border-left: 3px solid var(--accent); color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.pt-react { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; flex-wrap: wrap; }
.pt-rbtn { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--card); font: inherit; font-weight: 700; font-size: 15px; color: var(--ink); cursor: pointer; }
.pt-rbtn svg { width: 18px; height: 18px; }
.pt-rbtn:hover { border-color: var(--ink-3); }
.pt-rbtn.love.on { background: var(--accent); border-color: var(--accent); color: var(--on-dark); }
.pt-rbtn.love.on svg { fill: currentColor; }
.pt-rbtn.pass.on { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
.pt-react.big .pt-rbtn { height: 52px; padding: 0 24px; font-size: 16px; }
.pt-notes-n { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 700; text-decoration: none; }
.pt-notes-n svg { width: 18px; height: 18px; }
.pt-filters { margin-top: 4px; }

.pt-back { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; color: var(--ink); }
.pt-back svg { width: 18px; height: 18px; }
.pt-home { display: grid; grid-template-columns: 1.25fr 1fr; gap: 32px; align-items: start; }
.pt-home-photo { aspect-ratio: 4 / 3; border-radius: var(--r-xl); }
.pt-home-body { display: flex; flex-direction: column; gap: 16px; }
.pt-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pt-specs > div { padding: 14px 16px; border-radius: var(--r-md); background: var(--card); border: var(--hair); display: flex; flex-direction: column; }
.pt-specs b { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.pt-specs span { font-size: 15px; color: var(--ink-2); font-weight: 600; }
.pt-agent-note { padding: 16px 18px; border-radius: var(--r-md); background: var(--card-2); border: var(--hair); }
.pt-agent-note p { margin: 6px 0 0; font-size: 16px; line-height: 1.5; }
.pt-tour-line { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; }
.pt-tour-line svg { width: 20px; height: 20px; }
.pt-source { margin: 0; }
.pt-source .link { color: var(--ink); }

/* notes (a home, a tour) */
.pt-notes { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.pt-note-form { display: flex; gap: 10px; }
.pt-note-form input { flex: 1; min-width: 0; height: 52px; padding: 0 18px; border-radius: var(--pill); border: 1.5px solid var(--line); background: var(--card-2); font: inherit; font-size: 16px; color: var(--ink); }
.pt-note-form input:focus { outline: 0; border-color: var(--ink-3); }

/* tours */
.pt-tours { display: grid; gap: 22px; }
.pt-tour .h3 { margin-top: 4px; }
.pt-stops { list-style: none; margin: 10px 0 16px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pt-stops li { display: grid; grid-template-columns: 76px 84px 1fr; align-items: center; gap: 14px; }
.pt-stop-t { font-weight: 800; font-size: 16px; }
.pt-stop-photo { width: 84px; height: 64px; border-radius: 14px; }
.pt-stops li > div { display: flex; flex-direction: column; min-width: 0; }
.pt-stops a { color: var(--ink); text-decoration: none; }
.pt-stops a:hover { text-decoration: underline; }
.pt-stops .muted, .pt-stop-note { font-size: 15px; }
.pt-stop-note { color: var(--ink-2); font-style: italic; }
.pt-tour.past .pt-note-form { display: none; }

/* a seller's listing */
.pt-fb { display: flex; flex-direction: column; gap: 12px; }
.pt-fb-it { padding: 16px 18px; border-radius: var(--r-md); background: var(--card-2); border: var(--hair); }
.pt-fb-it .pt-sec-row { margin-bottom: 6px; }
.pt-fb-it p { margin: 0 0 6px; font-size: 16px; line-height: 1.5; }
.pt-fb-it .muted { font-size: 15px; }

/* documents */
.pt-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- messages ---------- */
.pt-thread { display: flex; flex-direction: column; overflow: hidden; padding: 0; height: calc(100vh - 210px); min-height: 480px; max-width: 900px; width: 100%; margin: 0 auto; }
.pt-thread-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: var(--hair); }
.pt-thread-head > div:not(.pt-call) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pt-thread-head .muted { font-size: 15px; }
.pt-call { display: flex; gap: 8px; }
.pt-msgs { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.pt-msg-home { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; }
.pt-msg-home svg, .pt-msgs .meta svg { width: 16px; height: 16px; }
.pt-compose textarea { min-height: 84px; }
.pt-compose-bar { display: flex; align-items: center; gap: 10px; }
.pt-compose-bar .btn { margin-left: auto; }
.pt-tag-home select { height: 48px; max-width: 320px; padding: 0 14px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--card); font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); }

/* the agent sheet */
.pt-agent-card { display: flex; align-items: center; gap: 18px; }
.pt-agent-card > div { display: flex; flex-direction: column; gap: 2px; }
.pt-agent-act { display: flex; align-items: center; gap: 10px; margin-top: 24px; }
.pt-agent-act .btn { flex: 1; }

/* ---------- phone ---------- */
@media (max-width: 759px) {
  .pt-demo { padding: 8px 16px; font-size: 14px; }
  .pt-demo-as > span { display: none; }
  .pt-top { grid-template-columns: 1fr auto; padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; }
  .pt-nav { display: none; }
  .pt-brand { font-size: 22px; }
  .pt-agent { padding: 3px; height: auto; }
  .pt-agent-n { display: none; }
  .pt-main { padding: 18px 16px calc(170px + env(safe-area-inset-bottom)); gap: 18px; }   /* the dock + the iPhone home bar never cover the last card (2026-09-29) */
  .pt-dock { display: flex; }
  .pt-greet .greet-h { font-size: 40px; }
  .pt-deal-top, .pt-cols, .pt-home { grid-template-columns: 1fr; }
  .pt-deal-photo { min-height: 220px; }
  .pt-deal-body { padding: 22px 20px; }
  .pt-nums { gap: 24px; }
  .pt-nums b { font-size: 26px; }
  .pt-road { grid-auto-flow: row; grid-auto-columns: auto; padding: 20px 20px 22px; gap: 0; }
  .pt-road li { padding: 0 0 18px 44px; }
  .pt-road li::before { top: 28px; bottom: 0; left: 13px; right: auto; width: 2px; height: auto; }
  .pt-road li:last-child::before { display: none; }
  .pt-hgrid { grid-template-columns: 1fr; }
  .pt-stops li { grid-template-columns: 64px 72px 1fr; gap: 10px; }
  .pt-stop-photo { width: 72px; height: 56px; }
  .pt-thread { height: calc(100vh - 250px); border-radius: var(--r-lg); }
  .pt-compose-bar { gap: 8px; }
  .pt-tag-home { flex: 1; min-width: 0; }
  .pt-tag-home select { width: 100%; max-width: none; }
  .pt-compose-bar .btn { margin-left: 0; padding: 0 16px; }
  .pt-dock .dock-it .lab { white-space: nowrap; }
  .pt-todo .btn { padding: 0 14px; }
}

/* Client calendar: readable seven-column month on phones. */
.pt-calendar, .pt-calendar-connect { margin-bottom: 20px; }
.pt-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin: 18px 0; }
.pt-weekday { text-align: center; font-size: 14px; padding: 6px 0; }
.pt-calendar-day { min-height: 44px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; font-size: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; }
.pt-calendar-day[aria-current="date"] { border-color: currentColor; }
.pt-calendar-day[aria-pressed="true"] { background: var(--ink); color: var(--on-dark); }
.pt-calendar-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pt-calendar-connect .actions { flex-wrap: wrap; }
.pt-calendar-connect p, .pt-calendar-connect li { font-size: 16px; line-height: 1.5; }
.pt-calendar-connect input { display: block; width: 100%; min-width: 0; margin: 8px 0; }

.pt-profile { position: relative; justify-self: end; }
.pt-profile summary { list-style: none; }
.pt-profile summary::-webkit-details-marker { display: none; }
.pt-profile-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 90; width: min(280px, 85vw); padding: 16px; border: var(--hair); border-radius: var(--r-md); background: var(--sheet); box-shadow: var(--shadow); display: grid; gap: 6px; }
.pt-profile-menu b { padding: 8px; overflow-wrap: anywhere; }
.pt-profile-menu a, .pt-profile-menu button { display: block; text-align: left; padding: 12px; min-height: 44px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; cursor: pointer; border-radius: 10px; }
.pt-profile-menu a:hover, .pt-profile-menu button:hover { background: var(--card-2); }
.pt-settings-section { margin: 20px 0; }

/* "For you" (2026-09-29, "looks silly"): the title gets the full width; Upload and Done sit side by side under it */
.pt-todo { flex-wrap: wrap; row-gap: 10px; }
.pt-todo-main { flex: 1 1 0; }
.pt-todo-act { flex: 1 1 100%; flex-wrap: nowrap; justify-content: flex-start; padding-left: 60px; }
.pt-todo-act .btn { min-height: 42px; }

/* Connect your calendar: room between the buttons and each step (Tovah, 2026-09-29: "more padding") */
.pt-calendar-connect > * + * { margin-top: 16px; }
.pt-calendar-connect .actions { margin-top: 20px; margin-bottom: 8px; gap: 12px; }
.pt-calendar-connect h3.h3 { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.pt-calendar-connect h3.h3 + p, .pt-calendar-connect h3.h3 + ol { margin-top: 10px; }
.pt-calendar-connect ol { padding-left: 22px; display: grid; gap: 8px; }
.pt-calendar-connect p > .btn { margin-top: 6px; }
.pt-calendar-connect label { display: grid; gap: 8px; }

/* Home on desktop (2026-09-29): main column + side column; one home is a wide card, photo beside the details */
.pt-dash { display: grid; gap: 24px; align-items: start; }
.pt-dash-side { display: grid; gap: 20px; }
@media (min-width: 1000px) {
  .pt-dash { grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); gap: 28px; }
  .pt-dash .pt-hgrid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .pt-dash .pt-hgrid > .pt-hcard:only-child { flex-direction: row; }
  .pt-dash .pt-hgrid > .pt-hcard:only-child .pt-hcard-link { flex: 0 0 56%; }
  .pt-dash .pt-hgrid > .pt-hcard:only-child .pt-hcard-link img, .pt-dash .pt-hgrid > .pt-hcard:only-child .pt-hcard-photo { height: 100%; min-height: 300px; object-fit: cover; }
  .pt-dash .pt-hgrid > .pt-hcard:only-child .pt-hcard-body { justify-content: center; padding: 28px; }
}
