/* Design tokens lifted from the prototype in public/index.html, which stays the
   visual reference. New components below follow the same palette and radii. */
:root {
  --ink: #17323b;
  --ink-soft: #566f75;
  --ink-faint: #45666a;
  --bg: #f4f7f8;
  --surface: #ffffff;
  --line: #dce6e7;
  --line-soft: #ebf0f1;
  --navy: #102b35;
  --navy-2: #153941;
  --navy-3: #20454c;
  --teal: #36bfa7;
  --teal-deep: #0f7168;
  --teal-pale: #e5f2ef;
  --teal-ink: #14645c;
  --amber-bg: #fff4df;
  --amber-ink: #8c610c;
  --red-bg: #fdecec;
  --red-ink: #a12c2c;
  --green-bg: #e8f7ed;
  --green-ink: #236341;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid var(--teal-deep); outline-offset: 2px;
}
a { color: var(--teal-deep); }

.shell { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
aside {
  background: var(--navy); color: #d7e9eb; padding: 30px 18px;
  display: flex; flex-direction: column; gap: 26px;
}
.brand { font-size: 1.2rem; font-weight: 800; letter-spacing: -.04em; color: #fff; padding: 0 10px; }
.brand b { color: #76dfca; }
.brand span { font-size: .75rem; letter-spacing: 0; font-weight: 600; display: block; color: #9cc0c5; margin-top: 2px; }
.nav { display: grid; gap: 6px; }
.nav button {
  background: none; border: 0; color: #c4d9dc; padding: 12px 14px;
  text-align: left; border-radius: 11px; font-weight: 650; width: 100%;
}
.nav button.active, .nav button:hover { background: var(--navy-3); color: #fff; }
.asidefoot { margin-top: auto; padding: 12px; color: #96b4b9; font-size: .82rem; line-height: 1.5; }
.asidefoot button {
  background: none; border: 1px solid #35606a; color: #c4d9dc;
  border-radius: 9px; padding: 7px 11px; margin-top: 10px; font-size: .82rem; font-weight: 650;
}
.whoami { color: #d7e9eb; font-weight: 700; }

main { padding: 34px clamp(20px, 4vw, 64px); max-width: 1440px; width: 100%; margin: auto; }
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.eyebrow {
  color: var(--ink-faint); font-size: .78rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; margin: 0 0 8px;
}
h1 { font-size: clamp(1.7rem, 3vw, 2.55rem); letter-spacing: -.055em; line-height: 1.12; margin: 0; }
h2 { font-size: 1.2rem; letter-spacing: -.03em; margin: 0 0 16px; }
h3 { font-size: .98rem; margin: 0 0 10px; letter-spacing: -.02em; }
p { line-height: 1.55; }

.tag { display: inline-block; padding: 7px 10px; border-radius: 99px; background: var(--teal-pale); color: var(--teal-ink); font-weight: 750; font-size: .78rem; }
.notice {
  background: #e7f2f0; border: 1px solid #b9d9d3; color: #345f5b;
  padding: 12px 16px; border-radius: 12px; margin-bottom: 22px; font-size: .88rem; line-height: 1.5;
}
.notice.warn { background: var(--amber-bg); border-color: #e8d19a; color: var(--amber-ink); }
.notice.stop { background: var(--red-bg); border-color: #efc4c4; color: var(--red-ink); }

.grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(310px, 1fr); gap: 20px; align-items: start; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 10px 32px rgba(14, 49, 56, .035); border-radius: var(--radius);
  padding: 25px; margin-bottom: 20px;
}
.card.hero { background: var(--navy-2); color: #fff; padding: 30px; }
.card.hero p { color: #c5dcde; margin: 9px 0 22px; }
.card.hero h2 { font-size: 1.45rem; }
.card.hero .tag { background: #2f5a5e; color: #dcf7ef; }

.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row + .row { border-top: 1px solid var(--line-soft); margin-top: 14px; padding-top: 14px; }
.muted { color: var(--ink-soft); }
.small { font-size: .86rem; }
.big { font-weight: 800; font-size: 1.1rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }

.btn { border: 1px solid #cadbdb; background: #fff; border-radius: 10px; padding: 10px 15px; font-weight: 750; color: #183940; }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #082e32; }
.btn.ghost { background: transparent; }
.btn:hover:not(:disabled) { filter: brightness(.95); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.small { padding: 6px 11px; font-size: .84rem; }
.card.hero .btn { background: #78e4d0; border-color: #78e4d0; color: #0b343b; }

.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.stat strong { font-size: 1.7rem; display: block; letter-spacing: -.05em; }
.stat span { font-size: .83rem; color: #617a80; }

.steps { display: grid; gap: 12px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
/* The round step badge. Scoped to .step: an unscoped .num also matched every
   numeric table cell, which turned each one into a 25px circle and squeezed
   the column it was in. */
.step .num {
  width: 25px; height: 25px; border-radius: 50%; background: #d8f0eb; color: #126f65;
  display: grid; place-items: center; font-size: .8rem; font-weight: 800; flex: none;
}
.step .num.done { background: var(--teal); color: #08343a; }

.field { display: grid; gap: 6px; margin: 14px 0; }
.field label { font-weight: 700; font-size: .87rem; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.field input, .field textarea, .field select {
  border: 1px solid #c8d8da; border-radius: 9px; padding: 11px; background: #fff; width: 100%; color: var(--ink);
}
.field textarea { min-height: 88px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.explain {
  background: #f2f7f7; border-left: 3px solid var(--teal); padding: 10px 12px;
  border-radius: 0 8px 8px 0; font-size: .84rem; color: #3d5f64; line-height: 1.5;
}
.linkish { background: none; border: 0; color: var(--teal-deep); font-weight: 700; font-size: .8rem; padding: 0; text-decoration: underline; }

.panel { display: none; }
.panel.active { display: block; }

.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.diff > div { padding: 16px; background: #f2f7f7; border-radius: 12px; }
.diff b { display: block; margin-bottom: 8px; }
.diff.changed > div:last-child { background: var(--teal-pale); }

table.data { width: 100%; border-collapse: collapse; font-size: .88rem; }
/* A table in a narrow column scrolls rather than spilling past the card. */
.table-scroll { overflow-x: auto; }
table.data th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.data td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.is-change td { background: #f4fbf9; }

.listitem { display: flex; justify-content: space-between; gap: 15px; padding: 15px 0; border-top: 1px solid #e5eded; }
.listitem:first-of-type { border: 0; }
.pill { border-radius: 99px; background: var(--amber-bg); color: var(--amber-ink); padding: 5px 9px; font-size: .77rem; font-weight: 750; white-space: nowrap; }
.pill.ok { background: var(--green-bg); color: var(--green-ink); }
.pill.stop { background: var(--red-bg); color: var(--red-ink); }
.pill.idle { background: #eef2f3; color: #5b7176; }
.pill.info { background: var(--teal-pale); color: var(--teal-ink); }

.empty { background: #f2f7f7; border-radius: 12px; padding: 20px; color: #587277; }
.hide { display: none !important; }
/* The availability note and anything else toggled by the hidden attribute.
   Stated outright because a class rule elsewhere would otherwise win. */
[hidden] { display: none !important; }

.finding { border-left: 3px solid #ccc; padding: 10px 12px; margin-bottom: 10px; border-radius: 0 8px 8px 0; background: #fafcfc; }
.finding.block { border-color: #d05a5a; background: var(--red-bg); }
.finding.flag { border-color: #d8a33c; background: var(--amber-bg); }
.finding.info { border-color: var(--teal); background: var(--teal-pale); }
.finding b { display: block; font-size: .85rem; }
.finding .cite { font-size: .76rem; }

pre.draft {
  background: #0f272e; color: #d7ecef; padding: 18px; border-radius: 12px;
  overflow: auto; font-size: .76rem; line-height: 1.5; max-height: 460px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.watermark {
  background: repeating-linear-gradient(45deg, #fff4df, #fff4df 12px, #ffeecb 12px, #ffeecb 24px);
  border: 1px solid #e8d19a; color: var(--amber-ink); padding: 12px 15px;
  border-radius: 10px; font-weight: 700; font-size: .84rem; margin-bottom: 14px; line-height: 1.5;
}

.login { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login .card { max-width: 430px; width: 100%; margin: 0; }
.accounts { display: grid; gap: 6px; margin-top: 14px; }
.accounts button {
  text-align: left; border: 1px solid var(--line); background: #fff;
  border-radius: 10px; padding: 9px 12px; font-size: .84rem;
}
.err { color: var(--red-ink); font-size: .86rem; min-height: 1.2em; }

.pdfframe {
  width: 100%; height: 620px; margin-top: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: #f7fafa;
}
@media (max-width: 850px) { .pdfframe { height: 420px; } }

.chat { display: grid; gap: 10px; max-height: 380px; overflow: auto; padding-right: 4px; }
.bubble { background: #f2f7f7; padding: 11px 13px; border-radius: 12px; font-size: .88rem; line-height: 1.5; }
.bubble.mine { background: var(--teal-pale); }
.bubble .who { font-weight: 750; font-size: .78rem; color: var(--ink-faint); display: block; margin-bottom: 3px; }

.wizard-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.wizard-nav button {
  border: 1px solid var(--line); background: #fff; border-radius: 99px;
  padding: 8px 14px; font-size: .84rem; font-weight: 700; color: #3f6067;
}
.wizard-nav button.active { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.wizard-nav button.done { border-color: var(--teal); color: var(--teal-ink); }

.integration { border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 14px; }
.states { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.states span { font-size: .74rem; padding: 4px 9px; border-radius: 99px; background: #eef2f3; color: #7b8e92; }
.states span.reachable { background: var(--teal-pale); color: var(--teal-ink); font-weight: 750; }
ul.reqs { margin: 8px 0 0; padding-left: 18px; font-size: .85rem; color: var(--ink-soft); line-height: 1.6; }

@media (max-width: 980px) { .statgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 850px) {
  .shell { display: block; }
  aside { padding: 15px; gap: 12px; }
  .brand { padding: 0; }
  .nav { display: flex; overflow: auto; }
  .nav button { white-space: nowrap; width: auto; }
  .asidefoot { display: none; }
  main { padding: 22px 16px; }
  .grid, .two, .diff { grid-template-columns: 1fr; }
  .top { align-items: center; }
}
@media (max-width: 450px) { .statgrid { grid-template-columns: 1fr 1fr; } .card { padding: 18px; } }

/* ---------- public listing pages ---------- */
.pubwrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.pubhead { background: var(--navy); color: #d7e9eb; padding: 16px 0; margin-bottom: 28px; }
.pubhead .pubwrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.brandlink { color: #fff; font-weight: 800; letter-spacing: -.04em; font-size: 1.1rem; text-decoration: none; }
.brandlink b { color: #76dfca; }
.pubhead .muted { color: #96b4b9; }
.pubfoot { margin: 40px auto; padding-top: 18px; border-top: 1px solid var(--line); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 22px; }
.filters .field { margin: 0; min-width: 150px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.listingcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 10px 32px rgba(14, 49, 56, .035); display: flex; flex-direction: column;
}
.listingcard img { width: 100%; height: 190px; object-fit: cover; display: block; background: #e8eff0; }
.listingcard .body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.listingcard h3 { margin: 0; font-size: 1rem; line-height: 1.35; }
.listingcard .price { font-weight: 800; font-size: 1.15rem; letter-spacing: -.03em; }
.listingcard a.btn { margin-top: auto; text-align: center; text-decoration: none; display: block; }

.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; max-height: 380px; }
.gallery img:first-child { grid-row: span 2; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } .gallery img:first-child { grid-row: auto; } }

.facts { display: flex; gap: 18px; flex-wrap: wrap; margin: 14px 0 18px; }
.facts div { background: #f2f7f7; border-radius: 10px; padding: 10px 14px; }
.facts b { display: block; font-size: 1.05rem; }
.featurelist { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; margin: 10px 0; }
.featurelist li { background: var(--teal-pale); color: var(--teal-ink); border-radius: 99px; padding: 6px 12px; font-size: .84rem; font-weight: 650; }
.slotgrid { display: grid; gap: 8px; }
.slotgrid label { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: .9rem; }
.progress { display: grid; gap: 8px; margin: 14px 0; }
.progress .row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }

/* A field the server rejected, so the eye lands on it. */
.field input.invalid, .field select.invalid, .field textarea.invalid {
  border-color: var(--red-ink);
  background: var(--red-bg);
}

/* ==========================================================================
   Product-quality pass.

   Same palette, same radii, same navy-and-teal direction as above. What
   changes is consistency: one page header, one empty state, one status
   vocabulary, one table treatment, one form rhythm. Nothing below alters what
   the product says about itself -- the warnings, watermarks and refusal
   notices keep their existing weight and are, if anything, louder.
   ========================================================================== */

:root {
  --shadow-sm: 0 1px 2px rgba(14, 49, 56, .05);
  --shadow: 0 10px 32px rgba(14, 49, 56, .035);
  --shadow-lift: 0 14px 38px rgba(14, 49, 56, .09);
  --radius-sm: 10px;
  --radius-md: 14px;
  --gutter: 16px;
}

/* Screen-reader-only text, for the places where a mark alone is not enough. */
.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;
}

/* Focus is never removed, only made legible on both light and dark grounds. */
:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 2px; border-radius: 4px; }
aside :focus-visible, .card.hero :focus-visible { outline-color: #8fe9d6; }

/* ---------- navigation ---------- */
.navgroup { margin-bottom: 14px; }
.navgroup > h4 {
  /* 12px floor. Uppercase with wide letter-spacing is the hardest combination
     to read small, and these are the labels somebody looks at most. */
  font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
  color: #8fb3b8; margin: 0 0 6px; padding: 0 14px; font-weight: 800;
}
.nav button {
  display: flex; align-items: center; gap: 10px; font-size: .9rem;
  transition: background .12s ease, color .12s ease;
}
.nav button .ico { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav button.active { background: var(--navy-3); color: #fff; box-shadow: inset 3px 0 0 var(--teal); }
.nav button.active .ico { opacity: 1; }
.nav button:hover:not(.active) { background: rgba(255, 255, 255, .06); color: #eaf6f7; }
.orgbox {
  border-top: 1px solid #2a5058; padding-top: 14px; display: grid; gap: 2px;
}
.orgbox .orgname { color: #fff; font-weight: 750; font-size: .9rem; }
.orgbox .orgrole { color: #8fb3b8; font-size: .78rem; }

/* ---------- page furniture ---------- */
main { max-width: 1280px; }
.pagehead {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 18px; flex-wrap: wrap; margin-bottom: 18px;
}
.pagehead-text h2 { margin: 0 0 4px; font-size: 1.32rem; }
.pagehead-text p { margin: 0; font-size: .9rem; }
.pageactions { display: flex; gap: 10px; flex-wrap: wrap; }
.cardhead {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px; margin-bottom: 16px;
}
.cardhead h2, .cardhead h3 { margin: 0 0 2px; }
.cardhead p { margin: 0; }

.card { box-shadow: var(--shadow-sm); }
.card.interactive { transition: box-shadow .14s ease, transform .14s ease; }
.card.interactive:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }

/* ---------- empty states ---------- */
.emptystate {
  background: #f5f9f9; border: 1px dashed #cfdedf; border-radius: var(--radius-md);
  padding: 30px 26px; text-align: center; color: #4e6b70;
}
.emptystate h3 { margin: 0 0 6px; font-size: 1rem; color: var(--ink); }
.emptystate p { margin: 0 auto 16px; max-width: 46ch; font-size: .9rem; line-height: 1.6; }
.emptystate .btn { margin: 0 auto; }

/* ---------- status vocabulary ---------- */
.pill { display: inline-block; line-height: 1.35; }
.pill + .pill { margin-left: 5px; }
.statusstrip { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 16px; }

/* ---------- tables ---------- */
table.data td .sub {
  display: block; color: var(--ink-soft); font-size: .8rem; margin-top: 2px;
}
table.data tbody tr:hover td { background: #f7fbfb; }
table.data.sticky thead th {
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
td.rowact, th.rowact { text-align: right; white-space: nowrap; }
td.rowact .btn + .btn { margin-left: 6px; }

/* ---------- forms ---------- */
.field label > span:first-child { display: inline-flex; align-items: baseline; gap: 6px; }
.field .req { color: var(--red-ink); font-weight: 800; }
.field .opt { color: var(--ink-soft); font-weight: 600; font-size: .78rem; }
.field input:disabled, .field select:disabled, .field textarea:disabled {
  background: #f2f5f6; color: #7d9296; cursor: not-allowed;
}
.fielderr { color: var(--red-ink); font-size: .82rem; margin: 2px 0 0; font-weight: 650; }
.formnote { font-size: .86rem; color: var(--ink-soft); margin: 12px 0 0; }
.prefixed { display: flex; align-items: center; gap: 0; }
.prefixed > span {
  border: 1px solid #c8d8da; border-right: 0; border-radius: 9px 0 0 9px;
  padding: 11px 12px; background: #f2f7f7; color: var(--ink-soft); font-weight: 700;
}
.prefixed input { border-radius: 0 9px 9px 0 !important; }
.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice.wrap { gap: 6px; }
.choicebox {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid #c8d8da;
  border-radius: 9px; padding: 9px 13px; font-size: .88rem; cursor: pointer; background: #fff;
}
.choicebox:has(input:checked) { border-color: var(--teal-deep); background: var(--teal-pale); font-weight: 700; }
.choicebox:has(input:focus-visible) { outline: 3px solid var(--teal-deep); outline-offset: 2px; }
.checkline { display: flex; align-items: center; gap: 9px; font-size: .88rem; margin: 10px 0; }
label.sub { display: grid; gap: 5px; font-size: .82rem; font-weight: 700; color: #3f6067; }
label.sub input, label.sub select, label.sub textarea {
  border: 1px solid #c8d8da; border-radius: 9px; padding: 10px; font-weight: 400;
  color: var(--ink); background: #fff; width: 100%;
}
label.sub textarea { min-height: 70px; }

/* ---------- repeating rows ---------- */
.repeater { display: grid; gap: 12px; }
.repeat-row {
  border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 15px; background: #fbfdfd; display: grid; gap: 10px;
}
.btn.danger { color: var(--red-ink); border-color: #e6c3c3; }
.btn.danger:hover:not(:disabled) { background: var(--red-bg); }

/* ---------- the lease board ---------- */
.bucketbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.bucketchip {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 12px 16px; min-width: 104px; box-shadow: var(--shadow-sm);
}
.bucketchip b { display: block; font-size: 1.4rem; letter-spacing: -.045em; }
.bucketchip span { font-size: .78rem; color: var(--ink-soft); }
.bucketchip.zero { opacity: .55; }

/* ---------- the create-lease wizard ---------- */
.wizardcard { padding: 0; overflow: hidden; }
.wizardhead {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 24px 26px 18px; border-bottom: 1px solid var(--line-soft);
}
.wizardhead h2 { margin: 0 0 4px; }
.wizardhead p { margin: 0; font-size: .89rem; }
.wizardsteps {
  display: flex; gap: 6px; flex-wrap: wrap; list-style: none; margin: 0;
  padding: 14px 26px; background: #f7fafa; border-bottom: 1px solid var(--line-soft);
}
.wizardsteps button {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid transparent;
  background: none; border-radius: 99px; padding: 6px 12px; font-size: .82rem;
  font-weight: 700; color: #5d7c81;
}
.wizardsteps button .n {
  width: 20px; height: 20px; border-radius: 50%; background: #dce7e8; color: #46686d;
  display: grid; place-items: center; font-size: .72rem; font-weight: 800;
}
.wizardsteps button.done { color: var(--teal-ink); }
.wizardsteps button.done .n { background: var(--teal); color: #08343a; }
.wizardsteps button.active { background: var(--navy-2); color: #fff; }
.wizardsteps button.active .n { background: #78e4d0; color: #0b343b; }
.wizardsteps button:disabled { opacity: .5; cursor: default; }
.wizardbody { padding: 24px 26px; max-width: 760px; }
.wizardfoot {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 18px 26px; border-top: 1px solid var(--line-soft); background: #fbfdfd;
}
.wizardcard .notice, .wizardcard .formnote { margin: 0 26px 18px; }
.wizardcard .statusstrip, .wizardcard .finding, .wizardcard > .small { margin-left: 26px; margin-right: 26px; }
.wizardcard h3 { padding: 0 26px; }

.summarybox {
  background: #f2f7f7; border-radius: var(--radius-md); padding: 16px 18px; margin: 16px 0;
}
.summarybox h4 { margin: 0 0 4px; font-size: .98rem; }
.summarybox p { margin: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chip {
  background: #fff; border: 1px solid var(--line); border-radius: 99px;
  padding: 4px 10px; font-size: .77rem; font-weight: 650; color: #4d6f74;
}

.rolekey { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-bottom: 22px; }
.rolecard { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 13px 15px; }
.rolecard b { display: block; font-size: .89rem; margin-bottom: 5px; }
.rolecard p { margin: 8px 0 0; font-size: .8rem; line-height: 1.5; }
.peoplelist { display: grid; gap: 12px; margin-bottom: 14px; }

.reviewgroup { border-top: 1px solid var(--line-soft); padding-top: 16px; margin-top: 16px; }
.reviewgroup:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.reviewgroup h4 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 10px; font-size: .95rem; }
.reviewgroup dl { margin: 0; display: grid; gap: 0; }
.reviewline {
  display: grid; grid-template-columns: minmax(150px, 40%) 1fr; gap: 14px;
  padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: .88rem;
}
.reviewline:last-child { border-bottom: 0; }
.reviewline dt { color: var(--ink-soft); font-weight: 650; margin: 0; }
.reviewline dd { margin: 0; }
.overlap table.data { margin: 12px 0; background: #fff; border-radius: var(--radius-sm); }

/* ---------- integrations ---------- */
.provgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.provcard {
  border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px;
  background: var(--surface); display: flex; flex-direction: column; gap: 10px;
}
.provcard .provtop { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.provcard h3 { margin: 0; }
.provcard .provwhat { font-size: .86rem; color: var(--ink-soft); line-height: 1.55; margin: 0; }
.provcard .provwho { font-size: .8rem; color: var(--ink-faint); margin: 0; }
details.detailbox { border-top: 1px solid var(--line-soft); padding-top: 10px; margin-top: auto; }
details.detailbox > summary {
  cursor: pointer; font-size: .84rem; font-weight: 750; color: var(--teal-deep);
  list-style: none; display: flex; align-items: center; gap: 6px;
}
details.detailbox > summary::-webkit-details-marker { display: none; }
details.detailbox > summary::after { content: '▾'; font-size: .7rem; }
details.detailbox[open] > summary::after { content: '▴'; }
details.detailbox > summary:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 2px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .reviewline { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 850px) {
  .nav { display: grid; overflow: visible; }
  .nav button { width: 100%; }
  .navgroup > h4 { padding: 0 10px; }
  .pagehead { align-items: flex-start; }
  .pageactions { width: 100%; }
  .pageactions .btn { flex: 1; }
  .wizardbody, .wizardhead, .wizardfoot, .wizardsteps { padding-left: var(--gutter); padding-right: var(--gutter); }
  .wizardcard .notice, .wizardcard .formnote, .wizardcard .statusstrip,
  .wizardcard .finding, .wizardcard > .small { margin-left: var(--gutter); margin-right: var(--gutter); }
  .wizardcard h3 { padding: 0 var(--gutter); }
  .wizardsteps { gap: 4px; }
  .wizardsteps button { padding: 5px 9px; font-size: .76rem; }
  .two { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  main { padding: 18px var(--gutter); }
  .bucketchip { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .wizardsteps li:not(:has(.active)):not(:has(.done)) { display: none; }
  table.data { font-size: .84rem; }
}

/* ---------- one page header ---------- */
.top { align-items: flex-start; }
.top-text { min-width: 0; }
.pagesub { margin: 8px 0 0; font-size: .92rem; max-width: 62ch; }
.top-right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; flex: none; }
.top-right .pageactions:empty { display: none; }

/* The wizard is a task, not a panel: hold it to a readable column. */
.wizardcard { max-width: 940px; margin-inline: auto; }
.wizardbody { max-width: none; }

@media (max-width: 850px) {
  .top { flex-direction: column; align-items: stretch; }
  .top-right { flex-direction: row-reverse; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
  .top-right .pageactions { flex: 1; }
}

/* A label's text and its required/optional marker belong on one line. */
label.sub .sublabel { display: inline-flex; align-items: baseline; gap: 6px; }
/* A row's destructive action sits to one side at its own size. */
.repeat-row .rowremove { justify-self: end; width: auto; }
.repeat-row { justify-items: stretch; }
.rolecard { display: flex; flex-direction: column; gap: 2px; }
.rolecard .pill { align-self: flex-start; }

/* ---------- overview ---------- */
.attn {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 14px 15px; border: 1px solid var(--line); border-left-width: 4px;
  border-radius: var(--radius-sm); margin-bottom: 10px; background: #fbfdfd;
}
.attn:last-child { margin-bottom: 0; }
.attn b { display: block; font-size: .92rem; }
.attn .btn { flex: none; }
.attn.blocked { border-left-color: #d05a5a; background: var(--red-bg); }
.attn.attention { border-left-color: #d8a33c; background: var(--amber-bg); }
.attn.info { border-left-color: var(--teal); background: var(--teal-pale); }
ul.plainlist { margin: 0 0 16px; padding-left: 18px; font-size: .86rem; line-height: 1.65; color: var(--ink-soft); }
ul.plainlist b { color: var(--ink); }
.provcard h4.reqhead { margin: 12px 0 4px; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); }
.provgrid { margin-bottom: 20px; }
.inlinepick select {
  border: 1px solid #c8d8da; border-radius: 9px; padding: 9px 11px; background: #fff;
  font-size: .88rem; color: var(--ink); max-width: 320px;
}

/* ==========================================================================
   Public rental search. A consumer page, not the operator workspace: bigger
   images, fewer words, one obvious action per card.
   ========================================================================== */
.pubhero { margin: 6px 0 20px; }
.pubhero h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
.pubhero p { margin: 8px 0 0; max-width: 56ch; }

.filters {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 14px 16px; box-shadow: var(--shadow-sm); align-items: end;
}
.filters .field label { font-size: .78rem; color: var(--ink-faint); }
.filters .btn { align-self: end; }

.listingcard { position: relative; transition: box-shadow .16s ease, transform .16s ease; }
.listingcard:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.listingcard:has(a.stretched:focus-visible) { outline: 3px solid var(--teal-deep); outline-offset: 2px; }
.listingcard .shot { position: relative; }
.listingcard .noshot {
  height: 190px; background: #eaf1f1; display: grid; place-items: center; gap: 6px;
  color: #8aa3a7; align-content: center;
}
.listingcard .noshot svg { width: 34px; height: 34px; }
.listingcard .noshot span { font-size: .78rem; font-weight: 650; }
.availchip {
  position: absolute; left: 10px; bottom: 10px; background: rgba(16, 43, 53, .9);
  color: #dff5f0; border-radius: 99px; padding: 5px 11px; font-size: .74rem; font-weight: 700;
}
.listingcard .price { margin: 0; font-weight: 800; font-size: 1.24rem; letter-spacing: -.035em; }
.listingcard .price .per { font-size: .8rem; font-weight: 650; color: var(--ink-soft); }
.listingcard h3 { margin: 2px 0 0; }
.listingcard h3 a { text-decoration: none; color: var(--ink); }
/* One tap target for the whole card, with the heading as its accessible name. */
a.stretched::after { content: ''; position: absolute; inset: 0; }
ul.keyfacts { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; padding: 0; margin: 8px 0 0; }
ul.keyfacts li {
  background: #f1f6f6; border-radius: 8px; padding: 4px 9px; font-size: .8rem;
  font-weight: 650; color: #46686d;
}
.listingcard .where { margin: 8px 0 0; font-size: .86rem; color: var(--ink-soft); }
.listingcard .viewcta { margin-top: auto; text-align: center; display: block; }

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filters .btn { grid-column: 1 / -1; }
  .listingcard img, .listingcard .noshot { height: 210px; }
}

/* A scrollable table region is focusable, so it needs a visible focus ring. */
.table-scroll { max-width: 100%; }
.table-scroll:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 2px; border-radius: var(--radius-sm); }
/* Hashes and long identifiers must not push a page sideways. */
.mono { overflow-wrap: anywhere; }
.states { max-width: 100%; }
@media (max-width: 560px) {
  .statgrid { gap: 8px; }
  .stat { padding: 14px; }
  .stat strong { font-size: 1.4rem; }
  .filters .field { min-width: 0; }
  .diff { grid-template-columns: 1fr; }
}

/* A grid child defaults to min-width:auto, so a wide table refused to shrink
   and pushed the whole page sideways on a phone -- 606px inside a 390px
   viewport. Every layout child may shrink; the table scrolls instead. */
.grid > *, .two > *, .card, .panel, main { min-width: 0; }
.grid > * > .card { max-width: 100%; }

/* Six stats in a fixed four-column grid left a ragged second row. */
.statgrid { grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
@media (max-width: 980px) { .statgrid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
@media (max-width: 450px) { .statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- the confirm dialog ---------- */
dialog#confirmDialog {
  border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0;
  max-width: 460px; width: calc(100% - 32px); box-shadow: 0 24px 60px rgba(10, 35, 42, .25);
  color: var(--ink); background: var(--surface);
}
dialog#confirmDialog::backdrop { background: rgba(12, 34, 41, .45); }
dialog#confirmDialog form { padding: 24px; margin: 0; }
dialog#confirmDialog h2 { margin: 0 0 8px; font-size: 1.08rem; }
dialog#confirmDialog p { margin: 0 0 4px; line-height: 1.55; }
.dialogfoot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.btn.danger-solid { background: var(--red-ink); border-color: var(--red-ink); color: #fff; }
.btn.danger-solid:hover:not(:disabled) { filter: brightness(1.08); }


/* ---------- contrast corrections ----------
   Measured with scripts/browser/contrast.js against what the browser paints,
   not chosen by eye. Each of these sat between 3.0:1 and 4.2:1, which reads
   fine on a good screen in a bright room and not at all otherwise. */
.states span { background: #e7ecee; color: #55686c; }
.attn .muted, .notice .muted { color: #4a6268; }
details.detailbox > summary { color: var(--teal-deep); }
.fieldhint { font-size: .78rem; color: var(--ink-faint); margin: 2px 0 0; }
.wizardfoot .footright { display: flex; gap: 10px; }
.discardnote { padding: 0 26px 18px; margin: -8px 0 0; }
@media (max-width: 850px) { .discardnote { padding: 0 var(--gutter) 18px; } }

/* ---------- property history ---------- */
ol.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
ol.timeline li {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; align-items: baseline;
  padding: 11px 0; border-bottom: 1px solid var(--line-soft);
}
ol.timeline li:last-child { border-bottom: 0; }
.tl-date { color: var(--ink-faint); font-size: .8rem; font-variant-numeric: tabular-nums; }
.tl-body { display: grid; gap: 2px; min-width: 0; }
.tl-body b { font-size: .92rem; font-weight: 700; }
.tl-amount { font-weight: 750; font-variant-numeric: tabular-nums; }
.tl-summary { color: var(--ink-soft); font-size: .84rem; }
.tl-kind {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint);
  background: #f1f6f6; border-radius: 99px; padding: 3px 9px; white-space: nowrap;
}
li.tl-maintenance .tl-kind { background: var(--amber-bg); color: var(--amber-ink); }
li.tl-payment .tl-kind { background: var(--green-bg); color: var(--green-ink); }
li.tl-lease .tl-kind, li.tl-tenancy .tl-kind { background: var(--teal-pale); color: var(--teal-ink); }
@media (max-width: 700px) {
  ol.timeline li { grid-template-columns: 1fr auto; }
  .tl-date { grid-column: 1 / -1; }
}

/* ==========================================================================
   The commercial site. Same palette and radii as the workspace; wider
   measure, bigger type, and nothing that implies a feature the product does
   not have.
   ========================================================================== */
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip:focus { left: 0; }

body.site { background: var(--bg); }
.sitehead {
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 14px 0; position: sticky; top: 0; z-index: 20;
}
.sitehead .pubwrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
/* The wordmark is a link home, so it is a target too. */
.sitehead .brandlink { display: inline-flex; align-items: center; min-height: 44px; }
.sitehead .brandlink { color: var(--ink); font-size: 1.15rem; }
.sitehead .brandlink b { color: var(--teal-deep); }
.sitenav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.sitenav a {
  color: var(--ink-soft); text-decoration: none; font-weight: 650; font-size: .92rem;
  /* A tappable height rather than the height of the text. WCAG 2.5.8 asks for
     24px; 44px is what a thumb actually wants, and the nav has room for it. */
  display: inline-flex; align-items: center; min-height: 44px;
}
.sitenav a:hover { color: var(--ink); }
.sitenav a.btn { color: #082e32; }
.sitenav span { display: flex; align-items: center; gap: 14px; }

.hero { padding: 56px 0 36px; max-width: 62ch; }
.hero.narrow { max-width: 54ch; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.055em; line-height: 1.08; }
.lede { font-size: 1.12rem; line-height: 1.6; color: var(--ink-soft); margin: 18px 0 24px; }
.heroactions { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.heroactions .btn { text-decoration: none; display: inline-block; }

.featuregrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 20px 0 48px; }
.featuregrid article {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 20px; box-shadow: var(--shadow-sm);
}
.featuregrid h2 { font-size: 1rem; margin: 0 0 8px; }
.featuregrid p { margin: 0; font-size: .9rem; color: var(--ink-soft); line-height: 1.6; }

.plainly, .restrictions, .freebits {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 24px 26px; margin: 0 0 32px;
}
.plainly h2, .restrictions h2, .freebits h2, .plansheading
  { font-size: 1.05rem; margin: 0 0 12px; }
.plainly ul, .restrictions ul, .freebits ul { margin: 0 0 8px; padding-left: 20px; line-height: 1.7; color: var(--ink-soft); }
.plainly li b, .restrictions li b { color: var(--ink); }
.restrictions h3 { margin: 18px 0 8px; font-size: .92rem; }

.plangrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 10px 0 36px; }
.plancard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 22px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-sm);
}
.plancard.featured { border-color: var(--teal); box-shadow: var(--shadow); }
.plancard h3 { margin: 0; font-size: 1.05rem; }
.planprice { margin: 2px 0 6px; font-size: 1.7rem; font-weight: 800; letter-spacing: -.045em; }
.planprice .per { font-size: .82rem; font-weight: 650; color: var(--ink-soft); letter-spacing: 0; }
.planprice .noprice { font-size: 1rem; font-weight: 750; color: var(--ink-faint); }
.plansummary { margin: 0; font-size: .9rem; color: var(--ink-soft); line-height: 1.55; }
ul.planlimits, ul.planfeatures { margin: 6px 0; padding-left: 18px; font-size: .85rem; color: var(--ink-soft); line-height: 1.6; }
ul.planlimits { font-weight: 650; color: var(--ink); }
.planaction { margin-top: auto; text-align: center; text-decoration: none; display: block; }

.sitefoot { border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0 48px; }
.sitefoot p { margin: 0 0 10px; max-width: 70ch; }
.sitefoot a { color: var(--teal-deep); }

@media (max-width: 700px) {
  .sitehead .pubwrap { flex-direction: column; align-items: flex-start; }
  .sitenav { width: 100%; justify-content: flex-start; gap: 12px; }
  .hero { padding: 32px 0 24px; }
}


/* ------------------------------------------------- the marketing homepage
   Added when the live site turned out to be three text sections, no images
   and no way in. A landlord should see the product within ten seconds, so
   the first thing under the headline is a screenshot of the real thing. */

.site .eyebrow {
  text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; font-weight: 750;
  color: var(--teal-ink, #0f6b63); margin: 0 0 10px;
}
.site .hero { padding: 48px 0 28px; max-width: 760px; }
.site .hero h1 { margin-bottom: 14px; }
.site .hero .lede { font-size: 1.12rem; color: var(--ink-soft); margin-bottom: 22px; }

.btn.ghost { background: transparent; border-color: transparent; text-decoration: underline; }

/* The product shots. A thin frame and a soft shadow so a screenshot reads as
   a window into the application rather than a stray image. */
.shot { margin: 0; }
.shot img {
  display: block; width: 100%; height: auto; border-radius: 14px;
  border: 1px solid #d9e4e4; box-shadow: 0 18px 44px rgba(16, 43, 53, .14);
  background: #fff;
}
.shot figcaption { margin-top: 10px; font-size: .84rem; color: var(--ink-soft); }
.hero-shot { margin: 0 0 56px; }

.tour { margin: 0 0 56px; }
.tour > h2 { font-size: 1.5rem; margin-bottom: 26px; }
.tourrow {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 38px; align-items: center; margin-bottom: 46px;
}
.tourrow.reverse .tourtext { order: 2; }
.tourrow h3 { font-size: 1.22rem; margin: 0 0 10px; letter-spacing: -.02em; }
.tourrow p { color: var(--ink-soft); margin: 0 0 14px; }

.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 8px; font-size: .94rem; }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: .45em; width: 9px; height: 5px;
  border-left: 2px solid var(--teal-ink, #0f6b63); border-bottom: 2px solid var(--teal-ink, #0f6b63);
  transform: rotate(-45deg);
}

.closing {
  margin: 0 0 56px; padding: 34px; border-radius: 16px;
  background: var(--teal-pale, #e7f2f0); border: 1px solid #c9e0db;
}
.closing h2 { font-size: 1.35rem; margin-bottom: 8px; }
.closing .lede { margin-bottom: 18px; color: var(--ink-soft); }

@media (max-width: 860px) {
  .site .hero { padding: 30px 0 20px; }
  .tourrow { grid-template-columns: 1fr; gap: 20px; margin-bottom: 36px; }
  /* Text first on a phone, always — a screenshot above the explanation is a
     picture nobody has been told how to read. */
  .tourrow.reverse .tourtext { order: 0; }
  .hero-shot { margin-bottom: 36px; }
  .closing { padding: 24px; }
}
