@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* =====================================================================
   Urban Nest design system
   One type scale, one colour vocabulary, borders instead of shadows.
   Tokens first; components below only ever use tokens.
   ===================================================================== */

:root {
  /* Surface hierarchy, kept subtle.
     L0 app background (--bg) -> L1 working canvas (--canvas) -> L2 inset surfaces (--surface-2) -> L3 floating overlays (--float).
     --surface is the canvas: content sits directly on it instead of in boxes. */
  --bg: #eceeec;
  --canvas: #fcfcfb;
  --surface: #fcfcfb;
  --surface-2: #f3f4f2;
  --float: rgba(255, 255, 255, 0.8);
  --ink: #14201c;
  --ink-soft: #46544e;
  /* Darkened from the original #7a8781 -- that only hit ~3.5:1 contrast
     against the page background (fails WCAG AA's 4.5:1 for text this
     size), and --muted is what every KPI label, delta line and table
     note uses. Same hue, just dark enough to actually read cleanly. */
  --muted: #646e69;
  --line: rgba(20, 32, 28, 0.07);
  --line-strong: rgba(20, 32, 28, 0.13);
  --line-faint: rgba(20, 32, 28, 0.045);
  /* small glyphs that are controls or hints (info dot, chevrons): ~3.9:1 on white, so they are findable without being loud */
  --icon: #7c8681;
  /* three text levels */
  --text-1: var(--ink);
  --text-2: var(--ink-soft);
  --text-3: #667069;

  /* colour carries meaning: brand = selection / primary action / main series */
  --brand: #0e9f6e;
  --brand-ink: #0a6b49;
  --brand-dim: rgba(14, 159, 110, 0.09);
  /* Darkened slightly from #1a8a57 (was just under 4.5:1) to actually
     pass contrast on the up-arrow/positive text, same reasoning as
     --muted above. */
  --pos: #177c4e;
  --pos-dim: rgba(26, 138, 87, 0.10);
  --warn: #b7791f;
  --warn-ink: #85560f;
  --warn-dim: rgba(183, 121, 31, 0.12);
  --neg: #c2413a;
  --neg-dim: rgba(194, 65, 58, 0.10);
  --neutral-dim: rgba(20, 32, 28, 0.06);

  /* the same concept = the same colour on every chart */
  --series-revenue: #0e9f6e;
  --series-costs: #58645f;
  --series-profit: #3f6489;
  --series-capex: #a9b3ae;

  /* booking channels: muted, distinct from the series colours */
  --chan-airbnb: #b5695a;
  --chan-booking: #6f6a9a;
  --chan-direct: #0e9f6e;
  --chan-vrbo: #a08a4c;
  --chan-other: #9aa5a0;

  /* sidebar: sits on the app background, not a slab of its own colour */
  --sidebar: transparent;
  --sidebar-ink: #2f3d37;
  --sidebar-muted: #6f7b75;
  --sidebar-line: rgba(20, 32, 28, 0.08);

  /* type scale -- the only sizes used anywhere */
  --fs-title: 27px;
  --fs-section: 17px;
  --fs-kpi: 30px;
  --fs-kpi-2: 19px;
  --fs-body: 14px;
  --fs-table: 13.5px;
  --fs-context: 13.5px;
  --fs-small: 12.5px;
  --fs-label: 11.5px;

  /* spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;

  --radius: 14px;          /* canvas, overlays */
  --radius-md: 10px;       /* inset surfaces */
  --radius-sm: 7px;        /* controls */
  --row-h: 40px;

  /* the only shadows: floating overlays (palette, drawer, popovers) */
  --shadow-float: 0 0 0 1px rgba(20, 32, 28, 0.06), 0 14px 36px -10px rgba(20, 32, 28, 0.22), 0 3px 8px rgba(20, 32, 28, 0.05);
  /* motion: one easing, two durations */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --t-fast: 120ms var(--ease);
  --t-med: 200ms var(--ease);
  --ring: 0 0 0 2px var(--canvas), 0 0 0 4px rgba(14, 159, 110, 0.5);

  /* legacy aliases so older markup keeps working */
  --accent: var(--brand);
  --accent-ink: var(--brand-ink);
  --accent-dim: var(--brand-dim);
  --green-dim: var(--pos-dim);
  --red: var(--neg);
  --red-dim: var(--neg-dim);
  --amber: var(--warn);
  --amber-dim: var(--warn-dim);
  --card: var(--surface);
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--fs-body);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 { color: var(--ink); letter-spacing: -0.015em; }
h1 { font-size: var(--fs-title); font-weight: 600; margin: 0 0 var(--s1); line-height: 1.2; }
h2 { font-size: var(--fs-section); font-weight: 600; margin: var(--s6) 0 var(--s3); }
h3 { font-size: var(--fs-body); font-weight: 600; margin: 0 0 var(--s2); }
a { color: var(--brand-ink); }

.subtitle { color: var(--muted); margin: 0 0 var(--s5); font-size: var(--fs-context); }
.subtitle a { font-weight: 500; text-decoration: none; }
.subtitle a:hover { text-decoration: underline; }
.note { color: var(--muted); font-size: var(--fs-small); }
.num, .money { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* ---------- layout ---------- */

.app-shell { display: flex; min-height: 100vh; align-items: stretch; }
.main-col { flex: 1 1 auto; min-width: 0; }
main { max-width: 1160px; margin: 0 auto; padding: var(--s6) var(--s6) 64px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.page-head .subtitle { margin: 0; }
.page-actions { display: flex; gap: var(--s2); align-items: center; }

/* A section is whitespace + a heading, not another box. */
.section { margin-top: var(--s6); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); margin-bottom: var(--s3); }
.section-head h2 { margin: 0; }
.section-head .note { margin: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
.grid-2 > * { min-width: 0; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

/* Small multiples: one compact trend per property instead of one crowded
   multi-line chart -- reads at a glance, never a spaghetti chart. */
.spark-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s3); }
.spark-card { display: block; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: inherit; }
.spark-card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.spark-name { font-size: var(--fs-small); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spark-value { font-size: var(--fs-kpi-2); font-weight: 600; margin-top: 2px; }
.spark-canvas { height: 40px; margin-top: var(--s2); }

/* Cards are reserved for content that is genuinely a unit: a chart, a table. */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s4) var(--s5);
  margin-bottom: var(--s4);
}
.card.flush { padding: 0; overflow-x: auto; }
.narrow { width: 100px; }
.card > h2:first-child { margin-top: 0; }
.section .card { margin-bottom: 0; }

/* ---------- sidebar ---------- */

.sidebar {
  width: 232px; flex: 0 0 232px;
  background: var(--sidebar); color: var(--sidebar-ink);
  padding: var(--s5) var(--s3);
  display: flex; flex-direction: column; gap: var(--s1);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 10px;
  padding: var(--s1) var(--s2) var(--s5); margin-bottom: var(--s2);
  border-bottom: 1px solid var(--sidebar-line);
}
.sidebar .brand .mark {
  width: 28px; height: 28px; border-radius: 8px; flex: 0 0 28px;
  background: var(--brand); display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px; color: #04231a;
}
.sidebar .brand .name { font-weight: 600; font-size: var(--fs-body); color: #f2f8f5; }
.sidebar .brand .sub { font-size: var(--fs-label); color: var(--sidebar-muted); margin-top: 1px; }
.sidebar .section-label { font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.08em; color: var(--sidebar-muted); font-weight: 500; padding: var(--s4) 10px 6px; }
.sidebar nav.primary { display: flex; flex-direction: column; gap: 2px; }

.sidebar a.nav-link {
  display: flex; align-items: center; gap: 10px;
  color: var(--sidebar-ink); text-decoration: none;
  padding: 7px 10px; border-radius: var(--radius-sm);
  font-size: var(--fs-context); font-weight: 400;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar a.nav-link .dot { width: 5px; height: 5px; border-radius: 50%; flex: 0 0 5px; background: var(--sidebar-muted); opacity: 0.5; }
.sidebar a.nav-link:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.sidebar a.nav-link.active { background: rgba(14, 159, 110, 0.16); color: #ecfff7; font-weight: 500; }
.sidebar a.nav-link.active .dot { background: var(--brand); opacity: 1; }
.sidebar a.nav-link.recent { padding: 4px 10px 4px 31px; font-size: var(--fs-small); color: var(--sidebar-muted); }
.sidebar a.nav-link.recent:hover { color: #fff; }
.sidebar a.nav-link.recent.active { background: none; color: #ecfff7; }
.sidebar .add-btn {
  margin-top: auto; background: transparent; color: var(--sidebar-ink);
  border: 1px solid var(--sidebar-line); padding: 8px 12px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: var(--fs-small); font-weight: 500; font-family: inherit;
}
.sidebar .add-btn:hover { background: rgba(255, 255, 255, 0.05); box-shadow: none; }

@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  main { padding: var(--s4); }
  .sidebar { position: sticky; top: 0; z-index: 30; width: auto; flex: none; height: auto; flex-direction: row; align-items: center; gap: var(--s2); padding: 10px var(--s3); overflow-x: auto; scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar .brand { border: none; padding: 0; margin: 0 var(--s2) 0 0; flex: 0 0 auto; }
  .sidebar .brand .sub, .sidebar .brand .name, .sidebar .jump-btn, .sidebar .add-btn, .sidebar .section-label, .sidebar a.nav-link.recent, .sidebar a.nav-link .dot { display: none; }
  .sidebar nav.primary { flex-direction: row; gap: 2px; }
  .sidebar a.nav-link { padding: 6px 10px; flex: 0 0 auto; }
  .rv-dock { left: 0; padding: var(--s2) var(--s3); }
  .page-head { align-items: flex-start; }
}

/* ---------- tabs (one pattern: bookings, property workspace, documents) ---------- */

.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line-strong); margin: 0 0 var(--s5); }
.tab {
  padding: 9px 16px; font-size: var(--fs-table); font-weight: 500; color: var(--ink-soft);
  text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.tab:hover { color: var(--ink); background: var(--neutral-dim); }
.tab.active { color: var(--brand-ink); border-bottom-color: var(--brand); font-weight: 600; background: var(--brand-dim); }
.tab .count { margin-left: 6px; font-size: var(--fs-label); color: var(--muted); font-weight: 500; }
/* Admin/source tabs (Documents, Settings) stay in the same bar -- one
   workspace, not two nav rows -- but read as visually subordinate to
   the analysis tabs: a thin divider and a quieter resting color. */
.tabs-divider { width: 1px; align-self: stretch; background: var(--line-strong); margin: 6px var(--s2) 6px 0; }
.tab-secondary { color: var(--muted); }
.tab-secondary:hover { color: var(--ink-soft); }
.tab-secondary.active { color: var(--ink-soft); background: var(--neutral-dim); border-bottom-color: var(--line-strong); font-weight: 500; }

/* ---------- KPIs: one compact row, then a quiet strip ---------- */

.tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.tile { padding: var(--s3) var(--s4) 14px; background: var(--surface); min-width: 0; }
@media (max-width: 1380px) { .tiles:has(> .tile:nth-child(5):last-child) .label { min-height: 32px; } }
/* five tiles: one row when there is room, otherwise the last one spans so no tile is left alone on a row */
.tiles:has(> .tile:nth-child(5):last-child) { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) {
  .tiles:has(> .tile:nth-child(5):last-child) { grid-template-columns: repeat(3, 1fr); }
  .tiles:has(> .tile:nth-child(5):last-child) > .tile:nth-child(5) { grid-column: span 2; }
  .tile .label { min-height: 32px; }                         /* labels that wrap must not push values out of line with their neighbours */
}
@media (max-width: 560px) {
  .tiles:has(> .tile:nth-child(5):last-child) { grid-template-columns: repeat(2, 1fr); }
  .tiles:has(> .tile:nth-child(5):last-child) > .tile:nth-child(5) { grid-column: span 2; }
}
.tile .label { font-size: var(--fs-label); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; line-height: 16px; }
/* Precision on top of an already-clear label, not a replacement for
   one -- see services/common.py's METRIC_INFO. Native title tooltip:
   no new JS, works on hover and (via tabindex) keyboard focus. */
.info-dot { display: inline-block; margin-left: 4px; line-height: 1; font-size: var(--fs-small); letter-spacing: 0; text-transform: none; color: var(--icon); cursor: help; vertical-align: 1px; }
.info-dot:hover { color: var(--muted); }
.info-dot:focus-visible { color: var(--ink); outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }
.tile .value { font-size: var(--fs-kpi); font-weight: 600; margin-top: 2px; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tile .delta, .delta { display: block; margin-top: 2px; font-size: var(--fs-small); font-weight: 400; color: var(--muted); padding: 0; background: none; border-radius: 0; }
.delta .arrow { font-weight: 600; margin-right: 2px; }
.delta.up .arrow { color: var(--pos); }
.delta.down .arrow { color: var(--neg); }
.delta.up, .delta.down, .delta.flat { color: var(--muted); background: none; }
.tile .note { font-size: var(--fs-small); margin-top: 2px; }
.tile-spark { height: 28px; margin-top: var(--s2); }

.tiles-secondary {
  display: flex; flex-wrap: wrap; gap: var(--s1) var(--s6); background: none; border: none; border-radius: 0; overflow: visible;
  margin-top: var(--s3); padding: 0 var(--s1);
}
.tiles-secondary .tile { border: none; padding: 0; display: flex; align-items: baseline; gap: var(--s2); }
.tiles-secondary .tile .label { font-size: var(--fs-small); text-transform: none; letter-spacing: 0; order: 1; }
.tiles-secondary .tile .value { font-size: var(--fs-body); font-weight: 600; margin: 0; order: 2; color: var(--ink); }

/* ---------- tables: one style everywhere ---------- */

table { width: 100%; border-collapse: collapse; font-size: var(--fs-table); }
th, td { text-align: left; padding: 8px var(--s3); border-bottom: 1px solid var(--line); height: var(--row-h); vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.05em; background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; z-index: 2; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nw { white-space: nowrap; }
/* a difference of nothing recedes; a real one reads */
.zero { color: var(--muted); font-weight: 400; }
.nz { color: var(--ink); font-weight: 600; }
tfoot td { background: var(--surface-2); border-top: 1px solid var(--line); }
tfoot tr:first-child td { border-top-color: var(--line-strong); }
tfoot tr:last-child td { border-bottom: none; }
tfoot .recs-total td { font-weight: 600; }
td:first-child, th:first-child { padding-left: var(--s4); }
td:last-child, th:last-child { padding-right: var(--s4); }
table a { color: var(--ink); font-weight: 500; text-decoration: none; }
table a:hover { color: var(--brand-ink); text-decoration: underline; }
tr.clickable { cursor: pointer; }
tr.clickable:focus-visible { outline: none; }
tr.clickable:focus-visible td { background: var(--brand-dim); box-shadow: inset 3px 0 0 var(--brand); }
tr.focus-row td { background: var(--brand-dim); box-shadow: inset 3px 0 0 var(--brand); }
tr.focus-row:hover td { background: var(--brand-dim); }
td.truncate { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Properties index: the Operated and Managed tables share one column grid (name, model, figure, [profit], occupancy, status), so
   Model / Occupancy / Status line up from one table to the next. Managed has no profit column; its empty gap column only holds the space. */
.prop-table td.c-name a { font-weight: 500; }
.prop-table td.c-status .pill { white-space: normal; text-align: left; line-height: 1.25; }
.prop-table .c-gap { padding: 0; }
@media (min-width: 1181px) {
  .prop-table { table-layout: fixed; }
  col.c-model { width: 150px; } col.c-metric { width: 150px; } col.c-occ { width: 100px; } col.c-status { width: 150px; }
  .prop-table th { white-space: normal; }
}
@media (max-width: 1180px) {
  .prop-table th { white-space: normal; letter-spacing: 0.02em; }
  .prop-table .c-gap, col.c-gap { display: none; }
  .prop-table td.c-name, .prop-table th:first-child { min-width: 170px; }
}
@media (max-width: 560px) {
  .prop-table .c-secondary, .prop-table .c-model, col.c-secondary, col.c-model { display: none; }
}
@media (max-width: 760px) {
  .prop-table th, .prop-table td { padding-left: var(--s2); padding-right: var(--s2); }
  .prop-table td:first-child, .prop-table th:first-child { padding-left: var(--s3); min-width: 0; }
  .prop-table td:last-child, .prop-table th:last-child { padding-right: var(--s3); }
}

/* Document review: the summary strip above the two-pane workspace and the
   ingestion trail below it. */
.rv-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--s4); }
.rv-sum-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rv-sum-item .label { color: var(--muted); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.05em; }
.rv-sum-item strong { font-size: var(--fs-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ol.trail { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
ol.trail li { padding-left: var(--s3); border-left: 2px solid var(--line-strong); }
ol.trail li details { margin-top: 2px; }
ol.trail li details ul { margin: 4px 0 0; padding-left: 18px; }
.trail-ev { font-weight: 600; font-size: var(--fs-small); }
.trail-confirmed { color: var(--pos); }
.trail-extraction_failed { color: var(--neg); }
.trail-undone { color: var(--warn); }

button:disabled, .btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- forms & buttons ---------- */

input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  font-family: inherit; font-size: var(--fs-table); color: var(--ink);
  height: 32px; padding: 0 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface);
}
textarea { height: auto; padding: 8px 10px; }
input[type=file] { font-family: inherit; font-size: var(--fs-small); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-dim); }

/* three button variants: primary (default), secondary, quiet */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
  height: 32px; padding: 0 14px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: var(--fs-table); font-weight: 500; font-family: inherit; text-decoration: none; white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease;
}
button:hover, .btn:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
button:active { transform: translateY(1px); }
button.secondary, .btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
button.secondary:hover, .btn.secondary:hover { background: var(--neutral-dim); border-color: var(--line-strong); }
button.quiet, .btn.quiet { background: none; color: var(--ink-soft); border-color: transparent; padding: 0 8px; }
button.quiet:hover, .btn.quiet:hover { background: var(--neutral-dim); border-color: transparent; }
button.danger { background: var(--surface); color: var(--neg); border-color: var(--neg-dim); }
button.danger:hover { background: var(--neg-dim); border-color: var(--neg-dim); }

.filter-bar, .mini-form, .goal-form, .upload-form { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.filter-bar { margin-bottom: var(--s3); }
.clear-link { font-size: var(--fs-small); color: var(--muted); }
.mini-form { margin-top: var(--s3); }
.mini-form input[name="amount"] { width: 100px; }
.mini-form input[name="vendor"], .mini-form input[name="description"] { width: 150px; }
.goal-form input { width: 110px; }

/* ---------- pills: calm status vocabulary ---------- */

.pill, .status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-small); padding: 2px 9px; border-radius: 999px; font-weight: 500; line-height: 1.5;
  background: var(--neutral-dim); color: var(--ink-soft); text-transform: none; letter-spacing: 0; white-space: nowrap;
}
.pill.pos, .status-pill.confirmed { background: var(--pos-dim); color: var(--pos); }
.pill.warn { background: var(--warn-dim); color: var(--warn-ink); }
.pill.neg { background: var(--neg-dim); color: var(--neg); }
.pill.brand { background: var(--brand-dim); color: var(--brand-ink); }
button.pill { height: auto; border: none; }
button.pill:hover { filter: brightness(0.95); }
button.pill.warn { background: var(--warn-dim); color: var(--warn-ink); }
button.pill.pos { background: var(--pos-dim); color: var(--pos); }
button.pill.neutral { background: var(--neutral-dim); color: var(--ink-soft); }

/* ---------- context bar: same place on every analytical page ---------- */

[x-cloak] { display: none !important; }
.context-bar { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin: 0 0 var(--s5); }
.context-item { position: relative; }
.context-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink);
  height: 32px; padding: 0 12px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: var(--fs-context); font-weight: 500; cursor: pointer;
}
.context-trigger:hover { background: var(--neutral-dim); border-color: var(--line-strong); }
.context-trigger .caret { font-size: 10px; color: var(--muted); }
.context-trigger .ctx-key { color: var(--muted); font-weight: 400; }
.context-pop {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 20;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(20, 32, 28, 0.10);
  min-width: 210px; max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; padding: var(--s1);
}
.context-option { padding: 7px 10px; border-radius: 4px; text-decoration: none; color: var(--ink); font-size: var(--fs-context); white-space: nowrap; }
.context-option:hover { background: var(--neutral-dim); }
.context-option.sel { background: var(--brand-dim); color: var(--brand-ink); font-weight: 600; }

/* ---------- empty states: what's missing, why, what to do ---------- */

.empty { padding: var(--s5) var(--s4); }
.empty .empty-title { font-weight: 600; font-size: var(--fs-body); }
.empty .empty-body { color: var(--muted); font-size: var(--fs-table); margin: 2px 0 var(--s3); max-width: 60ch; }

/* Compact in-place message for a chart whose series is entirely null --
   replaces the canvas rather than letting Chart.js draw a nonsense axis. */
.chart-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: var(--fs-table); text-align: center; padding: 0 var(--s4); }

/* ---------- loading skeletons ---------- */

@keyframes shimmer { 0% { background-position: -200px 0; } 100% { background-position: calc(200px + 100%) 0; } }
.skeleton, .skeleton-line {
  background: linear-gradient(90deg, var(--neutral-dim) 0, rgba(20, 32, 28, 0.02) 50%, var(--neutral-dim) 100%) no-repeat;
  background-size: 200px 100%; background-color: var(--neutral-dim); animation: shimmer 1.2s infinite linear;
  border-radius: var(--radius-sm);
}
.skeleton-line { height: 12px; margin: var(--s3) 0; }

