/* Wuva Data: the Otis design system with Wuva green #235C4D as the product colour in place of Otis indigo
   (decision 2026-10-14). Only the accent family changes; every other token is Otis's own. */
:root {
  --accent: #235c4d;
  --accent-dark: #1a4639;
  --accent-light: #e5efeb;
  --accent-glow: rgba(35, 92, 77, 0.18);
  --accent-solid: #235c4d;
  --accent-solid-hover: #1a4639;
  --accent-soft: #8fb5a9;
  --selected: #e5efeb;
}
:root[data-theme="dark"] {
  --accent: #7fc4ad;
  --accent-dark: #a3d6c5;
  --accent-light: #1c2d28;
  --accent-glow: rgba(127, 196, 173, 0.25);
  --accent-solid: #2f7a66;
  --accent-solid-hover: #368a73;
  --accent-soft: #3f6b5e;
  --selected: #1c2d28;
}
/* Dark is opt-in, as in Otis: <html data-theme="dark">. */
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); }

/* Page-specific layout, in the system's tokens */
.wd-body { padding: 20px var(--page-gutter, 40px) 64px; max-width: var(--page-max, 1480px); }
.wd-stats { display: flex; gap: 40px; flex-wrap: wrap; margin-bottom: 28px; }
.wd-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 14px 0 6px; }
.wd-search { width: 240px; }
.wd-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle); cursor: pointer; border-radius: 0; }
.wd-row:hover { background: var(--hover); }
.wd-row[aria-expanded="true"] { background: var(--selected); }
.wd-payee { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wd-amount { text-align: right; font-variant-numeric: tabular-nums; }
.wd-amount small { display: block; font-size: 12px; color: var(--text-muted); }
.wd-editor { padding: 14px 12px 18px; border-bottom: 1px solid var(--border-subtle); background: var(--bg-subtle); }
.wd-editor-grid { display: grid; grid-template-columns: 220px 280px auto auto; gap: 12px; align-items: end; }
.wd-txns { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 12.5px; }
.wd-txns td { padding: 5px 8px 5px 0; border-top: 1px solid var(--border-subtle); color: var(--text-secondary); }
.wd-txns td.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.wd-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
@media (max-width: 900px) {
  .wd-body { padding: 16px 16px 48px; }
  .wd-editor-grid { grid-template-columns: 1fr; }
  .wd-search { width: 100%; }
}

/* The black sidebar keeps Otis's own dark tokens; only its accent turns Wuva green */
aside.sidebar { --accent: #8fd1ba; --accent-light: rgba(143, 209, 186, 0.14); }
.wd-sidebar { width: 216px; flex-shrink: 0; display: flex; flex-direction: column; padding: 10px 8px 10px 10px; background: var(--canvas); }
.wd-brand { display: flex; align-items: center; gap: 8px; padding: 8px 6px 14px; color: var(--text); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.wd-brand { flex-direction: column; align-items: flex-start; gap: 4px; }
.wd-brand img { height: 22px; width: auto; }
.wd-brand span { font-size: 11.5px; font-weight: 500; color: var(--text-muted); }
.wd-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.wd-table-head, .wd-table-row { display: grid; gap: 12px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--border-subtle); }
.wd-table-head { font-size: 12px; color: var(--text-muted); padding-top: 4px; padding-bottom: 6px; }
.wd-table-row { cursor: pointer; font-size: 13px; }
.wd-table-row:hover { background: var(--hover); }
.wd-num { text-align: right; font-variant-numeric: tabular-nums; }
.wd-form { display: grid; gap: 14px; }
.wd-form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wd-form-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wd-group-title { font-size: 12px; color: var(--text-muted); margin: 18px 12px 4px; }
@media (max-width: 640px) {
  .wd-sidebar { display: none; }
  .wd-form-2, .wd-form-4 { grid-template-columns: 1fr; }
}

/* Workbook-style statements: months across, lines down. Hairlines, not boxes; tabular figures. */
.wd-body-wide { max-width: none; }
.wd-sheet-wrap { overflow-x: auto; border-top: 1px solid var(--border-subtle); }
.wd-sheet { border-collapse: collapse; font-size: 12.5px; width: 100%; }
.wd-sheet th { font-weight: 500; font-size: 12px; color: var(--text-muted); text-align: left; padding: 8px 10px; white-space: nowrap;
  border-bottom: 1px solid var(--border-subtle); background: var(--bg); position: sticky; top: 0; z-index: 1; }
.wd-sheet td { padding: 5px 10px; border-bottom: 1px solid var(--border-subtle); white-space: nowrap; }
.wd-sheet .num { text-align: right; font-variant-numeric: tabular-nums; }
.wd-sheet .wd-sheet-label { position: sticky; left: 0; background: var(--bg); min-width: 260px; max-width: 340px; overflow: hidden; text-overflow: ellipsis; z-index: 2; }
.wd-sheet thead .wd-sheet-label { z-index: 3; }
.wd-sheet .is-current { background: var(--selected); }
.wd-sheet th.is-current { color: var(--accent); }
.wd-sheet .wd-sheet-ytd { border-left: 1px solid var(--border); font-weight: 500; }
.wd-sheet .wd-sheet-note { color: var(--text-muted); font-size: 12px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.wd-sheet tr.is-section td { font-weight: 600; font-size: 13px; color: var(--text); padding-top: 18px; border-bottom: 1px solid var(--border); background: var(--bg); }
.wd-sheet tr.is-section td span { position: sticky; left: 10px; }
.wd-sheet tr.is-total td { font-weight: 600; border-top: 1px solid var(--border-strong); }
.wd-sheet tr.is-ratio td, .wd-sheet tr.is-metric td { color: var(--text-secondary); }
.wd-sheet tr.is-check td { color: var(--text-muted); font-size: 12px; }
.wd-sheet tr.is-check.is-bad td.num { color: var(--red); }
.wd-sheet td.is-drill { cursor: pointer; }
.wd-sheet td.is-drill:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.wd-sheet tr:hover td { background-color: var(--hover); }
.wd-sheet tr.is-section:hover td { background: var(--bg); }
.wd-sheet-plain { margin-bottom: 4px; }
.wd-muted { color: var(--text-muted); }

/* Dashboard charts: one series, one axis, in the chart token. Light keeps the brand green (contrast 3:1+ on the panel);
   dark uses #2f9a77, which passes the lightness, chroma and contrast checks on the dark panel. */
:root { --chart: #235c4d; }
:root[data-theme="dark"] { --chart: #2f9a77; }
.wd-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px 32px; padding-top: 14px; }
.wd-tile { min-width: 0; }
.wd-chart { position: relative; margin-top: 10px; }
.wd-chart svg { display: block; overflow: visible; }
.wd-chart-mark { fill: var(--chart); transition: opacity 100ms; }
.wd-chart-mark.is-dim { opacity: 0.45; }
.wd-chart-line { fill: none; stroke: var(--chart); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.wd-chart-dot { fill: var(--chart); stroke: var(--bg); stroke-width: 2; }
.wd-chart-zero { stroke: var(--border); stroke-width: 1; }
.wd-chart-cross { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 2 3; }
.wd-chart-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.wd-chart-empty { height: 96px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle); }
.wd-chart-tip { position: absolute; top: -6px; transform: translate(-50%, -100%); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 5px 8px; font-size: 12px; white-space: nowrap; pointer-events: none;
  display: flex; gap: 8px; font-variant-numeric: tabular-nums; z-index: 5; }
.wd-chart-tip span { color: var(--text-muted); }

/* Sign-in and the signed-in person in the sidebar */
.wd-signin { position: fixed; inset: 0; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 40px 16px; background: #121217; }
.wd-signin-centre { width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; gap: 40px; }
.wd-signin-logo { width: 132px; height: auto; }
.wd-signin-box { width: 100%; }
.wd-signin[hidden] { display: none; }
.wd-user { display: flex; align-items: center; gap: 8px; padding: 10px 6px 4px; border-top: 1px solid var(--border-subtle); font-size: 12px;
  color: var(--text-muted); min-width: 0; }
.wd-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Experiments */
.wd-exp { padding: 18px 0 22px; border-bottom: 1px solid var(--border-subtle); }
.wd-exp-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.wd-exp-title { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 15px; font-weight: 600; color: var(--text); }
.wd-exp-text { margin: 10px 0 0; max-width: 760px; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }
.wd-exp-notes { font-size: 12.5px; color: var(--text-muted); }
.wd-exp-figures { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px 32px; margin-top: 16px; }
.wd-exp-figure { min-width: 0; }
.wd-exp-figure-head { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.wd-exp-figure-name { font-weight: 500; color: var(--text); }
.wd-exp-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 6px; }
.wd-exp-nums span { display: block; font-size: 11.5px; color: var(--text-muted); }
.wd-exp-nums strong { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.wd-exp-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.wd-exp-line.is-before { stroke: var(--text-muted); }
.wd-exp-dot { fill: var(--text-muted); stroke: var(--bg); stroke-width: 2; }
.wd-exp-dot.is-open { fill: var(--bg); stroke: var(--text-muted); stroke-width: 1.5; }
.wd-exp-avg { stroke: var(--chart); stroke-width: 1; stroke-dasharray: 4 3; }
.wd-exp-avg.is-before { stroke: var(--text-muted); }
.wd-exp-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; max-height: 300px; overflow: auto;
  padding: 12px; border: 1px solid var(--border-subtle); border-radius: 8px; }
.wd-exp-picker-title { font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.wd-exp-pick { display: flex; gap: 8px; align-items: center; justify-content: space-between; min-height: 30px; }
@media (max-width: 760px) { .wd-exp-picker { grid-template-columns: 1fr; } }
