[hidden] { display: none !important; }
:root {
  --paper: #f6f7f5;
  --white: #ffffff;
  --ink: #1e2b30;
  --muted: #56656b;
  --line: #d6dcd8;
  --harbor: #24506b;
  --harbor-deep: #183a4f;
  --sage: #6f8c78;
  --done: #3d7a57;
  --soon: #9a6512;
  --critical: #a8432f;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body.app { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.55 var(--sans); }
.app-bar { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px; border-bottom: 1px solid var(--line); background: var(--white); }
.wordmark { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; }
.wordmark img { flex: none; }
.wm-name { display: block; }
.wm-sub { display: block; font-family: var(--sans); font-weight: 400; font-size: .8rem; color: var(--muted); }
.quiet-link { color: var(--harbor); }
main.narrow { max-width: 560px; margin: 48px auto; padding: 0 24px; }
main.wide { max-width: 980px; margin: 40px auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; }
h1 { font-size: 2rem; margin: 0 0 .5rem; }
h2 { font-size: 1.35rem; margin: 0 0 .5rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
.lede { color: var(--muted); }
.msg { padding: 12px 16px; border-radius: 6px; background: var(--white); border: 1px solid var(--line); }
.msg-error { border-color: var(--critical); color: var(--critical); }
.msg-ok { border-color: var(--done); color: var(--done); }
.btn { display: inline-block; font: inherit; font-weight: 700; padding: 11px 18px; border-radius: 6px; border: 1px solid var(--harbor); background: var(--white); color: var(--harbor); text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--harbor); color: var(--white); }
.btn-primary:hover { background: var(--harbor-deep); }
.btn-sso { display: block; text-align: center; margin-bottom: 12px; }
.btn:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #e2a83a; outline-offset: 2px; }
.email-link { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.hint { color: var(--muted); font-size: .9rem; }
label { display: block; font-weight: 700; font-size: .9rem; }
input, select { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; width: 100%; background: var(--white); color: var(--ink); }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 8px 0 12px; }
.row > label { flex: 0 1 200px; }
.row > .grow { flex: 1 1 260px; }
.row input { margin-top: 4px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 20px; margin: 20px 0; }
.case { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 24px; margin: 24px 0; }
.case-head p { margin: 0; color: var(--muted); }
.readiness .big { font-family: var(--serif); font-size: 1.8rem; margin: 16px 0 0; }
.phases { list-style: none; padding: 0; margin: 12px 0; }
.phases li { display: grid; grid-template-columns: 220px 1fr 48px; gap: 12px; align-items: center; padding: 4px 0; }
meter { width: 100%; height: 10px; }
.gaps { list-style: none; padding: 0; }
.gaps li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.tag { display: inline-block; min-width: 72px; font-size: .8rem; font-weight: 700; }
.u-critical .tag { color: var(--critical); }
.u-soon .tag { color: var(--soon); }
.u-routine .tag { color: var(--muted); }
fieldset.sections { border: 1px solid var(--line); border-radius: 6px; margin: 8px 0 12px; }
label.check { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; margin: 4px 16px 4px 0; }
label.check input { width: auto; }
.form-msg.ok { color: var(--done); }
.form-msg.error { color: var(--critical); }
.empty, .note { color: var(--muted); }
@media (max-width: 640px) { .phases li { grid-template-columns: 1fr 56px; } .phases li meter { grid-column: 1 / -1; grid-row: 2; } }
.contact-form label { margin-bottom: 14px; }
.contact-form input, .contact-form select, .contact-form textarea { margin-top: 4px; }
textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; width: 100%; background: var(--white); color: var(--ink); }
fieldset.inline { border: 0; padding: 0; margin: 0 0 14px; }
fieldset.inline legend { font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.msg ul { margin: 0; padding-left: 1.2em; }
.msg p { margin: 0 0 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Shared ---------- */
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.crit { color: var(--critical); }
.msg-warn { border-color: var(--soon); color: #6b4709; background: #fbf5e9; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn.small { padding: 7px 12px; font-size: .9rem; }
.btn:disabled { opacity: .6; cursor: progress; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--harbor); text-decoration: underline; cursor: pointer; }
.link.danger { color: var(--critical); }
.table-wrap { overflow-x: auto; }
table.queue, table.docs { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.queue th, table.queue td, table.docs th, table.docs td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.queue th, table.docs th { font-size: .85rem; color: var(--muted); }
table.queue tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--critical); }
code { background: #eef1ef; padding: 1px 5px; border-radius: 4px; font-size: .9em; }

/* ---------- Portal home ---------- */
.case-card { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: baseline; padding: 18px 20px; margin: 10px 0; background: var(--white); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; }
.case-card:hover { border-color: var(--harbor); }
.case-name { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; }

/* ---------- Case workspace ---------- */
main.workspace { max-width: 1040px; margin: 24px auto 64px; padding: 0 24px; }
.crumb { margin: 0 0 12px; font-size: .9rem; }
.ws-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px 32px; align-items: start; margin-bottom: 20px; }
.ws-head .lede { margin: 4px 0 0; }
.ws-ready { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; }
.ws-ready p { margin: 0 0 4px; }
.ws-ready .big { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; }
.pill { display: inline-block; background: #fbf5e9; border: 1px solid var(--soon); color: #6b4709; border-radius: 16px; padding: 3px 12px; font-weight: 700; font-size: .9rem; text-decoration: none; }
.ws-checkin { grid-column: 1 / -1; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 12px 18px; }
.ws-checkin summary { cursor: pointer; color: var(--ink); margin: 0; font-size: 1rem; }
.checkin-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin-top: 14px; }
.checkin-grid form label { margin-bottom: 10px; }
.ws-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.ws-tabs [role="tab"] { font: inherit; font-weight: 700; color: var(--muted); background: none; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; padding: 10px 16px; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.ws-tabs [role="tab"][aria-selected="true"] { background: var(--white); border-color: var(--line); color: var(--ink); }
.ws-tabs .count { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 11px; background: #e6ebe7; color: var(--ink); font-size: .8rem; text-align: center; }
[role="tabpanel"] { background: var(--white); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; padding: 24px; }
.toolbar { display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.toolbar > label:first-child { min-width: 240px; }
.phase-h { font-size: 1.2rem; margin: 28px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.phase-h .muted { font-family: var(--sans); font-weight: 400; font-size: .9rem; }

.item, .req { border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 6px; padding: 16px 18px; margin: 12px 0; }
.item.u-critical { border-left-color: var(--critical); }
.item.u-soon { border-left-color: var(--soon); }
.item.is-done { border-left-color: var(--done); opacity: .85; }
.item header h3, .req header h3 { margin: 4px 0 8px; font-size: 1.08rem; }
.item .tag, .req .tag { display: inline-block; min-width: 0; margin-right: 10px; font-size: .8rem; font-weight: 700; }
.u-critical .tag { color: var(--critical); }
.u-soon .tag { color: var(--soon); }
.tag.wish { color: var(--harbor); font-weight: 400; font-style: italic; }
.tag.crit { color: var(--critical); }
.item-form textarea { margin: 4px 0 8px; }
.item .note { background: var(--paper); border-radius: 6px; padding: 8px 12px; }
details summary { cursor: pointer; color: var(--harbor); font-size: .95rem; margin-top: 8px; }
details p { margin: 6px 0 0; font-size: .95rem; color: var(--muted); }

.doc-list { list-style: none; margin: 10px 0; padding: 0; }
.doc-list li { padding: 6px 0; border-top: 1px dashed var(--line); font-size: .95rem; }
.upload { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 10px; padding: 10px 12px; background: var(--paper); border-radius: 6px; }
.upload .file-pick { font-weight: 700; font-size: .9rem; }
.upload input[type="file"] { border: 0; padding: 4px 0; background: none; width: auto; max-width: 100%; font-size: .9rem; }

.req.st-submitted { border-left-color: var(--harbor); }
.req.st-done, .req.st-cancelled { opacity: .75; }
.req.overdue { border-left-color: var(--critical); }
.req-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
label.check.small { font-size: .9rem; }

.people-list { list-style: none; padding: 0; margin: 0 0 16px; }
.people-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.activity { list-style: none; padding: 0; margin: 0; }
.activity li { padding: 8px 0; border-bottom: 1px solid #edf0ee; font-size: .95rem; }

@media (max-width: 760px) {
  .ws-head { grid-template-columns: 1fr; }
  [role="tabpanel"] { padding: 16px; }
  .case-card { grid-template-columns: 1fr; gap: 4px; }
}

label > input, label > select, label > textarea { font-weight: 400; margin-top: 4px; }
input, select { min-height: 44px; }
input[type="checkbox"], input[type="radio"], input[type="file"] { min-height: 0; }
@media (max-width: 760px) { .checkin-grid { grid-template-columns: 1fr; } }

/* ---------- Phase 2: decisions and inventories ---------- */
.ws-tabs .count.warn { background: #fbf5e9; color: #6b4709; }
.flags { list-style: none; margin: 0 0 20px; padding: 0; }
.flags li { padding: 10px 14px; border-radius: 6px; margin-bottom: 6px; background: var(--paper); border-left: 4px solid var(--line); }
.flags .tag, .check .tag { min-width: 0; font-size: .8rem; font-weight: 700; margin-right: 6px; }
.lv-crit { border-left-color: var(--critical) !important; }
.lv-crit .tag { color: var(--critical); }
.lv-warn { border-left-color: var(--soon) !important; }
.lv-warn .tag { color: var(--soon); }
.lv-info .tag { color: var(--harbor); }
.lv-ok .tag { color: var(--done); }
.rec-type { margin: 8px 0 32px; }
.rec-type > h2 { font-size: 1.2rem; margin: 0 0 4px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.rec-type > h2 .muted { font-family: var(--sans); font-weight: 400; font-size: .9rem; }
.rec-type > p.muted { margin: 6px 0 12px; font-size: .95rem; max-width: 70ch; }
.rec { border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 6px; padding: 14px 18px; margin: 10px 0; }
.rec header h3 { margin: 0; font-size: 1.05rem; }
.rec header p { margin: 2px 0 0; }
.rec .tag { display: inline-block; margin-top: 6px; font-size: .8rem; font-weight: 700; }
.rec .check { margin: 10px 0 0; padding: 8px 12px; background: var(--paper); border-radius: 6px; }
.rec-details { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 20px; margin: 12px 0 0; }
.rec-details dt { font-size: .8rem; color: var(--muted); }
.rec-details dd { margin: 0; white-space: pre-line; }
.rec-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; }
.rec-upload { flex-basis: 100%; }
.rec-upload summary { margin-top: 0; }
.fund { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 6px; }
.fund div { background: var(--paper); border-radius: 6px; padding: 10px 12px; }
.fund span { display: block; font-size: .8rem; color: var(--muted); }
.fund strong { font-family: var(--serif); font-size: 1.35rem; }
.incl { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 20px; }
.incl li { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--line); padding: 4px 0; font-size: .95rem; }
.incl .in-yes strong { color: var(--done); }
.incl .in-no strong { color: var(--critical); }
.incl .in-unknown strong { color: var(--soon); }
.rec-form { border: 1px solid var(--harbor); border-radius: 8px; padding: 18px; margin: 10px 0; background: #fbfcfb; }
.rec-form h3 { margin: 0 0 12px; font-size: 1.05rem; }
.rec-form .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 18px; }
.rec-form label { margin-bottom: 10px; }
.rec-form .wide { grid-column: 1 / -1; }
.rec-form .hint { display: block; font-weight: 400; }
.rec-form fieldset.group, .rec-form fieldset.shares, .rec-form fieldset.incl-edit { border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; margin: 4px 0 12px; }
.rec-form legend { font-weight: 700; font-size: .9rem; padding: 0 4px; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0; }
.share-row select, .share-row .other-in { flex: 1 1 180px; min-width: 0; }
.share-row input[name="share-pct"] { flex: 0 0 110px; width: 110px; }
.incl-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 18px; }
.ledger-sum { margin: 8px 0 12px; }
@media (max-width: 640px) { .fund { grid-template-columns: 1fr; } }

/* ---------- Phase 3: care and packets ---------- */
.care-now { margin-top: 10px; padding: 10px 12px; background: var(--paper); border-radius: 6px; }
.care-now p { margin: 0 0 4px; }
ul.todo { margin: 4px 0 4px 18px; padding: 0; }
ul.hist { margin: 4px 0 0 18px; padding: 0; font-size: .9rem; }
.packets { list-style: none; padding: 0; margin: 12px 0 0; }
.packets li { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }

/* ---------- Phase 4: estate ---------- */
.path { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 10px 0; }
.path-col { border: 1px solid var(--line); border-top: 4px solid var(--line); border-radius: 6px; padding: 12px 14px; }
.path-outside { border-top-color: var(--done); }
.path-estate { border-top-color: var(--harbor); }
.path-unknown { border-top-color: var(--soon); }
.path-col h3 { margin: 0 0 2px; font-size: 1rem; }
.path-col ul { list-style: none; padding: 0; margin: 8px 0 0; }
.path-col li { padding: 6px 0; border-top: 1px dashed var(--line); }
.cert { background: var(--paper); border-radius: 6px; padding: 10px 14px; }
@media (max-width: 860px) { .path { grid-template-columns: 1fr; } }

/* ---------- 0.7: access map ---------- */
.pm-recs, .import { border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; margin: 10px 0 14px; background: #fbfcfb; }
.pm-recs summary, .import summary { font-weight: 700; color: var(--ink); margin: 0; }
.pm-recs ul { list-style: none; padding: 0; margin: 10px 0 6px; }
.pm-recs li { padding: 8px 0; border-top: 1px dashed var(--line); }
.tag.arch { color: var(--harbor); font-weight: 700; font-size: .8rem; }
.import-body { margin-top: 10px; }
.import-table { max-height: 320px; overflow: auto; margin: 8px 0 12px; border: 1px solid var(--line); border-radius: 6px; }
.import-table table { margin: 0; }
.import-table input { min-height: 0; width: auto; }
.import-opts { margin-top: 8px; }
.pwcheck { margin-top: 10px; padding: 10px 12px; background: var(--paper); border-radius: 6px; }
.pwcheck .row { margin: 6px 0 0; }
.pwcheck p { margin: 0; }
.tag.master { color: #fff; background: var(--harbor); border-radius: 4px; padding: 1px 8px; }

/* ---------- 0.9: team dashboard ---------- */
.t-summary { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 8px; }
.t-card { font: inherit; display: flex; flex-direction: column; align-items: flex-start; min-width: 130px; padding: 12px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; text-align: left; color: var(--ink); }
.t-card strong { font-family: var(--serif); font-size: 1.8rem; line-height: 1.1; }
.t-card span { color: var(--muted); font-size: .9rem; }
.t-card.att { border-color: var(--critical); }
.t-card.att strong { color: var(--critical); }
.t-card:hover { border-color: var(--harbor); }
.t-stages { flex-basis: 100%; margin: 4px 0 0; }
.badge { display: inline-block; font-size: .8rem; padding: 2px 8px; border-radius: 10px; background: #fbf5e9; color: #6b4709; border: 1px solid #e6cf9f; margin: 2px 0; }
.st { font-weight: 700; font-size: .9rem; }
.st-new { color: var(--harbor); }
.st-active { color: var(--done); }
.st-waiting { color: var(--soon); }
.st-closed { color: var(--muted); }
table.queue select { min-height: 36px; padding: 4px 8px; font-size: .9rem; max-width: 190px; }
.team .toolbar { margin-top: 8px; }
.team .toolbar .grow { flex: 1 1 200px; }
.work { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px; }
.work strong.st { font-size: 1rem; }
.work form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.work form label { margin: 0; }
.work form select, .work form input { min-height: 38px; padding: 6px 10px; }
.arch-team { list-style: none; padding: 0; margin: 0 0 12px; }
.arch-team li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }

/* ---------- 0.9.1: portal navigation ---------- */
.app-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; }
.app-nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; padding: 4px 0; border-bottom: 2px solid transparent; }
.app-nav a:hover { color: var(--harbor); }
.app-nav a[aria-current="page"] { color: var(--harbor); border-bottom-color: var(--harbor); }
.app-nav .quiet-link { font-weight: 400; color: var(--harbor); }
@media (max-width: 640px) { .app-bar { flex-wrap: wrap; gap: 10px; } }

/* ---------- 0.10: quick review ---------- */
body.noscroll { overflow: hidden; }
.review { position: fixed; inset: 0; background: rgba(30, 43, 48, .45); z-index: 50; overflow-y: auto; padding: 32px 16px; }
.review-sheet { max-width: 860px; margin: 0 auto; background: var(--white); border-radius: 10px; padding: 24px 28px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.5); }
.review-sheet header { display: flex; justify-content: space-between; align-items: center; }
.review-sheet h2 { margin: 0; }
.review fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 16px 0; }
.review legend { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; padding: 0 6px; }
.rv-bulk { margin: 0 0 6px; font-size: .9rem; }
.rv-item { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center; padding: 8px 0; border-top: 1px solid #edf0ee; }
.rv-opts { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg { margin: 0; font-weight: 400; font-size: .85rem; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; padding: 6px 10px; cursor: pointer; border-left: 1px solid var(--line); white-space: nowrap; }
.seg:first-child span { border-left: 0; }
.seg input:checked + span { background: var(--harbor); color: var(--white); }
.seg input:focus-visible + span { outline: 3px solid #e2a83a; outline-offset: -3px; }
.rv-foot { position: sticky; bottom: -24px; background: var(--white); padding: 12px 0; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); }
.facts .row { margin-top: 8px; }
@media (max-width: 700px) { .rv-item { grid-template-columns: 1fr; } .review-sheet { padding: 18px; } }

/* ---------- 0.10: estate extras ---------- */
.deadlines { list-style: none; padding: 0; margin: 0; }
.deadlines li { padding: 10px 12px; margin-bottom: 6px; border-left: 4px solid var(--line); background: var(--paper); border-radius: 4px; }
.deadlines .tag { font-size: .8rem; font-weight: 700; margin-right: 6px; }
.dl-overdue { border-left-color: var(--critical) !important; } .dl-overdue .tag { color: var(--critical); }
.dl-soon { border-left-color: var(--soon) !important; } .dl-soon .tag { color: var(--soon); }
.dl-done { opacity: .7; } .dl-done .tag { color: var(--done); }
.settle, .accounting { margin-top: 12px; padding: 12px 14px; background: var(--paper); border-radius: 6px; }
.settle h4, .accounting h4 { margin: 0 0 8px; font-family: var(--serif); }
strong.ok { color: var(--done); }
.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.accounting .num { text-align: right; font-variant-numeric: tabular-nums; }
.accounting tr.tot td { font-weight: 700; border-top: 2px solid var(--ink); }
@media (max-width: 760px) { .acc-grid { grid-template-columns: 1fr; } }

/* ---------- 0.10: bulk upload and inbox ---------- */
.bulk, .inbox { margin-bottom: 24px; }
.drop { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 22px; border: 2px dashed var(--line); border-radius: 8px; background: #fbfcfb; cursor: pointer; font-weight: 400; }
.drop.over { border-color: var(--harbor); background: #eef4f7; }
.drop input { width: auto; border: 0; padding: 0; min-height: 0; }
.up-list { list-style: none; padding: 0; margin: 8px 0 0; font-size: .9rem; max-height: 220px; overflow: auto; }
.up-list li { padding: 3px 0; }
.up-list .ok { color: var(--done); } .up-list .error { color: var(--critical); }
.inbox-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.inbox-list { list-style: none; padding: 0; margin: 0; }
.inbox-list li { display: grid; grid-template-columns: 24px 64px 1fr auto auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.inbox-list input[type=checkbox] { min-height: 0; width: 18px; height: 18px; }
.inbox-list img, .inbox-list .ftype { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); background: var(--paper); }
.inbox-list .ftype { display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; color: var(--muted); }
.inbox-list .order button { font-size: 1.1rem; padding: 0 4px; text-decoration: none; }
.inbox-list .order button:disabled { opacity: .3; cursor: default; }
.sortf label { margin-bottom: 8px; }
@media (max-width: 640px) { .inbox-list li { grid-template-columns: 24px 48px 1fr; } .inbox-list .order, .inbox-list li > .muted { grid-column: 3; } }

/* ---------- 0.11: agreements, help, storage, billing ---------- */
details.help { margin: 6px 0 10px; font-size: .92rem; }
details.help summary { color: var(--harbor); cursor: pointer; font-weight: 700; font-size: .85rem; }
details.help p, details.help ol { margin: 6px 0 0; color: var(--muted); max-width: 75ch; }
.ok-text { color: var(--done); }
.agree .agreement-text { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 18px 22px; max-height: 420px; overflow-y: auto; margin: 16px 0; }
.agree .agreement-text p, .agree .agreement-text li { line-height: 1.6; }
.agree form label { margin-bottom: 12px; }
.signed-meta th { width: 160px; }
.meter-wrap { margin: 10px 0; }
.meter-bar { height: 10px; background: #e6ebe7; border-radius: 5px; overflow: hidden; max-width: 420px; }
.meter-bar span { display: block; height: 100%; background: var(--harbor); }
.meter-bar span.hi { background: var(--soon); }
.meter-wrap p { margin: 4px 0 0; }
.billing .toolbar { align-items: center; }
.b-edit > td { background: #fbfcfb; }
.b-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 8px 4px; }
.b-grid h3 { margin-top: 0; }
.b-grid label { margin-bottom: 8px; }
.svc-list { margin: 0 0 6px; padding-left: 18px; }
table.cat input, table.cat select { min-height: 34px; padding: 4px 8px; }
@media (max-width: 900px) { .b-grid { grid-template-columns: 1fr; } }
@media print { .noprint, .app-bar { display: none !important; } }
.soon-text { color: var(--soon); }

/* ---------- 0.12: firms, lifecycle, training ---------- */
.btn-danger { background: var(--critical); border-color: var(--critical); color: #fff; }
.btn-danger:hover { filter: brightness(.92); }
.msg-info { background: #eef4f7; border: 1px solid #c9d8e1; color: var(--ink); }
.firm-box p { margin: 0 0 8px; }
.firm-home .req { background: #fbfcfb; }
.prod { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid #edf0ee; }
.prod .check { margin: 0; }
.prod select { min-height: 34px; padding: 4px 8px; max-width: 180px; }
.prods { border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; margin: 10px 0; }
.f-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.f-head h2 { margin: 0; }
.f-head .btn { margin-left: auto; }
.training-panel { border-style: dashed; }
a.danger { color: var(--critical); }
.fu-edit { width: 100%; align-items: flex-end; } .fu-edit label { margin: 0; }

/* ---------- 0.12.3: clearer sections, fixable notices ---------- */
.rec-type { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 0 18px 16px; margin: 0 0 24px; scroll-margin-top: 16px; }
.rec-type > h2 { margin: 0 -18px 12px; padding: 12px 18px; background: #f4efe2; border-bottom: 1px solid #e3d9bf; border-left: 5px solid var(--harbor); border-radius: 10px 10px 0 0; font-size: 1.15rem; }
.rec-type > h2 .muted { display: inline-block; min-width: 1.6em; text-align: center; margin-left: 6px; padding: 0 6px; background: var(--white); border: 1px solid #e3d9bf; border-radius: 10px; font-size: .8rem; color: var(--ink); }
.rec-type > h2 .muted:empty { display: none; }
.rec-type .rec { background: #fbfcfb; }
.rec-type.flash { box-shadow: 0 0 0 3px #e2a83a; transition: box-shadow .3s; }
.jump { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 0 0 18px; padding: 10px 12px; background: var(--paper); border-radius: 8px; }
.chip { font: inherit; font-size: .88rem; padding: 4px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); color: var(--harbor); cursor: pointer; }
.chip:hover { border-color: var(--harbor); }
.chip span { color: var(--muted); font-size: .8rem; }
.flags li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.flags .flag-text { flex: 1 1 320px; }
.fix-btn { margin-left: auto; }
label.fix-target { outline: 3px solid #e2a83a; outline-offset: 4px; border-radius: 4px; }
.dl-passed { border-left-color: var(--done) !important; } .dl-passed .tag { color: var(--done); }
.dl-check { border-left-color: var(--critical) !important; background: #fdf3f1 !important; } .dl-check .tag { color: var(--critical); }

/* ---------- 0.12.4: stage-first readiness badge ---------- */
.ws-ready .stage-k { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ws-ready .big { margin-top: 2px; }
.ws-ready .bar { height: 10px; background: #e6ebe7; border-radius: 5px; overflow: hidden; margin: 6px 0 8px; }
.ws-ready .bar span { display: block; height: 100%; background: var(--done); border-radius: 5px; }
.ws-ready .link.crit { color: var(--critical); font-weight: 700; }
.stage-strip { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 0; margin: 10px 0 6px; }
.stage-strip li { font-size: .8rem; border: 1px solid var(--line); border-radius: 12px; padding: 2px 8px; background: var(--white); }
.stage-strip li .link { font-size: .8rem; color: var(--ink); text-decoration: none; }
.stage-strip li span { color: var(--muted); }
.stage-strip li.full { border-color: #b9d4c3; background: #f1f8f3; }
.stage-strip li.cur { border-color: var(--harbor); box-shadow: inset 0 0 0 1px var(--harbor); }
.stage-strip li.cur .link { font-weight: 700; }
.ws-ready .whole { font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }

/* ---------- 0.13: accordion checklist, notices, choices, ledger import ---------- */
.phase-acc { border: 1px solid var(--line); border-radius: 10px; background: var(--white); margin: 0 0 12px; }
.phase-acc > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 16px; background: #f4efe2; border-left: 5px solid var(--harbor); border-radius: 10px; }
.phase-acc[open] > summary { border-radius: 10px 10px 0 0; border-bottom: 1px solid #e3d9bf; }
.phase-acc > summary::-webkit-details-marker { display: none; }
.phase-acc > summary::before { content: "\25B8"; color: var(--harbor); font-size: .9rem; transition: transform .15s; }
.phase-acc[open] > summary::before { transform: rotate(90deg); }
.phase-acc .phase-name { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.phase-acc .phase-count { font-size: .85rem; color: var(--muted); }
.phase-acc .phase-count.full { color: var(--done); font-weight: 700; }
.phase-acc > :not(summary) { margin-left: 16px; margin-right: 16px; }
.phase-acc > article:first-of-type { margin-top: 12px; }
.phase-acc > :last-child { margin-bottom: 12px; }
.acc-ctl { margin-left: auto; }
article.item.flash { box-shadow: 0 0 0 3px #e2a83a; }
.flag-acts { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
details.dismissed { margin: -6px 0 16px; font-size: .9rem; }
details.dismissed summary { cursor: pointer; color: var(--muted); }
details.dismissed li { margin: 4px 0; }
.other-in { margin-top: 6px; }
fieldset.checks { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 14px; }
fieldset.checks legend { font-weight: 700; font-size: .9rem; padding: 0 4px; }
fieldset.checks .check { margin: 2px 0; font-weight: 400; }
.import-ledger { margin: 12px 0; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 8px; background: #fbfcfb; }
.import-ledger summary { cursor: pointer; font-weight: 700; color: var(--harbor); }
.lmap label { margin: 0; }
.ledger-prev select { min-height: 32px; padding: 2px 6px; font-size: .85rem; }
.ledger-prev tr.skip td { opacity: .45; }
.ledger-prev .num { text-align: right; font-variant-numeric: tabular-nums; }
.ledger-prev input[type=text] { min-height: 32px; padding: 4px 8px; font-size: .85rem; width: 100%; min-width: 170px; }

/* ---------- 0.14: document preview, filing, spreadsheet imports ---------- */
.pv-sheet { max-width: 1000px; }
.pv-sheet header { gap: 12px; flex-wrap: wrap; }
.pv-sheet header h2 { font-size: 1.15rem; word-break: break-all; }
.pv-body { margin-top: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; min-height: 200px; display: flex; align-items: center; justify-content: center; overflow: auto; }
.pv-img { max-width: 100%; max-height: 75vh; display: block; }
.pv-pdf { width: 100%; height: 75vh; border: 0; }
.pv-text { width: 100%; max-height: 70vh; overflow: auto; margin: 0; padding: 12px; font-size: .85rem; white-space: pre-wrap; }
.sort-preview { margin-bottom: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; min-height: 120px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sort-preview .pv-img { max-height: 420px; }
.sort-preview .pv-pdf { height: 420px; }
.inbox-list li > span .btn { margin-top: 4px; }
.sheet-prev .ledger-prev td { font-size: .85rem; }
.sort-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sort-wrap .sort-preview { margin: 0; position: sticky; top: 12px; min-height: 360px; }
.sort-wrap .sortf { margin: 0; }
.pv-wrap { position: relative; width: 100%; text-align: center; }
.pv-open { position: absolute; right: 8px; bottom: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-size: .8rem; }
.sort-preview .pv-pdf { height: 520px; }
@media (max-width: 900px) { .sort-wrap { grid-template-columns: 1fr; } .sort-wrap .sort-preview { position: static; min-height: 200px; } }

/* ---------- 0.15: sorting board ---------- */
.board { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; margin: 0 0 28px; }
.board-left, .board-right { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.board-right { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.board-bar { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-bottom: 10px; }
.board-acts { margin-left: auto; }
.board-sel-acts { display: flex; gap: 10px; align-items: center; margin: 0 0 10px; }
.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.tile { position: relative; border: 2px solid var(--line); border-radius: 8px; background: var(--paper); cursor: pointer; overflow: hidden; user-select: none; }
.tile img, .tile .ftype { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.tile .ftype { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); }
.tile-name { display: block; font-size: .72rem; padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--white); }
.tile.on { border-color: var(--harbor); box-shadow: 0 0 0 2px var(--harbor); }
.tile-check { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.9); border: 2px solid var(--line); font-size: .8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; color: #fff; }
.tile.on .tile-check { background: var(--harbor); border-color: var(--harbor); }
.tile-pv { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); background: rgba(255,255,255,.92); cursor: pointer; font-size: .85rem; line-height: 1; padding: 0; }
.tile-pv:hover, .tile-pv:focus-visible { border-color: var(--harbor); }
.ct-make { background: #f4efe2; border: 1px solid #e3d9bf; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.ct-make h3 { margin: 0 0 4px; font-size: 1rem; }
.ct-make p { margin: 0 0 8px; }
.ct-make .row { align-items: flex-end; }
.ct-make label { margin: 0; }
.ct-search { display: block; margin-bottom: 6px; }
.ct-group { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 10px; }
.ct-group > summary { cursor: pointer; padding: 8px 12px; font-weight: 700; background: var(--paper); border-radius: 8px; }
.ct-group[open] > summary { border-radius: 8px 8px 0 0; border-bottom: 1px solid var(--line); }
.cts { list-style: none; padding: 4px; margin: 0; }
.ct { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; margin: 4px 0; border: 2px dashed transparent; border-radius: 6px; }
.ct:hover { background: #fbfcfb; border-color: var(--line); }
.ct.over { border-color: var(--harbor); background: #eef4f7; }
.ct-txt { display: flex; flex-direction: column; min-width: 0; }
.ct-txt strong { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; }
.drag-ghost { position: fixed; top: -100px; left: -100px; background: var(--harbor); color: #fff; padding: 6px 12px; border-radius: 14px; font-weight: 700; font-size: .85rem; }
#toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; background: var(--ink); color: #fff; border-radius: 8px; padding: 10px 16px; display: flex; gap: 12px; align-items: center; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); max-width: 92vw; }
#toast .link { color: #fff; font-weight: 700; }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; align-items: center; }
.thumb { border: 1px solid var(--line); border-radius: 6px; padding: 0; background: none; cursor: pointer; }
.thumb img { width: 64px; height: 64px; object-fit: cover; display: block; border-radius: 5px; }
.att-row td:first-child, li.att-row { padding-left: 22px; }
.att-mark { color: var(--muted); }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } .board-right { position: static; max-height: none; } }
table.docs td button.link, .doc-list button.link { text-align: left; }

/* ---------- 0.15.1: rooms ---------- */
.rooms-panel { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0 0 14px; background: #fbfcfb; }
.rooms-panel > summary { cursor: pointer; }
.room-list { list-style: none; padding: 0; margin: 8px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; }
.room-list li { display: flex; align-items: center; gap: 8px; }
.room-list input { flex: 1; min-height: 36px; padding: 4px 10px; }
.move-bar { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 8px 12px; margin: 0 0 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.move-bar.on { background: #eef4f7; border-color: var(--harbor); }
.move-bar label { margin: 0; display: flex; gap: 6px; align-items: center; }
.move-bar select { min-height: 34px; padding: 2px 8px; }
.room-group h3 { font-size: 1.02rem; margin: 18px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.item-wrap { display: flex; gap: 10px; align-items: flex-start; }
.item-wrap > .rec { flex: 1; }
.item-pick { margin-top: 18px; width: 20px; height: 20px; min-height: 0; }

/* ---------- 0.16: expected documents, care journey ---------- */
.slots-panel { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0 0 18px; background: var(--white); }
.slots-panel > summary { cursor: pointer; }
.slots-panel h3 { font-size: .98rem; margin: 14px 0 6px; }
.slot-list { list-style: none; padding: 0; margin: 0; }
.slot-list li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid #edf0ee; }
.slot-mark { width: 22px; text-align: center; font-weight: 700; }
.slot-list li.ok .slot-mark { color: var(--done); }
.slot-list li.missing .slot-mark { color: var(--soon); }
.slot-list li.na { opacity: .6; }
.slot-txt { flex: 1; }
.journey { list-style: none; padding: 0; margin: 0 0 14px; border-left: 3px solid var(--line); }
.journey li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; position: relative; padding: 0 0 6px 16px; }
.journey li::before { content: ""; position: absolute; left: -8px; top: 18px; width: 13px; height: 13px; border-radius: 50%; background: var(--white); border: 3px solid var(--line); }
.journey li.now::before { border-color: var(--harbor); background: var(--harbor); }
.j-when { padding-top: 14px; font-weight: 700; font-size: .9rem; }
@media (max-width: 700px) { .journey li { grid-template-columns: 1fr; } }
.slot-acts { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.kept-form { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: flex-end; margin-top: 6px; }
.kept-form label { margin: 0; min-width: 240px; }
.slots-panel .msg { margin: 4px 0 6px; }

/* ---------- 0.16.2: enter invoices ---------- */
.ct-inv { background: #eef4f7; border-color: #cfdde5; }
.inv-sheet { max-width: 1060px; }
.inv-card { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.inv-pv { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; min-height: 220px; max-height: 380px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.inv-pv .pv-img { max-height: 380px; }
.inv-pv .pv-pdf { height: 380px; }
.inv-name { margin: 0 0 6px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.inv-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; margin-bottom: 8px; }
.inv-modes .check { font-weight: 400; margin: 2px 0; }
.inv-set { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.inv-set label { margin-bottom: 8px; }
.inv-foot { position: sticky; bottom: 0; background: var(--white); padding: 12px 0 4px; border-top: 1px solid var(--line); }
@media (max-width: 800px) { .inv-card, .inv-set, .inv-modes { grid-template-columns: 1fr; } .inv-pv { min-height: 160px; } }

/* ---------- 0.16.4: quick capture in the review ---------- */
.rv-cap { grid-column: 1 / -1; }
.rv-cap { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: flex-end; margin: 2px 0 6px; }
.rv-cap .rv-f { margin: 0; font-size: .85rem; font-weight: 600; min-width: 200px; flex: 1 1 220px; max-width: 360px; }
.rv-cap input, .rv-cap select { min-height: 34px; padding: 3px 8px; font-size: .9rem; }
.rv-cap .other-in { margin-top: 4px; }
.rv-note input { min-height: 34px; padding: 3px 8px; width: 260px; }

/* ---------- 0.17: Arch Assets link ---------- */
.aa-panel { border: 1px solid #cfdde5; border-radius: 8px; padding: 8px 12px; margin: 0 0 14px; background: #eef4f7; }
.aa-panel > summary { cursor: pointer; }
.aa-connect { margin: 8px 0; }
.aa-connect .row label { margin: 0; }
.tag.aa-tag { background: #eef4f7; color: var(--harbor); border: 1px solid #cfdde5; font-weight: 600; }

/* ---------- 0.17.1: ledger register ---------- */
.reg-sheet { max-width: 1000px; }
.reg-sheet.side { max-width: 1500px; width: 96vw; }
.reg-ctl { align-items: flex-end; flex-wrap: wrap; gap: 6px 12px; }
.reg-ctl label { margin: 0; }
.reg-compare { margin: 10px 0; padding: 8px 12px; border-radius: 6px; background: var(--paper); }
.reg-compare.ok { background: #f1f8f3; color: var(--done); }
.reg-compare.off { background: #fdf3f1; color: var(--critical); }
.reg-body { display: block; }
.reg-sheet.side .reg-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.reg-left { overflow-x: auto; }
.reg-pv { position: sticky; top: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; min-height: 400px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.reg-pv .pv-pdf { height: 78vh; }
.reg-pv .pv-img { max-height: 78vh; }
.reg-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.reg-table th, .reg-table td { padding: 6px 8px; border-bottom: 1px solid #edf0ee; vertical-align: top; text-align: left; }
.reg-table thead th { background: #f4efe2; position: sticky; top: 0; }
.reg-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.reg-table .c { text-align: center; width: 44px; }
.reg-table tr.ok td { background: #f6fbf7; }
.reg-table tr.reg-start td { background: var(--paper); }
.reg-table tfoot th, .reg-table tfoot td { border-top: 2px solid var(--ink); font-weight: 700; }
@media (max-width: 900px) { .reg-sheet.side .reg-body { grid-template-columns: 1fr; } }
.missing-list ul { margin: 6px 0 0; padding-left: 18px; }
.missing-list li { margin: 3px 0; }
.ledger-result { margin: 8px 0; }

/* ---------- 0.17.4: proof and deposit items ---------- */
.deposit-items table { width: 100%; border-collapse: collapse; }
.deposit-items th { text-align: left; font-size: .8rem; color: var(--muted); padding: 2px 4px; }
.deposit-items td { padding: 2px 4px; }
.deposit-items input, .deposit-items select { min-height: 34px; padding: 3px 8px; width: 100%; }
.reg-table td.proof { white-space: nowrap; font-size: .85rem; }
.match-result ul { margin: 4px 0 6px; padding-left: 18px; } .match-result { margin: 0 0 12px; }
.rec-details .wide { grid-column: 1 / -1; } .di-view { border-collapse: collapse; width: 100%; max-width: 640px; } .di-view td { padding: 3px 8px 3px 0; border-bottom: 1px solid #edf0ee; } .di-view .num { text-align: right; font-variant-numeric: tabular-nums; } .di-view tfoot td { border-bottom: 0; padding-top: 5px; }

/* ---------- 0.17.7: check numbers, place one at a time ---------- */
.reg-chk { width: 90px; min-height: 28px; padding: 2px 6px; font-size: .85rem; margin-left: 6px; }
.place-sheet { max-width: 1400px; width: 96vw; }
.place-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.place-pv { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; min-height: 360px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.place-pv .pv-img { max-height: 62vh; }
.place-pv .pv-pdf { height: 62vh; }
.place-list ul { list-style: none; padding: 0; margin: 0; max-height: 62vh; overflow-y: auto; }
.place-list li { border-bottom: 1px solid #edf0ee; padding: 4px 0; }
.place-c { display: block; width: 100%; text-align: left; background: none; border: 1px solid transparent; border-radius: 6px; padding: 6px 8px; cursor: pointer; font: inherit; }
.place-c:hover, .place-c:focus-visible { border-color: var(--harbor); background: #eef4f7; }
.place-c.need { border-left: 4px solid var(--soon); }
.place-c .num { float: right; font-variant-numeric: tabular-nums; }
.place-items { display: block; padding: 0 8px 6px; }
@media (max-width: 900px) { .place-body { grid-template-columns: 1fr; } }

/* ---------- 0.17.8: deposit checks in the register ---------- */
.dep-edit td { background: #f6f9fb; }
.dep-box { padding: 8px 4px 4px; }
.dep-box table { width: 100%; max-width: 760px; border-collapse: collapse; }
.dep-box th { text-align: left; font-size: .78rem; color: var(--muted); padding: 2px 4px; background: none; position: static; }
.dep-box td { padding: 2px 4px; background: none; border: 0; }
.dep-box input[type=text] { min-height: 32px; padding: 3px 8px; width: 100%; font-size: .9rem; }
.dep-box p { margin: 6px 0; }
.dep-box .c { width: 28px; text-align: center; } .dc-move select { min-height: 30px; padding: 2px 6px; max-width: 420px; }

/* ---------- 0.18: Unfiled tray ---------- */
#tray-btn { position: fixed; right: 16px; bottom: 16px; z-index: 55; box-shadow: 0 6px 20px -8px rgba(0,0,0,.35); background: var(--white); }
body.tray-open #tray-btn { display: none; }
#tray { position: fixed; top: 0; right: 0; bottom: 0; width: 320px; z-index: 70; background: var(--white); border-left: 1px solid var(--line); box-shadow: -8px 0 24px -16px rgba(0,0,0,.35); padding: 12px 14px; overflow-y: auto; }
#tray header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
body.tray-open main.workspace { max-width: min(1400px, calc(100vw - 380px)); margin-left: max(24px, calc((100vw - 320px - min(1400px, calc(100vw - 380px))) / 2)); margin-right: 340px; }
body.tray-open .review { right: 320px; }
.tray-pv { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; min-height: 220px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tray-pv .pv-img { max-height: 46vh; }
.tray-pv .pv-pdf { height: 46vh; }
.tray-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tray-tile { border: 2px solid var(--line); border-radius: 8px; background: var(--paper); cursor: grab; overflow: hidden; }
.tray-tile.on { border-color: var(--harbor); }
.tray-tile img, .tray-tile .ftype { display: flex; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); }
.tray-tile .tile-name { display: block; font-size: .72rem; padding: 3px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--white); }
body.tray-dragging [data-tray-drop] { outline: 2px dashed #cfdde5; outline-offset: 2px; }
.tray-over { outline: 3px solid var(--harbor) !important; outline-offset: 2px; background: #eef4f7 !important; }
@media (max-width: 1100px) { #tray { width: 260px; } body.tray-open main.workspace { margin-right: 280px; max-width: calc(100vw - 300px); margin-left: 12px; } body.tray-open .review { right: 260px; } }

/* Activity: who changed what, before and after */
.activity-tools { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.activity-tools .check { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
.activity .tag { min-width: 0; margin: 0 4px; padding: 0 6px; border: 1px solid var(--line); border-radius: 3px; font-size: .75rem; font-weight: 700; color: var(--muted); }
.activity .tag.outside { color: var(--harbor); border-color: var(--harbor); }
.activity .tag.new { color: var(--white); background: var(--soon); border-color: var(--soon); }
.activity li.by-outside { border-left: 3px solid var(--harbor); padding-left: 10px; }
.activity li.is-new { background: #fbf4e6; }
.chg { list-style: none; margin: 6px 0 2px; padding: 0 0 0 4px; font-size: .9rem; }
.chg li { padding: 2px 0; border: 0; }
.chg-f { display: inline-block; min-width: 9em; color: var(--muted); }
.chg del { color: var(--critical); text-decoration: line-through; }
.chg ins { color: var(--done); text-decoration: none; font-weight: 700; }
.chg-vals dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 6px 0; font-size: .9rem; }
.chg-vals dl div { display: contents; }
.chg-vals dt { color: var(--muted); }
.chg-vals dd { margin: 0; }
.af-object { background: var(--paper); border: 1px solid var(--line); padding: 8px 12px; }
.changed-by { margin: 6px 0 0; }
@media (max-width: 760px) { .chg-f { display: block; min-width: 0; } }

/* Plain-language meanings */
details.terms { margin: 6px 0; }
details.terms > summary { cursor: pointer; color: var(--harbor); font-size: .9rem; }
details.terms dl { margin: 8px 0 4px; display: grid; gap: 8px; }
details.terms dt { font-weight: 700; }
details.terms dd { margin: 2px 0 0; color: var(--ink); }
details.words-to-know { background: var(--white); border: 1px solid var(--line); padding: 10px 14px; margin: 10px 0 14px; }
details.words-to-know > summary { font-weight: 700; font-size: 1rem; }
details.words-to-know dl { grid-template-columns: minmax(150px, 220px) 1fr; column-gap: 16px; }
details.words-to-know dl div { display: contents; }
@media (max-width: 760px) { details.words-to-know dl { grid-template-columns: 1fr; } }

.ws-foot { margin: 28px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); max-width: 70ch; }

/* Probate guide */
details.guide > summary { cursor: pointer; list-style: none; }
details.guide > summary h2 { display: inline; }
details.guide > summary h2 { margin: 0; font-size: 1.1rem; }
details.guide.rec-acc > :not(summary):last-child { margin-bottom: 16px; }
.gd-phases { padding-left: 1.2em; }
.gd-phases > li { margin: 16px 0; }
.gd-phases h3 { margin: 0 0 6px; }
.gd-steps { padding-left: 1.2em; }
.gd-step { margin: 10px 0; }
.gd-step p { margin: 4px 0; }
.gd-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.gd-st { font-size: .8rem; font-weight: 700; color: var(--soon); }
.gd-st.done { color: var(--done); }
.gd-step.is-done > .gd-head strong { color: var(--done); }
.inv-table td { vertical-align: top; }
.inv-needs td:first-child { border-left: 3px solid var(--soon); }

.guide-disclaimer { font-size: .92rem; border-width: 2px; }

/* Done items, kept reachable under each section */
details.done-list { margin: 10px 0 4px; border-top: 1px dashed var(--line); padding-top: 8px; }
details.done-list > summary { cursor: pointer; color: var(--harbor); font-weight: 700; font-size: .95rem; }

/* Who does each item */
.legal-help { margin: 0 0 12px; padding: 10px 14px; }
.legal-help .row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-end; }
.legal-help .grow { flex: 1 1 260px; margin: 0; }
.toolbar-checks { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-top: -4px; }
.toolbar-checks .acc-ctl { margin-left: auto; }
.tag.who { display: inline-block; min-width: 0; margin-left: 8px; padding: 1px 7px; border-radius: 10px; font-size: .75rem; font-weight: 700; border: 1px solid currentColor; }
.who-attorney { color: #6b3fa0; } .who-accountant { color: #1f6f78; } .who-family { color: var(--harbor); } .who-arch { color: var(--sage); }
.tag.who.muted { color: var(--muted); font-weight: 400; }
.who-note { margin: 4px 0 6px; padding: 6px 10px; background: #f3eef9; border-left: 3px solid #6b3fa0; font-size: .88rem; }
.who-note.warn { background: #fbf4e6; border-left-color: var(--soon); }
.who-count { margin-left: 8px; font-size: .78rem; font-weight: 700; }
.who-count span { margin-right: 8px; }
.who-list table select { min-width: 150px; }
fieldset.handles { border: 1px solid var(--line); margin: 0 0 10px; padding: 8px 12px; }
fieldset.handles legend { font-weight: 700; padding: 0 4px; }
fieldset.handles label.check { display: block; margin: 3px 0; font-weight: 400; }

.item .tag.who.who-attorney, .item .tag.who.who-attorney.muted { color: #6b3fa0; }
.item .tag.who.who-accountant { color: #1f6f78; }
.item .tag.who.who-family { color: var(--harbor); }
.item .tag.who.who-arch { color: var(--sage); }
.item .tag.who.muted { color: var(--muted); }

/* Rooms: every room listed, each folding */
.room-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0; }
.room-nav .acc-ctl { margin-left: auto; }
details.room-group { border: 1px solid var(--line); border-radius: 6px; margin: 8px 0; padding: 0 12px; background: var(--white); }
details.room-group > summary { cursor: pointer; list-style: none; padding: 10px 0; }
details.room-group > summary::-webkit-details-marker { display: none; }
details.room-group > summary h3 { display: inline; margin: 0; }
details.room-group > summary::before { content: "▸ "; color: var(--harbor); }
details.room-group[open] > summary::before { content: "▾ "; }
details.room-group[open] { padding-bottom: 8px; }
.room-list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.room-list input { min-width: 0; width: 100%; }
.room-list li > button, .room-list li > span { white-space: nowrap; flex: none; }
details.room-group > summary h3 { border: 0; padding: 0; }

/* Quick review: help on each item */
details.rv-help { display: inline-block; vertical-align: middle; margin-left: 6px; }
details.rv-help > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--harbor); color: var(--harbor); font-weight: 700; font-size: .8rem; }
details.rv-help > summary::-webkit-details-marker { display: none; }
details.rv-help[open] > summary { background: var(--harbor); color: var(--white); }
.rv-help-body { display: block; margin: 8px 0 4px; padding: 8px 12px; background: var(--paper); border-left: 3px solid var(--harbor); font-size: .9rem; font-weight: 400; max-width: 70ch; }
.rv-help-body p { margin: 4px 0; }
.rv-help-body dl { margin: 6px 0; } .rv-help-body dt { font-weight: 700; } .rv-help-body dd { margin: 0 0 4px; }
details.rv-help[open] { display: block; }

/* Probate timeline */
.gd-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 14px; }
.gd-nav .chip.done { border-color: var(--done); color: var(--done); }
.gd-arrow { color: var(--muted); }
.gd-date { font-size: .85rem; color: var(--harbor); font-family: var(--sans); font-weight: 700; }
details.gd-check { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; margin: 6px 0 10px; }
details.gd-check > summary { cursor: pointer; }
details.gd-check ul { list-style: none; padding: 0; margin: 6px 0; }
details.gd-check li { margin: 3px 0; }
details.gd-check li.done button { color: var(--done); }
ul.gd-ex { margin: 4px 0 6px 18px; padding: 0; font-size: .92rem; }
ul.gd-ex li { margin: 2px 0; }

/* Prep sheets */
.prep-line { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 6px 0 8px; }
.prep-line .tag { min-width: 0; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--line); font-size: .75rem; font-weight: 700; color: var(--muted); }
.prep-line .tag.doc-prep { color: var(--soon); border-color: var(--soon); }
.prep-line .tag.doc-attorney { color: #6b3fa0; border-color: #6b3fa0; }
.prep-line .tag.doc-signed { color: var(--done); border-color: var(--done); }
.prep-form { border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; margin: 6px 0 12px; background: var(--paper); }
.prep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px 16px; }
.prep-grid .wide { grid-column: 1 / -1; }
.prep-grid label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: .9rem; }
.prep-grid textarea, .prep-grid input, .prep-grid select { font-weight: 400; }
.prep-grid .hint { font-weight: 400; }

.summary-sheet fieldset { border: 1px solid var(--line); padding: 8px 12px; margin: 0 0 10px; }
.summary-sheet fieldset label.check { display: block; margin: 4px 0; font-weight: 400; }
.summary-sheet textarea { width: 100%; }
.summary-preview { white-space: pre-wrap; background: var(--paper); border: 1px solid var(--line); padding: 10px 12px; font: .88rem/1.45 var(--sans); max-height: 320px; overflow: auto; }
.prep-draft { color: var(--soon); font-weight: 600; }
/* Attorney's review of the prep-sheet questions */
.pq-sheet { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 10px; background: var(--paper); }
.pq-sheet > summary { cursor: pointer; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.pq-sheet > summary strong { font-size: 1.02rem; }
.pq-sheet[open] > summary { border-bottom: 1px solid var(--line); }
.pq-body { padding: 10px 14px; }
.pq-list { list-style: none; margin: 0 0 10px; padding: 0; }
.pq-list li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px dotted var(--line); }
.pq-list li.is-hidden .pq-q { text-decoration: line-through; color: var(--muted); }
.pq-list .pq-q { flex: 1; }
.pq-list label.check { white-space: nowrap; font-weight: 400; font-size: .85rem; }
.pq-extra { display: flex; gap: 8px; align-items: center; margin: 4px 0; }
.pq-extra input[type="text"] { flex: 1 1 auto; width: auto; min-width: 0; }
.pq-extra select { flex: 0 0 auto; width: auto; }
.pq-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
@media (max-width: 600px) { .pq-list li { flex-direction: column; gap: 2px; } .pq-extra { flex-wrap: wrap; } .pq-extra input[type="text"] { flex-basis: 100%; } }
/* Record tabs: every section is an accordion, like the checklist */
details.rec-acc.rec-type { padding: 0; margin: 0 0 12px; }
details.rec-acc > summary .phase-name { font-size: 1.1rem; }
details.rec-acc > .acc-body { padding: 4px 18px 16px; margin: 0; }
details.rec-acc > .acc-body > p.muted:first-child { margin-top: 10px; }
details.rec-acc:not([open]) > summary { border-radius: 10px; }
.jump .acc-all { margin-left: auto; white-space: nowrap; }
@media (max-width: 600px) { .jump .acc-all { margin-left: 0; } details.rec-acc > .acc-body { padding: 4px 12px 14px; } }