/* ---------- upload progress overlay ---------- */

.upload-overlay {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: rgba(20, 32, 28, 0.35); opacity: 0; pointer-events: none; transition: opacity 0.15s ease;
}
.upload-overlay.open { opacity: 1; pointer-events: auto; }
.upload-overlay-box {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(20, 32, 28, 0.18); padding: var(--s5) var(--s6); min-width: 260px; max-width: 320px; text-align: center;
}
@keyframes upload-spin { to { transform: rotate(360deg); } }
.upload-spinner {
  width: 26px; height: 26px; margin: 0 auto var(--s3); border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--brand); animation: upload-spin 0.8s linear infinite;
}
.upload-overlay-stage { font-weight: 600; font-size: var(--fs-body); }
.upload-overlay-note { color: var(--muted); font-size: var(--fs-table); margin-top: 4px; }

/* ---------- flash ---------- */

.flash {
  padding: 10px var(--s4); border-radius: var(--radius-sm); margin-bottom: var(--s3);
  font-size: var(--fs-table); font-weight: 500; border-left: 3px solid var(--line-strong);
  background: var(--neutral-dim); color: var(--ink-soft);
}
.flash.success { background: var(--pos-dim); color: var(--pos); border-left-color: var(--pos); }
.flash.warning { background: var(--warn-dim); color: var(--warn); border-left-color: var(--warn); }
.flash.error { background: var(--neg-dim); color: var(--neg); border-left-color: var(--neg); }
.flash.info { background: var(--neutral-dim); color: var(--ink-soft); border-left-color: var(--line-strong); }

/* ---------- lists ---------- */

.completeness-row, .list-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: 9px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-table); }
.completeness-row:last-child, .list-row:last-child { border-bottom: none; }
.doc-list { list-style: none; padding: 0; margin: var(--s3) 0 0; }
.doc-list li { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-table); }
.doc-list li:last-child { border-bottom: none; }
.doc-list a { font-weight: 500; text-decoration: none; margin-left: var(--s3); }

.progress-bar { height: 6px; background: var(--neutral-dim); border-radius: 999px; overflow: hidden; margin-top: var(--s2); }
.progress-bar > div { height: 100%; background: var(--brand); border-radius: 999px; }

/* ---------- dialog ---------- */

dialog { border: none; border-radius: var(--radius); padding: var(--s5); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.3); width: min(420px, 90vw); }
dialog::backdrop { background: rgba(6, 20, 15, 0.45); }
dialog h2 { margin-top: 0; }
dialog label { display: block; margin-bottom: var(--s3); font-size: var(--fs-table); color: var(--ink-soft); font-weight: 500; }
dialog input, dialog select { display: block; width: 100%; margin-top: 5px; height: 34px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s2); }
.dialog-actions button:first-child { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.dialog-actions button:first-child:hover { background: var(--neutral-dim); border-color: var(--line-strong); }

/* ---------- drawer: the one right-hand detail pattern ---------- */

.drawer-backdrop { position: fixed; inset: 0; background: rgba(20, 32, 28, 0.25); opacity: 0; pointer-events: none; transition: opacity 0.18s ease; z-index: 40; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 92vw;
  background: var(--surface); border-left: 1px solid var(--line-strong);
  padding: var(--s5); overflow-y: auto; z-index: 41;
  transform: translateX(100%); transition: transform 0.18s ease;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; }
.drawer-amount { font-size: var(--fs-kpi); font-weight: 600; letter-spacing: -0.02em; }
button.drawer-close { background: none; border: none; color: var(--muted); font-size: 22px; line-height: 1; padding: 2px 8px; height: auto; }
button.drawer-close:hover { background: none; color: var(--ink); }
.drawer-section { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); }
.drawer-field { display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--fs-table); padding: 4px 0; }
.drawer-field span { color: var(--muted); }
.drawer-form { display: flex; flex-direction: column; gap: 10px; margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); }
.drawer-form label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-small); color: var(--ink-soft); font-weight: 500; }
.drawer-form input:not([type=checkbox]), .drawer-form select { height: 34px; }

/* ---------- document inbox + review ---------- */

.upload-form select, .upload-form input[type="file"], .upload-form input[type="url"] { font-size: var(--fs-table); }
.dropzone { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: var(--s6) var(--s5); text-align: center; background: var(--surface); transition: border-color 0.15s ease, background 0.15s ease; }
.dropzone.drag-over { border-color: var(--brand); background: var(--brand-dim); }
.dropzone-label { font-size: var(--fs-section); font-weight: 600; margin-bottom: 2px; }


/* ---------- document review workspace ---------- */

body.wide main { max-width: 1600px; }
.rv-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s5); align-items: start; }
@media (max-width: 1000px) { .rv-split { grid-template-columns: 1fr; } }

.rv-viewer { position: sticky; top: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rv-viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); padding: 8px var(--s3); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.rv-viewer-title { font-size: var(--fs-label); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.rv-viewer-tools { display: flex; align-items: center; gap: 4px; }
.rv-viewer-tools button, .rv-viewer-tools .btn { height: 26px; padding: 0 9px; }
.rv-frame { height: calc(100vh - 150px); min-height: 420px; background: var(--bg); }
.rv-frame iframe { width: 100%; height: 100%; border: none; }
.rv-scroll { overflow: auto; }
.rv-scroll img { display: block; max-width: none; }
.rv-nopreview { display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
table.rv-preview { font-size: var(--fs-small); background: var(--surface); }
table.rv-preview th { width: 36px; text-align: right; background: var(--surface-2); padding: 4px 8px; height: auto; position: sticky; left: 0; }
table.rv-preview td { padding: 4px 10px; height: auto; white-space: nowrap; }
table.rv-preview tr.hl td, table.rv-preview tr.hl th { background: rgba(183, 121, 31, 0.18); }

.rv-work { min-width: 0; padding-bottom: 140px; }
.rv-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s2); }
.rv-selectall { display: flex; align-items: center; gap: var(--s2); }
.rv-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px var(--s3) 8px; margin-bottom: var(--s2); }
.rv-row.focus { border-color: var(--line-strong); box-shadow: 0 0 0 2px var(--brand-dim); }
.rv-row.has-flags { border-left: 3px solid var(--warn); }
.rv-row.excluded { background: transparent; opacity: 0.55; }
.rv-row.excluded .rv-title { text-decoration: line-through; }
form.only-attention .rv-row:not(.has-flags) { display: none; }
.rv-main { display: flex; align-items: center; gap: var(--s2); }
.rv-status { width: 18px; text-align: center; font-weight: 600; flex: 0 0 18px; }
.rv-status.ok { color: var(--pos); }
.rv-status.warn { color: var(--warn); }
.rv-status.off { color: var(--muted); }
.rv-title { flex: 1; min-width: 0; font-weight: 500; }
.rv-amount { display: flex; align-items: center; gap: 4px; font-weight: 600; white-space: nowrap; }
.rv-amount input { width: 96px; text-align: right; font-weight: 600; }
.rv-fields { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0 44px; }
.rv-fields select, .rv-fields input { height: 28px; font-size: var(--fs-small); }
.rv-fields select.row-property { max-width: 170px; }
.rv-fields input[type=date] { width: 128px; padding: 0 6px; }
.rv-row input.q, .rv-row select.q { border-color: transparent; background: var(--neutral-dim); }
.rv-row input.q:hover, .rv-row select.q:hover { border-color: var(--line-strong); }
.rv-row input.q:focus, .rv-row select.q:focus { background: var(--surface); border-color: var(--brand); }
.rv-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); margin: 4px 0 0 44px; min-height: 22px; }
.rv-flags { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.rv-flag { color: var(--warn); font-size: var(--fs-small); font-weight: 500; }
.rv-foot-right { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-small); }
.rv-foot-right a { text-decoration: none; }
.rv-foot-right button { height: 22px; font-size: var(--fs-small); }

.rv-dup { margin: var(--s2) 0 var(--s1) 44px; padding: var(--s3); background: var(--warn-dim); border-radius: var(--radius-sm); font-size: var(--fs-small); }
.rv-dup-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin: var(--s2) 0; }
.rv-dup-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s4); }
.rv-dup-actions label { display: flex; align-items: center; gap: 5px; font-weight: 500; }

.rv-dock { position: fixed; bottom: 0; left: 232px; right: 0; z-index: 10; padding: var(--s3) var(--s6); background: rgba(246, 247, 246, 0.94); border-top: 1px solid var(--line-strong); backdrop-filter: blur(4px); display: flex; flex-direction: column; gap: var(--s2); align-items: stretch; }
.rv-dock > * { max-width: 1600px; width: 100%; margin: 0 auto; }
.rv-bulk { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); padding: 8px var(--s3); background: var(--ink); color: #fff; border-radius: var(--radius-sm); }
.rv-bulk[hidden] { display: none; }
.rv-bulk select { height: 28px; font-size: var(--fs-small); }
.rv-bulk button { height: 28px; }
.rv-confirm { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); }
.rv-block { color: var(--warn); font-weight: 500; }
#confirm-btn { height: 38px; padding: 0 22px; font-size: var(--fs-body); }
#confirm-btn:disabled { background: var(--neutral-dim); border-color: transparent; color: var(--muted); cursor: not-allowed; }
@media (max-width: 860px) { .rv-dock { left: 0; } }

.rv-success { background: var(--pos-dim); border-radius: var(--radius); padding: var(--s4) var(--s5); margin-bottom: var(--s4); }
.rv-success-title { font-size: var(--fs-section); font-weight: 600; color: var(--pos); }
.rv-success-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }

/* ---------- booking calendar ---------- */

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-grid-head { margin-bottom: var(--s1); }
.cal-weekday { font-size: var(--fs-label); color: var(--muted); text-align: center; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.cal-cell { aspect-ratio: 1.3; border-radius: var(--radius-sm); border: 1px solid var(--line); padding: 5px 6px; display: flex; flex-direction: column; justify-content: space-between; }
.cal-cell-empty { border: none; }
.cal-day { font-size: var(--fs-label); color: var(--muted); }
.cal-occ { font-size: var(--fs-small); font-weight: 600; text-align: right; }

/* ---------- charts ---------- */

.chart-box { position: relative; }
.chart-legend { display: flex; gap: var(--s4); font-size: var(--fs-small); color: var(--muted); margin-bottom: var(--s2); }
.chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

/* ---------- targets ---------- */

.pbar { display: inline-block; width: 84px; height: 6px; border-radius: 999px; background: var(--neutral-dim); overflow: hidden; vertical-align: middle; }
.pbar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; opacity: 0.55; }
.pbar i.over { opacity: 1; }
.pbar.wide { display: block; width: 100%; height: 8px; margin: var(--s3) 0 var(--s2); }
.cell-progress { display: inline-flex; align-items: center; gap: var(--s2); }
.cell-progress .pct { min-width: 38px; text-align: right; font-size: var(--fs-small); color: var(--ink-soft); }
.cell-progress .pct.met { color: var(--pos); font-weight: 600; }
.tiles.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .tiles.two { grid-template-columns: 1fr; } }
.target-tile .of { font-size: var(--fs-section); color: var(--muted); font-weight: 400; }
.target-tile .sub { font-size: var(--fs-small); color: var(--muted); }
.target-tile .sub strong { color: var(--ink); font-weight: 600; }
/* Directional variance -- used instead of a percentage-of-target when
   the target isn't positive (see routes/targets.py), so a worse-than-
   planned loss never reads as green/achieved. */
.variance { font-size: var(--fs-small); font-weight: 500; }
.variance.met, .target-tile .sub.variance.met strong { color: var(--pos); }
.variance.miss, .target-tile .sub.variance.miss strong { color: var(--neg); }

.drawer-title { font-size: var(--fs-section); font-weight: 600; }
.tfield { padding-top: var(--s3); border-top: 1px solid var(--line); }
.tfield:first-of-type { border-top: none; padding-top: 0; }
.tfield > label { font-size: var(--fs-small); color: var(--ink-soft); font-weight: 500; }
.money-input { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.money-input input { flex: 1; min-width: 0; width: 100%; font-size: var(--fs-section); font-weight: 600; height: 40px !important; }
.tfield .ctx { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-small); color: var(--muted); }
.tfield .ctx a { color: var(--brand-ink); font-weight: 500; text-decoration: none; }
.tfield .ctx a:hover { text-decoration: underline; }
.tfield .hit { margin-top: var(--s2); padding: var(--s2) var(--s3); background: var(--surface-2); border-radius: var(--radius-sm); font-size: var(--fs-small); }
.tfield .hit .hit-label { color: var(--muted); text-transform: uppercase; font-size: var(--fs-label); letter-spacing: 0.05em; }
.tfield .hit strong { font-weight: 600; }
.drawer-actions { display: flex; gap: var(--s2); margin-top: var(--s2); }

/* ---------- drill-down affordances ---------- */

a.tile { color: inherit; text-decoration: none; display: block; }
a.tile:hover { background: var(--surface-2); }
tr.clickable:hover td { background: var(--surface-2); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-bottom: var(--s3); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: var(--brand-dim); color: var(--brand-ink); font-size: var(--fs-small); font-weight: 500; text-decoration: none; }
.chip span { color: var(--muted); }
.chip:hover span { color: var(--ink); }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.seg button, .seg a { background: none; color: var(--ink-soft); border: none; border-radius: 0; height: 28px; padding: 0 12px; font-size: var(--fs-small); border-left: 1px solid var(--line); display: inline-flex; align-items: center; text-decoration: none; }
.seg button:first-child, .seg a:first-child { border-left: none; }
.seg button:hover, .seg a:hover { background: var(--neutral-dim); }
.seg button.on, .seg a.on { background: var(--brand-dim); color: var(--brand-ink); font-weight: 600; }
.seg button.off { color: var(--muted); }
.seg button .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.seg button.off .sw { opacity: 0.3; }
.chart-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s3); }
.att-group { font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 500; padding: var(--s3) 0 2px; }
.att-group:first-child { padding-top: 0; }
tr.focus-row td { background: rgba(183, 121, 31, 0.16); }
.cal-cell:hover { outline: 2px solid var(--brand); }

/* ---------- channels ---------- */

.chan { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
button.chan-toggle { background: none; border: none; padding: 0; height: auto; font: inherit; color: var(--muted); cursor: pointer; }
button.chan-toggle:hover { color: var(--ink); }
button.chan-toggle.off { opacity: 0.4; }
button.chan-toggle.off i { background: var(--muted) !important; }
.chan i, .cal-dots i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.chan-airbnb { background: var(--chan-airbnb); }
.chan-booking { background: var(--chan-booking); }
.chan-direct { background: var(--chan-direct); }
.chan-vrbo { background: var(--chan-vrbo); }
.chan-other { background: var(--chan-other); }
.cal-dots { display: flex; gap: 3px; min-height: 8px; }
.cal-dots i { width: 6px; height: 6px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85); }
.chan-legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s3); font-size: var(--fs-small); color: var(--muted); }

/* ---------- navigation progress + quick jump ---------- */

#navbar { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--brand); opacity: 0; z-index: 100; transition: width 8s cubic-bezier(0.1, 0.8, 0.2, 1), opacity 0.2s; pointer-events: none; }
.sidebar .jump-btn { display: flex; justify-content: space-between; align-items: center; margin: 0 0 var(--s3); width: 100%; background: rgba(255, 255, 255, 0.05); color: var(--sidebar-muted); border: 1px solid var(--sidebar-line); font-weight: 400; font-size: var(--fs-small); }
.jump-btn:hover { background: rgba(255, 255, 255, 0.09); border-color: var(--sidebar-line); color: #fff; }
.jump-btn kbd { font-family: inherit; font-size: var(--fs-label); padding: 1px 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); }
.palette { position: fixed; inset: 0; z-index: 90; background: rgba(6, 20, 15, 0.4); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.palette[hidden] { display: none; }
.palette-box { width: min(560px, 92vw); background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line-strong); overflow: hidden; box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.35); }
.palette-box input { width: 100%; height: 48px !important; border: none !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; font-size: var(--fs-section) !important; padding: 0 var(--s4) !important; box-shadow: none !important; }
.palette-item { display: flex; justify-content: space-between; padding: 10px var(--s4); text-decoration: none; color: var(--ink); font-size: var(--fs-body); }
.palette-item.sel, .palette-item:hover { background: var(--brand-dim); }
.palette-empty { padding: var(--s4); color: var(--muted); }

@media (max-width: 860px) { .sidebar .jump-btn { display: none; } }

.ctx-reset { font-size: var(--fs-small); color: var(--muted); text-decoration: none; margin-left: var(--s1); }
.ctx-reset:hover { color: var(--brand-ink); text-decoration: underline; }

/* ---------- data health ---------- */

.health-row { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: var(--s3); padding: 9px var(--s4); border-bottom: 1px solid var(--line); font-size: var(--fs-table); }
.card .health-row:last-child, .drawer-section .health-row:last-child { border-bottom: none; }
.drawer-section .health-row { padding-left: 0; padding-right: 0; }
.hk { font-size: var(--fs-small); font-weight: 600; }
.hk.ok { color: var(--pos); font-size: var(--fs-body); }
.hk.miss { color: var(--warn); }
.hk.opt { color: var(--muted); font-weight: 500; }
.health-name .note { display: block; }
.health-name .note a { color: var(--muted); text-decoration: none; }
.health-name .note a:hover { color: var(--brand-ink); text-decoration: underline; }
a.sort { color: inherit; text-decoration: none; font-weight: inherit; }
a.sort:hover, a.sort.on { color: var(--ink); }

/* ---------- KPI drill-down affordance ---------- */

.tile.link { position: relative; cursor: pointer; transition: background 0.12s ease; }
.tile.link:hover { background: var(--surface-2); }
.tile.link .chev { position: absolute; top: 10px; right: 12px; color: var(--icon); font-size: 18px; line-height: 1; transition: color 0.12s ease, transform 0.12s ease; }
.tile.link:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.tile.link:hover .chev { color: var(--brand-ink); transform: translateX(2px); }
.tiles-secondary .tile.link { padding: 2px 22px 2px 0; border-radius: 4px; }
.tiles-secondary .tile.link .chev { top: 0; right: 4px; font-size: 15px; }
.tiles-secondary .tile.link:hover { background: none; }
.tiles-secondary .tile.link:hover .value { color: var(--brand-ink); }

/* ---------- login + view-only ---------- */

.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--s5); }
.login-box { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s6); }
.login .brand-row { display: flex; align-items: center; gap: 10px; }
.login .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: #04231a; font-weight: 600; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.sidebar .signout { margin-top: auto; padding: 6px 10px; font-size: var(--fs-small); color: var(--sidebar-muted); text-decoration: none; }
.sidebar .signout:hover { color: #fff; }
.sidebar .signout + .add-btn { margin-top: var(--s2); }
.viewer-note { background: var(--neutral-dim); color: var(--ink-soft); font-size: var(--fs-small); padding: 8px var(--s4); border-radius: var(--radius-sm); margin-bottom: var(--s3); }
body.viewer .add-btn, body.viewer [onclick*="add-apartment-dialog"] { display: none; }
form.view-only { opacity: 0.6; }

/* =====================================================================
   Drilldowns, status, workspace identity, import comparison.
   Shared vocabulary: .mlink (a figure that opens its records), .st / .pill (operational status),
   .rc (reconciliation status), .cmp / .chk (comparison + check tables), .nm (full / compact property name).
   ===================================================================== */

/* a figure that opens the records behind it: plain text, a hanging chevron (so numbers stay aligned), underline on hover */
a.mlink { position: relative; color: inherit; text-decoration: none; display: inline-block; padding: 3px 0; min-height: 24px; box-sizing: border-box; border-radius: 3px; }
a.mlink::after { content: '›'; position: absolute; left: 100%; margin-left: 4px; color: var(--icon); opacity: 0.8; transition: transform 0.12s ease, color 0.12s ease; }
a.mlink:hover { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
a.mlink:hover::after { color: var(--brand-ink); transform: translateX(2px); }
a.mlink:focus-visible, .cost-line a:focus-visible, .grp-status:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cost-line { margin: var(--s3) 0 var(--s5); font-size: var(--fs-small); color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px var(--s4); align-items: baseline; }
.cost-line a { color: var(--ink); text-decoration: none; padding: 4px 0; min-height: 24px; border-radius: 3px; }
.cost-line a strong { font-weight: 600; }
.cost-line a:hover { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.pill.review-link { text-decoration: none; }
.recs-total td { font-weight: 600; }
.sum-line { display: flex; flex-wrap: wrap; gap: 4px var(--s5); font-size: var(--fs-small); color: var(--muted); margin: 0 0 var(--s4); }
.sum-line strong { color: var(--ink); font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-small); }
.meta-line { margin: 0 0 var(--s2); font-size: var(--fs-small); color: var(--muted); }
.meta-line a { font-weight: 500; }

/* operational status is quiet when normal: "Active" is plain text; only exceptions are pills */
.st { font-size: var(--fs-table); color: var(--ink-soft); white-space: nowrap; }
.pill.quiet { background: none; color: var(--muted); padding-left: 0; padding-right: 0; }

/* reconciliation status: three meanings, three looks. PASS is a quiet tick, REVIEW is the only amber pill,
   NO CONTROL is plain grey text (no comparison available, not a failure) */
.rc { display: inline-flex; align-items: center; font-size: var(--fs-small); font-weight: 500; line-height: 1.5; white-space: nowrap; text-decoration: none; }
.rc-pass { color: var(--pos); }
.rc-pass::before { content: '✓\00a0'; }
.rc-review { background: var(--warn-dim); color: var(--warn-ink); padding: 2px 9px; border-radius: 999px; }
.rc-nc { color: var(--muted); font-weight: 400; cursor: help; text-decoration: underline dotted var(--icon); text-underline-offset: 3px; }
.rc-pass-text { color: var(--pos); font-weight: 500; }

/* import: Before / After / Change, grouped by area */
table.cmp { table-layout: auto; }
table.cmp th:not(:first-child), table.cmp td.num { width: 150px; }
table.cmp td.metric { padding-left: var(--s6); color: var(--ink-soft); }
table.cmp td.muted { color: var(--muted); }
table.cmp tr.grp td { background: var(--surface-2); padding-top: 6px; padding-bottom: 6px; height: auto; border-top: 1px solid var(--line-strong); }
table.cmp tbody:first-of-type tr.grp td { border-top: none; }
.grp-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.grp-status { text-decoration: none; border-radius: 3px; }
table.cmp tr.more { display: none; }
table.cmp.show-all tr.more { display: table-row; }
button.quiet[data-toggle-rows] { height: 26px; font-size: var(--fs-small); }

/* import: one reconciliation block per area */
.recon { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: var(--s3); overflow-x: auto; }
.recon:target { border-color: var(--line-strong); box-shadow: 0 0 0 3px var(--brand-dim); }
.recon.is-review { border-left: 3px solid var(--warn); }
.recon-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: var(--s3) var(--s4); }
.recon-head-r { display: inline-flex; align-items: center; gap: var(--s4); font-size: var(--fs-small); }
.recon-head-r a:not(.rc) { font-weight: 500; text-decoration: none; }
.recon-head-r a:not(.rc):hover { text-decoration: underline; }
.recon-note { padding: 0 var(--s4) var(--s3); margin: 0; }
table.chk td, table.chk th { height: 32px; }
table.chk th { background: none; position: static; }
table.chk td:first-child, table.chk th:first-child { padding-left: var(--s4); }
details.sub { border-top: 1px solid var(--line); }
details.sub > summary { cursor: pointer; padding: 9px var(--s4); font-size: var(--fs-small); color: var(--ink-soft); list-style: none; }
details.sub > summary::-webkit-details-marker { display: none; }
details.sub > summary::before { content: '›'; display: inline-block; width: 14px; color: var(--icon); transition: transform 0.12s ease; }
details.sub[open] > summary::before { transform: rotate(90deg); }
details.sub > summary:hover { background: var(--surface-2); }
details.sub > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
details.sub.nc > summary { color: var(--muted); }
.undo-block { margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--line); }

