/* 208 Market Agent Hub. Colors and type match 208market.com. Change the brand colors here. */
:root {
  --bg: #f7f7f7;
  --card: #ffffff;
  --ink: #232323;
  --muted: #59595b;
  --line: #dedede;
  --accent: #163561;
  --accent-dark: #0e2442;
  --accent-soft: #eaeef4;
  --top: #000000;
  --warn: #b3261e;
  --warn-bg: #fbeceb;
  --ok-bg: #eaeef4;
  --radius: 0;
  --label: Montserrat, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif; font-size: 16px; line-height: 1.5; background: var(--bg); color: var(--ink); }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--label); font-weight: 500; color: var(--accent); }
h1 { font-size: clamp(1.5rem, 3.5vw, 2rem); line-height: 1.2; margin: 0 0 .4em; letter-spacing: .04em; text-transform: uppercase; }
h2 { font-size: 1.15rem; margin: 0 0 .5em; letter-spacing: .03em; }
code { background: #efefef; padding: .1em .35em; border-radius: 3px; font-size: .95em; }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 1.5rem 0; }

/* header */
.top { background: var(--top); color: #fff; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.75rem; padding: .6rem clamp(1rem, 4vw, 2.5rem); }
.brand { display: flex; align-items: center; gap: 1rem; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand img { width: 58px; height: 58px; display: block; }
.brand-name { font-family: var(--label); font-size: .72rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; padding-left: 1rem; border-left: 1px solid #fff; line-height: 2.2; }
.top nav { display: flex; flex-wrap: nowrap; justify-content: center; gap: .25rem 1.6rem; flex: 1; }
.top nav a { white-space: nowrap; }
.top nav a { font-family: var(--label); color: #c5c5c5; text-decoration: none; padding: .4rem 0; font-size: .72rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid transparent; }
.top nav a:hover, .top nav a[aria-current] { color: #fff; border-bottom-color: #fff; }
.who { display: flex; flex-wrap: wrap; gap: .2rem 1rem; font-size: .78rem; }
.who a { color: #c5c5c5; text-decoration: none; }
.who a:hover, .who a[aria-current] { color: #fff; text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 1.75rem clamp(1rem, 4vw, 2.5rem) 3rem; }
.foot { text-align: center; color: var(--muted); font-family: var(--label); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; padding: 0 1rem 2.5rem; }
.crumb { color: var(--muted); font-family: var(--label); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 1rem; }
.crumb a { color: inherit; }

/* surfaces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 1.75rem); }
.narrow { max-width: 460px; margin: 2rem auto; }
.narrow-wide { max-width: 640px; }
.stack { display: grid; gap: .9rem; }
.stack label, .filters label { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }
.flash { padding: .75rem 1rem; border-radius: var(--radius); margin: 0 0 1rem; }
.flash-ok { background: var(--ok-bg); border: 1px solid #c3cddc; }
.flash-err { background: var(--warn-bg); border: 1px solid #efc2bf; }

/* inputs */
input[type=text], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=password], input:not([type]), select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 1px solid #c5c5c5; border-radius: var(--radius); padding: .6rem .75rem; min-height: 2.75rem;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 2px solid rgba(22, 53, 97, .2); outline-offset: 0; }
input[type=file] { font: inherit; font-size: .95rem; max-width: 100%; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font-family: var(--label); font-weight: 500; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: var(--radius); padding: .7rem 1.6rem; min-height: 2.75rem; cursor: pointer; text-decoration: none; transition: background .15s ease, color .15s ease; }
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.err { color: var(--warn); font-weight: 500; margin: .35rem 0 0; font-size: .95rem; }

/* hub */
.hero { padding: 1rem 0 .5rem; text-align: center; }
.hero .eyebrow { display: block; font-family: var(--label); color: var(--muted); font-size: .85rem; letter-spacing: .3em; text-transform: uppercase; margin-bottom: .35rem; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: .12em; }
.hero p { color: var(--muted); margin: 0; font-size: 1.05rem; }
.hub-group { margin-top: 2.5rem; }
.hub-group > h2, .fold > summary h2 { font-family: var(--label); font-size: .82rem; font-weight: 500; color: var(--muted); letter-spacing: .25em; text-transform: uppercase; border-bottom: 1px solid var(--line); padding-bottom: .6rem; margin-bottom: 1rem; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.hub-card { display: grid; align-content: start; gap: .4rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.25rem 1.3rem; text-decoration: none; color: var(--ink); box-shadow: inset 0 -3px 0 transparent; transition: box-shadow .15s ease, border-color .15s ease; }
.hub-card strong { font-family: var(--label); font-size: .88rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hub-card span { color: var(--muted); font-size: .9rem; }
.form-no { display: inline-block; margin-left: .35rem; padding: .05rem .4rem; border: 1px solid var(--line); font-style: normal; font-size: .64rem; letter-spacing: .08em; color: var(--muted); vertical-align: 2px; white-space: nowrap; }
.group-note { display: block; margin-top: .3rem; font-family: "Open Sans", Arial, sans-serif; font-size: .85rem; letter-spacing: 0; text-transform: none; color: var(--muted); }
.hub-card:hover { border-color: #c5c5c5; color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); }

/* home: Agent Hub first, on every screen size */
.home-agent-hub { display: grid; margin-top: 1rem; border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); text-align: center; justify-items: center; padding: 1.6rem 1.5rem; }
.sections-grid .is-agent-hub { display: none; }
@media (max-width: 760px) {
  .top nav a[href$="index.php"] { order: -2; }
  .top nav a[href$="s=agent-hub"] { order: -1; }
}

/* voice assistant */
/* Floating microphone on every page: a round button that shows its label on wide screens. */
.voice-fab { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; align-items: center; gap: .55rem; height: 56px; min-width: 56px; padding: 0 16px; border-radius: 28px; background: var(--accent); color: #fff; text-decoration: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); font-family: var(--label); font-size: .72rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.voice-fab:hover { background: var(--accent-dark); color: #fff; }
.voice-fab span { white-space: nowrap; }
@media (max-width: 760px) { .voice-fab { padding: 0; justify-content: center; width: 56px; right: 16px; bottom: 16px; } .voice-fab span { display: none; } }
@media print { .voice-fab { display: none; } }
/* Room at the bottom so the button never covers the last thing on a page. */
body:has(.voice-fab) .foot { padding-bottom: 96px; }
.voice { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; min-height: 0; height: calc(100vh - 160px); }
/* The voice page fits the screen like a chat app: only the messages scroll. */
body:has(#voice) .foot { display: none; }
body:has(#voice) .wrap { padding-bottom: .5rem; }
.voice-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.voice .eyebrow { display: block; font-family: var(--label); color: var(--muted); font-size: .72rem; letter-spacing: .25em; text-transform: uppercase; }
.voice-form { margin: .2rem 0 0; font-family: var(--label); font-weight: 500; color: var(--accent); font-size: 1.05rem; }
.voice-new { min-height: 2.2rem; padding: .4rem .9rem; }
.voice-log { list-style: none; margin: 0; padding: 0 0 .5rem; display: flex; flex-direction: column; gap: .6rem; overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
.voice-line { max-width: 85%; padding: .65rem .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.voice-line.me { align-self: flex-end; background: var(--accent); color: #fff; }
.voice-line.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); }
.voice-files, .voice-done { background: var(--card); border: 1px solid var(--line); padding: 1rem 1.1rem; }
.voice-files h2 { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; }
.voice-done:not([hidden]) { display: flex; flex-wrap: wrap; gap: .6rem; }
.voice-files + .voice-done { border-top: 0; margin-top: -1rem; }
.voice-files, .voice-done { flex: none; max-height: 55%; overflow-y: auto; }
.voice-controls { flex: none; background: var(--bg); padding: .5rem 0 .25rem; display: grid; justify-items: center; gap: .7rem; text-align: center; }
.voice-status { margin: 0; color: var(--muted); min-height: 1.5em; max-width: 34ch; }
.voice-mic { width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(22, 53, 97, .3); }
.voice-mic[data-state=listening] { background: #b3261e; animation: voice-pulse 1.2s ease-in-out infinite; }
.voice-mic[data-state=starting] { background: #59595b; }
.voice-mic[data-state=thinking] { opacity: .6; cursor: progress; }
.voice-mic[data-state=speaking] { background: var(--accent-dark); }
@keyframes voice-pulse { 50% { box-shadow: 0 0 0 14px rgba(179, 38, 30, .15); } }
.voice-type { display: flex; gap: .5rem; width: 100%; }
.voice-type input { flex: 1; }
.voice-auto { font-size: .85rem; color: var(--muted); display: flex; gap: .4rem; align-items: center; }
@media (prefers-reduced-motion: reduce) { .voice-mic[data-state=listening] { animation: none; } }

/* market snapshot */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
@media (min-width: 1000px) { .stats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; } }
/* Labels reserve two lines so every big number sits on the same line across the row. */
.stat { display: grid; grid-template-rows: auto auto 1fr; gap: .5rem; background: var(--card); border: 1px solid var(--line); padding: 1.15rem 1.2rem 1.2rem; }
.stat-label { font-family: var(--label); font-size: .66rem; font-weight: 500; line-height: 1.5; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); min-height: 3em; display: flex; align-items: flex-end; }
.stat-value { font-family: var(--label); font-size: 1.65rem; font-weight: 600; line-height: 1.1; color: var(--accent); }
.stat-sub { font-size: .82rem; line-height: 1.5; color: var(--muted); }
.stats-note { font-size: .8rem; color: var(--muted); margin: .6rem 0 0; }
/* Where supported, subgrid lines up label, number, and details across each row at any width. */
@supports (grid-template-rows: subgrid) {
  .stat { grid-row: span 3; grid-template-rows: subgrid; row-gap: .5rem; }
  .stat-label { min-height: 0; }
}

/* collapsible form groups: always open on wide screens, tap to open on phones */
.fold > summary { list-style: none; position: relative; cursor: default; pointer-events: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold-count { display: none; }
@media (max-width: 760px) {
  .fold { margin-top: .75rem; background: var(--card); border: 1px solid var(--line); }
  .fold > summary { pointer-events: auto; cursor: pointer; padding: 1rem 2.75rem 1rem 1rem; }
  .fold > summary h2 { border: 0; padding: 0; margin: 0; }
  .fold-count { display: block; margin-top: .35rem; font-size: .8rem; color: var(--muted); }
  .fold > summary::after { content: ""; position: absolute; right: 1.1rem; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
  .fold[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
  .fold > .hub-grid { padding: 0 .75rem .75rem; gap: .6rem; }
  .fold .hub-card { border-color: #e8e8e8; }
}

/* sections */
.sections-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.section-card { padding: 1.6rem 1.4rem; text-align: center; justify-items: center; }
.section-card strong { font-size: 1rem; letter-spacing: .18em; }
.link-card a { text-decoration: none; }
.link-card a::after { content: " \2197"; color: var(--muted); font-size: .8em; }
.link-card form { margin-top: .3rem; }
.news-list { display: grid; gap: 1rem; }
.news { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 1.1rem 1.25rem; }
.news h3 { font-size: 1rem; margin: 0; letter-spacing: .03em; }
.news-section { font-family: var(--label); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.news-meta { font-size: .82rem; margin: .15rem 0 .5rem; }
.news-body { overflow-wrap: anywhere; }
.manage { background: var(--card); border: 1px dashed #c5c5c5; padding: .8rem 1.1rem; margin-bottom: 1rem; }
.manage summary { cursor: pointer; font-family: var(--label); font-size: .74rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.manage[open] summary { margin-bottom: 1rem; }

/* tables */
.scroll { overflow-x: auto; }
.list { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); font-size: .95rem; }
.list th, .list td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.list th { font-family: var(--label); font-weight: 500; color: var(--muted); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; background: #fafafa; }
.list tr.inactive td { color: var(--muted); }
.list .actions { white-space: nowrap; display: flex; gap: 1rem; }
.inline { display: inline; }
.files-badge { display: inline-flex; align-items: center; gap: .2rem; margin-left: .4rem; padding: .05rem .4rem; background: var(--accent-soft); color: var(--accent); font-size: .78rem; font-weight: 600; white-space: nowrap; vertical-align: 1px; }
.status { display: inline-block; padding: .15rem .55rem; font-family: var(--label); font-size: .66rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; background: #efefef; white-space: nowrap; }
.s-new { background: #fdf0d4; color: #7a5300; }
.s-in-progress { background: #dde9f7; color: #1f4b80; }
.s-waiting-on-agent { background: #f6e1f0; color: #7a2462; }
.s-complete { background: #e5f1ea; color: #1d5a37; }
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin-bottom: 1rem; }
.filters label { min-width: 180px; flex: 1; }

/* submission detail */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
.detail aside { display: grid; gap: 1.25rem; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } }
.answers h2 { margin: 1.75rem 0 .4rem; padding-bottom: .35rem; border-bottom: 1px solid var(--accent); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; }
.answers div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1rem; padding: .45rem 0; border-bottom: 1px solid #efefef; }
.answers dt { color: var(--muted); }
.answers dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .answers div { grid-template-columns: 1fr; gap: .1rem; } }
.log { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; font-size: .9rem; }
.log .bad strong { color: var(--warn); }

/* the form */
.hubform { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 3.5vw, 2.25rem); max-width: 780px; margin: 0 auto; }
.steps { margin-bottom: 1.25rem; }
.step-label { display: block; font-family: var(--label); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 500; min-height: 1.4em; }
.bar { height: 3px; background: #e5e5e5; margin-top: .35rem; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s ease; }
.hubform:not(.js) .steps, .hubform:not(.js) [data-nav=back], .hubform:not(.js) [data-nav=next], .hubform:not(.js) [data-nav=save] { display: none; }
.fpage { display: grid; gap: 1.4rem; }
.fhead h2 { font-size: 1.3rem; margin: 0; letter-spacing: .08em; text-transform: uppercase; }
.fhead p { color: var(--muted); margin: .4rem 0 0; }
.ftext { background: #f7f7f7; border-left: 3px solid var(--accent); padding: .8rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0; }
.ftext p { margin: .3rem 0; }
.ftext ul { margin: .3rem 0; padding-left: 1.2rem; }
.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 600; margin-bottom: .4rem; padding: 0; }
.req { color: var(--warn); }
.help { color: var(--muted); font-size: .9rem; margin: -.15rem 0 .45rem; }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: var(--warn); }
.field.has-err > legend, .field.has-err > label { color: var(--warn); }
.choices { display: grid; gap: .35rem; }
.choice { display: flex; align-items: flex-start; gap: .55rem; padding: .45rem .65rem; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.choice:hover { border-color: #9a9a9a; }
.choice input { margin-top: .3rem; width: 1.05rem; height: 1.05rem; accent-color: var(--accent); flex: none; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--ok-bg); }
.other { margin-top: .2rem; }
.parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem; }
.part span { display: block; font-size: .82rem; color: var(--muted); margin-top: .2rem; }
.addr { grid-template-columns: 2fr 1fr 1fr; }
.addr .part-line1, .addr .part-line2 { grid-column: 1 / -1; }
@media (max-width: 560px) { .addr { grid-template-columns: 1fr 1fr; } .addr .part-city { grid-column: 1 / -1; } }
.draftbar { margin-top: 1.25rem; padding: .7rem 1rem; background: #fdf0d4; border-radius: var(--radius); }
.formnav { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.formnav [data-nav=next], .formnav [data-nav=submit] { margin-left: auto; }
.formnav [data-nav=back][hidden] + [data-nav=save] { margin-left: 0; }

/* Narrower screens (most laptops): sections move to their own row under the logo. */
@media (max-width: 1360px) {
  .top { padding-bottom: 0; }
  .top nav { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; border-top: 1px solid #333; padding: .2rem 0; }
  .who { margin-left: auto; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Desktop: the menu wrapper is invisible to layout, so the nav and personal links sit in the header row. */
.topmenu { display: contents; }
.menu-toggle { display: none; }

@media (max-width: 760px) {
  .formnav .btn { flex: 1 1 auto; }
  /* Phones: menu button on the left, logo in the center, everything else in a drop-down panel. */
  .top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: .55rem 16px; gap: 0; }
  .brand { grid-column: 2; justify-self: center; }
  .brand img { width: 46px; height: 46px; }
  .brand-name { display: none; }
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; grid-column: 1; grid-row: 1; width: 44px; height: 44px; padding: 0 10px; background: none; border: 0; cursor: pointer; }
  .menu-toggle span { display: block; height: 2px; background: #fff; transition: transform .2s ease, opacity .2s ease; }
  .menu-toggle[aria-expanded=true] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded=true] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded=true] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .topmenu { display: none; grid-column: 1 / -1; padding: .5rem 0 .75rem; margin-top: .55rem; border-top: 1px solid #333; }
  .topmenu.open { display: block; }
  .top .topmenu nav { display: flex; flex-direction: column; gap: 0; overflow: visible; border: 0; padding: 0; margin: 0; }
  .top .topmenu nav a { padding: .8rem 0; font-size: .8rem; border-bottom: 0; }
  .top .topmenu nav a[aria-current] { color: #fff; border-left: 2px solid #fff; padding-left: .75rem; }
  .topmenu .who { display: flex; flex-direction: column; gap: 0; margin: .5rem 0 0; padding-top: .5rem; border-top: 1px solid #333; }
  .topmenu .who a { padding: .7rem 0; font-size: .95rem; }
}

input.locked { background: #f3f3f3; color: var(--muted); }

/* Sign in with Google */
.gbtn { background: #fff; color: #1f1f1f; border-color: #b9c2be; gap: .6rem; }
.gbtn:hover { background: #f6f7f6; color: #1f1f1f; }
.or { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .9rem; margin: .1rem 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* PDF download / email */
.pdf-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-start; margin: .25rem 0 1.25rem; }
.pdf-actions .pdf-email[open] { flex-basis: 100%; }
.pdf-actions .pdf-email > summary { list-style: none; display: inline-flex; }
.pdf-actions .pdf-email > summary::-webkit-details-marker { display: none; }
.pdf-actions .pdf-email[open] > summary { margin-bottom: .75rem; }
.pdf-actions .pdf-email form { max-width: 520px; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius, 6px); background: #fff; }
.pdf-hint { margin: 0; font-size: .85rem; }

/* Thank-you page */
.card.narrow:has(.thanks-actions) { max-width: 640px; }
.thanks-ref { color: var(--muted, #5d6763); }
.thanks-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 0; }
.thanks-actions .btn, .thanks-share .btn { margin: 0; }
.thanks-share { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line, #dedede); }
.thanks-share-label { margin: 0 0 .85rem; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted, #5d6763); }
.thanks-share .pdf-actions { margin: 0; gap: .6rem; }
.thanks-share .pdf-actions .btn { font-size: .8rem; padding: .55rem 1.1rem; min-height: 0; }
.thanks-share .pdf-email form .btn { font-size: .85rem; }
@media (max-width: 560px) { .thanks-actions .btn { flex: 1 1 100%; } }
.thanks-share .pdf-email form { max-width: none; }
/* Archive / delete (admins) */
.archived-note { display: inline-block; margin: 0 0 .9rem; padding: .3rem .7rem; background: #efefef; color: var(--muted); font-family: var(--label); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.admin-actions form { display: grid; gap: .6rem; margin: 0; }
.admin-actions form p { margin: 0; }
.admin-actions .btn { justify-self: start; }
.danger-zone { border-top: 1px solid var(--line); padding-top: .9rem; }
.danger-zone > summary { cursor: pointer; color: var(--warn); font-weight: 600; font-size: .95rem; }
.danger-zone[open] > summary { margin-bottom: .75rem; }
.danger-zone form { padding: .9rem; background: var(--warn-bg); border: 1px solid #efc2bf; }
.btn.btn-danger { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn.btn-danger:hover { background: #8c1d17; border-color: #8c1d17; color: #fff; }
.filters label { min-width: 140px; }

/* Row actions on All submissions (admins) */
.list td.row-actions { white-space: nowrap; text-align: right; }
.row-actions .inline { display: inline; }
.row-btn { background: none; border: 1px solid var(--line); padding: .3rem .6rem; font-family: var(--label); font-size: .64rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); cursor: pointer; }
.row-btn + .row-btn, .row-actions .inline + .inline { margin-left: .35rem; }
.row-btn:hover { border-color: var(--ink); }
.row-btn-danger { color: var(--warn); }
.row-btn-danger:hover { border-color: var(--warn); background: var(--warn-bg); }
.s-archived { background: #efefef; color: var(--muted); margin-top: .3rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Employee Handbook */
.hb-hero { padding-bottom: 0; }
.hb-search { max-width: 720px; margin: 1.25rem auto 1.75rem; text-align: center; }
.hb-search input { font-size: 1.05rem; padding: .85rem 1rem; min-height: 3.1rem; }
.hb-status { margin: .5rem 0 0; font-size: .9rem; }
.hb-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 2rem; align-items: start; }
.hb-toc { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; font-size: .92rem; }
.hb-toc summary { font-family: var(--label); font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); cursor: pointer; list-style: none; padding: .25rem 0 .6rem; }
.hb-toc summary::-webkit-details-marker { display: none; }
.hb-toc ol { list-style: none; margin: 0; padding: 0; }
.hb-toc > details > ol > li { margin-bottom: .9rem; }
.hb-toc-ch { display: block; font-family: var(--label); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: .3rem; }
.hb-toc li li a { display: block; padding: .18rem 0 .18rem .7rem; border-left: 2px solid var(--line); color: var(--ink); text-decoration: none; }
.hb-toc li li a:hover { border-left-color: var(--accent); color: var(--accent); }
.hb-pdf { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .88rem; }
.hb-chapter { margin-bottom: 2.25rem; }
.hb-chapter > h2 { font-family: var(--label); font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: .5rem; margin: 0 0 1rem; }
.hb-section { margin-bottom: 1rem; scroll-margin-top: 1rem; }
.hb-section h3 { margin: 0 0 .75rem; font-size: 1.2rem; }
.hb-anchor { color: var(--accent); text-decoration: none; }
.hb-anchor:hover { text-decoration: underline; }
.hb-text { line-height: 1.65; }
.hb-text p { margin: 0 0 .85rem; }
.hb-text h4 { margin: 1.25rem 0 .4rem; font-size: 1rem; color: var(--ink); }
.hb-text ul, .hb-text ol { margin: 0 0 .9rem; padding-left: 1.3rem; }
.hb-text li { margin-bottom: .4rem; }
.hb-text blockquote { margin: 0 0 1rem; padding: .6rem 1rem; border-left: 3px solid var(--accent); background: #fafafa; font-style: italic; }
.hb-meta { font-size: .88rem; color: var(--muted); background: #fafafa; padding: .55rem .8rem; border: 1px solid var(--line); }
.hb-note { font-size: .88rem; color: var(--muted); font-style: italic; }
.hb-holidays { columns: 2; column-gap: 2rem; }
.hb-text mark, .hb-anchor mark { background: #fde68a; color: inherit; padding: 0 .1em; }
.hb-footnote { font-size: .85rem; }
.hb-card { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
@media (max-width: 900px) {
  .hb-layout { grid-template-columns: 1fr; gap: 1rem; }
  .hb-toc { position: static; max-height: none; border: 1px solid var(--line); background: var(--card); padding: .75rem 1rem; }
  .hb-toc summary { padding: .25rem 0; }
  .hb-toc details[open] summary { padding-bottom: .75rem; }
  .hb-holidays { columns: 1; }
}
@media print { .hb-search, .hb-toc, .top, .voice-fab, .crumb { display: none !important; } .hb-layout { display: block; } .hb-section { break-inside: avoid; border: 0; padding: 0; } }
.hb-search input[type=search] { width: 100%; font: inherit; font-size: 1.05rem; color: var(--ink); background: #fff; border: 1px solid #b9b9b9; border-radius: var(--radius); }
.hb-toc summary::after { content: " ▾"; }
.hb-toc details:not([open]) summary::after { content: " ▸"; }
@media (min-width: 901px) { .hb-toc summary { pointer-events: none; } .hb-toc summary::after { content: ""; } }

/* Market snapshot: clickable tiles and deal list pop-up (staff) */
.stat-btn { font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; transition: border-color .15s ease, box-shadow .15s ease; }
.stat-btn:hover, .stat-btn:focus-visible { border-color: #c5c5c5; box-shadow: inset 0 -3px 0 var(--accent); }
.stat-more { font-family: var(--label); font-size: .62rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); align-self: end; }
@supports (grid-template-rows: subgrid) { .stat-btn { grid-row: span 4; } }
.deal-dialog { width: min(960px, calc(100vw - 2rem)); max-height: calc(100vh - 3rem); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); }
.deal-dialog[open] { display: flex; flex-direction: column; }
.deal-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.deal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.25rem 1.5rem .5rem; }
.deal-head h2 { margin: 0; font-size: 1.15rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.deal-head p { margin: .3rem 0 0; }
.deal-close { background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 .25rem; }
.deal-close:hover { color: var(--ink); }
.deal-filters { display: flex; gap: .4rem; padding: 0 1.5rem .9rem; }
.deal-filters button { font-family: var(--label); font-size: .66rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; background: none; border: 1px solid var(--line); padding: .35rem .8rem; cursor: pointer; color: var(--ink); }
.deal-filters button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #fff; }
.deal-scroll { overflow: auto; padding: 0 1.5rem 1.5rem; }
.deal-table { border: 0; }
.deal-table th { position: sticky; top: 0; }
.deal-table .num { text-align: right; white-space: nowrap; }
.deal-table td:nth-child(4) { white-space: nowrap; }
.deal-client { font-size: .82rem; color: var(--muted); }
.deal-empty { padding: 0 1.5rem 1.5rem; }

/* Property Tracker */
.pt-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 1.5rem; margin: 1.25rem 0 1rem; }
.pt-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.pt-tabs a { font-family: var(--label); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: var(--card); padding: .45rem .85rem; }
.pt-tabs a:hover { border-color: var(--ink); }
.pt-tabs a[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }
.pt-updated { margin: 0; font-size: .85rem; }
.pt-updated .inline { margin-left: .4rem; }
.pt-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.pt-sum { display: grid; gap: .35rem; background: var(--card); border: 1px solid var(--line); padding: 1rem 1.1rem; text-decoration: none; color: inherit; }
.pt-sum:hover { box-shadow: inset 0 -3px 0 var(--accent); }
.pt-sum .stat-label { min-height: 0; }
.pt-filters { align-items: end; }
.pt-filters input[type=search] { width: 100%; font: inherit; font-size: 1rem; background: #fff; border: 1px solid #b9b9b9; border-radius: var(--radius); padding: .55rem .7rem; min-height: 2.6rem; }
.pt-count { margin: 0 0 .6rem; font-size: .9rem; }
.pt-section > summary h2 { margin: 0; }
.pt-table { font-size: .88rem; }
.pt-table th { white-space: nowrap; }
.pt-table td { white-space: nowrap; }
.pt-table td.pt-long { white-space: normal; min-width: 240px; }
.pt-table td:first-child, .pt-table th:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; white-space: normal; min-width: 160px; }
.pt-table thead th:first-child { background: #fafafa; }
.pt-table .num { text-align: right; }
.pt-table tfoot td { font-weight: 600; border-top: 2px solid var(--line); background: #fafafa; }
.pt-none { margin: .5rem 0 0; }
.wrap:has(.pt-table) { max-width: 1440px; }
/* Listing Process Guide */
.wrap:has(.lg-steps) { max-width: 1200px; }
.lg-jump { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin: 0 0 1rem; font-family: var(--label); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; }
.lg-roles { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .75rem; margin: 0 0 1.75rem; background: var(--card); border: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.lg-roles-label { font-family: var(--label); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-right: .35rem; }
.lg-roles button { display: inline-flex; align-items: center; gap: .35rem; font: inherit; font-size: .85rem; background: #fff; color: var(--ink); border: 1px solid var(--line); padding: .3rem .65rem; min-height: 2.25rem; cursor: pointer; }
.lg-roles button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.lg-badge { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .3rem; border-radius: 999px; font-family: var(--label); font-size: .68rem; font-weight: 600; letter-spacing: .04em; color: #fff; background: #59595b; vertical-align: middle; flex: none; }
.lg-agent { background: #163561; } .lg-valinda { background: #2f7d6d; } .lg-natalie { background: #b0552e; } .lg-april { background: #7a4b8f; } .lg-admin { background: #6b6b6b; }
.lg-block { margin: 0 0 2.75rem; scroll-margin-top: 4.5rem; }
.lg-h { margin: 0 0 .35rem; }
.lg-sub { margin: 0 0 1.1rem; max-width: 62rem; }
.lg-steps { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem; }
.lg-step { width: 100%; height: 100%; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: .15rem .6rem; align-items: start; text-align: left; font: inherit; background: var(--card); color: var(--ink); border: 1px solid var(--line); padding: .7rem .75rem; cursor: pointer; transition: border-color .15s, box-shadow .15s, opacity .15s; }
.lg-step:hover { border-color: var(--accent); }
.lg-step[aria-current="step"] { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); background: var(--accent-soft); }
.lg-num { grid-row: span 2; font-family: var(--label); font-size: 1.35rem; font-weight: 500; color: var(--accent); line-height: 1.1; }
.lg-step-title { font-size: .9rem; font-weight: 600; line-height: 1.3; }
.lg-step-owners { display: flex; gap: .2rem; align-items: center; flex-wrap: wrap; }
.lg-step-owners .lg-badge { min-width: 1.35rem; height: 1.35rem; font-size: .6rem; }
.lg-step-progress { grid-column: 2; font-size: .72rem; color: var(--muted); }
.lg-step-progress:empty { display: none; }
.lg-step-progress.lg-done { color: #2f7d6d; font-weight: 600; }
.lg-switch { grid-column: 1 / -1; display: flex; align-items: center; gap: .75rem; font-family: var(--label); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.lg-switch::before, .lg-switch::after { content: ""; flex: 1; border-top: 2px dashed var(--accent); opacity: .45; }
.lg-filtering .lg-step:not(.lg-mine) { opacity: .4; }
.lg-filtering .lg-step.lg-mine { border-color: var(--accent); }
.lg-phase { scroll-margin-top: 4.5rem; }
.lg-phase-head { display: flex; gap: 1rem; align-items: center; padding-bottom: 1rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.lg-big { font-family: var(--label); font-size: clamp(2.4rem, 6vw, 3.4rem); line-height: 1; color: var(--accent); opacity: .85; }
.lg-phase-head .eyebrow { display: block; font-family: var(--label); color: var(--muted); font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; }
.lg-phase-head h3 { margin: .1rem 0 .35rem; font-size: clamp(1.3rem, 3vw, 1.65rem); }
.lg-owner { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; font-size: .92rem; }
.lg-phase-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 1.75rem; }
.lg-main > p:first-child { margin-top: 0; }
.lg-main h4 { display: flex; align-items: center; gap: .45rem; margin: 1.4rem 0 .6rem; font-family: var(--label); font-weight: 500; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.lg-snap { background: var(--accent-soft); padding: 1rem 1.1rem; align-self: start; position: sticky; top: 4.5rem; }
.lg-snap h4 { margin: 0 0 .6rem; font-family: var(--label); font-weight: 500; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.lg-snap dl { margin: 0; }
.lg-snap dl > div { padding: .45rem 0; border-top: 1px solid rgba(22, 53, 97, .14); }
.lg-snap dt { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lg-snap dd { margin: .1rem 0 0; font-size: .9rem; }
.lg-group { border-left: 3px solid var(--line); padding: .1rem 0 .1rem 1rem; margin: 1.1rem 0; transition: border-color .15s, background .15s; }
.lg-group h4 { margin-top: .2rem; }
.lg-group ul { margin: 0; padding-left: 1.1rem; }
.lg-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.lg-chips span { font-size: .85rem; background: #f1f1f1; border: 1px solid var(--line); padding: .2rem .55rem; }
.lg-filtering .lg-group.lg-mine, .lg-filtering .lg-check.lg-mine { border-left-color: var(--accent); background: var(--accent-soft); }
.lg-check { border-left: 3px solid var(--line); padding: .1rem 0 .1rem 1rem; margin: 1.25rem 0; }
.lg-check ul { list-style: none; margin: 0; padding: 0; }
.lg-check li { border-bottom: 1px solid #eee; }
.lg-check label { display: flex; gap: .65rem; align-items: flex-start; padding: .5rem 0; cursor: pointer; }
.lg-check input { width: 1.15rem; height: 1.15rem; min-height: 0; margin: .2rem 0 0; flex: none; accent-color: var(--accent); }
.lg-check input:checked + span { color: var(--muted); text-decoration: line-through; }
.lg-count { margin-left: auto; font-size: .72rem; letter-spacing: .04em; text-transform: none; color: var(--muted); }
.lg-flow { counter-reset: f; list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.lg-flow li { counter-increment: f; font-size: .85rem; background: var(--accent-soft); padding: .35rem .7rem .35rem .45rem; display: flex; align-items: center; gap: .4rem; }
.lg-flow li::before { content: counter(f); display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 999px; background: var(--accent); color: #fff; font-size: .68rem; }
.lg-topics { padding-left: 1.3rem; margin: 1rem 0; }
.lg-topics li { margin: 0 0 .55rem; }
.lg-topics strong { display: block; }
.lg-topics span { color: var(--muted); font-size: .92rem; }
.lg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem; margin: 1.1rem 0; }
.lg-stats div { border: 1px solid var(--line); padding: .8rem; text-align: center; }
.lg-stats strong { display: block; font-family: var(--label); font-size: 1.5rem; font-weight: 500; color: var(--accent); }
.lg-stats span { font-size: .82rem; color: var(--muted); }
.lg-touches dl { margin: 0; }
.lg-touches dl > div { display: grid; grid-template-columns: 9rem 1fr; gap: .75rem; padding: .45rem 0; border-top: 1px solid #eee; }
.lg-touches dt { font-weight: 600; font-size: .9rem; }
.lg-touches dd { margin: 0; font-size: .92rem; }
.lg-callout { background: #fbf8ef; border-left: 3px solid #c9a227; padding: .8rem 1rem; margin: 1.1rem 0; }
.lg-callout strong { display: block; margin-bottom: .2rem; }
.lg-callout p, .lg-callout ul { margin: 0; }
.lg-callout ul { padding-left: 1.1rem; }
.lg-warn { background: #fbefec; border-left-color: #b0552e; }
.lg-rule { background: var(--accent-soft); border-left-color: var(--accent); }
.lg-nav { display: flex; justify-content: space-between; gap: .5rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.lg-clear { font-size: .85rem; margin: .75rem 0 0; }
.lg-team { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .6rem; margin: 0 0 1rem; }
.lg-person { display: flex; gap: .7rem; background: var(--card); border: 1px solid var(--line); padding: .9rem; transition: border-color .15s, opacity .15s; }
.lg-person .lg-badge { width: 2.2rem; height: 2.2rem; font-size: .78rem; }
.lg-person strong { display: block; }
.lg-role-title { display: block; font-size: .78rem; color: var(--muted); }
.lg-person p { margin: .4rem 0 0; font-size: .9rem; }
.lg-filtering .lg-person:not(.lg-mine), .lg-filtering .lg-matrix tbody tr:not(.lg-mine) { opacity: .4; }
.lg-filtering .lg-person.lg-mine { border-color: var(--accent); }
.lg-matrix { border-collapse: collapse; min-width: 900px; width: 100%; background: var(--card); font-size: .82rem; }
.lg-matrix th, .lg-matrix td { border: 1px solid var(--line); padding: .5rem; vertical-align: top; text-align: left; }
.lg-matrix thead th { background: var(--accent); color: #fff; font-weight: 600; }
.lg-matrix thead th span { display: block; font-weight: 400; font-size: .7rem; opacity: .8; }
.lg-matrix tbody th { white-space: nowrap; background: #fafafa; }
.lg-task { display: block; padding: .15rem 0; }
.lg-task + .lg-task { border-top: 1px dotted #ddd; }
.lg-mail::before { content: "✉ "; color: #b0552e; }
.lg-goal { background: var(--accent); color: #fff; padding: .9rem 1.1rem; font-weight: 600; margin: .5rem 0 .75rem; }
.lg-touchline { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .6rem; }
.lg-touchline li { position: relative; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--accent); padding: .85rem .9rem .85rem 3rem; transition: opacity .15s; }
.lg-touchline .lg-tn { position: absolute; left: .85rem; top: .85rem; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 999px; background: var(--accent); color: #fff; font-size: .78rem; font-weight: 600; }
.lg-touchline strong { display: block; }
.lg-touchline em { display: block; font-style: normal; font-size: .78rem; color: var(--muted); }
.lg-touchline p { margin: .4rem 0; font-size: .9rem; }
.lg-towner { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.lg-t-launch { border-top-color: #2f7d6d; } .lg-t-launch .lg-tn { background: #2f7d6d; }
.lg-t-active { border-top-color: #b0552e; } .lg-t-active .lg-tn { background: #b0552e; }
.lg-filtering .lg-touchline li:not(.lg-mine) { opacity: .4; }
.lg-gifts h3 { margin: 1.5rem 0 .3rem; }
.lg-gift-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .6rem; margin: 0 0 1rem; }
.lg-gift-grid > div { background: var(--card); border: 1px solid var(--line); padding: .9rem; }
.lg-gift-grid em { display: block; font-style: normal; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lg-gift-grid strong { display: block; margin: .2rem 0; }
.lg-gift-grid p { margin: 0; font-size: .9rem; }
.lg-version { text-align: center; font-size: .8rem; }
.lg-card { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
@media (max-width: 860px) {
  .lg-phase-grid { grid-template-columns: 1fr; }
  .lg-snap { position: static; order: -1; }
  .lg-roles { position: static; }
  .lg-touches dl > div { grid-template-columns: 1fr; gap: .1rem; }
}
@media (max-width: 520px) { .lg-steps { grid-template-columns: 1fr 1fr; } .lg-step { grid-template-columns: 1fr; } .lg-num { grid-row: auto; font-size: 1.1rem; } .lg-step-progress { grid-column: 1; } }
@media print { .lg-roles, .lg-jump, .lg-nav, .lg-clear, .lg-steps { display: none !important; } .lg-phase[hidden] { display: block !important; } .lg-phase { break-before: page; } .lg-snap { position: static; } }

/* Property Tracker: What's due view */
.wrap:has(.pt-roster) { max-width: 1280px; }
.pt-views { display: flex; align-self: end; }
.pt-views a { font-family: var(--label); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: var(--card); padding: .7rem .9rem; white-space: nowrap; }
.pt-views a + a { border-left: 0; }
.pt-views a[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }
.pt-ag { display: inline-grid; place-items: center; height: 1.5rem; padding: 0 .6rem; border-radius: 999px; color: #fff; font-family: var(--label); font-size: .7rem; font-weight: 600; letter-spacing: .03em; white-space: nowrap; }
.pt-week { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin: 1rem 0 .5rem; }
.pt-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: .6rem; margin: 0 0 .75rem; align-items: start; }
.pt-day { background: var(--card); border: 1px solid var(--line); }
.pt-day h4 { display: flex; justify-content: space-between; gap: .5rem; margin: 0; padding: .5rem .75rem; background: var(--accent); color: #fff; font-family: var(--label); font-size: .78rem; font-weight: 600; letter-spacing: .04em; }
.pt-day.is-past h4 { background: #8a8f98; }
.pt-day.is-today h4 { background: #a86a00; }
.pt-ev { display: grid; grid-template-columns: 9.5rem 1fr auto; gap: .75rem; align-items: center; padding: .55rem .75rem; border-top: 1px solid #eee; font-size: .9rem; }
.pt-ev:first-of-type { border-top: 0; }
.pt-what { font-weight: 600; }
.pt-ev small, .pt-roster td small { display: block; color: var(--muted); font-size: .8rem; }
.pt-later { margin: .75rem 0; }
.pt-later > summary { cursor: pointer; font-family: var(--label); font-size: .8rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 .5rem; }
.pt-nodates { margin: .25rem 0 .75rem; }
.pt-roster { margin-top: .5rem; font-size: .9rem; }
.pt-roster tbody tr.pt-row { cursor: pointer; }
.pt-roster tbody tr.pt-row:hover td { background: #f7f9fc; }
.pt-roster tr.pt-row td:first-child { position: relative; padding-left: 1.6rem; }
.pt-roster tr.pt-row td:first-child::before { content: "▸"; position: absolute; left: .5rem; top: .75rem; color: var(--muted); font-size: .75rem; }
.pt-roster tr.pt-row[aria-expanded="true"] td:first-child::before { content: "▾"; }
.pt-roster .num { text-align: right; white-space: nowrap; }
.pt-roster tfoot td { font-weight: 700; border-top: 2px solid var(--ink); background: #fafafa; }
.pt-more td { background: #fbfbfb; padding: .75rem 1rem 1rem 1.6rem; }
.pt-more dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem 1.25rem; margin: 0; }
.pt-more dt { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pt-more dd { margin: 0; font-size: .9rem; }
.pt-chip { display: inline-block; font-size: .8rem; padding: .15rem .5rem; border: 1px solid var(--line); background: #fafafa; white-space: nowrap; }
.pt-chip.is-soon { color: #a86a00; background: #fdf3e1; border-color: #f1dcb3; font-weight: 600; }
@media (max-width: 760px) {
  .pt-days { grid-template-columns: 1fr; }
  .pt-ev { grid-template-columns: 1fr auto; gap: .2rem .75rem; }
  .pt-what { grid-column: 1 / -1; font-size: .8rem; color: var(--accent); }
  .pt-roster th:nth-child(4), .pt-roster td:nth-child(4) { display: none; }
}

/* Market snapshot tiles that open the Property Tracker */
.stat-link { text-decoration: none; color: inherit; transition: border-color .15s ease, box-shadow .15s ease; }
.stat-link:hover, .stat-link:focus-visible { color: inherit; border-color: #c5c5c5; box-shadow: inset 0 -3px 0 var(--accent); }
@supports (grid-template-rows: subgrid) { .stat-link { grid-row: span 4; } }
/* HR: time off and employee files */
.d-block { display: block; }
.badge { display: inline-block; font-family: var(--label); font-size: .62rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: .15rem .45rem; background: #fdf3e1; color: #8a5a00; vertical-align: middle; }
.badge-ok { background: #e6f2ef; color: #2f7d6d; }
.to-tabs { margin: 0 0 1.25rem; }
.to-stats { margin-bottom: 1rem; }
.to-stats .stat-value.to-date { font-size: clamp(1.2rem, 3vw, 1.5rem); }
.to-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1rem; margin: 1rem 0 1.5rem; align-items: start; }
.to-grid h2, .emp-settings h2, .emp-form h2 { margin-top: 0; font-size: 1.1rem; }
.to-form label, .emp-form label, .emp-upload label, .emp-adjust label, .emp-settings label, .to-req label { display: grid; gap: .3rem; margin: 0 0 .9rem; font-weight: 600; font-size: .9rem; }
.to-form small, .emp-form small, .emp-upload small, .emp-settings small { font-weight: 400; }
.to-dates { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.to-list { list-style: none; margin: 0; padding: 0; }
.to-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: .7rem 0; border-top: 1px solid #eee; }
.to-list li:first-child { border-top: 0; }
.to-list small { display: block; color: var(--muted); font-size: .82rem; }
.to-right { text-align: right; white-space: nowrap; }
.to-status { display: block; font-size: .8rem; font-weight: 600; }
.to-pending .to-status { color: #a86a00; }
.to-approved .to-status { color: #2f7d6d; }
.to-declined .to-status, .to-cancelled .to-status { color: var(--muted); }
.to-cancelled strong, .to-declined strong { text-decoration: line-through; color: var(--muted); }
.to-ledger { margin-top: 1rem; }
.to-review { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .75rem; }
.to-req h3 { margin: 0 0 .25rem; }
.to-when { margin: 0 0 .4rem; }
.to-note { margin: 0 0 .4rem; font-style: italic; }
.to-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.to-req:target { box-shadow: 0 0 0 3px var(--accent); }
.emp-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 1rem; }
.emp-fields .emp-wide { grid-column: 1 / -1; }
.emp-fields label.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
.emp-fields label.check input { width: auto; min-height: 0; }
.emp-upload, .emp-adjust { margin-top: 1rem; }
.emp-upload h3, .emp-adjust h3 { margin-top: 0; }
.emp-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin-top: 2rem; }
.emp-table td { vertical-align: top; }
@media (max-width: 760px) { .to-grid { grid-template-columns: 1fr; } .to-dates { grid-template-columns: 1fr; } }

.emp-form + .emp-form { margin-top: 1rem; }
.emp-note { margin: .75rem 0 0; font-size: .85rem; }
.emp-manifest { margin-top: 1rem; }
.emp-manifest summary { cursor: pointer; font-weight: 600; }
.emp-manifest textarea { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: .78rem; }
.emp-settings .btn.ghost { margin-left: .4rem; }

/* Seller Communication Templates */
.st-field { background: var(--accent-soft); color: var(--ink); font-weight: 600; padding: 0 .2em; border-radius: 2px; }
.st-promise { border: 1px solid var(--accent); background: var(--card); padding: 1rem 1.25rem; margin: 1.25rem 0 1rem; font-size: 1.05rem; }
.st-how { list-style: none; counter-reset: st; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; padding: 0; margin: 0 0 .75rem; }
.st-how li { counter-increment: st; background: var(--card); border: 1px solid var(--line); padding: 1rem 1.1rem; }
.st-how li::before { content: counter(st); display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--ink); color: #fff; font-size: .85rem; margin-bottom: .5rem; }
.st-alert { background: var(--warn-bg); padding: .85rem 1.1rem; margin: 0 0 1.5rem; }
.st-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .75rem; }
.st-chip { font-family: var(--label); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); background: var(--card); border: 1px solid var(--line); padding: .45rem .85rem; cursor: pointer; }
.st-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.st-line { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); background: var(--card); }
.st-line li + li { border-top: 1px solid var(--line); }
.st-line a { display: grid; grid-template-columns: 2rem 1fr auto; align-items: center; gap: .75rem; padding: .7rem 1rem; color: inherit; text-decoration: none; }
.st-line a:hover { background: var(--bg); }
.st-lt { display: grid; gap: .1rem; min-width: 0; }
.st-lt small { color: var(--muted); }
.st-gift-row .st-n { color: var(--accent); background: transparent; }
.st-n { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--ink); color: #fff; font-size: .8rem; font-weight: 600; }
.st-owner { font-family: var(--label); font-size: .65rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: .25rem .55rem; border: 1px solid var(--line); white-space: nowrap; }
.st-o-team { background: var(--ink); border-color: var(--ink); color: #fff; }
.st-o-ops { background: var(--accent-soft); }
.st-o-agent { background: var(--card); }
.st-email { background: var(--card); border: 1px solid var(--line); margin: 1.5rem 0; padding: 1.25rem; scroll-margin-top: 5rem; }
.st-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .9rem; }
.st-head .st-n { width: 2.4rem; height: 2.4rem; font-size: .95rem; }
.st-head h2 { margin: .1rem 0 0; }
.st-email .eyebrow, .st-card .eyebrow { display: block; font-family: var(--label); color: var(--muted); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; }
.st-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .5rem 1rem; margin: 1rem 0; padding: .75rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.st-meta dt { font-family: var(--label); font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.st-meta dd { margin: .15rem 0 0; }
.st-mail { border: 1px solid var(--line); background: var(--bg); padding: 1rem 1.1rem; }
.st-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .75rem; margin: 0 0 .5rem; }
.st-row > span { font-family: var(--label); font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); min-width: 4.5rem; }
.st-body { border-top: 1px solid var(--line); margin-top: .75rem; padding-top: .75rem; }
.st-body h3 { font-family: var(--label); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; margin: 1.1rem 0 .35rem; }
.st-body ul, .st-body ol { margin: .25rem 0 .75rem; padding-left: 1.3rem; }
.st-body li { margin: .2rem 0; }
.st-sig { margin-top: 1rem; }
.st-actions { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; }
.st-copy:not(.btn) { font: inherit; font-size: .8rem; color: var(--accent-dark); background: none; border: 1px solid var(--line); padding: .3rem .7rem; cursor: pointer; }
.st-copy:not(.btn):hover { border-color: var(--accent); }
.st-gifts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .75rem; }
.st-card { background: var(--card); border: 1px solid var(--line); padding: 1.1rem; display: grid; gap: .4rem; align-content: start; }
.st-card h3 { margin: 0; }
.st-note { font-style: italic; margin: .25rem 0 0; }
.st-who { margin: 0; font-size: .85rem; }
.st-card .st-copy { justify-self: start; }
.st-foot { margin: 1.5rem 0; }
.lg-tpl-link { margin: .5rem 0 1rem; }
@media (max-width: 600px) {
  .st-head { grid-template-columns: auto 1fr; }
  .st-head > .st-owner { grid-column: 1 / -1; justify-self: start; }
  .st-line a { grid-template-columns: 2rem 1fr; }
  .st-line .st-owner { grid-column: 2; justify-self: start; }
  .st-email { padding: 1rem; }
}
@media print {
  .st-copy, .st-filter, .st-actions { display: none !important; }
  .st-email { break-inside: avoid; }
}

/* Tracker: date sections folded behind one toggle */
.pt-dates { margin: .25rem 0 1rem; }
.pt-dates > summary { cursor: pointer; font-family: var(--label); font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); padding: .6rem .8rem; border: 1px solid var(--line); background: var(--card); }
.pt-dates > summary:hover { border-color: var(--accent); }
.pt-dates[open] > summary { margin-bottom: .5rem; }