:root {
  --bg: #f6f7f9; --surface: #fff; --text: #1b1f24; --muted: #667085; --border: #e3e6ea;
  --accent: #1f6feb; --accent-text: #fff; --danger: #c4372b; --ok: #1a7f37; --info-bg: #eef4ff; --err-bg: #fdecea;
  --radius: 8px; font-size: 15px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111418; --surface: #1a1e24; --text: #e6e8eb; --muted: #98a2b3; --border: #2b313a;
          --accent: #4b8df8; --info-bg: #17243a; --err-bg: #3a1c1a; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
       font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
h1 { font-size: 1.5rem; margin: 0 0 1rem; } h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; font-weight: normal; }

.topbar { display: flex; align-items: center; gap: 1rem; padding: .6rem 1.25rem; background: var(--surface);
          border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--text); }
.mainnav { display: flex; gap: 1rem; } .mainnav a { color: var(--text); }
.spacer { flex: 1; }
.topbar form { margin: 0; }

.page { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.25rem; }
.center { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.narrow { width: 100%; max-width: 360px; display: grid; gap: .9rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1rem; margin-top: 1rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.stat .label { color: var(--muted); font-size: .85rem; }
.stat .value { font-size: 1.6rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.stat .sub { color: var(--muted); font-size: .85rem; }

label { display: grid; gap: .3rem; font-size: .9rem; }
input, select, textarea { font: inherit; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 6px;
                          background: var(--surface); color: var(--text); }
button { font: inherit; padding: .5rem .9rem; border-radius: 6px; border: 1px solid var(--border);
         background: var(--surface); color: var(--text); cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
button.link { border: 0; background: none; color: var(--accent); padding: 0; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; font-size: .85rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.flash { padding: .6rem .8rem; border-radius: 6px; margin: 0 0 1rem; background: var(--info-bg); }
.flash-error { background: var(--err-bg); color: var(--danger); }
.tasks { list-style: none; padding: 0; margin: 0; } .tasks li { padding: .4rem 0; border-bottom: 1px solid var(--border); }

/* layout helpers */
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.head h1 { margin: 0; }
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar input[type=search] { flex: 1; min-width: 220px; }
.card.flush { padding: 0; overflow-x: auto; }
.card.flush table th:first-child, .card.flush table td:first-child { padding-left: 1rem; }
.stack { display: grid; gap: 1rem; }
.form { display: grid; gap: .9rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; }
.row > label { flex: 1 1 160px; }
.actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.spaced { margin-top: 1.25rem; }
.inline { display: inline-flex; gap: .4rem; align-items: center; margin: .3rem 0 0; }
input.short, .short { max-width: 9rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
fieldset { border: 1px solid var(--border); border-radius: 6px; padding: .6rem .8rem; display: grid; gap: .5rem; }
legend { padding: 0 .3rem; font-size: .9rem; }
label.check { display: flex; align-items: center; gap: .5rem; }
a.button { display: inline-block; padding: .5rem .9rem; border-radius: 6px; border: 1px solid var(--border);
           background: var(--surface); color: var(--text); }
a.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
textarea { width: 100%; }
ul.plain { list-style: none; padding: 0; margin: 0; } ul.plain li { padding: .3rem 0; }
.pager { display: flex; gap: 1rem; margin-top: .75rem; }
.tabs { display: flex; gap: 1rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.tabs a { padding: .4rem 0; color: var(--muted); } .tabs a.on { color: var(--text); border-bottom: 2px solid var(--accent); }

/* status */
.badge { display: inline-block; font-size: .75rem; padding: .1rem .45rem; border-radius: 999px; background: var(--border);
         color: var(--text); vertical-align: middle; white-space: nowrap; }
.badge.good, .stage-tenant, .unit-available { background: #d8f3dc; color: #14532d; }
.badge.bad { background: #fde2e1; color: #8a1c13; }
.badge.warn, .stage-reserved, .unit-reserved { background: #fff1c2; color: #6b4e00; }
.unit-unavailable, .stage-former { background: var(--border); color: var(--muted); }
@media (prefers-color-scheme: dark) {
  .badge.good, .stage-tenant, .unit-available { background: #12351f; color: #9be7b0; }
  .badge.bad { background: #3d1513; color: #ffb4ab; }
  .badge.warn, .stage-reserved, .unit-reserved { background: #3a2f0b; color: #f5d777; }
}
.owed { color: var(--danger); } td.credit { color: var(--ok); }
.notes { list-style: none; padding: 0; margin: 1rem 0 0; } .notes li { padding: .5rem 0; border-bottom: 1px solid var(--border); }
.notes li.done { opacity: .55; }
.picks li { display: flex; gap: .6rem; align-items: center; }

.linkcard { color: var(--text); display: block; } .linkcard:hover { border-color: var(--accent); }
.small-value { font-size: 1.1rem; }
.pre { white-space: pre-line; }
tr.overdue td:first-child { color: var(--danger); }
.token-box { border-color: var(--accent); } .token-box pre { padding: .6rem; background: var(--bg); border-radius: 6px; overflow-x: auto; user-select: all; }
.mainnav { flex-wrap: wrap; }

/* nav dropdown */
.menu { position: relative; }
.menu summary { cursor: pointer; list-style: none; } .menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: " ▾"; color: var(--muted); }
.menu-items { position: absolute; top: 1.8rem; left: 0; z-index: 10; display: grid; min-width: 12rem; padding: .4rem 0;
              background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.menu-items a { padding: .45rem .9rem; } .menu-items a:hover { background: var(--bg); }

/* unit map */
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .9rem; }
.legend .sw { display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; margin-right: .35rem; vertical-align: -2px; }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.2rem, 1fr)); gap: .4rem; }
.unit { display: block; text-align: center; padding: .55rem .2rem; border-radius: 6px; font-size: .85rem; font-weight: 600;
        color: #1b1f24; border: 1px solid rgba(0,0,0,.08); }
.unit:hover { outline: 2px solid var(--accent); }
.st-available { background: #d8f3dc; } .st-reserved { background: #fff1c2; } .st-current { background: #cfe2ff; }
.st-past_due { background: #ffd8a8; } .st-locked { background: #ffb3ad; } .st-unavailable { background: #e3e6ea; color: #667085; }
.narrow-wide { max-width: 560px; }
input.num { text-align: right; }
.toolbar-form .row { align-items: center; }

/* tenant portal */
.portal-page { max-width: 820px; }
.center-card { margin: 2rem auto; }
@media (max-width: 600px) {
  .portal .mainnav { gap: .75rem; font-size: .95rem; }
  .portal table th:nth-child(2), .portal table td:nth-child(2) { display: none; }
}

/* public site */
.pub-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: .9rem 1.25rem; }
.pub-header .brand { font-size: 1.2rem; }
.pub-inner { max-width: 960px; margin: 0 auto; }
.pub-page { max-width: 960px; }
.pub-footer { padding: 2rem 1.25rem; }
.hero { margin: .5rem 0 1.5rem; } .hero h1 { font-size: 1.8rem; margin-bottom: .3rem; }
.size-list { display: grid; gap: .75rem; }
.size-card { display: flex; gap: 1rem; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.size-card h2 { margin: 0 0 .2rem; font-size: 1.25rem; }
.size-price { display: grid; gap: .35rem; justify-items: end; text-align: right; }
.price { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
pre.lease { white-space: pre-wrap; font: .9rem/1.5 Georgia, serif; background: var(--bg); padding: 1rem;
            border-radius: 6px; max-height: 22rem; overflow-y: auto; }
@media (max-width: 600px) { .size-price { justify-items: start; text-align: left; } }
.pub-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
pre.dns { background: var(--bg); padding: .5rem; border-radius: 6px; overflow-x: auto; }

/* sales site */
.mkt-inner { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.mkt-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: .8rem 0; }
.mkt-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.mkt-header .brand { font-size: 1.25rem; }
.mkt-nav { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; } .mkt-nav a:not(.button) { color: var(--text); }
.mkt-hero { padding: 4.5rem 0 3.5rem; background: linear-gradient(180deg, var(--surface), var(--bg)); }
.mkt-hero h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.12; max-width: 18ch; margin-bottom: 1rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.button.big, a.button.big { padding: .75rem 1.3rem; font-size: 1.05rem; }
.mkt-section { padding: 3rem 1.25rem; } .mkt-section h2 { font-size: 1.6rem; margin-bottom: 1.25rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.feature h3 { margin: 0 0 .4rem; font-size: 1.1rem; } .feature p { margin: 0; color: var(--muted); }
.mkt-band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 2.5rem 0; }
.mkt-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; align-items: start; }
.mkt-cta { text-align: center; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.plan { display: grid; gap: .6rem; align-content: start; } .plan h2 { margin: 0; }
.plan-featured { border: 2px solid var(--accent); }
ul.checks { list-style: none; padding: 0; margin: 0; } ul.checks li { padding: .25rem 0 .25rem 1.4rem; position: relative; }
ul.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.mkt-footer { padding: 2rem 0; border-top: 1px solid var(--border); margin-top: 2rem; }
.platform-bar { background: #111827; } .platform-bar .brand, .platform-bar .muted, .platform-bar button.link { color: #e5e7eb; }

/* website editor */
.logo-preview { max-height: 80px; max-width: 260px; background: repeating-conic-gradient(var(--border) 0 25%, transparent 0 50%) 0 0 / 16px 16px; padding: 6px; border-radius: 6px; }
.photo-preview { width: 100%; max-height: 220px; object-fit: cover; border-radius: 6px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.photo-tile { display: grid; gap: .3rem; font-size: .85rem; }
.photo-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.photo-tile input { padding: .3rem .4rem; }
.amenity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .3rem .8rem; }
.map-preview { width: 100%; height: 240px; border: 1px solid var(--border); border-radius: 6px; }

/* public site: richer pages */
.pub-brand { display: flex; align-items: center; gap: .8rem; }
.pub-logo { max-height: 48px; width: auto; height: auto; }
.pub-hero { min-height: 320px; background-size: cover; background-position: center; border-radius: var(--radius);
            display: flex; align-items: flex-end; margin: .5rem 0 1.5rem; overflow: hidden; }
.pub-hero-text { width: 100%; padding: 2rem 1.5rem 1.5rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.pub-hero-text h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 .3rem; }
.pub-hero-text p { margin: 0; }
.pub-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .pub-layout { grid-template-columns: 1fr; } }
.section-title { font-size: 1.3rem; margin: 2rem 0 .8rem; } .pub-main > .section-title:first-child { margin-top: 0; }
.small-title { font-size: 1rem; margin: 0 0 .5rem; }
.size-card h3 { margin: 0 0 .2rem; font-size: 1.2rem; }
.pub-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .5rem; }
.pub-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; }
.lightbox { display: none; position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.85); align-items: center; justify-content: center; padding: 1rem; }
.lightbox:target { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; }
.pub-map { width: 100%; height: 220px; border: 0; border-radius: 6px; margin: .5rem 0; }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; }
.quotes blockquote { margin: 0; } .quotes p { margin: 0 0 .5rem; font-style: italic; }
.stars { color: #e3a008; letter-spacing: 1px; }
details.faq { border-bottom: 1px solid var(--border); padding: .6rem 0; } details.faq summary { cursor: pointer; font-weight: 600; }
.loc-cover { width: 160px; height: 100px; object-fit: cover; border-radius: 6px; }
.unit-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .2rem .6rem; max-height: 420px; overflow-y: auto; }
.finder { align-items: end; }
.loc-links { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: .3rem; }
.facility-addr { margin-top: -.4rem; }
.facility-switch label { margin-right: .3rem; }
tr.current td { background: color-mix(in srgb, currentColor 6%, transparent); }
.thread { display: grid; gap: .5rem; max-height: 60vh; overflow-y: auto; }
.bubble { max-width: 75%; padding: .5rem .75rem; border-radius: 12px; background: var(--border); white-space: pre-wrap; }
.bubble.out { justify-self: end; background: color-mix(in srgb, #2563eb 18%, transparent); }
tr.unread td:first-child { border-left: 3px solid #2563eb; }
.navbadge { display: inline-block; min-width: 1.2em; padding: 0 .35em; border-radius: 999px; background: #dc2626; color: #fff; font-size: .72rem; text-align: center; }
button.danger { background: #b91c1c; color: #fff; border-color: #b91c1c; }
.good-text { color: #15803d; } .bad-text { color: #b91c1c; }
@media print { .topbar, .noprint { display: none !important; } .grid2 { display: block; } .card { break-inside: avoid; } }

/* -- MyUnitDesk brand (brand/myunitdesk-logo-kit) -- Archivo, self-hosted (SIL Open Font License) */
@font-face { font-family: "Archivo"; src: url("/static/fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 100 900; font-display: swap; }
:root { --mu-navy: #12263A; --mu-rust: #C8601F; --mu-rust-light: #F08A47; --mu-cream: #FAF7F2; }
.mu-logo { display: inline-flex; align-items: center; gap: .4em; font-family: "Archivo", system-ui, sans-serif;
  line-height: 1; letter-spacing: -0.01em; color: var(--mu-navy); text-decoration: none; white-space: nowrap; }
.mu-logo img, .mu-logo picture { width: 1.4em; height: 1.4em; flex: none; display: block; }
.mu-logo .mu-my { font-weight: 300; }
.mu-logo .mu-unit, .mu-logo .mu-product { font-weight: 800; }
.mu-logo .mu-product { color: var(--mu-rust); }
.mu-logo.on-dark { color: var(--mu-cream); }
.mu-logo.on-dark .mu-product { color: var(--mu-rust-light); }
.topbar .mu-logo { font-size: 1.15rem; }
.mkt-header .mu-logo { font-size: 1.4rem; }
.login-logo { font-size: 2rem; margin-bottom: .8rem; }
@media (prefers-color-scheme: dark) {
  .mu-logo:not(.on-light) { color: var(--mu-cream); }
  .mu-logo:not(.on-light) .mu-product { color: var(--mu-rust-light); }
}
.mkt-band h2 { font-size: 1.6rem; margin: 0 0 .6rem; }