/* property workspace identity: the name once, then model · fee · status */
.ws-head { margin: 0 0 var(--s4); }
.ws-title { font-size: clamp(21px, 2.1vw, var(--fs-title)); margin: 0; text-wrap: balance; }
.ws-meta { margin: 2px 0 0; font-size: var(--fs-context); color: var(--muted); display: flex; flex-wrap: wrap; gap: 0 var(--s2); align-items: center; }
.ws-meta .sep { color: var(--icon); }
.ws-meta .ws-flag { color: var(--ink-soft); background: var(--neutral-dim); border-radius: 999px; padding: 0 9px; font-size: var(--fs-small); font-weight: 500; }
.ws-addr { display: none; margin: 2px 0 0; font-size: var(--fs-small); color: var(--muted); }

/* a property name has two forms: the full canonical name, and a compact one for cramped spots (display only) */
.nm, .ws-title { position: relative; }          /* the visually-hidden full name must sit inside its own cell, or it widens the page */
.nm .nm-short, .ws-title .nm-short { display: none; }
.nm-always .nm-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nm-always .nm-short { display: inline; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 560px) {
  .nm-compact .nm-full, .ws-title .nm-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* still read by screen readers */
  .nm-compact .nm-short, .ws-title .nm-short { display: inline; }
  .ws-addr { display: block; }
}

/* narrow screens: scroll inside a component, never the page, and show that more is there */
.tabs, .sidebar { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs .tab, .tabs .tabs-divider { flex: none; }
.tabs.has-more, .sidebar.has-more { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.card.flush.has-more { box-shadow: inset -14px 0 10px -12px rgba(20, 32, 28, 0.22); }
details.card { overflow-x: auto; }
.filter-bar select, .filter-bar input, .mini-form select, .mini-form input { max-width: 100%; min-width: 0; }
.mini-form select { max-width: 260px; text-overflow: ellipsis; }
.filter-bar select { text-overflow: ellipsis; }
/* the ledger filter bar: search takes the slack, selects stay compact and share a row where they can */
.ledger-filters input[type=text] { flex: 1 1 180px; }
.ledger-filters select { flex: 0 1 auto; max-width: 150px; }
.ledger-filters select[name=t_scope] { max-width: 180px; }
@media (max-width: 560px) { .ledger-filters input[type=text] { flex-basis: 100%; } .ledger-filters select { flex: 1 1 45%; max-width: none; } }
td.scope { max-width: 200px; }
.chan-legend, .chan-legend .chan { max-width: 100%; }
.chan-legend .chan { white-space: normal; }
@media (max-width: 760px) { .hide-sm { display: none; } }
@media (max-width: 560px) { .section-head { flex-direction: column; align-items: flex-start; gap: 2px; } .section-head .note { text-align: left; } }
/* targets: figures never split; the Performance link sits with Edit instead of crowding the name */
.targets-table td.t-name { min-width: 190px; }
.targets-table .t-act { white-space: nowrap; }
.targets-table a.t-perf { font-size: var(--fs-small); font-weight: 500; color: var(--ink-soft); text-decoration: none; margin-right: var(--s3); padding: 6px 0; }
.targets-table a.t-perf::after { content: ' ›'; color: var(--icon); }
.targets-table a.t-perf:hover { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.targets-table a.t-perf:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }
.pbar { width: 64px; }
.file-label { font-size: var(--fs-small); color: var(--ink-soft); max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* drawer hierarchy: the record first; where it came from is quieter, grouped, and says plainly what controls it */
.drawer-field strong { font-weight: 500; text-align: right; }
.drawer-head + .drawer-section, .drawer-head + p + .drawer-section { border-top: none; margin-top: var(--s3); }
.drawer-section.src { border-top: 1px dashed var(--line-strong); }
.drawer-section.src .drawer-field { font-size: var(--fs-small); padding: 2px 0; }
.drawer-section.src .drawer-field strong { font-weight: 400; color: var(--ink-soft); }
.src-state { font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; color: var(--ink-soft); margin: 0 0 var(--s2); }
.ro-note { margin: var(--s3) 0 0; font-size: var(--fs-small); color: var(--muted); }
.drawer { overscroll-behavior: contain; }
@media (max-width: 560px) { .drawer { width: 100vw; max-width: 100vw; } }
table.chk { table-layout: fixed; min-width: 560px; }
table.chk col.cn { width: 130px; } table.chk col.cs { width: 112px; }
@media (max-width: 560px) {
  table.cmp th:not(:first-child), table.cmp td.num { width: auto; }
  table.cmp td.metric { padding-left: var(--s4); }
  table.cmp th, table.cmp td { padding-left: var(--s2); padding-right: var(--s2); font-size: var(--fs-small); }
  table.cmp td:first-child, table.cmp th:first-child { padding-left: var(--s3); }
  table.cmp td:last-child, table.cmp th:last-child { padding-right: var(--s3); }
  table.chk { min-width: 520px; }
}

/* spacing helpers (replace repeated inline margins) */
.mt0 { margin-top: 0; } .mt2 { margin-top: var(--s2); } .mt3 { margin-top: var(--s3); } .mt4 { margin-top: var(--s4); } .mt5 { margin-top: var(--s5); }
.m0 { margin: 0; } .mb3 { margin-bottom: var(--s3); } .mb4 { margin-bottom: var(--s4); }
.m0-b3 { margin: 0 0 var(--s3); } .m0-b2 { margin: 0 0 var(--s2); } .m-t2 { margin: var(--s2) 0 0; } .m-t3 { margin: var(--s3) 0 0; }
.wsn { white-space: normal; } .wa { width: auto; }
.section .card.mb3 { margin-bottom: var(--s3); } .section .card.mb4 { margin-bottom: var(--s4); }
/* a clickable tile that also carries its own link (REVIEW): the main link and the flag sit side by side, never nested */
.tile.link.split { padding: 0; display: flex; flex-direction: column; }
.tile.link.split .tile-main { display: block; flex: 1; color: inherit; text-decoration: none; padding: var(--s3) var(--s4) 4px; }
.tile.link.split .tile-main:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.tile-flag { padding: 0 var(--s4) 12px; }
/* the current configuration is context beside a historical result, never part of it */
.cur-note { margin-top: 2px; font-size: var(--fs-small); color: var(--ink-soft); }
.cur-label { text-transform: uppercase; letter-spacing: 0.05em; font-size: var(--fs-label); color: var(--muted); margin-right: 4px; }
.cur-ok { color: var(--pos); font-weight: 500; }
.confirm-card { max-width: 640px; border-left: 3px solid var(--warn); }
.confirm-actions { display: flex; gap: var(--s2); margin: var(--s3) 0; }
.mb0 { margin-bottom: 0; }

/* Phase 8: quiet NO DATA state and the one-line cost note under the Overview tiles */
.nodata-line { margin: var(--s3) 0 var(--s4); color: var(--muted); font-size: var(--fs-sm, 13px); }
.cost-note { margin: calc(var(--s2) * -1) 0 var(--s4); }
.owner-line { margin: var(--s2) 0 var(--s4); }

/* Phase 8: the ⓘ definition popover (hover, focus, click and tap) and a touch-sized hit area */
.info-pop { position: fixed; z-index: 120; padding: var(--s2) var(--s3); background: var(--ink); color: var(--surface); border-radius: var(--radius-sm, 6px); font-size: var(--fs-small); font-weight: 400; line-height: 1.4; letter-spacing: 0; text-transform: none; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .4); pointer-events: none; }
.info-dot { cursor: pointer; }
@media (pointer: coarse) { .info-dot { padding: 10px 8px; margin: -10px -4px -10px 0; } }

/* Phase 8: the PASS / REVIEW / NO CONTROL legend */
.legend { margin: var(--s2) 0 var(--s3); font-size: var(--fs-small); color: var(--muted); }
.legend summary { cursor: pointer; }
.legend dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--s3); align-items: center; margin: var(--s2) 0; }
.legend dt, .legend dd { margin: 0; }
.legend .note { margin: 0; }
.note.why { color: var(--muted); }

/* Phase 9: the one-line formula behind Urban Nest Net Profit */
.net-line { margin-top: 0; }
.net-line > strong { color: var(--ink); }

/* =====================================================================
   Product layer. Fewer boxes, more hierarchy.
   Everything below only re-skins shared components through the tokens at
   the top: the canvas, the sidebar, KPIs, tables, controls, status,
   overlays and motion. No page has its own look.
   ===================================================================== */

body { background: var(--bg); font-feature-settings: "tnum", "calt"; text-rendering: optimizeLegibility; }
::selection { background: rgba(14, 159, 110, 0.18); }

/* ---------- surfaces: app background > working canvas ---------- */
.main-col { margin: 8px 8px 8px 0; background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius); min-height: calc(100vh - 16px); overflow: clip; }
main { max-width: 1200px; padding: var(--s6) 40px 72px; }
@media (max-width: 860px) {
  .main-col { margin: 0; border: none; border-radius: 0; min-height: 0; }
  main { padding: var(--s4); }
}

/* a card is an inset surface only when the content is genuinely a unit (a form, a notice); charts and tables live on the canvas */
.card { background: var(--surface-2); border: none; border-radius: var(--radius-md); padding: var(--s4) var(--s5); }
.card.flush { background: none; border-radius: 0; padding: 0; margin-left: -10px; margin-right: -10px; }
.card:has(> .chart-box), .card:has(> .chart-tools) { background: none; padding: 0; }
.section { margin-top: var(--s7); }
h1 { font-size: 25px; font-weight: 600; letter-spacing: -0.022em; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.subtitle, .page-head .subtitle { color: var(--text-3); }
.note { color: var(--text-3); }
.section-head .note { color: var(--text-3); font-size: var(--fs-small); }
.page-head { margin-bottom: var(--s6); }

/* ---------- sidebar: product navigation ---------- */
.sidebar { background: var(--sidebar); padding: 18px 10px 14px; gap: 2px; }
.sidebar .brand { border-bottom: none; padding: 2px 8px var(--s5); margin-bottom: 0; }
.sidebar .brand .mark { width: 26px; height: 26px; flex-basis: 26px; border-radius: 7px; background: var(--ink); color: #f4f7f5; font-size: 11px; letter-spacing: 0.02em; }
.sidebar .brand .name { color: var(--ink); font-weight: 600; letter-spacing: -0.01em; }
.sidebar .brand .sub { color: var(--text-3); }
.sidebar .jump-btn { gap: 8px; justify-content: flex-start; height: 32px; padding: 0 10px; margin: 0 0 var(--s4); background: var(--canvas); color: var(--text-3); border: 1px solid var(--line); border-radius: 9px; font-size: 13px; transition: border-color var(--t-fast), color var(--t-fast); }
.sidebar .jump-btn:hover { background: var(--canvas); border-color: var(--line-strong); color: var(--ink); }
.sidebar .jump-btn .ico { width: 15px; height: 15px; flex: 0 0 15px; }
.sidebar .jump-btn kbd { margin-left: auto; background: var(--surface-2); color: var(--text-3); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; font-size: 11px; }
.sidebar a.nav-link { color: var(--sidebar-ink); gap: 10px; padding: 0 10px; height: 32px; border-radius: 8px; font-size: 13.5px; font-weight: 450; transition: background-color var(--t-fast), color var(--t-fast); }
.sidebar a.nav-link .ico { width: 16px; height: 16px; flex: 0 0 16px; color: var(--text-3); transition: color var(--t-fast); }
.sidebar a.nav-link:hover { background: rgba(20, 32, 28, 0.045); color: var(--ink); }
.sidebar a.nav-link:hover .ico { color: var(--ink-soft); }
.sidebar a.nav-link.active { background: rgba(20, 32, 28, 0.065); color: var(--ink); font-weight: 500; }
.sidebar a.nav-link.active .ico { color: var(--brand-ink); }
.sidebar a.nav-link.recent { height: 28px; padding-left: 36px; color: var(--text-3); font-size: 12.5px; }
.sidebar a.nav-link.recent:hover { color: var(--ink); }
.sidebar a.nav-link.recent.active { background: none; color: var(--ink); font-weight: 500; }
.sidebar .section-label { color: var(--text-3); }
.sidebar .add-btn { display: flex; align-items: center; gap: 8px; height: 32px; border: none; background: none; color: var(--text-3); padding: 0 10px; font-size: 13px; font-weight: 450; border-radius: 8px; transition: background-color var(--t-fast), color var(--t-fast); }
.sidebar .add-btn:hover { background: rgba(20, 32, 28, 0.045); color: var(--ink); }
.sidebar .add-btn .ico { width: 15px; height: 15px; }
.signout { color: var(--text-3); }
@media (max-width: 860px) {
  .sidebar { background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--s3); height: auto; }
  .sidebar a.nav-link .ico, .sidebar .jump-btn { display: none; }
  .sidebar a.nav-link { height: 30px; }
}

/* ---------- page chrome: one sticky toolbar, quiet controls ---------- */
.context-bar { position: sticky; top: 0; z-index: 25; margin: calc(var(--s6) * -1) -40px var(--s6); padding: 9px 40px; gap: 2px; background: var(--float); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); border-bottom: 1px solid var(--line); }
@media (max-width: 860px) { .context-bar { margin: calc(var(--s4) * -1) calc(var(--s4) * -1) var(--s5); padding: 8px var(--s4); } }
.context-trigger { background: none; border: 1px solid transparent; height: 30px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text-1); transition: background-color var(--t-fast), border-color var(--t-fast); }
.context-trigger:hover { background: rgba(20, 32, 28, 0.05); border-color: transparent; }
.context-trigger[aria-expanded="true"], .context-item:focus-within .context-trigger { background: rgba(20, 32, 28, 0.05); }
.context-trigger .ctx-key { color: var(--text-3); }
.context-trigger .caret { color: var(--text-3); font-size: 9px; }
.context-pop { background: var(--float); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); border: none; border-radius: 12px; box-shadow: var(--shadow-float); padding: 5px; animation: pop-in 140ms var(--ease); transform-origin: top left; }
.context-option { border-radius: 7px; padding: 7px 10px; transition: background-color var(--t-fast); }
.context-option:hover { background: rgba(20, 32, 28, 0.06); }
.context-option.sel { background: var(--brand-dim); color: var(--brand-ink); font-weight: 500; }
.ctx-reset, .context-bar a.note { color: var(--text-3); }
.ctx-reset { margin-left: var(--s2); }
.ctx-reset:hover { color: var(--ink); }

/* segmented controls: a quiet inset track, the selected segment lifts */
.seg { border: none; background: var(--surface-2); border-radius: 9px; padding: 2px; gap: 1px; overflow: visible; }
.seg button, .seg a { height: 26px; border-radius: 7px; color: var(--text-2); padding: 0 11px; font-weight: 500; transition: background-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
.seg button:hover, .seg a:hover { background: rgba(20, 32, 28, 0.045); }
.seg button.on, .seg a.on { background: var(--canvas); color: var(--ink); font-weight: 500; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(20, 32, 28, 0.06); }
.seg button.off { color: var(--text-3); }

/* tabs: text and a hairline; the active tab is marked, not filled */
.tabs { border-bottom: 1px solid var(--line); gap: 2px; margin-bottom: var(--s6); }
.tab { padding: 8px 12px; color: var(--text-2); font-weight: 500; background: none; border-radius: 0; border-bottom: 2px solid transparent; transition: color var(--t-fast), border-color var(--t-med); }
.tab:hover { color: var(--ink); background: none; }
.tab.active { color: var(--ink); background: none; border-bottom-color: var(--ink); font-weight: 500; }
.tab-secondary { color: var(--text-3); }
.tab-secondary.active { background: none; color: var(--ink); border-bottom-color: var(--line-strong); }
.tabs-divider { background: var(--line); }

/* property workspace header: opening a record */
.ws-head { margin-bottom: var(--s5); }
.ws-title { font-size: clamp(22px, 2.2vw, 26px); letter-spacing: -0.024em; font-weight: 600; }
.ws-meta { color: var(--text-3); }
.ws-meta .ws-flag { background: none; padding: 0; color: var(--warn-ink); }

/* ---------- KPIs: an open row, not a grid of boxes ---------- */
.tiles { background: none; border: none; border-radius: 0; overflow: visible; gap: 0; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.tile { background: none; padding: 2px var(--s5) 2px var(--s5); border-left: 1px solid var(--line); border-radius: 0; }
.tile:first-child { padding-left: 0; border-left: none; }
.tile .label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 450; color: var(--text-2); min-height: 0; line-height: 18px; }
.tile .value { font-size: 32px; font-weight: 500; letter-spacing: -0.035em; line-height: 1.15; margin-top: 6px; }
.tile .delta, .delta { margin-top: 4px; color: var(--text-3); }
.tile-spark { height: 26px; margin-top: var(--s3); opacity: 0.7; }
.tile.link, a.tile.link { border-radius: 0; transition: background-color var(--t-fast); }
.tile.link:hover, a.tile.link:hover { background: none; }
.tile.link .chev { opacity: 0; transition: opacity var(--t-fast), transform var(--t-fast); right: var(--s3); }
.tile.link:hover .chev, .tile.link:focus-visible .chev { opacity: 1; transform: translateX(2px); }
.tile.link:hover .value { color: var(--brand-ink); }
/* the one metric that answers "what did the business make?" */
.tile-hero .label { color: var(--ink); font-weight: 500; }
.tile-hero .value { font-size: 42px; font-weight: 600; letter-spacing: -0.04em; margin-top: 4px; }
.tiles.tiles:has(> .tile:nth-child(5):last-child) { grid-template-columns: 1.15fr 1.55fr 1fr 1fr 1fr; }
.tiles.tiles:has(> .tile:nth-child(5):last-child) > .tile:nth-child(5) { grid-column: auto; }
.tiles:has(> .tile-hero) > .tile { min-width: 0; }
@media (max-width: 860px) {
  .tiles.tiles:has(> .tile:nth-child(5):last-child), .tiles.tiles:has(> .tile-hero) { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s5); }
  .tiles:has(> .tile:nth-child(5):last-child) > .tile:nth-child(5) { grid-column: auto; }
  .tile:nth-child(odd) { padding-left: 0; border-left: none; }
  .tile-hero { grid-column: 1 / -1; padding-left: 0; border-left: none; padding-bottom: var(--s4); border-bottom: 1px solid var(--line); order: -1; }
}
@media (max-width: 560px) { .tile .value { font-size: 28px; } .tile-hero .value { font-size: 36px; } }
.cost-line { margin: var(--s5) 0 var(--s2); color: var(--text-3); gap: 2px var(--s5); }
.cost-line a { color: var(--text-2); }
.cost-line a strong { color: var(--ink); font-weight: 500; }
.cost-note { color: var(--text-3); }
.net-line { margin: 0 0 var(--s1); }
.net-line > strong { font-weight: 600; }
.net-line .note { color: var(--icon); }
.nodata-line { color: var(--text-3); }

