/* HouseBalance: "the ledger".
   A bill-splitting tool should look like a well-set financial statement:
   paper and ink, hairline rules, a serif for titles and figures, numerals that
   line up, and exactly one accent colour meaning "settled".
   No gradients, no glass, no drop shadows, no decorative badges. */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/newsreader-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/newsreader-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/manrope-latin.woff2") format("woff2");
}

:root {
  --paper: #f6f4ee;
  --sheet: #ffffff;
  --ink: #1b1a17;
  --ink-2: #4d4a42;
  --muted: #7b776c;
  --rule: #d9d4c7;
  --rule-soft: #e9e5da;
  --field: #cdc7b8;

  --accent: #0f6b5b;
  --accent-dark: #0b5246;
  --accent-soft: #e2efe9;
  --accent-ink: #ffffff;

  --warn-ink: #7a4f00;
  --warn-bg: #fbf1d8;
  --warn-rule: #e6cd8b;
  --bad-ink: #9b2c1f;
  --bad-bg: #fbeae6;
  --bad-rule: #e6b9ae;
  --info-bg: #eeeae0;
  --info-ink: #4d4a42;

  --focus: #b7791f;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 3px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15.5px/1.55 var(--sans);
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- header */
header.top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .25rem 1.5rem;
  padding: 0 1.25rem;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .7rem 0;
  color: var(--ink);
  text-decoration: none;
}
.brand img { display: block; width: 26px; height: 26px; }
.brand .wordmark { font: 700 15.5px/1 var(--sans); letter-spacing: -.01em; }
.brand .tagline {
  color: var(--muted);
  font: italic 500 13px/1.2 var(--serif);
}
header.top .tagline { display: none; }
header nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0 .25rem; }
header nav a {
  display: inline-block;
  padding: .45rem .6rem;
  color: var(--ink-2);
  font: 600 14px/1.2 var(--sans);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
header nav a:hover { color: var(--ink); border-bottom-color: var(--rule); }
header nav a.here { color: var(--ink); border-bottom-color: var(--accent); }
header .who {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem .9rem;
  margin-left: auto;
  padding: .5rem 0;
}
header .who .portfolio {
  color: var(--ink-2);
  font: 500 12.5px/1.3 var(--sans);
  letter-spacing: .06em;
  text-transform: uppercase;
}
header .who .portfolio span { color: var(--muted); text-transform: none; letter-spacing: 0; }
header .who form { margin: 0; }
button.link, .link {
  border: 0; background: none; padding: 0; margin: 0;
  color: var(--accent); font: 600 14px/1.3 var(--sans);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
button.link:hover, .link:hover { color: var(--accent-dark); }
header .cta { margin: .3rem 0 .3rem .25rem; }

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 4rem;
}
main.narrow { max-width: 620px; }
main.auth { max-width: 420px; padding-top: 4rem; }
main.wide { max-width: 1180px; }

footer.site {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
footer.site a { color: var(--ink-2); }
footer.site .row {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
  justify-content: space-between;
}

/* ------------------------------------------------------------------ type */
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.012em; color: var(--ink); }
h1 { font-size: 2.05rem; line-height: 1.12; margin: .2rem 0 1.1rem; }
h2 { font-size: 1.45rem; line-height: 1.2; margin: 1.9rem 0 .75rem; }
h3 {
  font: 600 12.5px/1.3 var(--sans);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
  margin: 1.4rem 0 .5rem;
}
p { margin: .5rem 0 .9rem; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
.lede { font: 400 1.22rem/1.5 var(--serif); color: var(--ink-2); max-width: 40rem; }
.kicker {
  font: 600 12px/1.3 var(--sans);
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 .5rem;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.money { font-family: var(--serif); font-weight: 500; font-variant-numeric: tabular-nums lining-nums; }
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  border-bottom: 1px solid var(--ink);
  padding-bottom: .8rem;
  margin-bottom: 1.25rem;
}
.page-head h1 { margin: 0; }
.page-head p { margin: .3rem 0 0; color: var(--ink-2); max-width: 44rem; }
.page-head .aside { font-size: 13px; color: var(--muted); text-align: right; }
.page-head .aside strong { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------- buttons */
button, .button {
  display: inline-block;
  margin: 0;
  padding: 9px 15px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--sheet);
  color: var(--ink);
  font: 600 14px/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
button:hover, .button:hover { background: var(--info-bg); border-color: var(--ink); color: var(--ink); }
button.primary, .button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
button.primary:hover, .button.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
button.quiet, .button.quiet { border-color: var(--rule); color: var(--ink-2); background: transparent; }
button.quiet:hover, .button.quiet:hover { border-color: var(--ink); color: var(--ink); background: var(--info-bg); }
button.danger { border-color: var(--bad-rule); color: var(--bad-ink); background: var(--sheet); }
button.danger:hover { background: var(--bad-bg); border-color: var(--bad-ink); color: var(--bad-ink); }
button.big { padding: 12px 20px; font-size: 15px; }
button:disabled { opacity: .55; cursor: not-allowed; }

/* ------------------------------------------------------------------ form */
label { display: block; margin: .8rem 0; font: 600 13.5px/1.35 var(--sans); color: var(--ink); }
label span.muted { display: block; font-weight: 400; font-size: 12.5px; margin-top: .1rem; }
input, select, textarea {
  display: block;
  width: 100%;
  margin-top: .35rem;
  padding: 9px 11px;
  border: 1px solid var(--field);
  border-radius: var(--radius);
  background: var(--sheet);
  color: var(--ink);
  font: 400 15px/1.3 var(--sans);
  transition: border-color .12s;
}
input::placeholder { color: #a9a497; }
input:hover, select:hover { border-color: #b3ac9b; }
input:focus, select:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
input[type="checkbox"] { width: 1.05rem; height: 1.05rem; margin: 0 .5rem 0 0; padding: 0; accent-color: var(--accent); }
input[type="file"] { padding: 8px; font-size: 14px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 .9rem; }
.check { display: flex; align-items: flex-start; font-weight: 400; color: var(--ink-2); font-size: 14px; }
.check input { margin-top: .2rem; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1.1rem; }
.field-error { color: var(--bad-ink); font-size: 13px; margin: .25rem 0 0; }

/* ----------------------------------------------------------------- cards */
.card {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem 1.25rem;
  margin-bottom: 1.1rem;
}
.card h2 { margin: .1rem 0 .7rem; font-size: 1.3rem; }
.card > h3:first-child { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.section { border-top: 1px solid var(--rule); padding-top: .3rem; margin-top: 1.6rem; }

/* ---------------------------------------------------------------- tables */
table { border-collapse: collapse; width: 100%; margin: .4rem 0 .9rem; }
th, td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule-soft);
  padding: .55rem .6rem .55rem 0;
  font-size: 14.5px;
}
th {
  font: 600 12px/1.3 var(--sans);
  letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: .4rem;
}
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
tr.total td { font-weight: 600; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
table.alloc td:first-child { font-weight: 600; }
table td a { font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
table td a:hover { border-bottom-color: var(--accent); color: var(--accent-dark); }

/* status words: small printed labels, not coloured pills */
.status {
  display: inline-block;
  font: 600 11.5px/1 var(--sans);
  letter-spacing: .07em; text-transform: uppercase;
  padding: .28rem .45rem .24rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink-2);
  white-space: nowrap;
}
.s-awaiting_review { border-style: dashed; }
.s-needs_review { border-color: var(--warn-rule); color: var(--warn-ink); background: var(--warn-bg); }
.s-ready, .s-approved, .s-exported { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.s-invalidated { border-color: var(--bad-rule); color: var(--bad-ink); background: var(--bad-bg); }
.s-recorded { background: var(--info-bg); }
.chip {
  display: inline-block;
  font: 600 12px/1.2 var(--sans);
  padding: .15rem .5rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--muted);
  white-space: nowrap;
}
.chip.on { border-color: var(--accent); color: var(--accent); }
.chip.off { color: var(--muted); }
.badge {
  display: inline-block;
  font: 600 11.5px/1 var(--sans);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: .15rem;
}

/* --------------------------------------------------------------- notices */
.flash {
  border-left: 3px solid var(--ink);
  background: var(--sheet);
  padding: .7rem .95rem;
  margin: 0 0 1rem;
  font-size: 14.5px;
  color: var(--ink);
}
.flash.ok { border-left-color: var(--accent); background: var(--accent-soft); }
.flash.error { border-left-color: var(--bad-ink); background: var(--bad-bg); }
.flash.warn { border-left-color: var(--warn-rule); background: var(--warn-bg); color: var(--warn-ink); }
.flash strong { font-weight: 700; }
.issue {
  border-left: 3px solid var(--rule);
  background: var(--sheet);
  padding: .55rem .85rem;
  margin: .35rem 0;
  font-size: 14.5px;
}
.i-blocker { border-left-color: var(--bad-ink); background: var(--bad-bg); }
.i-review { border-left-color: var(--warn-rule); background: var(--warn-bg); }
.i-warning { border-left-color: var(--rule); background: var(--info-bg); color: var(--info-ink); }
.issue b {
  display: block;
  font: 600 11.5px/1.3 var(--sans);
  letter-spacing: .08em; text-transform: uppercase;
}
.note {
  display: block;
  margin: .5rem 0;
  padding: .6rem .85rem;
  font-size: 14.5px;
  color: var(--warn-ink);
  background: var(--warn-bg);
  border-left: 3px solid var(--warn-rule);
}
.note.info { color: var(--ink-2); background: var(--paper); border-left-color: var(--rule); }
.demo-notice { border-left: 3px solid var(--ink); background: var(--sheet); padding: .7rem .95rem; font-size: 14px; }
.plan-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.25rem;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  padding: .75rem 0;
  margin-bottom: 1.25rem;
  font-size: 14px;
  color: var(--ink-2);
}
.plan-band strong { color: var(--ink); }
.plan-band .actions { margin: 0; }

/* ------------------------------------------------------------- dashboard */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.stat { background: var(--sheet); padding: .9rem 1.1rem .85rem; }
.stat .num { font: 500 2rem/1 var(--serif); color: var(--ink); }
.stat .lbl {
  font: 600 11.5px/1.3 var(--sans);
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  margin-top: .35rem;
}
.checklist { list-style: none; padding: 0; margin: .4rem 0 0; border-top: 1px solid var(--rule); }
.checklist li {
  display: flex;
  align-items: baseline;
  gap: .9rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 15px;
}
.checklist .n {
  flex: 0 0 1.9rem;
  font: 500 1.25rem/1 var(--serif);
  color: var(--muted);
}
.checklist a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); font-weight: 600; }
.checklist a:hover { border-bottom-color: var(--accent); }
.checklist li.done .n { color: var(--accent); }
.checklist li.done a { color: var(--muted); font-weight: 500; border-bottom: 0; }
.checklist .state { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.checklist li.done .state { color: var(--accent); }

/* --------------------------------------------------------------- landing */
.hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  align-items: center;
  padding: 1.5rem 0 2.25rem;
  border-bottom: 1px solid var(--ink);
}
.hero h1 {
  font-size: clamp(2.5rem, 5.2vw, 3.9rem);
  line-height: 1.03;
  letter-spacing: -.02em;
  margin: .1rem 0 1rem;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lede { font-size: 1.25rem; margin: 0 0 1.5rem; }
.hero .cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.hero .cta-row .fine { font-size: 13.5px; color: var(--muted); }
.hero figure { margin: 0; }
.hero figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  background: var(--sheet);
}
.hero figcaption { font: italic 500 13.5px/1.4 var(--serif); color: var(--muted); margin-top: .5rem; }
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 1.5rem;
  counter-reset: step;
}
.steps li { counter-increment: step; border-top: 1px solid var(--rule); padding-top: .85rem; }
.steps li::before {
  content: counter(step);
  display: block;
  font: 500 2.1rem/1 var(--serif);
  color: var(--accent);
  margin-bottom: .4rem;
}
.steps h3 { text-transform: none; letter-spacing: 0; font: 500 1.25rem/1.25 var(--serif); color: var(--ink); margin: 0 0 .35rem; }
.steps p { color: var(--ink-2); font-size: 14.5px; margin: 0; }
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
  margin: 0;
}
.facts > div { border-top: 1px solid var(--rule); padding: .8rem 0 .2rem; }
.facts dt { font: 600 12px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: .25rem 0 0; font-size: 15px; color: var(--ink); }
.faq { margin: 0; }
.faq dt { font: 500 1.2rem/1.3 var(--serif); border-top: 1px solid var(--rule); padding: .8rem 0 .1rem; }
.faq dd { margin: 0 0 .5rem; color: var(--ink-2); }
.band {
  border-top: 1px solid var(--ink);
  margin-top: 2.5rem;
  padding-top: .35rem;
}
.band-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1.5rem; }
.band-head h2 { margin: .2rem 0 .9rem; }
.band-head p { margin: 0 0 .9rem; color: var(--ink-2); }

