/* One plain column, set like a document. Tables do the work; color is for links and the highlighted totals. */
:root {
  --bg: #fcfcfa;
  --ink: #1b1b1a;
  --muted: #5a5a56;
  --rule: #d4d4ce;
  --field: #ffffff;
  --link: #0b57a4;
  --mark: #fff0a0;
  --bad: #a3271d;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161616; --ink: #e8e8e4; --muted: #a6a6a1; --rule: #3b3b38; --field: #1f1f1e;
    --link: #8db9ff; --mark: #4a4216; --bad: #ff9488;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161616; --ink: #e8e8e4; --muted: #a6a6a1; --rule: #3b3b38; --field: #1f1f1e;
  --link: #8db9ff; --mark: #4a4216; --bad: #ff9488;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1.0625rem/1.6 var(--serif); }
.page { max-width: 46rem; margin: 0 auto; padding-block: 1.25rem 3rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

a { color: var(--link); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

.site { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; align-items: baseline; padding-bottom: .75rem; border-bottom: 1px solid var(--rule); font: .9375rem/1.4 var(--sans); }
.site strong { font-weight: 700; margin-right: auto; }
.site strong a { color: var(--ink); text-decoration: none; }
.site a[aria-current="page"] { color: var(--ink); text-decoration: none; font-weight: 600; }
.site nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }

h1 { font-size: 2.1rem; line-height: 1.15; margin: 1.75rem 0 .5rem; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; line-height: 1.25; margin: 2.25rem 0 .5rem; }
p { margin: 0 0 .8rem; }
.lede { font-size: 1.125rem; }
.small { font: .875rem/1.5 var(--sans); color: var(--muted); }

fieldset { border: 0; padding: 0; margin: 1.25rem 0 0; min-width: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: .35rem; }
.fields { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: end; font-family: var(--sans); }
.fields label { display: grid; gap: .2rem; font-size: .875rem; color: var(--muted); }
input[type="text"], input[type="number"], input[type="date"], select, textarea {
  font: 1rem/1.3 var(--sans); color: var(--ink); background: var(--field);
  border: 1px solid var(--rule); border-radius: 2px; padding: .45rem .5rem; min-height: 44px; max-width: 100%;
}
input[type="number"] { font-variant-numeric: tabular-nums; }
input.w-money { width: 8.5rem; }
input.w-num { width: 5.5rem; }
input.w-pct { width: 4.75rem; }
input[type="checkbox"] { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--link); }

.scroll { overflow-x: auto; margin: .5rem 0 0; }
table { border-collapse: collapse; width: 100%; font: .9375rem/1.35 var(--sans); font-variant-numeric: tabular-nums; }
caption { text-align: left; font: 700 1rem var(--serif); padding-bottom: .35rem; }
th, td { border-bottom: 1px solid var(--rule); padding: .35rem .5rem .35rem 0; text-align: left; vertical-align: middle; }
thead th { font-weight: 600; color: var(--muted); font-size: .8125rem; border-bottom-color: var(--ink); vertical-align: bottom; }
td.num, th.num { text-align: right; padding-right: 0; padding-left: .75rem; white-space: nowrap; }
td.c, th.c { text-align: center; padding-left: .5rem; }
thead th.num { white-space: normal; }
#bids input[type="text"] { width: 100%; min-width: 6.5rem; }
#bids input[type="number"] { width: 100%; min-width: 4.75rem; }
#bids th, #bids td { padding-right: .4rem; }
tfoot td { font-weight: 700; border-bottom: 0; }
td input[type="text"] { width: 100%; min-width: 8rem; }
.pay { background: var(--mark); font-weight: 700; padding-right: .4rem !important; }

button { font: 600 .9375rem var(--sans); min-height: 44px; cursor: pointer; border-radius: 2px; }
.btn { background: var(--ink); color: var(--bg); border: 1px solid var(--ink); padding: .5rem 1rem; }
.plain { background: none; border: 0; padding: .5rem 0; color: var(--link); text-decoration: underline; text-underline-offset: 2px; font-weight: 400; }
.x { background: none; border: 0; color: var(--muted); font-size: 1.25rem; min-width: 44px; }
.x:hover { color: var(--bad); }
.row { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; margin-top: .75rem; }
.warn { color: var(--bad); font: .9375rem/1.45 var(--sans); margin: .75rem 0 0; }
textarea { width: 100%; min-height: 3rem; resize: vertical; margin-top: .5rem; }
.status { font: .875rem var(--sans); color: var(--muted); min-height: 1.3em; margin: .25rem 0 0; }

.formula { font: .875rem/1.5 ui-monospace, Consolas, "Courier New", monospace; background: var(--field); border: 1px solid var(--rule); padding: .6rem .75rem; overflow-x: auto; white-space: pre; }
details { border-top: 1px solid var(--rule); padding: .1rem 0; }
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; }
details p { margin-top: .1rem; }

.ad { margin: 1.5rem 0; min-height: 90px; }
footer { margin-top: 3rem; padding-top: .75rem; border-top: 1px solid var(--rule); font: .875rem/1.55 var(--sans); color: var(--muted); }
footer p { margin: 0 0 .4rem; }

@media (max-width: 560px) {
  h1 { font-size: 1.75rem; }
  .rooms-table thead { display: none; }
  .rooms-table, .rooms-table tbody, .rooms-table tr, .rooms-table td { display: block; width: 100%; }
  .rooms-table tr { position: relative; padding: .75rem 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 1fr 1fr; gap: .35rem 1rem; }
  .rooms-table td { border: 0; padding: 0; text-align: left !important; }
  .rooms-table td.name { grid-column: 1 / -1; padding-right: 3rem; }
  .rooms-table td.del { position: absolute; top: .6rem; right: 0; width: auto; }
  .rooms-table td[data-label]::before { content: attr(data-label); display: block; font: .8125rem var(--sans); color: var(--muted); }
  .rooms-table td.tick { display: flex; gap: .5rem; align-items: center; }
  .rooms-table td.tick::before { order: 2; display: inline; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