/* small multiples: tonal on hover, no frame */
.spark-card { border: none; background: none; border-radius: var(--radius-md); padding: var(--s3); margin: calc(var(--s3) * -1) 0; transition: background-color var(--t-fast); }
.spark-card:hover { background: var(--surface-2); border-color: transparent; }
.spark-name { color: var(--text-3); }
.spark-value { font-weight: 500; letter-spacing: -0.02em; }

/* ---------- tables: they disappear until you need them ---------- */
table { font-size: 13.5px; }
th, td { border-bottom: 1px solid var(--line-faint); padding: 8px var(--s3); }
th { background: var(--canvas); text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; color: var(--text-3); border-bottom: 1px solid var(--line); height: 34px; }
td:first-child, th:first-child { padding-left: 10px; }
td:last-child, th:last-child { padding-right: 10px; }
tbody tr { transition: background-color var(--t-fast); }
tbody tr:hover { background: rgba(20, 32, 28, 0.028); }
tbody tr:hover td:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
tbody tr:hover td:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
tfoot td { background: none; border-top: 1px solid var(--line); border-bottom: none; }
tfoot tr:first-child td { border-top-color: var(--line-strong); }
table a { font-weight: 500; }
table a:hover { text-decoration: none; color: var(--brand-ink); }
.sort { color: inherit; text-decoration: none; }
a.sort.on { color: var(--ink); }
.zero { color: var(--text-3); }
td.num, th.num { letter-spacing: -0.005em; }
.card .card.flush, .card.flush table { background: none; }
.card:not(.flush) table th { background: var(--surface-2); }
table.cmp tr.grp td { background: none; border-top: 1px solid var(--line); font-weight: 500; padding-top: 14px; }
table.cmp tbody:first-of-type tr.grp td { border-top: none; }
table.cmp td.metric { color: var(--text-2); }
table.chk th { background: none; }
tr.clickable:focus-visible td, tr.focus-row td { background: var(--brand-dim); box-shadow: none; }

/* ---------- controls ---------- */
button, .btn { border-radius: var(--radius-sm); height: 32px; font-weight: 500; transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
button:active { transform: none; }
button.secondary, .btn.secondary { background: var(--canvas); border-color: var(--line-strong); color: var(--text-1); }
button.secondary:hover, .btn.secondary:hover { background: var(--surface-2); }
button.quiet, .btn.quiet { color: var(--text-2); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { background: var(--surface-2); border: 1px solid transparent; border-radius: var(--radius-sm); transition: background-color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast); }
input:not([type=checkbox]):not([type=radio]):not([type=file]):hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { background: var(--canvas); border-color: rgba(14, 159, 110, 0.55); box-shadow: 0 0 0 3px var(--brand-dim); }
.card input:not([type=checkbox]):not([type=radio]):not([type=file]), .card select, .card textarea, dialog input:not([type=checkbox]):not([type=radio]), dialog select { background: var(--canvas); border-color: var(--line); }
.filter-bar { gap: var(--s2); }
.clear-link { color: var(--text-3); }
a { transition: color var(--t-fast); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { box-shadow: 0 0 0 3px var(--brand-dim); }
.tile.link:focus-visible, tr.clickable:focus-visible { box-shadow: none; outline: 2px solid rgba(14, 159, 110, 0.55); outline-offset: 2px; }
dialog { border: none; border-radius: var(--radius); box-shadow: var(--shadow-float); background: var(--canvas); animation: pop-in 180ms var(--ease); }
dialog::backdrop { background: rgba(20, 24, 22, 0.28); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.flash { border-radius: var(--radius-md); border-left-width: 0; animation: fade-in 200ms var(--ease); }

/* ---------- status: a glyph and words, not a badge ---------- */
.pill, .status-pill { background: none; padding: 0; border-radius: 0; gap: 6px; color: var(--text-2); font-weight: 500; }
.pill::before, .status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--icon); flex: 0 0 6px; }
.pill.pos, .status-pill.confirmed { background: none; color: var(--pos); }
.pill.pos::before, .status-pill.confirmed::before { background: var(--pos); }
.pill.warn { background: none; color: var(--warn-ink); }
.pill.warn::before { background: var(--warn); }
.pill.neg { background: none; color: var(--neg); }
.pill.neg::before { background: var(--neg); }
.pill.brand { background: none; color: var(--brand-ink); }
.pill.brand::before { background: var(--brand); }
.pill.quiet::before, .pill.nodot::before { display: none; }
.pill.review-link, button.pill { background: var(--warn-dim); color: var(--warn-ink); padding: 1px 9px; border-radius: 999px; }
.pill.review-link::before, button.pill::before { display: none; }
.rc { gap: 5px; font-weight: 500; }
.rc-pass { color: var(--pos); }
.rc-review { background: none; padding: 0; border-radius: 0; color: var(--warn-ink); }
.rc-review::before { content: '●\00a0'; font-size: 9px; color: var(--warn); }
.rc-nc { color: var(--text-3); text-decoration: none; }
.rc-nc::before { content: '○\00a0'; font-size: 10px; }
.st { color: var(--text-2); }
.recon { background: none; border: none; border-top: 1px solid var(--line); border-radius: 0; margin-bottom: var(--s5); padding-top: var(--s3); }
.recon.is-review { border-left: none; box-shadow: inset 2px 0 0 var(--warn); padding-left: var(--s3); }
.recon:target { box-shadow: 0 0 0 3px var(--brand-dim); border-color: var(--line); }
.empty .empty-title { letter-spacing: -0.01em; }
.empty .empty-body { color: var(--text-3); }

/* ---------- overlays: floating, translucent, the only shadows ---------- */
.drawer-backdrop { background: rgba(20, 24, 22, 0.2); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); transition: opacity var(--t-med); }
.drawer { width: 420px; padding: 0 var(--s5) var(--s6); background: var(--canvas); border-left: none; box-shadow: var(--shadow-float); transition: transform var(--t-med); }
.drawer-head { position: sticky; top: 0; z-index: 3; margin: 0 calc(var(--s5) * -1); padding: var(--s5) var(--s5) var(--s3); background: var(--float); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--line); align-items: center; }
.drawer-amount { font-size: 30px; font-weight: 600; letter-spacing: -0.035em; }
button.drawer-close { width: 28px; height: 28px; padding: 0; border-radius: 8px; color: var(--text-3); display: inline-flex; align-items: center; justify-content: center; transition: background-color var(--t-fast), color var(--t-fast); }
button.drawer-close:hover { background: rgba(20, 32, 28, 0.06); color: var(--ink); }
.drawer-section { border-top: 1px solid var(--line-faint); margin-top: var(--s5); padding-top: var(--s4); }
.drawer-section.src { border-top: 1px solid var(--line); background: none; }
.drawer-field span { color: var(--text-3); }
.src-state { font-size: 11.5px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s2); }
.palette { background: rgba(20, 24, 22, 0.3); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade-in 140ms var(--ease); padding-top: 14vh; }
.palette-box { width: min(600px, 94vw); background: var(--float); -webkit-backdrop-filter: blur(28px) saturate(1.5); backdrop-filter: blur(28px) saturate(1.5); border: none; border-radius: 16px; box-shadow: var(--shadow-float), 0 30px 80px -20px rgba(20, 32, 28, 0.35); animation: pop-in 160ms var(--ease); transform-origin: top center; }
.palette-top { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s4); border-bottom: 1px solid var(--line); }
.palette-top .ico { width: 17px; height: 17px; color: var(--text-3); flex: 0 0 17px; }
.palette-box input { height: 54px !important; border-bottom: none !important; background: none !important; font-size: 16px !important; padding: 0 !important; }
#palette-list { max-height: min(52vh, 420px); overflow-y: auto; padding: var(--s2); }
.palette-group { padding: var(--s3) var(--s3) 4px; font-size: 11.5px; font-weight: 500; letter-spacing: 0.03em; color: var(--text-3); }
.palette-item { justify-content: flex-start; align-items: center; gap: var(--s3); padding: 0 var(--s3); height: 38px; border-radius: 9px; font-size: 14px; transition: background-color var(--t-fast); }
.palette-item .ico { width: 16px; height: 16px; flex: 0 0 16px; color: var(--text-3); }
.palette-item .pi-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item .pi-hint { color: var(--text-3); font-size: 12px; }
.palette-item.sel, .palette-item:hover { background: rgba(20, 32, 28, 0.065); }
.palette-item.sel .ico { color: var(--brand-ink); }
.palette-foot { display: flex; gap: var(--s4); padding: 9px var(--s4); border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.palette-foot kbd { font-family: inherit; font-size: 11px; background: rgba(20, 32, 28, 0.06); border-radius: 4px; padding: 1px 5px; margin-right: 4px; color: var(--text-2); }
.info-pop { background: var(--float); color: var(--ink); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); border-radius: 10px; box-shadow: var(--shadow-float); animation: pop-in 120ms var(--ease); }
.info-dot { color: var(--icon); transition: color var(--t-fast); }

/* ---------- motion: 120-200ms, one easing, never on figures ---------- */
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* the Overview chart sits on the canvas, with a quiet legend */
.chart-legend { color: var(--text-3); }
.chart-tools { margin-bottom: var(--s4); }
.cost-line { margin-top: var(--s6); }
.net-line { margin: var(--s4) 0 var(--s1); }
.cost-note { margin: 0 0 var(--s1); font-size: 12px; }
.tiles + .cost-line { margin-top: var(--s6); }
.card:has(> .empty:only-child) { background: none; padding: 0; }
.card:has(> .empty:only-child) .empty { padding-left: 0; }
@media (max-width: 860px) {
  .tiles .tile { border-left: none; padding-left: 0; padding-right: 0; border-top: 1px solid var(--line-faint); padding-top: var(--s4); }
  .tiles .tile.tile-hero { border-top: none; padding-top: 0; }
  .tiles { column-gap: var(--s6); }
}
@media (min-width: 861px) and (max-width: 1180px) {
  .tile { padding-left: var(--s4); padding-right: var(--s3); }
  .tile:first-child { padding-left: 0; }
  .tile .value { font-size: 26px; }
  .tile-hero .value { font-size: 34px; }
  .tile .label { font-size: 12.5px; }
  .tiles.tiles:has(> .tile:nth-child(5):last-child) { grid-template-columns: 1.1fr 1.4fr 1fr 1fr 1fr; }
  main { padding-left: var(--s5); padding-right: var(--s5); }
  .context-bar { margin-left: calc(var(--s5) * -1); margin-right: calc(var(--s5) * -1); padding-left: var(--s5); padding-right: var(--s5); }
}

/* ---------- collapsible sidebar (desktop only; the phone top-nav is untouched) ---------- */
.sb-toggle { display: none; }
@media (min-width: 861px) {
  .sidebar { transition: width var(--t-med), flex-basis var(--t-med), padding var(--t-med); }
  .sidebar .brand { position: relative; }
  .sb-toggle { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-left: auto; padding: 0; border: 1px solid var(--line); background: var(--canvas); color: var(--text-3); border-radius: 50%; cursor: pointer; transition: background-color var(--t-fast), color var(--t-fast), transform var(--t-med), border-color var(--t-fast); }
  .sb-toggle:hover { color: var(--ink); border-color: var(--line-strong); background: var(--canvas); }
  .sb-toggle svg { width: 14px; height: 14px; }
  html[data-sidebar="collapsed"] .sidebar { width: 64px; flex-basis: 64px; padding-left: 8px; padding-right: 8px; }
  html[data-sidebar="collapsed"] .sidebar .brand { flex-direction: column; align-items: center; gap: 10px; padding: 2px 0 var(--s4); }
  html[data-sidebar="collapsed"] .sidebar .brand-text { display: none; }
  html[data-sidebar="collapsed"] .sb-toggle { margin: 0; transform: rotate(180deg); }
  /* the label stays in the accessibility tree (screen readers, tooltips) but leaves the layout */
  html[data-sidebar="collapsed"] .sidebar .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  html[data-sidebar="collapsed"] .sidebar a.nav-link, html[data-sidebar="collapsed"] .sidebar .add-btn, html[data-sidebar="collapsed"] .sidebar .jump-btn { justify-content: center; padding: 0; gap: 0; }
  html[data-sidebar="collapsed"] .sidebar .jump-btn kbd, html[data-sidebar="collapsed"] .sidebar a.nav-link.recent, html[data-sidebar="collapsed"] .sidebar .section-label, html[data-sidebar="collapsed"] .sidebar .signout { display: none; }
  html[data-sidebar="collapsed"] .sidebar .jump-btn { width: 100%; }
}
.sb-tip { position: fixed; z-index: 130; padding: 5px 9px; border-radius: 8px; background: var(--ink); color: var(--canvas); font-size: 12.5px; font-weight: 500; line-height: 1.3; pointer-events: none; white-space: nowrap; animation: fade-in 120ms var(--ease); }
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* ======================================================================
   Overview: one control band, a dark analytical hero with the money flow,
   an open KPI strip that selects the one chart, costs, and the property list.
   ====================================================================== */
.ctx-stamp { margin-left: auto; }
.context-bar.has-title { align-items: center; }
.context-bar .bar-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin: 0 var(--s3) 0 0; line-height: 1; padding-right: var(--s3); border-right: 1px solid var(--line); height: 18px; display: flex; align-items: center; }
.context-bar .bar-seg { margin-right: auto; }
.context-bar.has-title .ctx-stamp { margin-left: var(--s2); }
@media (max-width: 700px) { .context-bar .bar-title { border-right: 0; padding-right: 0; margin-right: auto; } .context-bar .bar-seg { margin-right: 0; order: 5; flex-basis: 100%; } .context-bar .bar-seg a { flex: 1; text-align: center; } .context-bar.has-title .ctx-stamp { display: none; } }

/* hero panel: deep green-charcoal, restrained tones, no glow */
.ov-wrap { container-type: inline-size; container-name: ov; margin: 0 0 var(--s7); }
.ov-panel { --pn-bg: #14201c; --pn-ink: #eef2ef; --pn-mute: #93a39b; --pn-line: rgba(238, 242, 239, 0.12); --pn-rev: #4f9a7d; --pn-cost: #8b9a93; --pn-neg: #d58f86;
  display: grid; grid-template-columns: minmax(240px, 280px) minmax(0, 1fr); gap: var(--s5); align-items: start;
  background: var(--pn-bg); color: var(--pn-ink); border-radius: 16px; padding: 28px 32px 22px; }
.ov-hero { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ov-eyebrow { font-size: 11.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--pn-mute); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.ov-eyebrow .info-dot, .ov-panel .info-dot { color: var(--pn-mute); }
.ov-net { font-size: 52px; line-height: 1.05; letter-spacing: -0.045em; font-weight: 500; font-variant-numeric: tabular-nums; }
.ov-net.is-loss { color: #f0ddd9; }
.ov-panel .delta { color: var(--pn-mute); margin: 0; font-size: 13px; }
.ov-panel .delta .arrow { margin-right: 3px; }
.ov-panel .delta.down, .ov-panel .delta.up { color: var(--pn-mute); }
.ov-link { background: none; border: 0; padding: 0; margin-top: 10px; color: var(--pn-mute); font-size: 12.5px; text-decoration: underline; text-decoration-color: rgba(238, 242, 239, 0.25); text-underline-offset: 3px; cursor: pointer; height: auto; transition: color var(--t-fast); }
.ov-link:hover { color: var(--pn-ink); background: none; }
.ov-link + .ov-link { margin-top: 4px; }
.ov-panel a:focus-visible, .ov-panel button:focus-visible, .ov-panel .info-dot:focus-visible { outline: 2px solid #9fd6c0; outline-offset: 3px; border-radius: 4px; }
.ov-how { margin-top: 8px; font-size: 13px; color: var(--pn-mute); width: 100%; }
.ov-how p { margin: 0 0 8px; }
.ov-how dl { margin: 0; border-top: 1px solid var(--pn-line); }
.ov-how dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--pn-line); }
.ov-how dt, .ov-how dd { margin: 0; }
.ov-how dd { font-variant-numeric: tabular-nums; color: var(--pn-ink); }
.ov-how a { color: var(--pn-ink); text-decoration: none; border-bottom: 1px solid rgba(238, 242, 239, 0.25); }
.ov-how .total dt, .ov-how .total dd { color: var(--pn-ink); font-weight: 600; }
.ov-fine { font-size: 12px; opacity: 0.8; }
.ov-nodata { margin: 10px 0 0; font-size: 13px; color: var(--pn-mute); }
.ov-nodata a { color: var(--pn-ink); }

/* money flow */
.ov-flow { min-width: 0; }
.flow-svg { width: 100%; height: auto; display: block; overflow: visible; }
.flow-rails { display: none; }
.rb { cursor: pointer; }
.rb-rev { fill: var(--pn-rev); opacity: 0.38; }
.rb-cost { fill: var(--pn-cost); opacity: 0.34; }
.rb-net { fill: var(--pn-rev); opacity: 0.55; }
.fn { cursor: pointer; outline: none; }
.fn-hit { fill: transparent; }
.fn-bar { fill: var(--pn-cost); }
.fn-ops_rev .fn-bar, .fn-fees .fn-bar, .fn-revenue .fn-bar, .fn-net .fn-bar { fill: var(--pn-rev); }
.fn-fees .fn-bar { fill: #7fb9a1; }
.fn-shortfall .fn-bar { stroke: var(--pn-neg); stroke-width: 1; }
.hatch-bg { fill: transparent; } .hatch-line { stroke: var(--pn-neg); stroke-width: 1.4; opacity: 0.8; }
.ft-name { font-size: 14px; fill: var(--pn-mute); }
.ft-val { font-size: 15px; fill: var(--pn-ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.ft-share { fill: var(--pn-mute); font-weight: 400; }
.fn:focus-visible .fn-bar, .fn:focus-visible .fn-hit { stroke: #9fd6c0; stroke-width: 2; }
/* a quiet emphasis on the selected path; everything else stays exactly as it is */
.rb-rev.on { opacity: 0.55; } .rb-cost.on { opacity: 0.5; } .rb-net.on { opacity: 0.72; }
.fn.on .fn-bar { filter: brightness(1.18); }
.flow-readout { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--pn-line); min-height: 78px; font-size: 13px; }
.ro-title { color: var(--pn-mute); } .ro-value { font-weight: 600; margin-left: 6px; font-variant-numeric: tabular-nums; }
.ro-text { color: var(--pn-mute); margin-top: 2px; max-width: 62ch; }
.ro-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
.ro-links a { color: var(--pn-ink); text-decoration: none; border-bottom: 1px solid rgba(238, 242, 239, 0.28); }
.ro-links a:hover { border-bottom-color: var(--pn-ink); }

/* narrow container: stack the hero over the flow; very narrow: the flow becomes two proportional rails */
@container ov (max-width: 880px) {
  .ov-panel { grid-template-columns: 1fr; gap: var(--s5); }
  .ov-net { font-size: 48px; }
}
@container ov (max-width: 600px) {
  .flow-svg { display: none; }
  .flow-rails { display: block; }
  .ov-net { font-size: 44px; }
}
.rail-title { font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pn-mute); margin: 4px 0 6px; }
.rail { display: flex; gap: 3px; height: 14px; }
.rail .seg-r { flex: 0 1 auto; min-width: 3px; height: 14px; border: 0; padding: 0; border-radius: 2px; background: var(--pn-cost); cursor: pointer; }
.rail .seg-r.fn-ops_rev, .rail .seg-r.fn-net { background: var(--pn-rev); }
.rail .seg-r.fn-fees { background: #7fb9a1; }
.rail .seg-r.fn-business { background: #6c7a74; }
.rail .seg-r.fn-shortfall { background: transparent; border: 1px dashed var(--pn-neg); }
.rail-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--pn-mute); margin: 8px 0 14px; }
.rail-legend .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; background: var(--pn-cost); }
.sw-ops_rev, .sw-net { background: var(--pn-rev) !important; } .sw-fees { background: #7fb9a1 !important; } .sw-business { background: #6c7a74 !important; }
.sw-shortfall { background: transparent !important; border: 1px dashed var(--pn-neg); }
@media (max-width: 700px) { .ov-panel { padding: 22px 18px 16px; border-radius: 14px; } .ov-wrap { margin-bottom: var(--s5); } }

/* open KPI strip: no boxes, thin hairlines; each figure selects the chart */
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0 0 var(--s5); }
.kpi { all: unset; box-sizing: border-box; cursor: pointer; padding: 6px var(--s5); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; position: relative; transition: background-color var(--t-fast); border-radius: 0; }
.kpi:first-child { padding-left: 0; border-left: 0; }
.kpi:hover .kpi-value { color: var(--brand-ink); }
.kpi:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 4px; }
.kpi-label { font-size: 13px; color: var(--text-2); display: block; line-height: 18px; }
.kpi-label .info-dot { margin-left: 5px; }
.kpi-value { font-size: 30px; line-height: 1.15; letter-spacing: -0.035em; font-weight: 500; font-variant-numeric: tabular-nums; margin-top: 2px; }
.kpi-delta .delta { margin: 0; font-size: 12.5px; }
.kpi::after { content: ''; position: absolute; left: var(--s5); right: var(--s5); bottom: -8px; height: 2px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform var(--t-med) var(--ease); }
.kpi:first-child::after { left: 0; }
.kpi.is-on::after { transform: scaleX(1); }
.kpi.is-on .kpi-label { color: var(--ink); font-weight: 500; }
@media (max-width: 700px) {
  .kpi-strip { grid-template-columns: 1fr 1fr; row-gap: var(--s4); }
  .kpi:nth-child(odd) { padding-left: 0; border-left: 0; }
  .kpi-value { font-size: 26px; }
  .kpi::after { bottom: -6px; }
}

/* the one chart */
.ov-chart { margin: var(--s6) 0 var(--s7); }
.chart-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.chart-head h2 { display: inline; margin: 0; font-size: 15px; }
.chart-head .chart-tools { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.chart-key { font-size: 12.5px; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.chart-key i { display: inline-block; }
.key-now { width: 10px; height: 10px; border-radius: 2px; background: var(--brand); }
.key-cmp { width: 16px; height: 0; border-top: 1.5px dashed rgba(20, 32, 28, 0.6); margin-left: 8px; }
.ov-open { font-size: 12.5px; color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.ov-open:hover { color: var(--ink); border-bottom-color: var(--ink); }
@media (max-width: 700px) { .chart-box { height: 230px !important; } }

/* costs: two figures and one thin proportional rail */
.ov-costs { margin: 0 0 var(--s7); }
.cost-items { display: flex; gap: var(--s7); flex-wrap: wrap; }
.cost-item { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; padding: 2px 0; border-radius: 4px; }
.cost-item:hover .ci-value { color: var(--brand-ink); }
.cost-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.ci-label { font-size: 13px; color: var(--text-2); }
.ci-value { font-size: 24px; letter-spacing: -0.03em; font-weight: 500; font-variant-numeric: tabular-nums; }
.cost-rail { display: flex; gap: 3px; height: 4px; margin: 10px 0 8px; max-width: 520px; }
.cost-rail i { display: block; height: 4px; border-radius: 2px; background: rgba(20, 32, 28, 0.45); flex: 0 0 auto; min-width: 2px; }
.cost-rail i.b { background: rgba(20, 32, 28, 0.2); }
.cost-managed { margin: 0; font-size: 12.5px; }
.cost-managed a { color: var(--text-2); text-decoration: none; }
.cost-managed a:hover { color: var(--ink); }

/* properties: an open table on the canvas */
.ov-props { margin: 0 0 var(--s7); }
.props-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.props-head h2 { margin: 0; font-size: 15px; }
.props-head .seg .count { color: var(--text-3); margin-left: 4px; font-variant-numeric: tabular-nums; }
.ov-table { width: 100%; border-collapse: collapse; }
.ov-table th { font-size: 12.5px; font-weight: 450; color: var(--text-3); text-transform: none; letter-spacing: 0; text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line-strong); background: none; }
.ov-table td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ov-table th.num, .ov-table td.num { text-align: right; padding-right: 20px; font-variant-numeric: tabular-nums; }
.ov-table tbody tr:hover { background: rgba(20, 32, 28, 0.02); }
.ov-table tr[hidden] { display: none; }
.ov-table .sub { color: var(--text-3); font-size: 12px; }
.ov-table .muted { color: var(--text-3); }
.ov-table td.status { white-space: nowrap; }
.ov-table td.status .pill + .pill { margin-left: 12px; }
.ov-table .neg-text { color: var(--neg); }
@media (max-width: 700px) {
  .ov-table thead { display: none; }
  .ov-table, .ov-table tbody { display: block; }
  .ov-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .ov-table td { border: 0; padding: 0; font-size: 13px; }
  .ov-table td:nth-child(1) { grid-column: 1; font-weight: 500; }
  .ov-table td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: 12px; }
  .ov-table td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; padding: 0; }
  .ov-table td:nth-child(4), .ov-table td:nth-child(5), .ov-table td:nth-child(6) { display: none; }
  .ov-table td.status { grid-column: 2; grid-row: 2; text-align: right; }
  .ov-table td[colspan] { display: block; grid-column: 2; grid-row: 1; text-align: right; }
}
@media (prefers-reduced-motion: reduce) { .kpi::after { transition: none; } }
@media (max-width: 1360px) { .context-bar.has-title .ctx-stamp { display: none; } }

/* chart: the costs chip and its key */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: none; color: var(--text-2); font-size: 12.5px; font-weight: 500; cursor: pointer; }
.chip[hidden] { display: none; }
.chip .chip-dot { width: 8px; height: 8px; border-radius: 2px; background: rgba(194, 65, 58, 0.62); }
.chip[aria-pressed="false"] { color: var(--text-3); } .chip[aria-pressed="false"] .chip-dot { background: transparent; box-shadow: inset 0 0 0 1px var(--icon); }
.chip:hover { background: rgba(20, 32, 28, 0.04); }
.chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.key-cost { width: 10px; height: 10px; border-radius: 2px; background: rgba(194, 65, 58, 0.62); margin-left: 8px; }