/* --------------------------------------------------------------- pricing */
.price-table { width: 100%; border-top: 1px solid var(--ink); margin-top: .75rem; }
.price-table th, .price-table td { padding: .75rem .9rem .75rem 0; vertical-align: top; }
.price-table thead th { font: 500 1.35rem/1.15 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); border-bottom: 1px solid var(--rule); }
.price-table thead th:first-child { font: 600 12px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.price-table thead .who { display: block; font: 400 13.5px/1.4 var(--sans); color: var(--ink-2); margin-top: .3rem; min-height: 2.6em; }
.price-table .amount { font: 500 2rem/1 var(--serif); white-space: nowrap; }
.price-table .amount small { font: 400 14px/1 var(--sans); color: var(--muted); }
.price-table .amount .alt { display: block; font: 400 13px/1.5 var(--sans); color: var(--muted); margin-top: .25rem; }
.price-table tbody th { font: 600 13px/1.4 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); border-bottom: 0; width: 22%; padding-top: .9rem; }
.price-table td { border-bottom: 0; color: var(--ink-2); }
.price-table tr:hover th, .price-table tr:hover td { background: #faf9f5; }
.price-table .yes { color: var(--ink); }
.price-table .dash { color: #b9b4a7; }
.price-table tfoot td { border-top: 1px solid var(--ink); padding-top: .9rem; }
.price-table .here { display: inline-block; margin-left: .4rem; }
.compare { border-top: 1px solid var(--ink); margin-top: .5rem; }
.compare th:first-child, .compare td:first-child { font-weight: 600; color: var(--ink); }

/* -------------------------------------------------------------- the plan page */
.plan-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; margin: 1rem 0 1.5rem; }
.plan-card { border: 1px solid var(--rule); border-top: 2px solid var(--rule); background: var(--sheet); padding: 1rem 1.2rem 1.2rem; display: flex; flex-direction: column; }
.plan-card.current { border-top-color: var(--accent); }
.plan-card h3 { text-transform: none; letter-spacing: 0; font: 500 1.35rem/1.2 var(--serif); color: var(--ink); margin: 0; }
.plan-card .amount { font: 500 1.9rem/1.1 var(--serif); margin: .5rem 0 .1rem; }
.plan-card .amount small { font: 400 14px/1 var(--sans); color: var(--muted); }
.plan-card .alt { font-size: 13px; color: var(--muted); min-height: 1.5em; }
.plan-card ul { list-style: none; padding: .6rem 0 0; margin: 0 0 .9rem; border-top: 1px solid var(--rule-soft); flex: 1; }
.plan-card li { padding: .28rem 0; font-size: 14px; color: var(--ink-2); }
.plan-card form { margin: 0; }
.plan-card .pick { display: flex; flex-direction: column; align-items: stretch; gap: .5rem; margin-top: .35rem; }
.plan-card .pick button { width: 100%; text-align: center; }
.plan-card.chosen { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.price-table td .alt { display: block; font-size: 13px; color: var(--muted); margin-top: .2rem; }
ul.plain { padding-left: 1.1rem; }
ul.plain li { margin: .25rem 0; }
.danger-zone { border: 1px solid var(--bad-rule); background: var(--sheet); padding: 1rem 1.2rem; border-radius: var(--radius); }
.danger-zone h2 { color: var(--bad-ink); font-size: 1.2rem; margin: 0 0 .5rem; }
.ledger { border-top: 1px solid var(--ink); }
.ledger div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1.5rem; padding: .55rem 0; border-bottom: 1px solid var(--rule-soft); font-size: 14.5px; }
.ledger div span:first-child { color: var(--muted); }
.ledger div span:last-child { font-weight: 600; text-align: right; }
.legend { font-size: 13px; color: var(--muted); }
.phone-only { display: none; }

/* ---------------------------------------------------------------- sign-in */
.auth-card { border: 1px solid var(--rule); background: var(--sheet); padding: 1.5rem 1.6rem 1.4rem; border-radius: var(--radius); }
.auth-card h1 { font-size: 1.8rem; margin: 0 0 .9rem; }
.auth-card form { margin: 0; }
.auth-card .form-actions { margin-top: 1.2rem; }
.auth-card button { width: 100%; text-align: center; }
.auth-after { margin-top: 1rem; font-size: 14px; color: var(--ink-2); }
.auth-after p { margin: .3rem 0; }
.terms-check { margin: 1rem 0 0; }

/* ---------------------------------------------------------------- statement */
.statement {
  background: var(--sheet);
  border: 1px solid var(--rule);
  padding: 2.2rem 2.4rem 1.6rem;
  max-width: 760px;
}
.statement .st-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  border-bottom: 3px double var(--ink);
  padding-bottom: .7rem;
  margin-bottom: 1.1rem;
}
.st-head-brand { display: flex; align-items: center; gap: .6rem; }
.st-head-brand strong { font: 700 1.05rem/1 var(--sans); }
.st-head-brand .tagline { display: block; color: var(--muted); font: italic 500 13px/1.3 var(--serif); }
.statement h1 { font-size: 2rem; margin: .1rem 0 .6rem; }
.statement .meta { color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.statement table { margin-top: 1.2rem; }
.statement th, .statement td { padding: .55rem .8rem .55rem 0; }
.statement .foot { margin-top: 1.4rem; border-top: 1px solid var(--rule); padding-top: .6rem; }

/* ----------------------------------------------------------------- misc */
.search { display: flex; gap: .5rem; max-width: 30rem; margin-bottom: 1rem; }
.search input { margin: 0; }
.inline { display: inline; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 1.1rem 0 0; }
.evidence code {
  display: inline-block;
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  padding: .1rem .4rem;
  border-radius: 2px;
  font: 400 12.5px/1.4 ui-monospace, Consolas, monospace;
  word-break: break-all;
}
.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
pre.breakdown {
  white-space: pre-wrap;
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  padding: .7rem .9rem;
  font: 400 13px/1.5 ui-monospace, Consolas, monospace;
}

/* non-production interlock: impossible to miss on every page */
.nonprod-banner {
  position: sticky; top: 0; z-index: 50;
  text-align: center;
  padding: .5rem 1rem;
  font: 600 14px/1.3 var(--sans);
  color: #1f2933;
  background: repeating-linear-gradient(135deg, #ffd54d 0 1.2rem, #ffe79a 1.2rem 2.4rem);
  border-bottom: 3px solid #8a5a00;
}

/* accessible focus everywhere */
a:focus-visible, button:focus-visible, .button:focus-visible,
input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

/* phones: everything stays inside the screen and links are big enough to tap.
   A wide table scrolls inside itself instead of pushing the page sideways;
   tables marked .stack (row buttons, or six columns) become one card per row. */
@media (max-width: 600px) {
  main { padding: 1.1rem 1rem 3rem; }
  main.auth { padding-top: 2rem; }
  header.top { padding: 0 .9rem; }
  header nav { width: 100%; }
  header nav a { display: inline-block; margin: 0; padding: .7rem .55rem; min-height: 44px; }
  header .who { flex-wrap: wrap; margin-left: 0; width: 100%; }
  .hero { grid-template-columns: 1fr; gap: 1.25rem; padding: 1rem 0 1.5rem; }
  .hero h1 { font-size: 2.4rem; }
  .steps { grid-template-columns: 1fr; gap: 1rem; }
  .facts { grid-template-columns: 1fr; }
  .plan-cards, .grid2, .split { grid-template-columns: minmax(0, 1fr); }
  .desktop-only { display: none; }
  .phone-only { display: block; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head .aside { text-align: left; }
  table { display: block; overflow-x: auto; }
  button:not(.link), .button { min-height: 44px; }
  /* tables marked .stack (row buttons, or six columns) become one card per
     row instead: a table that only scrolls sideways still hides its buttons
     (the Remove button on the occupancy table) */
  table.stack { overflow: visible; }
  /* tbody as a plain block: the cards span the full width instead of
     shrink-wrapping to their text inside an anonymous table box */
  table.stack tbody { display: block; }
  table.stack tr { display: block; padding: .55rem .75rem; margin: .5rem 0;
    border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
  table.stack tr.head { display: none; }
  table.stack td { display: block; border: none; padding: .12rem 0; }
  table.stack td.num { text-align: left; }
  table.stack td[data-label]::before { content: attr(data-label); display: block;
    font-size: .72rem; text-transform: uppercase; color: var(--muted); }
  table.stack td.actions { margin-top: .35rem; }
  .statement { padding: 1.2rem 1rem 1rem; }
}

@media print {
  header, footer, .print-note, .flash, .plan-band, .actions { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .statement { border: none; padding: 0; max-width: none; }
}

/* ---- Leave it running, the inbox and the tenants panel (1 Dec 2026) ---- */
.bill-address { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .6rem 0; }
.bill-address code { font: 600 15px/1.4 var(--sans); background: var(--sheet); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: .35rem .6rem; word-break: break-all; }
form.card .check { margin: .9rem 0; }
form.card .check span { display: block; }
form.card .check span a { color: var(--accent); }
form.card > label:not(.check) { margin-top: 1.1rem; }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; }
.inline-form label { margin: 0; }
.tenant-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.tenant-actions form { margin: 0; }
table .status { white-space: nowrap; }