/* ======================================================================
   Properties: an open summary, an attention switch, one list on the canvas, and a quiet inspector.
   ====================================================================== */
.context-bar .bar-sub { color: var(--text-3); font-size: 13px; margin-right: auto; white-space: nowrap; }
.context-bar.has-title .bar-sub ~ .ctx-stamp { margin-left: var(--s2); }
@media (max-width: 860px) { .context-bar .bar-sub { display: none; } }

.pr-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 var(--s6); }
.ps { display: flex; flex-direction: column; gap: 2px; padding: 2px var(--s5); border-left: 1px solid var(--line); min-width: 0; }
.ps:first-child { padding-left: 0; border-left: 0; }
.ps-label { font-size: 13px; color: var(--text-2); }
.ps-value { font-size: 28px; line-height: 1.15; letter-spacing: -0.035em; font-weight: 500; font-variant-numeric: tabular-nums; margin-top: 2px; }
.ps-sub { font-size: 12.5px; color: var(--text-3); }
@media (max-width: 900px) { .pr-strip { grid-template-columns: 1fr 1fr; row-gap: var(--s4); } .ps:nth-child(odd) { padding-left: 0; border-left: 0; } .ps-value { font-size: 24px; } }

.pr-wrap { container-type: inline-size; container-name: pr; }
.pr-bar { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin: 0 0 var(--s3); }
.pr-bar .seg .count, .pr-life .count { color: var(--text-3); margin-left: 4px; font-variant-numeric: tabular-nums; }
.pr-search { margin-left: auto; }
.pr-search input { height: 30px; width: 180px; border: 1px solid transparent; background: var(--surface-2); border-radius: 8px; padding: 0 10px; font-size: 13px; }
.pr-search input:focus { background: var(--canvas); border-color: var(--line-strong); outline: none; box-shadow: 0 0 0 2px var(--brand-dim); }
.pr-menu { position: relative; }
.pr-menu > summary { list-style: none; cursor: pointer; height: 30px; display: inline-flex; align-items: center; gap: 4px; padding: 0 9px; border-radius: 8px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.pr-menu > summary::-webkit-details-marker { display: none; }
.pr-menu > summary:hover, .pr-menu[open] > summary { background: rgba(20, 32, 28, 0.05); color: var(--ink); }
.pr-menu > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.pr-menu .caret { color: var(--text-3); font-size: 9px; }
.pr-pop { position: absolute; z-index: 30; top: 34px; left: 0; min-width: 170px; background: var(--float); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); border-radius: 12px; box-shadow: var(--shadow-float); padding: 5px; display: flex; flex-direction: column; }
.pr-pop a { padding: 7px 10px; border-radius: 7px; font-size: 13px; color: var(--ink); text-decoration: none; }
.pr-pop a:hover { background: rgba(20, 32, 28, 0.06); }
.pr-pop a.sel { background: var(--brand-dim); color: var(--brand-ink); font-weight: 500; }
.pr-life { display: inline-flex; gap: 2px; font-size: 13px; }
.pr-life a { padding: 4px 9px; border-radius: 8px; color: var(--text-3); text-decoration: none; }
.pr-life a:hover { color: var(--ink); }
.pr-life a.on { color: var(--ink); font-weight: 500; background: rgba(20, 32, 28, 0.05); }
.pr-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 var(--s3); }
.chip-x { display: inline-flex; gap: 6px; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 12.5px; color: var(--text-2); text-decoration: none; }
.chip-x i { font-style: normal; color: var(--text-3); }
.chip-x:hover { background: rgba(20, 32, 28, 0.04); color: var(--ink); }
.chip-reset { font-size: 12.5px; color: var(--text-3); margin-left: 4px; }

.pr-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); align-items: start; }
.pr-table { width: 100%; border-collapse: collapse; }
.pr-table thead th { font-size: 12.5px; font-weight: 450; color: var(--text-3); text-transform: none; letter-spacing: 0; text-align: left; padding: 8px 14px 8px 0; border-bottom: 1px solid var(--line-strong); background: none; white-space: nowrap; }
.pr-table th.num, .pr-table td.num { text-align: right; padding-right: 22px; font-variant-numeric: tabular-nums; }
.pr-table tr.grp th { text-align: left; font-size: 11.5px; letter-spacing: 0.08em; color: var(--text-3); font-weight: 500; padding: 22px 0 6px; border-bottom: 1px solid var(--line); background: none; }
.pr-table tbody:first-of-type tr.grp th { padding-top: 14px; }
.pr-row td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13.5px; }
.pr-row { cursor: pointer; transition: background-color var(--t-fast); }
.pr-row:hover { background: rgba(20, 32, 28, 0.025); }
.pr-row.sel { background: rgba(14, 159, 110, 0.06); box-shadow: inset 2px 0 0 var(--brand); }
.pr-row[hidden], .pr-table tbody[hidden] { display: none; }
.c-name { min-width: 200px; }
.pr-name { color: var(--ink); text-decoration: none; font-weight: 500; display: block; }
.pr-name:hover { color: var(--brand-ink); }
.pr-name:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 3px; }
.pr-model { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.c-earned { white-space: nowrap; }
.pr-main { font-weight: 500; font-size: 14.5px; }
.pr-cap { color: var(--text-3); font-size: 12px; margin-left: 5px; }
.pr-second { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 1px; }
.pr-row .mlink { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.pr-row .mlink:hover { border-bottom-color: var(--line-strong); color: var(--brand-ink); }
.pr-row .c-none { text-align: right; }
.chg { font-size: 12.5px; color: var(--text-3); }
.chg.up { color: var(--pos); } .chg.down { color: var(--neg); }
.status { white-space: nowrap; font-size: 13px; }
.st { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; font-size: 12.5px; letter-spacing: 0.02em; text-decoration: none; }
.st i { font-style: normal; font-size: 11px; }
.st-pass { color: var(--pos); } .st-review { color: var(--warn-ink); } .st-nc { color: var(--text-3); } .st-nodata { color: var(--neg); }
a.st-review:hover { text-decoration: underline; }
.st-q { color: var(--text-3); font-size: 12.5px; }
.st-note { display: block; font-size: 12px; color: var(--warn-ink); margin-top: 1px; }
.pr-none, .pr-empty { color: var(--text-3); font-size: 13.5px; padding: var(--s5) 0; }

/* the inspector: an overlay by default, docked beside the list when there is room */
.pr-insp { position: fixed; z-index: 45; top: 0; right: 0; bottom: 0; width: min(400px, 100%); background: var(--canvas); box-shadow: var(--shadow-float); padding: var(--s5); overflow-y: auto; }
.pr-insp[hidden] { display: none; }
.insp-head { display: flex; justify-content: space-between; gap: var(--s3); align-items: flex-start; }
.insp-head h2 { margin: 0; font-size: 18px; letter-spacing: -0.02em; outline: none; }
.insp-addr { margin: 3px 0 0; font-size: 12.5px; color: var(--text-3); }
.insp-close { background: none; border: 0; font-size: 22px; line-height: 1; color: var(--text-3); height: auto; padding: 0 6px; cursor: pointer; }
.insp-close:hover { color: var(--ink); background: none; }
.insp-close:focus-visible { outline: 2px solid var(--brand); border-radius: 4px; }
.insp-sec { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); }
.insp-sec:first-of-type { border-top: 0; }
.insp-sec h3 { margin: 0 0 6px; font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.insp-line { display: flex; justify-content: space-between; gap: var(--s3); padding: 5px 0; font-size: 13.5px; }
.insp-line .k { color: var(--text-3); }
.insp-line .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); text-decoration: none; }
.insp-line.strong .v { font-weight: 600; font-size: 15px; }
.insp-line a.v:hover { color: var(--brand-ink); text-decoration: underline; }
.insp-note { margin: 0; font-size: 13px; color: var(--text-3); }
.insp-reason { margin: 0 0 6px; font-size: 13px; color: var(--ink); }
.insp-reason strong { color: var(--warn-ink); font-weight: 600; }
.insp-actions { display: flex; flex-direction: column; gap: 6px; }
.insp-actions a { color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.insp-actions a:hover { color: var(--brand-ink); }
@container pr (min-width: 900px) {
  .pr-wrap.insp-open .pr-layout { grid-template-columns: minmax(0, 1fr) 330px; }
  .pr-wrap.insp-open .pr-insp { position: sticky; top: 70px; z-index: 1; width: auto; max-height: calc(100vh - 92px); box-shadow: none; border-left: 1px solid var(--line); border-radius: 0; background: none; padding: 0 0 0 var(--s5); }
}
@container pr (max-width: 1180px) { .pr-wrap.insp-open .c-revpar, .pr-wrap.insp-open .c-trend { display: none; } }
@media (max-width: 700px) {
  .pr-insp { top: auto; width: 100%; max-height: 82vh; border-radius: 16px 16px 0 0; padding: var(--s4); }
  .pr-search { margin-left: 0; width: 100%; } .pr-search input { width: 100%; }
  .pr-table thead { display: none; }
  .pr-table, .pr-table tbody { display: block; }
  .pr-row { display: grid; grid-template-columns: auto auto 1fr auto; gap: 2px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
  .pr-row td { border: 0; padding: 0; }
  .pr-row .c-name { grid-column: 1 / 4; grid-row: 1; min-width: 0; }
  .pr-row .c-earned { grid-column: 4; grid-row: 1; text-align: right; }
  .pr-row .c-earned .pr-cap { display: none; }
  .pr-row .c-occ { grid-column: 1; grid-row: 2; font-size: 12.5px; text-align: left; padding: 0; }
  .pr-row .c-revpar { grid-column: 2; grid-row: 2; font-size: 12.5px; text-align: left; padding: 0; }
  .pr-row .c-trend { grid-column: 3; grid-row: 2; text-align: left; padding: 0; }
  .pr-row .c-occ::after { content: ' occupancy'; color: var(--text-3); }
  .pr-row .c-revpar::after { content: ' RevPAR'; color: var(--text-3); }
  .pr-row .c-status { grid-column: 4; grid-row: 2; text-align: right; }
  .pr-row .c-none { grid-column: 4; grid-row: 1; padding: 0; }
  .pr-table tr.grp { display: block; } .pr-table tr.grp th { display: block; }
  .pr-wrap.insp-open .c-revpar, .pr-wrap.insp-open .c-trend { display: block; }
}
@media (prefers-reduced-motion: reduce) { .pr-row { transition: none; } }

.ps-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-row .mlink::after { display: none; }
@media (max-width: 700px) {
  .pr-row { grid-template-columns: auto auto minmax(0, 1fr) minmax(0, 48%); gap: 2px 14px; }
  .pr-row .c-name { grid-column: 1 / 4; grid-row: 1 / 3; min-width: 0; }
  .pr-row .c-earned { display: contents; }
  .pr-row .c-earned .pr-main { grid-column: 4; grid-row: 1; text-align: right; font-size: 15px; }
  .pr-row .c-earned .pr-second { grid-column: 4; grid-row: 2; text-align: right; margin: 0; }
  .pr-row .c-occ { grid-row: 3; } .pr-row .c-revpar { grid-row: 3; } .pr-row .c-trend { grid-row: 3; }
  .pr-row .c-status { grid-column: 4; grid-row: 3; text-align: right; white-space: normal; min-width: 0; }
  .pr-row .c-none { grid-column: 4; grid-row: 1; }
}
@media (max-width: 700px) { .pr-row .c-earned .pr-second { white-space: normal; max-width: 100%; } }

/* ======================================================================
   Properties V2: one strong portfolio band, a state rail, a tonal working surface, occupancy bars and a lifted inspector.
   ====================================================================== */
.pr-band { --pn-bg: #14201c; --pn-ink: #eef2ef; --pn-mute: #93a39b; --pn-line: rgba(238, 242, 239, 0.12);
  background: var(--pn-bg); color: var(--pn-ink); border-radius: 16px; padding: 20px 28px 16px; margin: 0 0 var(--s5); }
.pb-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pr-band .ps { padding: 2px var(--s5); border-left: 1px solid var(--pn-line); gap: 3px; }
.pr-band .ps:first-child { padding-left: 0; border-left: 0; }
.pr-band .ps-label { color: var(--pn-mute); font-size: 12.5px; letter-spacing: 0.02em; }
.pr-band .ps-value { font-size: 30px; font-weight: 500; letter-spacing: -0.04em; color: var(--pn-ink); cursor: default; }
.pr-band .ps-sub { color: var(--pn-mute); font-size: 12.5px; }
.pb-rail { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--pn-line); }
.rail-bar { display: flex; gap: 3px; height: 8px; }
.rail-bar .rl { display: block; min-width: 6px; border-radius: 3px; transition: filter var(--t-fast); }
.rail-bar .rl:hover { filter: brightness(1.25); }
.rail-bar .rl:focus-visible { outline: 2px solid #9fd6c0; outline-offset: 2px; }
.rl-pass { background: #4f9a7d; } .rl-review { background: #d58f86; } .rl-nocontrol { background: #7d8b85; } .rl-nodata { background: transparent; box-shadow: inset 0 0 0 1px #d58f86; }
.rail-key { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 9px; font-size: 12.5px; }
.rail-key a { color: var(--pn-mute); text-decoration: none; display: inline-flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.rail-key a:hover { color: var(--pn-ink); }
.rail-key a:focus-visible { outline: 2px solid #9fd6c0; outline-offset: 3px; border-radius: 3px; }
.dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.dot-pass { background: #4f9a7d; } .dot-review { background: #d58f86; } .dot-nocontrol { background: #7d8b85; } .dot-nodata { box-shadow: inset 0 0 0 1px #d58f86; }
@media (max-width: 900px) {
  .pr-band { padding: 18px 18px 14px; border-radius: 14px; }
  .pb-metrics { grid-template-columns: 1fr 1fr; row-gap: 14px; }
  .pr-band .ps:nth-child(odd) { padding-left: 0; border-left: 0; }
  .pr-band .ps-value { font-size: 26px; }
}

/* the working surface: a soft tonal inset with hairline edges; the rows stay open */
.pr-bar { margin-bottom: var(--s3); }
.pr-surface { background: rgba(20, 32, 28, 0.028); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); border-radius: 12px; padding: 4px 20px 8px; }
.pr-table thead th { padding-top: 12px; }
.pr-table tr.grp th { background: rgba(20, 32, 28, 0.04); padding: 8px 12px; margin: 0; border-bottom: 0; border-radius: 6px; font-size: 11px; }
.pr-table tbody tr.grp + tr td { border-top: 0; }
.pr-table tbody:first-of-type tr.grp th { padding-top: 8px; }
.pr-table tr.grp { background: none; }
.pr-table tbody + tbody tr.grp th { box-shadow: 0 0 0 0 transparent; }
.pr-table tbody + tbody { border-top: 10px solid transparent; }
.pr-row td { padding-top: 13px; padding-bottom: 13px; }
.pr-row:last-child td { border-bottom: 0; }
.pr-row[data-attn="1"] td:first-child { box-shadow: inset 2px 0 0 rgba(194, 65, 58, 0.45); padding-left: 12px; }
.pr-row.sel td:first-child { box-shadow: inset 2px 0 0 var(--brand); }
.pr-table th:first-child { padding-left: 12px; }
.pr-row td:first-child { padding-left: 12px; }
.pr-main { font-size: 16px; letter-spacing: -0.01em; }
.pr-name { font-size: 14px; }
.occ { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.occ-n { font-weight: 500; line-height: 1; }
.occ-bar { display: block; width: 72px; height: 4px; border-radius: 2px; background: rgba(20, 32, 28, 0.1); overflow: hidden; }
.occ-bar i { display: block; height: 100%; border-radius: 2px; background: var(--brand); }
.occ-bar:has(i[style*="width:0"]) i { display: none; }
.pr-row .c-occ { padding-right: 24px; }

/* ghost controls */
.pr-search input { background: transparent; border: 1px solid var(--line-strong); width: 150px; }
.pr-search input:focus { background: var(--canvas); }
.pr-life { background: none; }
.pr-life a.on { background: rgba(20, 32, 28, 0.07); }

/* the inspector: a lifted, green-tinted product panel */
.pr-insp { background: #eef2ef; border-radius: 16px; box-shadow: 0 1px 2px rgba(20, 32, 28, 0.06), 0 12px 32px -12px rgba(20, 32, 28, 0.22); padding: 24px 22px; }
@container pr (min-width: 900px) {
  .pr-wrap.insp-open .pr-insp { position: sticky; top: 70px; width: auto; max-height: calc(100vh - 92px); background: #eef2ef; border: 0; border-radius: 16px; padding: 24px 22px; box-shadow: 0 1px 2px rgba(20, 32, 28, 0.06), 0 12px 32px -12px rgba(20, 32, 28, 0.22); }
}
.insp-head h2 { font-size: 20px; font-weight: 600; }
.insp-hero { margin-top: 20px; display: flex; flex-direction: column; gap: 2px; }
.insp-hero .hv { font-size: 38px; line-height: 1.05; letter-spacing: -0.045em; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink); text-decoration: none; }
.insp-hero .hv:hover { color: var(--brand-ink); }
.insp-hero .hl { font-size: 13px; color: var(--text-2); }
.insp-lines { margin-top: 14px; display: flex; flex-direction: column; }
.insp-lines .insp-line { padding: 7px 0; border-top: 1px solid rgba(20, 32, 28, 0.08); }
.insp-lines .insp-line .v { color: var(--ink); text-decoration: none; font-weight: 500; }
.insp-lines .insp-line.quiet .v, .insp-lines .insp-line.quiet .k { color: var(--text-3); font-weight: 400; }
.insp-lines a.v:hover { color: var(--brand-ink); text-decoration: underline; }
.insp-meta { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid rgba(20, 32, 28, 0.12); display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.insp-meta dt { font-size: 11.5px; color: var(--text-3); letter-spacing: 0.04em; text-transform: uppercase; }
.insp-meta dd { margin: 2px 0 0; font-size: 13.5px; color: var(--ink); }
.insp-meta dd a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.insp-sec { border-top-color: rgba(20, 32, 28, 0.12); }
.insp-actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(20, 32, 28, 0.12); }
@media (max-width: 700px) {
  .pr-surface { padding: 0 12px 4px; border-radius: 10px; }
  .pr-insp { border-radius: 16px 16px 0 0; padding: 20px 18px; }
  .pr-row .c-occ { grid-column: 1 / 3; grid-row: 3; padding-right: 0; }
  .pr-row .c-occ .occ { flex-direction: row; align-items: center; gap: 8px; }
  .pr-row .c-occ .occ-bar { width: 52px; }
  .pr-row .c-occ::after { content: none; }
  .pr-row .c-revpar { grid-column: 3; grid-row: 3; }
  .pr-row .c-trend { grid-column: 4; grid-row: 3; justify-self: end; }
  .pr-row .c-status { grid-column: 1 / 5; grid-row: 4; text-align: left; }
  .pr-row td:first-child { padding-left: 0; }
}
.insp-hero .hv.neg { color: var(--neg); }
.pr-insp { top: 12px; right: 12px; bottom: 12px; }
@media (max-width: 700px) { .pr-insp { top: auto; right: 0; bottom: 0; } }
.pr-list { min-width: 0; }
@container pr (max-width: 1180px) {
  .pr-wrap.insp-open .pr-surface { padding-left: 12px; padding-right: 12px; }
  .pr-wrap.insp-open .c-name { min-width: 130px; }
  .pr-wrap.insp-open .pr-table td.num, .pr-wrap.insp-open .pr-table th.num { padding-right: 12px; }
  .pr-wrap.insp-open .pr-row .c-occ { padding-right: 12px; }
  .pr-wrap.insp-open .occ-bar { width: 48px; }
  .pr-wrap.insp-open .pr-row td { padding-right: 8px; }
}
@media (max-width: 700px) {
  .pr-band .ps-sub { white-space: normal; }
  .pr-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 3px 14px; padding: 13px 0; }
  .pr-row .c-name { grid-column: 1 / 3; grid-row: 1 / 3; align-self: start; }
  .pr-row .c-earned .pr-main { grid-column: 3; grid-row: 1; }
  .pr-row .c-earned .pr-second { grid-column: 3; grid-row: 2; }
  .pr-row .c-occ { grid-column: 1; grid-row: 3; margin-top: 4px; }
  .pr-row .c-revpar { grid-column: 2; grid-row: 3; margin-top: 4px; justify-self: start; }
  .pr-row .c-trend { grid-column: 3; grid-row: 3; margin-top: 4px; justify-self: end; }
  .pr-row .c-status { grid-column: 1 / 4; grid-row: 4; text-align: left; margin-top: 2px; }
  .pr-row .c-none { grid-column: 3; grid-row: 1; }
  .pr-row .c-status .st-note { display: inline; margin-left: 10px; }
  .pr-row .c-occ .occ { flex-direction: row; align-items: center; gap: 8px; }
}
@media (max-width: 700px) {
  .pr-row .c-name { display: contents; }
  .pr-row .c-name .pr-name { grid-column: 1 / 3; grid-row: 1; align-self: start; }
  .pr-row .c-name .pr-model { grid-column: 1 / 3; grid-row: 2; margin: 0; align-self: start; }
  .pr-row .c-earned .pr-second { max-width: 150px; justify-self: end; }
  .pr-row .c-earned .pr-main { justify-self: end; }
}
@media (max-width: 700px) {
  .pr-table .pr-row td, .pr-table .pr-row td:first-child { padding: 0; }
  .pr-row .c-earned .pr-second { max-width: 128px; }
  .pr-row .c-occ .occ { gap: 6px; }
  .pr-row .c-occ .occ-bar { width: 40px; }
  .pr-row[data-attn="1"] td:first-child { box-shadow: none; }
  .pr-row[data-attn="1"] { box-shadow: inset 2px 0 0 rgba(194, 65, 58, 0.45); padding-left: 10px; }
  .pr-row.sel { box-shadow: inset 2px 0 0 var(--brand); }
}
@media (max-width: 700px) { .pr-row .c-occ { justify-self: start; text-align: left; } .pr-row .c-occ .occ { justify-content: flex-start; } }
.rl-noimport { background: transparent; box-shadow: inset 0 0 0 1px #7d8b85; } .dot-noimport { box-shadow: inset 0 0 0 1px #7d8b85; }

/* ======================================================================
   Property workspace: one shared shell (identity, economics strip, tabs, main + facts) that every property tab inherits.
   ====================================================================== */
.context-bar .bar-crumb { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; margin-right: auto; min-width: 0; }
.context-bar .bar-crumb a { color: var(--text-3); text-decoration: none; }
.context-bar .bar-crumb a:hover { color: var(--ink); }
.context-bar .bar-crumb .sep { color: var(--icon); }
.context-bar .bar-crumb [aria-current] { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40ch; }
.context-bar:has(.bar-crumb) .ctx-stamp { margin-left: var(--s2); }
@media (max-width: 700px) { .context-bar .bar-crumb { flex-basis: 100%; } }

.ws2 { container-type: inline-size; container-name: ws; }
.ws2 .ws-head { margin: 0 0 var(--s4); }
.ws2 .ws-title { font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -0.03em; font-weight: 600; }
.ws2 .ws-addr { display: block; margin: 3px 0 0; font-size: 13px; color: var(--text-3); }
.ws2 .ws-meta { margin-top: 6px; font-size: 13.5px; color: var(--text-2); }
.ws2 .ws-empty { margin: 0 0 var(--s5); color: var(--text-3); font-size: 13.5px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* the economics strip: one continuous deep-green band, hairlines and connectors, never four cards */
.ws-strip { --pn-bg: #14201c; --pn-ink: #eef2ef; --pn-mute: #93a39b; --pn-line: rgba(238, 242, 239, 0.12);
  display: flex; align-items: stretch; flex-wrap: wrap; background: var(--pn-bg); color: var(--pn-ink); border-radius: 16px; padding: 18px 8px 16px 24px; margin: 0 0 var(--s5); row-gap: 14px; }
.ws-strip .wc { display: flex; flex-direction: column; gap: 3px; padding: 0 22px; border-left: 1px solid var(--pn-line); min-width: 0; flex: 1 1 130px; }
.ws-strip .wc:first-child { border-left: 0; padding-left: 0; }
.ws-strip .ws-op, .ws-strip .ws-arrow { align-self: center; color: var(--pn-mute); font-size: 20px; line-height: 1; padding: 0 2px; }
.ws-strip .ws-op + .wc, .ws-strip .ws-arrow + .wc { border-left: 0; }
.ws-strip .wc-label { font-size: 12.5px; color: var(--pn-mute); letter-spacing: 0.02em; }
.ws-strip .wc-label .info-dot { color: var(--pn-mute); margin-left: 4px; }
.ws-strip .wc-value { font-size: 30px; line-height: 1.12; letter-spacing: -0.04em; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--pn-ink); text-decoration: none; }
.ws-strip a.wc-value:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(238, 242, 239, 0.35); }
.ws-strip a:focus-visible, .ws-strip .info-dot:focus-visible { outline: 2px solid #9fd6c0; outline-offset: 3px; border-radius: 4px; }
.ws-strip .wc-sub { font-size: 12.5px; color: var(--pn-mute); display: flex; gap: 8px; align-items: center; min-height: 18px; }
.ws-strip .delta { margin: 0; font-size: 12.5px; color: var(--pn-mute); display: inline; }
.ws-strip .delta.up, .ws-strip .delta.down { color: var(--pn-mute); }
.ws-strip .wc-profit .wc-value { color: #bfe6d4; }
.ws-strip .wc-revpar { flex: 0 1 110px; }
.ws-strip .wc-revpar .wc-value { font-size: 22px; color: #cdd8d2; }
/* managed: the guests' money is quiet; the fee Urban Nest earns is the figure */
.ws-strip-managed .wc-gross .wc-value { color: #8fa097; font-size: 24px; font-weight: 400; }
.ws-strip-managed .wc-gross .wc-cap { font-style: italic; }
.ws-strip-managed .wc-fee .wc-value { color: #bfe6d4; font-size: 36px; }
.ws-strip-managed .wc-fee .wc-cap { color: #9fd6c0; }
@container ws (max-width: 640px) {
  .ws-strip { display: grid; grid-template-columns: 1fr 1fr; padding: 18px; gap: 16px 0; }
  .ws-strip .ws-op, .ws-strip .ws-arrow { display: none; }
  .ws-strip .wc, .ws-strip .wc:first-child { padding: 0 14px; border-left: 1px solid var(--pn-line); }
  .ws-strip .wc:nth-of-type(odd) { padding-left: 0; border-left: 0; }
  .ws-strip .wc-value, .ws-strip-managed .wc-fee .wc-value, .ws-strip-managed .wc-gross .wc-value { font-size: 24px; }
  .ws-strip .wc-revpar { grid-column: 1 / -1; padding-left: 0; border-left: 0; flex: none; }
}

/* tabs: text on a hairline, an underline for the active one */
.ws2 .tabs { margin: 0 0 var(--s5); border-bottom: 1px solid var(--line-strong); gap: 4px; }
.ws2 .tab { padding: 9px 12px; font-size: 14px; }
.ws2 .tab.active { border-bottom: 2px solid var(--ink); }
.ws2 .tabs-divider { margin-left: auto; background: none; width: 0; }

.ws-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); align-items: start; }
.ws-main { min-width: 0; }
.ws-facts { background: rgba(20, 32, 28, 0.03); border-radius: 14px; padding: 6px 18px 14px; margin-top: var(--s5); }
.ws-facts > summary { cursor: pointer; list-style: none; padding: 12px 0; font-size: 13.5px; font-weight: 500; color: var(--text-2); display: flex; justify-content: space-between; }
.ws-facts > summary::-webkit-details-marker { display: none; }
.ws-facts > summary::after { content: '▾'; color: var(--text-3); font-size: 10px; align-self: center; }
.ws-facts[open] > summary::after { content: '▴'; }
.ws-facts > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.wf-sec { padding-top: 10px; }
.wf-sec + .wf-sec { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.wf-sec h2 { margin: 0 0 8px; font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.wf-sec dl { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.wf-sec dt { font-size: 11.5px; color: var(--text-3); letter-spacing: 0.03em; text-transform: uppercase; }
.wf-sec dd { margin: 2px 0 0; font-size: 14px; color: var(--ink); }
.wf-sec dd a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.wf-sec dd a:hover { color: var(--brand-ink); }
@container ws (min-width: 900px) {
  .ws-body { grid-template-columns: minmax(0, 1fr) 250px; }
  .ws-facts { margin-top: 0; position: sticky; top: 70px; padding: 18px 18px 20px; }
  .ws-facts > summary { display: none; }
}

/* overview tab: one chart, a small side panel, an open list */
.ws-attn { margin: 0 0 var(--s4); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; padding: 0 0 var(--s3); border-bottom: 1px solid var(--line); }
.ws-attn i { font-style: normal; font-size: 11px; }
.ws-attn-review i, .ws-attn-review strong { color: var(--warn-ink); }
.ws-attn-nocontrol i, .ws-attn-nocontrol strong { color: var(--text-3); }
.ws-attn strong { font-size: 12.5px; letter-spacing: 0.04em; }
.ws-attn a { margin-left: auto; color: var(--text-2); font-size: 13px; }
.ov2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); margin-bottom: var(--s6); }
.ov2-chart, .ov2-side { background: rgba(20, 32, 28, 0.028); border-radius: 14px; padding: 16px 18px; min-width: 0; }
.ov2-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ov2 h2, .ov2-recent h2 { margin: 0; font-size: 14.5px; font-weight: 600; }
.ov2-side h2 { margin-bottom: 12px; }
.ov2-costs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ov2-costs a { display: grid; grid-template-columns: 1fr auto; row-gap: 4px; padding: 6px 0; color: inherit; text-decoration: none; font-size: 13.5px; }
.ov2-costs a:hover .cl { color: var(--brand-ink); }
.ov2-costs .cv { font-variant-numeric: tabular-nums; font-weight: 500; }
.ov2-costs .cb { grid-column: 1 / 3; height: 3px; border-radius: 2px; background: rgba(20, 32, 28, 0.08); overflow: hidden; }
.ov2-costs .cb i { display: block; height: 100%; background: rgba(194, 65, 58, 0.55); border-radius: 2px; }
.ov2-rec { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.ov2-rec dt { font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.ov2-rec dd { margin: 2px 0 0; font-size: 18px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ov2-more { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.ov2-more:hover { color: var(--ink); }
.ov2-recent { margin-bottom: var(--s5); }
.ov2-recent h2 { margin-bottom: 8px; }
.ov2-links { display: flex; gap: 18px; margin: 10px 0 0; font-size: 13px; }
.ov2-links a { color: var(--text-2); text-decoration: none; }
.ov2-links a:hover { color: var(--ink); }
@container ws (min-width: 700px) { .ov2 { grid-template-columns: minmax(0, 1fr) 260px; } }
.key-gross { width: 10px; height: 10px; border-radius: 2px; background: rgba(100, 118, 110, 0.5); display: inline-block; }
.key-port { width: 16px; height: 0; border-top: 1.5px dotted rgba(100, 118, 110, 0.9); margin-left: 8px; display: inline-block; }

/* open lists everywhere in the workspace: no white card, hairline rows */
.ws-list, .ws2 .card.flush table { width: 100%; border-collapse: collapse; }
.ws-list th, .ws2 .card.flush th { font-size: 12.5px; font-weight: 450; color: var(--text-3); text-transform: none; letter-spacing: 0; text-align: left; padding: 8px 14px 8px 0; border-bottom: 1px solid var(--line-strong); background: none; }
.ws-list td, .ws2 .card.flush td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ws-list th.num, .ws-list td.num { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; }
.ws-list tr.clickable:hover, .ws2 .card.flush tr.clickable:hover { background: rgba(20, 32, 28, 0.025); }
.ws-list .neg-text { color: var(--neg); }
.ws2 .card.flush { background: none; border: 0; box-shadow: none; border-radius: 0; }
.ws2 .card:not(.flush) { background: rgba(20, 32, 28, 0.028); border: 0; box-shadow: none; border-radius: 14px; }
.ws2 .section { margin-top: var(--s5); }
.ws2 .section-head h2 { font-size: 14.5px; }

/* performance tab */
.pf { background: rgba(20, 32, 28, 0.028); border-radius: 14px; padding: 16px 18px 12px; margin-bottom: var(--s5); }
.pf-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.pf-head .seg { max-width: 100%; overflow-x: auto; }
.pf-head .seg button { white-space: nowrap; }
.pf-tools { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
@media (max-width: 700px) { .ws2 .chart-box { height: 230px !important; } .ws-strip { border-radius: 14px; } }

.ws2 .ws-title .nm-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ws2 .ws-title .nm-short { display: inline; }
.ws-list th.num, .ws-list td.num { padding-right: 20px; }
.ws2 .card.flush th.num, .ws2 .card.flush td.num { padding-right: 20px; }

.ws-sum { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0 0 var(--s4); padding: 0 0 var(--s3); border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ws-sum .sk { color: var(--text-3); } .ws-sum .sv { font-weight: 500; font-variant-numeric: tabular-nums; }
.ws-sum a { color: inherit; text-decoration: none; } .ws-sum a:hover .sv { color: var(--brand-ink); text-decoration: underline; }
.ws-add { margin-top: var(--s5); padding: 4px 0; border-top: 1px solid var(--line); }
.ws-add summary { cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--text-2); padding: 10px 0; list-style: none; }
.ws-add summary::-webkit-details-marker { display: none; }
.ws-add summary::before { content: '+'; margin-right: 8px; color: var(--text-3); }
.ws-add[open] summary::before { content: '−'; }
.ws-add summary:focus-visible { outline: 2px solid var(--brand); border-radius: 4px; }
.ws2 .doc-list { list-style: none; margin: 0; padding: 0; }
.ws2 .doc-list li { display: flex; justify-content: space-between; gap: var(--s3); padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }

/* ======================================================================
   Bookings: a summary band with a data-type rail, a portfolio list with honest occupancy visuals, and a flat activity list.
   ====================================================================== */
.bk2 .tabs { margin-bottom: var(--s5); }
.bk-band { --pn-bg: #14201c; --pn-ink: #eef2ef; --pn-mute: #93a39b; --pn-line: rgba(238, 242, 239, 0.12);
  background: var(--pn-bg); color: var(--pn-ink); border-radius: 16px; padding: 20px 28px 16px; margin: 0 0 var(--s4); }
.bk-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bk-band .ps { padding: 2px var(--s5); border-left: 1px solid var(--pn-line); gap: 3px; }
.bk-band .ps:first-child { padding-left: 0; border-left: 0; }
.bk-band .ps-label { color: var(--pn-mute); font-size: 12.5px; }
.bk-band .ps-label .info-dot { color: var(--pn-mute); margin-left: 4px; }
.bk-band .ps-value { font-size: 30px; font-weight: 500; letter-spacing: -0.04em; color: var(--pn-ink); }
.bk-band .ps-sub { color: var(--pn-mute); font-size: 12.5px; white-space: normal; }
.bk-band .pb-rail { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--pn-line); }
.bk-band a:focus-visible, .bk-band .info-dot:focus-visible { outline: 2px solid #9fd6c0; outline-offset: 3px; border-radius: 3px; }
.rl-bk-reservations { background: #4f9a7d; }
.rl-bk-monthly { background: repeating-linear-gradient(135deg, rgba(79, 154, 125, 0.55) 0 4px, rgba(79, 154, 125, 0.18) 4px 8px); box-shadow: inset 0 0 0 1px #4f9a7d; }
.rl-bk-none { background: transparent; box-shadow: inset 0 0 0 1px #7d8b85; }
.dot-bk-reservations { background: #4f9a7d; } .dot-bk-monthly { background: repeating-linear-gradient(135deg, #4f9a7d 0 2px, rgba(79,154,125,.25) 2px 4px); box-shadow: inset 0 0 0 1px #4f9a7d; } .dot-bk-none { box-shadow: inset 0 0 0 1px #7d8b85; }
.bk-note { margin: 0 0 var(--s4); font-size: 13px; color: var(--text-3); }
.bk-bar { margin-top: var(--s3); }
.bk-surface { padding-top: 0; }
.bk-table { width: 100%; border-collapse: collapse; }
.bk-table thead th { font-size: 12.5px; font-weight: 450; color: var(--text-3); text-transform: none; letter-spacing: 0; text-align: left; padding: 12px 14px 8px 12px; border-bottom: 1px solid var(--line-strong); background: none; white-space: nowrap; }
.bk-table th.num, .bk-table td.num { text-align: right; padding-right: 22px; font-variant-numeric: tabular-nums; }
.bk-table td { padding: 12px 14px 12px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; }
.bk-row { cursor: pointer; transition: background-color var(--t-fast); }
.bk-row:hover { background: rgba(20, 32, 28, 0.03); }
.bk-row[data-attn="1"] td:first-child { box-shadow: inset 2px 0 0 rgba(194, 65, 58, 0.45); }
.bk-table .c-name { min-width: 190px; }
.bk-table .mlink { color: inherit; text-decoration: none; } .bk-table .mlink::after { display: none; } .bk-table .mlink:hover { color: var(--brand-ink); text-decoration: underline; }
.c-nights { white-space: nowrap; } .c-nights .of { color: var(--text-3); }
.c-gbr { font-weight: 500; }
.occ2 { display: inline-flex; flex-direction: column; gap: 6px; min-width: 150px; }
.occ2 b { font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1; }
/* a day strip is painted only from real reservation records; a monthly total gets a dashed proportional rail, never invented days */
.dstrip { display: flex; gap: 1px; height: 8px; max-width: 220px; }
.dstrip i { flex: 1 1 0; min-width: 2px; background: rgba(20, 32, 28, 0.09); border-radius: 1px; }
.dstrip i.b { background: var(--brand); }
.mrail { display: block; width: 180px; max-width: 100%; height: 8px; border-radius: 2px; background: transparent; box-shadow: inset 0 0 0 1px rgba(14, 159, 110, 0.5); overflow: hidden; }
.mrail i { display: block; height: 100%; background: repeating-linear-gradient(135deg, rgba(14, 159, 110, 0.5) 0 4px, rgba(14, 159, 110, 0.2) 4px 8px); }
.ev { font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.ev i { font-style: normal; font-size: 11px; }
.ev-res { color: var(--brand-ink); } .ev-mon { color: var(--text-2); } .ev-none { color: var(--text-3); } .ev-inc { color: var(--text-2); }
.ev-src, .ev-flag { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.ev-src a { color: var(--text-3); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.ev-flag { color: var(--warn-ink); text-decoration: none; }
.c-go { width: 28px; padding-left: 0; padding-right: 8px; text-align: right; }
.row-open { background: none; border: 0; color: var(--icon); font-size: 18px; line-height: 1; padding: 2px 8px; height: auto; cursor: pointer; border-radius: 6px; }
.row-open:hover { color: var(--ink); background: rgba(20, 32, 28, 0.06); }
.row-open:focus-visible { outline: 2px solid var(--brand); }
.bk-act .a-label { font-weight: 500; }
.bk-act .ak-monthly .a-label { color: var(--text-2); font-style: italic; font-weight: 450; }
.bk-act .a-prop a { color: var(--text-2); text-decoration: none; } .bk-act .a-prop a:hover { color: var(--ink); }
.bk-act .a-amt { font-weight: 500; }
.bk-act .a-src { font-size: 12.5px; }
.bk-act tr.grp th { text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); font-weight: 500; padding: 14px 12px 6px; background: rgba(20, 32, 28, 0.04); border-bottom: 0; }
.bk-act tfoot td { border-bottom: 0; border-top: 1px solid var(--line-strong); font-weight: 500; padding-top: 12px; }
.bk-act .chan { font-size: 12.5px; }
@media (max-width: 900px) { .bk-band { padding: 18px; border-radius: 14px; } .bk-metrics { grid-template-columns: 1fr 1fr; row-gap: 14px; } .bk-band .ps:nth-child(odd) { padding-left: 0; border-left: 0; } .bk-band .ps-value { font-size: 26px; } }
@media (max-width: 700px) {
  .bk-table thead { display: none; } .bk-table, .bk-table tbody, .bk-table tfoot { display: block; }
  .bk-table tr.bk-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
  .bk-table tr.bk-row td { border: 0; padding: 0; }
  .bk-table .c-name { grid-column: 1; grid-row: 1; min-width: 0; }
  .bk-table .c-gbr { grid-column: 2; grid-row: 1; padding: 0; }
  .bk-table .c-nights { grid-column: 1; grid-row: 2; text-align: left; padding: 0; } .bk-table .c-nights::after { content: ' nights'; color: var(--text-3); }
  .bk-table .c-occ2 { grid-column: 1; grid-row: 3; }
  .bk-table .c-evid { grid-column: 1 / 3; grid-row: 4; }
  .bk-table .c-go { display: none; }
  .bk-table .c-none { grid-column: 2; grid-row: 1; padding: 0; text-align: right; }
  .occ2 { flex-direction: row; align-items: center; gap: 10px; } .mrail { width: 120px; } .dstrip { width: 150px; }
  .bk-act tr.bk-row { grid-template-columns: minmax(0, 1fr) auto; }
  .bk-act .a-rec { grid-column: 1; grid-row: 1; } .bk-act .a-amt { grid-column: 2; grid-row: 1; text-align: right; }
  .bk-act .a-prop { grid-column: 1; grid-row: 2; } .bk-act .num:not(.a-amt) { grid-column: 2; grid-row: 2; text-align: right; padding: 0; } .bk-act .num:not(.a-amt)::after { content: ' nights'; color: var(--text-3); }
  .bk-act .a-type { grid-column: 1; grid-row: 3; } .bk-act .a-chan { grid-column: 2; grid-row: 3; text-align: right; } .bk-act .a-src { grid-column: 1 / 3; grid-row: 4; }
  .bk-act tr.grp, .bk-act tr.grp th { display: block; }
  .bk-act tfoot tr { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 0; } .bk-act tfoot td { padding: 0; border: 0; }
}
@media (max-width: 700px) {
  .bk-table tr.bk-row { gap: 2px 12px; padding: 12px 0; }
  .bk-table tr.bk-row td.c-nights { grid-column: 2; grid-row: 2; text-align: right; padding: 0; }
  .bk-table tr.bk-row td.c-nights::after { content: ' nights'; }
  .bk-table tr.bk-row td.c-occ2 { grid-column: 1; grid-row: 2; }
  .bk-table tr.bk-row td.c-gbr { grid-column: 2; grid-row: 1; padding: 0; text-align: right; }
  .bk-table tr.bk-row td.c-evid { grid-column: 1 / 3; grid-row: 3; display: flex; flex-wrap: wrap; gap: 1px 10px; align-items: baseline; padding-top: 2px; }
  .bk-table .ev-src, .bk-table .ev-flag { margin-top: 0; }
  .bk-table tr.bk-row td.c-none { grid-column: 1 / 3; grid-row: 2; text-align: left; }
}

/* ======================================================================
   Expenses: a ledger. One band, ghost menus, tokens, grouped rows with subtotals, and an inspector drawer.
   ====================================================================== */
.ex-views { margin: 0 0 var(--s4); display: flex; }
.ex-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ex-band .ps { padding: 2px var(--s5); border-left: 1px solid var(--pn-line); }
.ex-band .ps:first-child { padding-left: 0; border-left: 0; }
.ex-band { padding-bottom: 18px; }
.ex-bar { margin-top: var(--s3); }
.ex-pop { max-height: 340px; overflow-y: auto; min-width: 200px; }
.ex-surface { padding-top: 0; }
.ex-table th.num, .ex-table td.num { padding-right: 14px; }
.ex-table td { padding-top: 11px; padding-bottom: 11px; }
.ex-row.sel { background: rgba(14, 159, 110, 0.07); box-shadow: inset 2px 0 0 var(--brand); }
.ex-date { color: var(--text-2); width: 1%; }
.ex-main { min-width: 180px; }
.ex-vendor { display: block; font-weight: 500; }
.ex-desc { display: block; font-size: 12.5px; color: var(--text-3); max-width: 42ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-where .ex-prop { display: block; }
.ex-scope { display: block; font-size: 12.5px; color: var(--text-3); }
.ex-cat { white-space: nowrap; }
.ex-capex { margin-left: 8px; font-size: 12px; color: var(--text-3); letter-spacing: 0.03em; }
.ex-src { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.ex-src a { color: var(--text-3); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.ex-src a:hover { color: var(--ink); }
.ex-amt { font-weight: 600; white-space: nowrap; }
.ex-rev { display: block; font-size: 11.5px; font-weight: 400; color: var(--text-3); }
.ex-table tr.grp th { text-align: left; padding: 14px 12px 8px; background: rgba(20, 32, 28, 0.04); border-bottom: 0; text-transform: none; letter-spacing: 0; font-weight: 500; }
.ex-table tr.grp .g-name { font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.ex-table tr.grp .g-meta { margin-left: 12px; font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ex-table tr.grp .g-go { float: right; font-size: 12.5px; color: var(--text-3); text-decoration: none; }
.ex-table tr.more td { color: var(--text-3); font-size: 12.5px; border-bottom: 0; }
.ex-table tfoot td { border-bottom: 0; border-top: 1px solid var(--line-strong); font-weight: 500; padding-top: 12px; }
.ex-table tfoot td.num { font-weight: 600; }
/* the inspector drawer */
.dr-who { font-size: 16px; font-weight: 500; margin-top: 6px; }
.dr-h { font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); font-weight: 500; margin-bottom: 6px; }
.dr-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.dr-hist .when { color: var(--text-3); margin-right: 8px; font-variant-numeric: tabular-nums; }
.dr-edit { margin-top: var(--s5); }
@media (max-width: 900px) { .ex-metrics { grid-template-columns: 1fr 1fr; row-gap: 14px; } .ex-band .ps:nth-child(odd) { padding-left: 0; border-left: 0; } }
@media (max-width: 700px) {
  .ex-table thead { display: none; } .ex-table, .ex-table tbody, .ex-table tfoot { display: block; }
  .ex-table tr.ex-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .ex-table tr.ex-row td { border: 0; padding: 0; }
  .ex-table .ex-date { grid-column: 1; grid-row: 1; width: auto; font-size: 12.5px; }
  .ex-table .ex-amt { grid-column: 2; grid-row: 1 / 3; text-align: right; align-self: start; padding: 0; }
  .ex-table .ex-main { grid-column: 1; grid-row: 2; min-width: 0; }
  .ex-table .ex-where { grid-column: 1; grid-row: 3; }
  .ex-table .ex-where .ex-scope { display: inline; } .ex-table .ex-where .ex-scope::before { content: ' · '; }
  .ex-table .ex-where .ex-prop { display: inline; }
  .ex-table .ex-cat { grid-column: 1; grid-row: 4; font-size: 12.5px; color: var(--text-2); }
  .ex-table .ex-src { grid-column: 1 / 3; grid-row: 5; white-space: normal; }
  .ex-table tr.grp { display: block; } .ex-table tr.grp th { display: block; } .ex-table tr.grp .g-go { float: none; display: block; margin-top: 4px; }
  .ex-table tfoot tr { display: flex; justify-content: space-between; padding: 12px 0; } .ex-table tfoot td { padding: 0; border: 0; }
  .ex-table tr.more { display: block; padding: 8px 0; } .ex-table tr.more td { display: block; padding: 0; }
}
.ex-bar .pr-search input { width: 210px; }
@media (max-width: 700px) {
  .ex-table tr.ex-row td { height: auto; min-height: 0; line-height: 1.35; }
  .ex-table tr.grp th { height: auto; padding: 10px 12px; }
  .ex-table .ex-desc { max-width: none; white-space: normal; }
}
.ex-src2 { display: none; font-size: 12.5px; color: var(--text-3); }
@media (max-width: 1180px) and (min-width: 701px) {
  .ex-table .ex-src, .ex-table thead th:nth-child(5) { width: 0; max-width: 0; padding: 0; overflow: hidden; font-size: 0; border: 0; }   /* keep six columns so group rows still span the table */
  .ex-table .ex-src2 { display: block; }
}
@media (max-width: 700px) { .ex-src2 { display: none; } }

/* ======================================================================
   Import review: a three-step flow, one band, triaged property blocks, directional change rows, and an audit record.
   ====================================================================== */
.imp-flow { display: flex; align-items: center; gap: 0; list-style: none; margin: 0 0 var(--s4); padding: 0; font-size: 13px; color: var(--text-3); }
.imp-flow li { display: flex; align-items: center; gap: 8px; }
.imp-flow li + li::before { content: ''; width: 28px; height: 1px; background: var(--line-strong); margin: 0 12px; }
.imp-flow .n { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.imp-flow li.on { color: var(--ink); font-weight: 500; }
.imp-flow li.on .n { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.imp-back { margin: 0 0 var(--s3); font-size: 13px; }
.imp-head h1 { margin: 0; font-size: 26px; letter-spacing: -0.03em; }
.imp-sub { margin: 4px 0 0; font-size: 13.5px; color: var(--text-3); }
.imp-file { color: var(--text-2); }
.imp-read { font-size: 13px; color: var(--text-3); margin: var(--s3) 0 var(--s2); }
.imp-unmapped { font-size: 13.5px; margin: 6px 0; }
.imp-sheets { font-size: 13px; color: var(--text-3); margin-bottom: var(--s3); }
.imp-sheets summary, .imp-more summary, .imp-quiet summary { cursor: pointer; color: var(--text-2); font-size: 13px; }
.imp-months { margin: var(--s3) 0 var(--s4); }
.imp-h2 { margin: var(--s2) 0 var(--s3); font-size: 15px; font-weight: 600; }

.imp-band { background: #14201c; color: #eef2ef; border-radius: 16px; padding: 20px 28px 16px; margin: 0 0 var(--s4); }
.imp-counts { font-size: 22px; letter-spacing: -0.03em; display: flex; flex-wrap: wrap; gap: 4px 12px; font-variant-numeric: tabular-nums; }
.imp-counts b { font-weight: 500; font-size: 28px; } .imp-counts .d { color: #5f6f67; }
.imp-counts span:not(.d) { color: #cdd8d2; }
.imp-verdict { margin-top: 6px; font-size: 13.5px; color: #93a39b; }
.imp-rail { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(238, 242, 239, 0.12); }
.imp-rail .rail-bar { display: flex; gap: 3px; height: 8px; }
.imp-rail .rl { display: block; min-width: 6px; border-radius: 3px; border: 0; padding: 0; height: 8px; cursor: pointer; }
.imp-rail .rl[aria-pressed="true"] { outline: 2px solid #9fd6c0; outline-offset: 2px; }
.imp-rail .rl:focus-visible { outline: 2px solid #9fd6c0; outline-offset: 2px; }
.rl-imp-pass { background: #4f9a7d; } .rl-imp-review { background: #d58f86; } .rl-imp-nocontrol { background: transparent; box-shadow: inset 0 0 0 1px #7d8b85; }
.dot-imp-pass { background: #4f9a7d; } .dot-imp-review { background: #d58f86; } .dot-imp-nocontrol { box-shadow: inset 0 0 0 1px #7d8b85; }
.imp-rail .rail-key { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 9px; font-size: 12.5px; color: #93a39b; }
.imp-rail .rail-key span { display: inline-flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }

.imp-calm { background: rgba(14, 159, 110, 0.06); border-radius: 14px; padding: 18px 22px; margin: 0 0 var(--s4); }
.imp-calm-title { margin: 0 0 4px; font-size: 15px; font-weight: 500; color: var(--brand-ink); } .imp-calm-title i { font-style: normal; margin-right: 6px; }
.imp-calm form { margin-top: 12px; }

.imp-grp { margin: var(--s5) 0 var(--s2); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); font-weight: 500; }
.imp-grp span { margin-left: 6px; font-variant-numeric: tabular-nums; }
.imp-prop { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 0 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.imp-prop[hidden] { display: none; }
.imp-prop.is-review { box-shadow: inset 2px 0 0 rgba(194, 65, 58, 0.45); padding-left: 10px; margin-left: -10px; }
.imp-pick { padding-top: 2px; }
.imp-body > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.imp-body > summary::-webkit-details-marker { display: none; }
.imp-body > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.imp-name strong { font-size: 14.5px; }
.imp-model { display: block; font-size: 12.5px; color: var(--text-3); }
.imp-st { display: inline-flex; gap: 14px; align-items: baseline; font-size: 13px; }
.imp-act { color: var(--text-2); } .imp-act.quiet { color: var(--text-3); } .imp-act.err { color: var(--neg); }
.imp-in { padding: 10px 0 4px; }
.imp-rows { margin: 0 0 6px; font-size: 12.5px; color: var(--text-3); }
.imp-reason { margin: 0 0 4px; }
.imp-flag { margin: 10px 0; padding: 10px 14px; border-left: 2px solid rgba(194, 65, 58, 0.5); background: rgba(194, 65, 58, 0.04); border-radius: 0 8px 8px 0; font-size: 13.5px; }
.imp-flag .fl-fig { font-variant-numeric: tabular-nums; margin: 3px 0; }
.imp-new { margin: 10px 0; padding: 12px 14px; border-radius: 10px; background: rgba(20, 32, 28, 0.04); font-size: 13.5px; }
.chg-list { margin: 8px 0; display: flex; flex-direction: column; }
.chg-row { position: relative; display: grid; grid-template-columns: minmax(150px, 1.2fr) auto minmax(80px, auto); align-items: baseline; gap: 4px 18px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; outline: none; }
.chg-row:focus-visible { box-shadow: 0 0 0 2px var(--brand); border-radius: 4px; }
.chg-row .cl { color: var(--text-2); }
.chg-row .cv { font-variant-numeric: tabular-nums; }
.chg-row .was { color: var(--text-3); } .chg-row .arr { margin: 0 8px; color: var(--icon); } .chg-row .now { font-weight: 600; }
.chg-row .cd { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.chg-pop { display: none; position: absolute; z-index: 20; right: 0; top: calc(100% - 2px); background: var(--float); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: var(--shadow-float); border-radius: 10px; padding: 10px 14px; font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; grid-template-columns: auto auto; gap: 3px 16px; }
.chg-pop b { font-weight: 400; color: var(--text-3); }
.chg-row:hover .chg-pop, .chg-row:focus .chg-pop { display: grid; }
.imp-more { margin-top: 10px; }
.imp-tbl { width: 100%; margin: var(--s2) 0; font-size: 13px; }
.imp-quiet { margin: var(--s4) 0; } .imp-quiet ul { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; }
.imp-apply { margin-top: var(--s5); padding: var(--s4) 0 0; border-top: 1px solid var(--line-strong); }
.imp-ack { display: block; margin-bottom: 6px; font-size: 14px; }
.imp-actions { display: flex; gap: var(--s2); align-items: center; margin: 10px 0 6px; }
@media (max-width: 700px) {
  .imp-band { padding: 18px; border-radius: 14px; } .imp-counts { font-size: 17px; } .imp-counts b { font-size: 22px; }
  .chg-row { grid-template-columns: 1fr auto; } .chg-row .cv { grid-column: 1; grid-row: 2; } .chg-row .cd { grid-column: 2; grid-row: 2; }
  .chg-pop { position: static; display: grid; box-shadow: none; background: none; padding: 4px 0 0; grid-column: 1 / 3; grid-row: 3; font-size: 12px; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .chg-row:not(:focus):not(:hover) .chg-pop { display: none; }
  .imp-flow li + li::before { width: 14px; margin: 0 8px; }
  .imp-st { gap: 10px; }
  .imp-tbl { display: block; overflow-x: auto; }
}
.imp-eyebrow { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-ink); font-weight: 500; margin-bottom: 4px; }
.imp-band-applied .imp-counts { font-size: 20px; } .imp-band-applied .imp-counts b { font-size: 26px; }
.imp-upload { background: rgba(20, 32, 28, 0.03); border-radius: 14px; padding: var(--s4) var(--s5); margin: var(--s3) 0; }
.imp-hist { padding-top: 0; }
.imp-hist-table { width: 100%; border-collapse: collapse; }
.imp-hist-table thead th { font-size: 12.5px; font-weight: 450; color: var(--text-3); text-transform: none; letter-spacing: 0; padding: 12px 14px 8px 12px; border-bottom: 1px solid var(--line-strong); background: none; text-align: left; }
.imp-hist-table th.num, .imp-hist-table td.num { text-align: right; }
.imp-hist-table td { padding: 12px 14px 12px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: top; height: auto; }
.imp-hist-table tbody tr:hover { background: rgba(20, 32, 28, 0.03); }
.imp-open { color: var(--text-2); text-decoration: none; font-size: 13px; } .imp-open:hover { color: var(--ink); }
.undo-block { opacity: 0.9; } .undo-block button { font-size: 13px; }
@media (max-width: 700px) {
  .imp-hist-table thead { display: none; } .imp-hist-table, .imp-hist-table tbody { display: block; }
  .imp-hist-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .imp-hist-table td { border: 0; padding: 0; } .imp-hist-table td:nth-child(1) { grid-column: 1; } .imp-hist-table td:nth-child(6) { grid-column: 2; grid-row: 1; text-align: right; }
  .imp-hist-table td:nth-child(2) { grid-column: 1 / 3; } .imp-hist-table td:nth-child(3), .imp-hist-table td:nth-child(4), .imp-hist-table td:nth-child(5) { grid-column: 1 / 3; display: inline; }
  .imp-hist-table td:nth-child(7) { grid-column: 2; text-align: right; }
}

/* ======================================================================
   Documents / evidence review: an open review-first list, and a split review workspace
   (source on the left, a quiet inspector on the right). Evidence only: nothing here posts a figure.
   ====================================================================== */
.dc-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); margin: 0 0 var(--s4); }
.dc-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; min-width: 0; }
.dc-title h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.dc-label { display: inline-block; font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); border: 1px solid var(--line-strong); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.dc-note { font-size: 13px; color: var(--text-3); }
.dc-note a { color: var(--text-2); }
.dc-upload { position: relative; flex: 0 0 auto; }
.dc-upload > summary { list-style: none; cursor: pointer; height: 30px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--canvas); color: var(--ink); font-size: 13px; font-weight: 500; }
.dc-upload > summary::-webkit-details-marker { display: none; }
.dc-upload > summary:hover, .dc-upload[open] > summary { background: rgba(20, 32, 28, 0.04); }
.dc-upload > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.dc-upload-pop { position: absolute; z-index: 40; right: 0; top: 36px; width: min(380px, 86vw); background: var(--float); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); box-shadow: var(--shadow-float); border-radius: 12px; padding: 14px 16px; }
.dc-form { display: flex; flex-direction: column; gap: 10px; }
.dc-form input[type=file] { width: 100%; font-size: 13px; }
.dc-form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.dc-form-row select { min-width: 0; width: 100%; height: 30px; font-size: 13px; }
.dc-form-row button { grid-column: 1 / 3; height: 30px; }
.dc-files { font-size: 12.5px; color: var(--text-3); overflow-wrap: anywhere; }
.dc-files:empty { display: none; }
.dc-hint, .dc-pre { font-size: 12.5px; color: var(--text-3); margin: 0; }
.dc-pre { margin-bottom: 10px; color: var(--text-2); }
.dc-pre[hidden] { display: none; }

.dc-rail { margin: 0 0 var(--s4); }
.dc-bar { height: 6px; margin-bottom: 9px; }
.dc-bar .rl { height: 6px; }
.dc-r-review { background: #d58f86; } .dc-r-un { background: #c3cbc7; } .dc-r-ok { background: #4f9a7d; }
.dc-key { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 13px; }
.dc-key a { color: var(--text-2); text-decoration: none; display: inline-flex; gap: 6px; align-items: baseline; border-radius: 4px; }
.dc-key a b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.dc-key a:hover { color: var(--ink); }
.dc-key a.on { color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.dc-key a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.dc-pop { min-width: 210px; max-height: 340px; overflow: auto; }

.dc-surface { --dc-cols: minmax(0, 2.4fr) minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(128px, 1.2fr) 118px 118px 84px 92px; padding-top: 0; }
.dc-cols { display: grid; grid-template-columns: var(--dc-cols); gap: 0 14px; padding: 11px 0 8px; font-size: 12.5px; color: var(--text-3); border-bottom: 1px solid var(--line-strong); }
.dc-cols .dc-amt { text-align: right; }
.dc-row { display: grid; grid-template-columns: var(--dc-cols); gap: 0 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 13.5px; transition: background-color var(--t-fast); }
.dc-row:hover { background: rgba(20, 32, 28, 0.03); }
.dc-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 6px; }
.dc-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-m1 { display: contents; }
.dc-m1 > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-name { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.dc-sub { display: block; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; }
.dc-why { color: var(--warn-ink); }
.dc-why-m { display: none; }
@media (max-width: 760px) { .dc-why-m { display: block; } }
.dc-none, .dc-miss { color: var(--text-3); }
.dc-miss { color: var(--warn-ink); }
.dc-amt { text-align: right; font-variant-numeric: tabular-nums; }
.dc-evi, .dc-up { color: var(--text-3); font-size: 12.5px; }
.dc-reviewed .dc-name, .dc-reviewed .dc-type, .dc-reviewed .dc-prop, .dc-reviewed .dc-per, .dc-reviewed .dc-amt { color: var(--text-2); font-weight: 400; }
.dc-reviewed .dc-name { font-weight: 450; }
.dc-gh { display: flex; align-items: baseline; gap: 10px; margin: 0; padding: 20px 0 6px; font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--line); }
.dc-group:first-of-type .dc-gh { padding-top: 14px; }
.dc-gh .g-meta { font-variant-numeric: tabular-nums; letter-spacing: 0; }
.dc-more { font-size: 12.5px; color: var(--text-3); margin: 10px 0 0; }
.dc-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: var(--s4) 0 0; font-size: 13px; }
.dc-links a { color: var(--text-3); text-decoration: none; } .dc-links a:hover { color: var(--ink); }
@media (max-width: 1100px) {
  .dc-surface { --dc-cols: minmax(0, 2.4fr) minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(128px, 1.2fr) 118px 84px; }
  .dc-cols > :nth-child(6), .dc-cols > :nth-child(8), .dc-row > .dc-evi, .dc-row > .dc-up { display: none; }
}
@media (max-width: 760px) {
  .dc-head { align-items: flex-start; }
  .dc-title { flex-direction: column; gap: 2px; }
  .dc-cols { display: none; }
  .dc-row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "file file file" "meta meta meta" "per amt state"; gap: 2px 0; padding: 12px 0; }
  .dc-file { grid-area: file; } .dc-m1 { display: block; grid-area: meta; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); font-size: 13px; }
  .dc-m1 > span { display: inline; } .dc-m1 .dc-prop::before { content: " · "; }
  .dc-per { grid-area: per; font-size: 13px; } .dc-amt { grid-area: amt; text-align: left; font-size: 13px; }
  .dc-amt { margin-left: 0.45em; } .dc-amt:not(.dc-na)::before { content: "· "; } .dc-amt.dc-na { visibility: hidden; }
  .dc-why-d { display: none; }
  .dc-state { grid-area: state; text-align: right; }
  .dc-row > .dc-evi, .dc-row > .dc-up { display: none; }
  .dc-row > .dc-file { overflow: hidden; }
  .dc-name { font-size: 14.5px; }
}

/* review workspace */
.dr-head { margin: 0 0 var(--s4); }
.dr-crumb { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.dr-crumb a { color: var(--text-3); text-decoration: none; } .dr-crumb a:hover { color: var(--ink); }
.dr-queue { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.dr-queue a, .dr-queue .dr-off { padding: 0 8px; font-size: 16px; line-height: 22px; border-radius: 6px; }
.dr-queue a { color: var(--ink); } .dr-queue a:hover { background: rgba(20, 32, 28, 0.06); }
.dr-queue a:focus-visible { outline: 2px solid var(--brand); }
.dr-queue .dr-off { opacity: 0.3; }
.dr-titlebar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.dr-title { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.dr-sub { margin: 3px 0 0; font-size: 13.5px; color: var(--text-3); }
.rv-split { grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); gap: var(--s6); }
.rv-split .rv-frame { height: calc(100vh - 200px); min-height: 420px; }
@media (max-width: 1000px) {
  .rv-split { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .rv-viewer { position: static; }
  .rv-split .rv-frame { height: 56vh; min-height: 320px; }
  .rv-split #preview-scroll.rv-frame { height: auto; max-height: 48vh; min-height: 96px; }
}
.rv-viewer-title { text-transform: none; letter-spacing: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dr-insp { min-width: 0; }
.dr-sec { padding: 18px 0 16px; border-top: 1px solid var(--line); }
.dr-sec:first-child { border-top: 0; padding-top: 0; }
.dr-sec > h2 { font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin: 0 0 12px; }
.fxg { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.fx dt { font-size: 12px; color: var(--text-3); margin: 0 0 2px; }
.fx dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.fx-none { color: var(--text-3); } .fx-warn { color: var(--warn-ink); }
.fx-sub { display: block; font-size: 12px; color: var(--text-3); margin-top: 1px; }
.fx-line { margin: 12px 0 0; font-size: 13.5px; color: var(--text-2); }
.fx-src, .fx-conf { margin: 8px 0 0; font-size: 12.5px; color: var(--text-3); }
.fx-lines { list-style: none; margin: 14px 0 0; padding: 0; }
.fx-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.fx-lines li.is-out { opacity: 0.55; }
.fx-lines li.focus-row { box-shadow: inset 2px 0 0 var(--brand); padding-left: 8px; }
.fl-main { min-width: 0; overflow-wrap: anywhere; } .fl-amt { text-align: right; font-variant-numeric: tabular-nums; }
.fl-sub { display: block; font-size: 12px; color: var(--text-3); }
.dr-none { margin: 0; font-size: 13.5px; color: var(--text-3); }
.dr-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--text-3); }
.dr-map { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: rgba(20, 32, 28, 0.04); }
.dr-map-h { font-size: 13.5px; font-weight: 500; }
.dr-map-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; margin-top: 10px; font-size: 13px; align-items: center; }
.dr-map-row > span { grid-column: 1 / 3; } .dr-map-row select { min-width: 0; height: 30px; }
.rv-edit { margin-top: 14px; }
.rv-edit > summary { cursor: pointer; font-size: 12.5px; color: var(--text-3); list-style: none; display: inline-flex; gap: 6px; align-items: center; border-radius: 4px; }
.rv-edit > summary::-webkit-details-marker { display: none; }
.rv-edit > summary::before { content: "▸"; font-size: 10px; } .rv-edit[open] > summary::before { content: "▾"; }
.rv-edit > summary:hover { color: var(--ink); }
.rv-edit > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.rv-edit form { margin-top: 12px; }
.rv-edit .rv-fields, .rv-edit .rv-foot { margin-left: 0; }
.rv-edit .rv-row { padding: 10px 10px 8px; }
.rv-edit .rv-bulk { margin-bottom: var(--s2); position: static; }
.lk { list-style: none; margin: 0; padding: 0; }
.lk li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.lk li:first-child { border-top: 0; padding-top: 0; }
.lk-rel { font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); margin-right: 8px; }
.lk-go { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.lk-go:hover { text-decoration-color: var(--brand); color: var(--brand-ink); }
.lk-sub { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.dr-sec .rv-success { background: none; padding: 0; margin: 10px 0 0; }
.dr-sec .rv-success-title { font-size: 13.5px; font-weight: 500; color: var(--pos); }
.dr-sec .rv-success .note { font-size: 12.5px; color: var(--text-3); margin: 2px 0 8px; }
.dr-state { margin: 0 0 8px; font-size: 14px; }
.dr-why { margin: 0 0 8px; font-size: 13.5px; }
.dr-reasons { list-style: none; margin: 0 0 6px; padding: 0; }
.dr-reasons li { font-size: 13.5px; padding: 2px 0; color: var(--warn-ink); }
.dr-reasons li::before { content: "●"; font-size: 8px; margin-right: 8px; vertical-align: 2px; }
.dr-warn { margin: 6px 0 0; font-size: 12.5px; color: var(--warn-ink); }
.dr-warn.is-info { color: var(--text-3); }
.dr-confirm { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; }
.dr-confirm .dr-hint { margin: 0; flex: 1 1 200px; }
.dr-act { margin-top: 14px; }
.quiet-danger { background: none; border: 0; padding: 0; height: auto; color: var(--text-3); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.quiet-danger:hover { color: var(--neg); }
.dr-links { margin: 10px 0 0; font-size: 13px; }
.dr-more { margin-top: 12px; }
.dr-more > summary { cursor: pointer; font-size: 12.5px; color: var(--text-3); }
.dr-more > summary:hover { color: var(--ink); }
.dr-tbl { width: 100%; font-size: 12.5px; margin-top: 8px; }
.dr-tbl th, .dr-tbl td { height: auto; padding: 4px 6px; }

/* ======================================================================
   Targets: actual (solid) against target (faint ghost with a marker); an open list grouped by operating model.
   ====================================================================== */
.tg-sum { padding: 18px 22px 12px; margin: 0 0 var(--s4); }
.tg-items { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.tg-item { padding: 0 20px; border-left: 1px solid var(--line-strong); min-width: 0; }
.tg-item:first-child { padding-left: 0; border-left: 0; }
.tg-label { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.tg-big { font-size: 24px; font-weight: 500; letter-spacing: -0.03em; margin: 4px 0 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tg-big.tg-nil { color: var(--text-3); }
.tg-of { font-size: 14px; font-weight: 400; color: var(--text-3); letter-spacing: 0; }
.tg-bar { position: relative; display: block; height: 8px; border-radius: 999px; background: transparent; width: 100%; }
.tg-bar i { position: absolute; left: 0; top: 0; height: 100%; border-radius: 999px; display: block; }
.tg-bar .tg-t { background: rgba(20, 32, 28, 0.10); border-right: 2px solid rgba(20, 32, 28, 0.45); border-radius: 999px 2px 2px 999px; }
.tg-bar .tg-a { background: var(--brand); opacity: 0.9; }
.tg-bar.tg-behind .tg-a { background: #cf8a80; }
.tg-bar.tg-none { background: rgba(20, 32, 28, 0.04); }
.tg-var { margin-top: 8px; font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tg-var b { font-weight: 500; font-size: 14px; }
.tg-s-ahead b, .tg-s-on b { color: var(--pos); }
.tg-s-behind b { color: var(--neg); }
.tg-cap { margin-top: 4px; font-size: 12px; color: var(--text-3); }
.tg-owner .tg-big, .tg-owner .tg-label { opacity: 0.8; }
.tg-note, .tg-foot, .tg-gnote { font-size: 12.5px; color: var(--text-3); margin: 14px 0 0; }
.tg-gnote { margin: 4px 0 6px; }
.tg-foot { margin: var(--s3) 0 0; }
.tg-edit { margin-left: auto; }
.tg-pop { min-width: 210px; max-height: 340px; overflow: auto; }
.tg-pop-r { left: auto; right: 0; }
.tg-reset { background: none; border: 0; height: auto; padding: 7px 10px; color: var(--text-3); font-size: 13px; text-align: left; width: 100%; border-top: 1px solid var(--line); margin-top: 4px; border-radius: 0; cursor: pointer; }
.tg-reset:hover { color: var(--ink); }
.tg-surface { padding-top: 0; }
.tg-gh { display: flex; align-items: baseline; gap: 10px; margin: 0; padding: 20px 0 6px; font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--line-strong); }
.tg-group:first-of-type .tg-gh { padding-top: 14px; }
.tg-gh .g-meta { font-variant-numeric: tabular-nums; letter-spacing: 0; }
.tg-prop { padding: 12px 0 6px; border-bottom: 1px solid var(--line); }
.tg-prop:last-child { border-bottom: 0; }
.tg-prophead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 2px; }
.tg-pname { font-weight: 500; font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-perf { font-size: 12.5px; color: var(--text-3); text-decoration: none; white-space: nowrap; }
.tg-perf::after { content: " ›"; }
.tg-perf:hover { color: var(--ink); }
.tg-perf:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }
.tg-inactive, .tg-none { margin: 2px 0 8px; font-size: 13px; color: var(--text-3); }
.tg-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(130px, 1fr) minmax(150px, 1.5fr) 112px 70px; align-items: center; gap: 0 18px; width: 100%; padding: 8px 0; margin: 0; background: none; border: 0; border-radius: 6px; height: auto; text-align: left; color: var(--ink); font: inherit; font-size: 13.5px; cursor: pointer; transition: background-color var(--t-fast); }
.tg-row:hover { background: rgba(20, 32, 28, 0.03); }
.tg-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.tg-row > span { min-width: 0; }
.tg-metric { color: var(--text-2); }
.tg-tag { margin-left: 8px; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 6px; }
.tg-val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tg-val b { font-weight: 500; }
.tg-src { margin-left: 6px; font-size: 11px; color: var(--text-3); letter-spacing: 0.04em; text-transform: uppercase; }
.tg-miss { font-size: 13px; color: var(--text-3); }
.tg-vv { font-variant-numeric: tabular-nums; text-align: right; }
.tg-vv b { font-weight: 500; display: block; }
.tg-vv small { display: block; font-size: 11.5px; color: var(--text-3); }
.tg-s-ahead .tg-vv b, .tg-s-on .tg-vv b { color: var(--pos); }
.tg-s-behind .tg-vv b { color: var(--neg); }
.tg-trend { text-align: right; color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 900px) {
  .tg-items { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .tg-item:nth-child(odd) { padding-left: 0; border-left: 0; }
  .tg-sum { padding: 16px 16px 10px; }
}
@media (max-width: 760px) {
  .tg-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "metric metric" "val val" "bar bar" "var trend"; gap: 3px 10px; padding: 12px 0; border-top: 1px solid var(--line); border-radius: 0; }
  .tg-row:first-of-type { border-top: 0; }
  .tg-metric { grid-area: metric; color: var(--ink); font-weight: 500; }
  .tg-val { grid-area: val; font-size: 15px; }
  .tg-cell { grid-area: bar; }
  .tg-vv { grid-area: var; text-align: left; display: flex; gap: 8px; align-items: baseline; }
  .tg-vv b, .tg-vv small { display: inline; }
  .tg-trend { grid-area: trend; }
  .tg-big { font-size: 22px; }
}

/* Targets: a recorded average is a benchmark, not a target. Neutral ink, a dashed reference, no ahead/behind colour. */
.tg-bar.tg-bench .tg-a { background: rgba(20, 32, 28, 0.42); opacity: 1; }
.tg-bar.tg-bench .tg-t { background: rgba(20, 32, 28, 0.06); border-right: 2px dashed rgba(20, 32, 28, 0.4); }
.tg-s-benchmark b, .tg-s-benchmark .tg-vv b { color: var(--text-2); font-weight: 400; }
.tg-s-benchmark .tg-var span, .tg-s-benchmark .tg-vv small { color: var(--text-3); }
.tg-bench-note { color: var(--text-2); }

/* ======================================================================
   Reports: a report library with one live document. Statement hierarchy, hairlines, strong totals; no cards.
   ====================================================================== */
.rp-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; margin: 0 0 var(--s3); }
.rp-head h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.rp-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-ctl select, .rp-ctl input { height: 30px; font-size: 13px; }
.rp-ctl select { max-width: 240px; }
.rp-to { color: var(--text-3); }
.rp-upd { height: 30px; }
.rp-seg { margin: 0 0 8px; max-width: 100%; overflow-x: auto; }
.rp-seg a { white-space: nowrap; }
.rp-contents { margin: 0 0 var(--s4); font-size: 13px; color: var(--text-3); max-width: 70ch; }
.rp-empty { padding: 28px 24px; color: var(--text-2); }
.rp-empty p { margin: 0; }
.rp-doc { padding: 26px 32px 22px; }
.rp-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); flex-wrap: wrap; }
.rp-kick { font-size: 11.5px; letter-spacing: 0.09em; color: var(--text-3); font-weight: 500; }
.rp-title { font-size: 24px; font-weight: 600; letter-spacing: -0.025em; margin: 6px 0 2px; overflow-wrap: anywhere; }
.rp-period { font-size: 14.5px; color: var(--text-2); }
.rp-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.rp-actions .btn { height: 30px; font-size: 13px; text-decoration: none; }
.rp-state { margin: 22px 0 6px; font-size: 14.5px; color: var(--text-2); }
.rp-hero { display: flex; gap: 0; flex-wrap: wrap; margin: 22px 0 6px; padding: 14px 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.rp-hero > div { display: flex; flex-direction: column; gap: 2px; padding: 0 32px 0 0; margin-right: 32px; border-right: 1px solid var(--line); }
.rp-hero > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.rp-hl { font-size: 12.5px; color: var(--text-3); }
.rp-hn { color: var(--text-3); }
.rp-hv { font-size: 30px; font-weight: 500; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.rp-sec { margin-top: 24px; }
.rp-sec h3, .rp-more > summary { font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin: 0 0 6px; }
.rp-more > summary { cursor: pointer; list-style: none; padding: 4px 0; border-radius: 4px; }
.rp-more > summary::-webkit-details-marker { display: none; }
.rp-more > summary::before { content: "▸ "; } .rp-more[open] > summary::before { content: "▾ "; }
.rp-more > summary:hover { color: var(--ink); }
.rp-more > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.rp-count { font-variant-numeric: tabular-nums; letter-spacing: 0; margin-left: 4px; }
.rp-scroll { overflow-x: auto; max-width: 100%; }
.rp-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rp-tbl th { font-size: 12.5px; font-weight: 450; color: var(--text-3); text-transform: none; letter-spacing: 0; text-align: left; padding: 6px 14px 6px 0; border-bottom: 1px solid var(--line-strong); background: none; white-space: nowrap; height: auto; }
.rp-tbl td { padding: 8px 14px 8px 0; border-bottom: 1px solid var(--line); height: auto; vertical-align: top; }
.rp-tbl th.num, .rp-tbl td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 0; padding-left: 14px; }
.rp-tbl.rp-fin { table-layout: fixed; }
.rp-tbl.rp-fin th:first-child { width: 46%; }
.rp-tbl tr.rp-sub td { font-weight: 500; }
.rp-tbl tr.rp-total td { font-weight: 600; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.rp-dim { color: var(--text-3); }
.rp-note, .rp-none { font-size: 12.5px; color: var(--text-3); margin: 8px 0 0; max-width: 90ch; }
.rp-foot { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 28px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.rp-foot div { display: flex; gap: 6px; } .rp-foot dt { margin: 0; } .rp-foot dd { margin: 0; color: var(--text-2); }
.rp-gen { font-size: 12.5px; color: var(--text-3); margin: var(--s3) 0 0; }
@media (max-width: 760px) {
  .rp-doc { padding: 18px 16px 16px; }
  .rp-hv { font-size: 26px; }
  .rp-hero > div { padding-right: 18px; margin-right: 18px; }
  .rp-ctl { width: 100%; } .rp-ctl select { flex: 1 1 140px; max-width: none; }
  .rp-sec .rp-tbl.rp-fin th:nth-child(n+3), .rp-sec .rp-tbl.rp-fin td:nth-child(n+3) { display: none; }
  .rp-tbl.rp-fin th:first-child { width: auto; }
}


/* ----- final QA fixes ----- */
/* Property workspace "Recent records": never wider than the phone; scroll inside, never clip */
.ov2-recent { overflow-x: auto; max-width: 100%; }
/* Calendar: seven equal columns that can shrink; smaller cells on a phone */
.cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-cell { min-width: 0; }
@media (max-width: 560px) { .cal-grid { gap: 2px; } .cal-cell { padding: 3px 4px; aspect-ratio: 1.05; } .cal-occ { font-size: 11px; } .cal-weekday { font-size: 10px; letter-spacing: 0; } }
.cal-note { font-size: 13px; color: var(--text-2); margin: 0 0 var(--s3); }
.cal-cell.cal-agg { background: transparent !important; }
.cal-cell.cal-agg .cal-occ { color: var(--text-3) !important; font-weight: 400; }
/* Targets summary: the source tag sits under the figure instead of running off the card */
.tg-big { white-space: normal; }
.tg-big .tg-src { display: block; margin: 2px 0 0; }
@media (max-width: 560px) { .tg-items { grid-template-columns: minmax(0, 1fr); } .tg-item, .tg-item:nth-child(odd) { padding-left: 0; border-left: 0; } .tg-item + .tg-item { padding-top: 14px; border-top: 1px solid var(--line); } }
/* the drawer is a dialog: its container takes focus without a visible ring */
.drawer:focus { outline: none; }
/* Bookings table is wider than the column between phone and desktop widths: scroll inside the surface, never clip */
.bk-surface { overflow-x: auto; }
