:root {
  --bg: #f5f6f4;
  --panel: #ffffff;
  --panel-2: #f0f2ef;
  --text: #1d2420;
  --muted: #66706a;
  --line: #dfe3de;
  --accent: #2f6f5e;
  --accent-ink: #ffffff;
  --accent-soft: #e2efe9;
  --good: #23784f;
  --bad: #b23b31;
  --warn: #9a6a00;
  --bad-soft: #f8e5e2;
  --warn-soft: #f8efd8;
  --good-soft: #e1f1e7;
  --bar: #2f6f5e;
  --bar-2: #c58b2d;
  --shadow: 0 1px 2px rgba(20, 30, 25, .06), 0 2px 10px rgba(20, 30, 25, .04);
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141816;
    --panel: #1c211e;
    --panel-2: #232925;
    --text: #e6ebe7;
    --muted: #97a29b;
    --line: #2f3632;
    --accent: #5fb398;
    --accent-ink: #0d1411;
    --accent-soft: #1f3530;
    --good: #5cc58f;
    --bad: #f0857a;
    --warn: #e2b54f;
    --bad-soft: #3a2220;
    --warn-soft: #3a3020;
    --good-soft: #1d3428;
    --bar: #5fb398;
    --bar-2: #e2b54f;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 0.875rem/1.45 var(--font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); }
h1 { font-size: 1.375rem; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 0.9375rem; margin: 0 0 10px; }
h3 { font-size: 0.8125rem; margin: 0; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.75rem; }
.num { text-align: right; white-space: nowrap; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }

/* Layout */
.shell { display: grid; grid-template-columns: minmax(220px, 14rem) minmax(0, 1fr); min-height: 100vh; }
.shell > * { min-width: 0; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; gap: 10px; align-items: center; font-weight: 650; padding: 0 8px 18px; }
#nav { display: flex; flex-direction: column; gap: 2px; }
#nav a { color: var(--text); text-decoration: none; padding: 8px 10px; border-radius: 7px; }
#nav a:hover { background: var(--panel-2); }
#nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
main { padding: 24px 28px 60px; max-width: 2200px; width: 100%; outline: none; }
main p, main li { max-width: 120ch; } /* long lines stay readable on wide monitors */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 4px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; z-index: 5; height: auto; padding: 8px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 4px 0 8px; }
  #nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  #nav a { white-space: nowrap; padding: 6px 10px; }
  main { padding: 18px 16px 60px; }
}

/* Panels & grids */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; min-width: 0; }
.panel + .panel { margin-top: 16px; }
.grid > .panel + .panel, .stack > .panel + .panel { margin-top: 0; }
.stack > .panel + .panel { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.grid.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 16px; }
@media (max-width: 1100px) { .grid.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.two { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid.k3 { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .grid.k4 { grid-template-columns: 1fr; } }

.kpi { padding: 14px 16px; }
.kpi .label { color: var(--muted); font-size: 0.75rem; }
.kpi .value { font-size: 1.5rem; font-weight: 650; margin-top: 2px; letter-spacing: -.01em; }
.kpi .sub { color: var(--muted); font-size: 0.75rem; margin-top: 2px; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 0.75rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
th.num, td.num { text-align: right; }
tbody tr:hover { background: var(--panel-2); }
tbody tr:not(.group) td:first-child { min-width: 160px; }
tr.dim td { opacity: .55; }
tr.dim td.keep { opacity: 1; }
tr.group td { background: var(--panel-2); font-weight: 600; }
tfoot td { font-weight: 650; border-bottom: 0; border-top: 2px solid var(--line); }
td.row-actions { white-space: nowrap; text-align: right; width: 1%; }
/* a list wider than the screen: its buttons stay in view at the right, and wrap to two lines on small monitors */
@media (min-width: 861px) { .table-wrap td.row-actions { position: sticky; right: 0; background: var(--panel); box-shadow: -8px 0 8px -8px rgba(0, 0, 0, .18); z-index: 1; } }
@media (min-width: 861px) and (max-width: 1800px) { .table-wrap td.row-actions { white-space: normal; min-width: 150px; } }
.clickable { cursor: pointer; }

/* Buttons & forms */
button, .btn {
  font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  padding: 7px 12px; border-radius: 7px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
button:hover, .btn:hover { background: var(--panel-2); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button.primary:hover { filter: brightness(1.07); background: var(--accent); }
button.danger { color: var(--bad); }
button.ghost { border-color: transparent; background: transparent; padding: 4px 8px; color: var(--muted); }
button.ghost:hover { color: var(--text); background: var(--panel-2); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; width: 100%;
}
input[type=checkbox] { width: auto; accent-color: var(--accent); transform: scale(1.15); }
input[type=color] { padding: 2px; height: 36px; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 0.75rem; color: var(--muted); }
label.field > span { font-weight: 600; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 0.875rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid h3.form-sec { margin: 8px 0 -4px; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.form-grid h3.form-sec:first-child { margin-top: 0; }
.contact-info { display: flex; flex-direction: column; gap: 3px; font-size: 0.8125rem; min-width: 0; }
.contact-info a { overflow-wrap: anywhere; }
.contact-info .muted { font-size: 0.75rem; }
.contact-search { width: 100%; max-width: 360px; margin: 0 0 14px; }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }
.inline { display: inline-flex; gap: 8px; align-items: center; }
.inline input, .inline select { width: auto; }

/* Dialog */
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 0; background: var(--panel); color: var(--text); width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog.wide { width: min(980px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(10, 15, 12, .45); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 1; }
.dlg-head h2 { margin: 0; font-size: 1rem; }
.dlg-body { padding: 18px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--panel); }

/* Bits */
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 0.75rem; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; }
.person-card { display: flex; flex-direction: column; gap: 12px; }
.person-card .top { display: flex; gap: 12px; align-items: center; }
.person-card dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0; }
.person-card dt { color: var(--muted); }
.person-card dd { margin: 0; text-align: right; font-weight: 600; }

.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 170px) 1fr auto; gap: 10px; align-items: center; }
.bar-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--bar); border-radius: 99px; }
.progress { height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; min-width: 70px; }
.progress > i { display: block; height: 100%; background: var(--bar); }
.progress.over > i { background: var(--bad); }

.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks .ico { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 700; }
.checks .ok .ico { background: var(--good-soft); color: var(--good); }
.checks .no .ico { background: var(--bad-soft); color: var(--bad); }
.checks .hm .ico { background: var(--warn-soft); color: var(--warn); }

.chart svg { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--line); }
.chart text { fill: var(--muted); font-size: 0.6875rem; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.75rem; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }

.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.empty button { margin-top: 10px; }
.callout { background: var(--accent-soft); border-radius: var(--radius); padding: 12px 14px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.month-nav { display: inline-flex; align-items: center; gap: 6px; }
.month-nav strong { min-width: 130px; text-align: center; }
.amount-input { width: 110px; text-align: right; }

#toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 8px; opacity: 0; pointer-events: none; transition: .2s; z-index: 100; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.error { background: var(--bad); color: #fff; }

/* Stage 1: accounts & register */
[hidden] { display: none !important; }
.split-lines td { padding: 4px 6px; }
.split-lines select, .split-lines input { width: 100%; }
.toolbar > select { width: auto; max-width: 100%; }

/* Contact groups */
fieldset.group-checks { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.group-checks legend { padding: 0; margin-bottom: 6px; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
fieldset.group-checks .check-row { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chips button { border-radius: 99px; padding: 4px 12px; font-size: 0.8125rem; }
.chips button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.chips button .n { opacity: .75; margin-left: 4px; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.pill.g-household { background: var(--good-soft); color: var(--good); }
.pill.g-lender { background: var(--warn-soft); color: var(--warn); }
.pill.g-borrower { background: var(--bad-soft); color: var(--bad); }

/* Contact search box (combobox) */
.combo-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.75rem; color: var(--muted); }
.combo-field > span { font-weight: 600; }
.combo { position: relative; }
.combo > input[role=combobox] { width: 100%; }
.combo-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 2px); max-height: 260px; overflow: auto; margin: 0; padding: 4px 0; list-style: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.18); font-size: 0.875rem; color: var(--text); }
.combo-list li { padding: 6px 10px; cursor: pointer; }
.combo-list li.combo-head { cursor: default; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding-top: 8px; }
.combo-list li[role=option]:hover, .combo-list li.active { background: var(--accent-soft); }
.combo-list li[data-new] { color: var(--accent); font-weight: 600; }
.actual-grid td, .actual-grid th { white-space: nowrap; }
.actual-grid td:first-child, .actual-grid th:first-child { position: sticky; left: 0; background: var(--panel); z-index: 1; }
.actual-grid tr.group td:first-child { background: var(--panel-2); }
/* Stage 5: receipts */
.rcpt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.rcpt-card { display: flex; gap: 12px; padding: 12px; margin: 0; }
.rcpt-thumb { flex: 0 0 88px; }
.rcpt-img { width: 88px; height: 110px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.rcpt-doc { width: 88px; height: 110px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.rcpt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rcpt-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rcpt-fields input { width: 100%; min-width: 0; }
.rcpt-body .actions { display: flex; flex-wrap: wrap; gap: 6px; }
.rcpt-drop.drag { outline: 2px dashed var(--accent); outline-offset: -6px; }
.rcpt-mini { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0; }
.rcpt-mini-item { position: relative; }
.rcpt-mini-item .rcpt-img, .rcpt-mini-item .rcpt-doc { width: 64px; height: 80px; }
.rcpt-mini-item button { position: absolute; top: -6px; right: -6px; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 0 6px; }
.rcpt-match-top { display: flex; gap: 12px; align-items: center; }
.rcpt-match-top .rcpt-img, .rcpt-match-top .rcpt-doc { width: 56px; height: 70px; }
.rcpt-text summary { cursor: pointer; color: var(--muted); }
.rcpt-text pre { white-space: pre-wrap; font-size: 0.6875rem; max-height: 180px; overflow: auto; background: var(--panel-2); padding: 6px; border-radius: 6px; margin: 4px 0 0; }

/* ---- Stage 7: Reports ---- */
.rep-grid tr.rep-total td { font-weight: 600; border-top: 2px solid var(--line); }
.rep-grid tfoot tr.rep-total td { border-top: 3px double var(--line); }
.print-only { display: none; }
@media print {
  :root { --bg: #fff; --panel: #fff; --panel-2: #f0f0f0; --text: #000; --muted: #444; --line: #bbb; }
  body { background: #fff; }
  .sidebar, .no-print, .page-head .actions, #toast, dialog { display: none !important; }
  .shell { display: block; }
  main { padding: 0 !important; max-width: none !important; }
  .print-only { display: block; }
  .panel { box-shadow: none; border: 1px solid #ccc; break-inside: avoid-page; }
  .table-wrap { overflow: visible !important; }
  .actual-grid td:first-child, .actual-grid th:first-child { position: static; }
  table { font-size: 0.625rem; }
  a { color: inherit; text-decoration: none; }
}

/* ---- Sidebar groups & icons ---- */
#nav { gap: 0; }
.nav-group { display: flex; flex-direction: column; gap: 1px; margin-bottom: 10px; }
.nav-head { all: unset; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 0.6875rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 4px; border-radius: 6px; }
.nav-head:hover { color: var(--text); }
.nav-head:focus-visible { outline: 2px solid var(--accent); }
.nav-caret { transition: transform .15s; font-size: 0.625rem; }
.nav-group.closed .nav-caret { transform: rotate(-90deg); }
.nav-group.closed a:not(.active) { display: none; }
#nav a { display: flex; align-items: center; gap: 10px; }
.nav-ico { width: 18px; height: 18px; flex: none; opacity: .85; }
#nav a.active .nav-ico { opacity: 1; }
.nav-custom { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--muted); font-size: 0.8125rem; padding: 8px 10px; border-radius: 7px; margin-top: 4px; }
.nav-custom:hover { background: var(--panel-2); color: var(--text); }
.navc-group { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 10px; }
.navc-item { display: flex; align-items: center; gap: 8px; padding: 4px 2px; border-top: 1px solid var(--line); }
.navc-item:first-of-type { border-top: 0; }
.navc-item select { max-width: 150px; }
.navc-item.dim { opacity: .5; }
@media (max-width: 860px) {
  .nav-group { display: contents; }
  .nav-head, .nav-custom span { display: none; }
  .nav-group.closed a:not(.active) { display: flex; }
}

/* ---- Calendar ---- */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-head { font-size: 0.75rem; font-weight: 600; color: var(--muted); padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel-2); }
.cal-day { min-height: 104px; padding: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-day.out { background: var(--panel-2); opacity: .55; }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-day.hol .cal-num span:first-child { color: var(--bad); }
.cal-num { display: flex; justify-content: space-between; font-size: 0.75rem; font-weight: 600; padding: 0 2px; }
.cal-chip { all: unset; box-sizing: border-box; display: flex; justify-content: space-between; gap: 4px; font-size: 0.6875rem; line-height: 1.3; padding: 2px 5px; border-radius: 4px; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border-left: 3px solid; background: var(--panel-2); }
.cal-chip:hover { filter: brightness(.95); }
.cal-chip .cal-amt { color: var(--muted); flex: none; }
.cal-chip.done { opacity: .6; text-decoration: line-through; }
.cal-chip.got { font-weight: 600; } /* a payday whose pay stub is in: received */
.k-expense { border-color: var(--bar); } .k-card { border-color: var(--bar-2); } .k-loan { border-color: var(--bad); }
.k-payday { border-color: var(--good); background: var(--good-soft); } .k-holiday { border-color: var(--muted); font-style: italic; } .k-custom { border-color: #5b7fd6; }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: currentColor; border: 0; }
.cal-dot.k-expense { color: var(--bar); } .cal-dot.k-card { color: var(--bar-2); } .cal-dot.k-loan { color: var(--bad); } .cal-dot.k-payday { color: var(--good); } .cal-dot.k-holiday { color: var(--muted); } .cal-dot.k-custom { color: #5b7fd6; }
@media (max-width: 700px) {
  .cal-day { min-height: 64px; }
  .cal-chip { font-size: 0; padding: 0; height: 6px; border-left-width: 0; border-radius: 3px; background: currentColor; }
  .cal-chip.k-expense { color: var(--bar); } .cal-chip.k-card { color: var(--bar-2); } .cal-chip.k-loan { color: var(--bad); } .cal-chip.k-payday { color: var(--good); } .cal-chip.k-holiday { color: var(--muted); } .cal-chip.k-custom { color: #5b7fd6; }
  .cal-num .small { display: none; }
}

/* ---- Accounts & text size ---- */
#login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.login-card { width: min(380px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.login-card .field input { width: 100%; }
.login-size { display: flex; align-items: center; justify-content: center; gap: 2px; margin-top: 8px; }
.login-size button { padding: 2px 6px; line-height: 1; }
.nav-user { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 0 0 10px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.nav-user .nav-me { flex: 1; min-width: 0; }
.nav-user .nav-me span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-budget { display: flex; flex-direction: column; gap: 2px; padding: 0 0 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.nav-budget select { width: 100%; font-weight: 600; }
.nav-size { display: flex; flex: none; }
.nav-size button { padding: 4px 6px; font-size: 0.8125rem; }
.size-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.size-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 76px; padding: 8px 10px; }
.size-pick.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
@media (max-width: 860px) {
  .nav-user { border: 0; margin: 0; padding: 0; }
  .nav-user .nav-me span { display: none; }
}

/* ---- Appearance: modes (Auto / Light / Bright white / Dark) and background pictures ---- */
:root { --hol: #b8362b; --hol-soft: #fbe7e4; }
@media (prefers-color-scheme: dark) { :root { --hol: #f0857a; --hol-soft: #3a2321; } }
html[data-mode="light"], html[data-mode="white"] {
  --bg: #f5f6f4; --panel: #ffffff; --panel-2: #f0f2ef; --text: #1d2420; --muted: #66706a; --line: #dfe3de;
  --accent: #2f6f5e; --accent-ink: #ffffff; --accent-soft: #e2efe9; --good: #23784f; --bad: #b23b31; --warn: #9a6a00;
  --bad-soft: #f8e5e2; --warn-soft: #f8efd8; --good-soft: #e1f1e7; --bar: #2f6f5e; --bar-2: #c58b2d;
  --shadow: 0 1px 2px rgba(20, 30, 25, .06), 0 2px 10px rgba(20, 30, 25, .04); --hol: #b8362b; --hol-soft: #fbe7e4; color-scheme: light;
}
html[data-mode="white"] { --bg: #ffffff; --panel: #ffffff; --panel-2: #f5f7f9; --line: #e4e7eb; --shadow: 0 1px 3px rgba(0, 0, 0, .06); }
html[data-mode="dark"] {
  --bg: #141816; --panel: #1c211e; --panel-2: #232925; --text: #e6ebe7; --muted: #97a29b; --line: #2f3632;
  --accent: #5fb398; --accent-ink: #0d1411; --accent-soft: #1f3530; --good: #5cc58f; --bad: #f0857a; --warn: #e2b54f;
  --bad-soft: #3a2220; --warn-soft: #3a3020; --good-soft: #1d3428; --bar: #5fb398; --bar-2: #e2b54f; --shadow: none;
  --hol: #f0857a; --hol-soft: #3a2321; color-scheme: dark;
}
html[data-mode="sepia"] {
  --bg: #f4ecdc; --panel: #fbf6ec; --panel-2: #f1e7d4; --text: #3a2f22; --muted: #7a6a55; --line: #e2d5bd;
  --accent: #2f6f5e; --accent-ink: #ffffff; --accent-soft: #e6eadb; --good: #3f7a3a; --bad: #a8402f; --warn: #94650a;
  --bad-soft: #f4e0d6; --warn-soft: #f3e6c8; --good-soft: #e3ebd5; --bar: #2f6f5e; --bar-2: #b9852f;
  --shadow: 0 1px 2px rgba(70, 50, 20, .08), 0 2px 10px rgba(70, 50, 20, .05); --hol: #a8402f; --hol-soft: #f4e0d6; color-scheme: light;
}
html[data-mode="contrast"] {
  --bg: #ffffff; --panel: #ffffff; --panel-2: #eeeeee; --text: #000000; --muted: #2b2b2b; --line: #000000;
  --accent: #0b4f3e; --accent-ink: #ffffff; --accent-soft: #d6ece4; --good: #0a5c2f; --bad: #9e1b12; --warn: #6b4a00;
  --bad-soft: #fbdcd8; --warn-soft: #fbedc8; --good-soft: #d4efdd; --bar: #0b4f3e; --bar-2: #8a5a00;
  --shadow: none; --hol: #9e1b12; --hol-soft: #fbdcd8; color-scheme: light;
}
html[data-mode="contrast"] .panel, html[data-mode="contrast"] .kpi { border-width: 2px; }
html[data-mode="contrast"] a { text-decoration: underline; }
html[data-mode="contrast"] :focus-visible { outline: 3px solid #000; outline-offset: 2px; }
html[data-mode="dim"] {
  --bg: #23272e; --panel: #2c313a; --panel-2: #343a44; --text: #dfe3ea; --muted: #a1a9b6; --line: #3e4551;
  --accent: #6fbfa5; --accent-ink: #11161a; --accent-soft: #2a3d3a; --good: #6ccb98; --bad: #f08f84; --warn: #e5bc63;
  --bad-soft: #43302f; --warn-soft: #433a2a; --good-soft: #283d33; --bar: #6fbfa5; --bar-2: #e5bc63; --shadow: none;
  --hol: #f08f84; --hol-soft: #43302f; color-scheme: dark;
}
html[data-mode="midnight"] {
  --bg: #000000; --panel: #0d0f0e; --panel-2: #161917; --text: #eef2ef; --muted: #9aa39d; --line: #262b28;
  --accent: #5fb398; --accent-ink: #000000; --accent-soft: #15261f; --good: #5cc58f; --bad: #f0857a; --warn: #e2b54f;
  --bad-soft: #2b1715; --warn-soft: #2b2415; --good-soft: #13261c; --bar: #5fb398; --bar-2: #e2b54f; --shadow: none;
  --hol: #f0857a; --hol-soft: #2b1715; color-scheme: dark;
}
/* More modes */
html[data-mode="mist"] {
  --bg: #eef2f6; --panel: #ffffff; --panel-2: #e8edf3; --text: #1c2430; --muted: #5f6b7a; --line: #d8dfe8;
  --accent: #2f6f5e; --accent-ink: #ffffff; --accent-soft: #e2efe9; --good: #23784f; --bad: #b23b31; --warn: #9a6a00;
  --bad-soft: #f8e5e2; --warn-soft: #f8efd8; --good-soft: #e1f1e7; --bar: #2f6f5e; --bar-2: #c58b2d;
  --shadow: 0 1px 2px rgba(20, 30, 40, .06), 0 2px 10px rgba(20, 30, 40, .04); --hol: #b8362b; --hol-soft: #fbe7e4; color-scheme: light;
}
html[data-mode="sage"] {
  --bg: #eef3ec; --panel: #fbfdf9; --panel-2: #e5ede1; --text: #1e2a1f; --muted: #5f6e60; --line: #d5e0d1;
  --accent: #2f6f5e; --accent-ink: #ffffff; --accent-soft: #dfece2; --good: #23784f; --bad: #b23b31; --warn: #9a6a00;
  --bad-soft: #f8e5e2; --warn-soft: #f8efd8; --good-soft: #e1f1e7; --bar: #2f6f5e; --bar-2: #c58b2d;
  --shadow: 0 1px 2px rgba(20, 30, 40, .06), 0 2px 10px rgba(20, 30, 40, .04); --hol: #b8362b; --hol-soft: #fbe7e4; color-scheme: light;
}
html[data-mode="blush"] {
  --bg: #f9eff0; --panel: #fffafa; --panel-2: #f4e4e6; --text: #33212a; --muted: #7a6168; --line: #ecd8dc;
  --accent: #2f6f5e; --accent-ink: #ffffff; --accent-soft: #e2efe9; --good: #23784f; --bad: #b23b31; --warn: #9a6a00;
  --bad-soft: #f8e5e2; --warn-soft: #f8efd8; --good-soft: #e1f1e7; --bar: #2f6f5e; --bar-2: #c58b2d;
  --shadow: 0 1px 2px rgba(20, 30, 40, .06), 0 2px 10px rgba(20, 30, 40, .04); --hol: #b8362b; --hol-soft: #fbe3e1; color-scheme: light;
}
html[data-mode="sand"] {
  --bg: #f2ead9; --panel: #fbf7ef; --panel-2: #ece2cd; --text: #2f281d; --muted: #756a57; --line: #e0d4bb;
  --accent: #2f6f5e; --accent-ink: #ffffff; --accent-soft: #e4eada; --good: #23784f; --bad: #b23b31; --warn: #9a6a00;
  --bad-soft: #f8e5e2; --warn-soft: #f8efd8; --good-soft: #e1f1e7; --bar: #2f6f5e; --bar-2: #c58b2d;
  --shadow: 0 1px 2px rgba(20, 30, 40, .06), 0 2px 10px rgba(20, 30, 40, .04); --hol: #a8402f; --hol-soft: #f4e0d6; color-scheme: light;
}
html[data-mode="ocean"] {
  --bg: #0f1a2a; --panel: #152338; --panel-2: #1c2d45; --text: #e3ebf5; --muted: #93a4bb; --line: #26384f;
  --accent: #5fb398; --accent-ink: #0f1a2a; --accent-soft: #1b3a3a; --good: #5cc58f; --bad: #f0857a; --warn: #e2b54f;
  --bad-soft: #3a2220; --warn-soft: #3a3020; --good-soft: #1d3428; --bar: #5fb398; --bar-2: #e2b54f; --shadow: none;
  --hol: #f0857a; --hol-soft: #3a2321; color-scheme: dark;
}
html[data-mode="forestnight"] {
  --bg: #111a14; --panel: #17231b; --panel-2: #1e2c22; --text: #e3ede5; --muted: #93a698; --line: #2a3a2e;
  --accent: #6cc39f; --accent-ink: #111a14; --accent-soft: #1c3a2c; --good: #5cc58f; --bad: #f0857a; --warn: #e2b54f;
  --bad-soft: #3a2220; --warn-soft: #3a3020; --good-soft: #1d3428; --bar: #6cc39f; --bar-2: #e2b54f; --shadow: none;
  --hol: #f0857a; --hol-soft: #3a2321; color-scheme: dark;
}
html[data-mode="mocha"] {
  --bg: #1e1814; --panel: #28201b; --panel-2: #312821; --text: #efe6dd; --muted: #a89888; --line: #3d322a;
  --accent: #6fbfa5; --accent-ink: #1e1814; --accent-soft: #2a332c; --good: #5cc58f; --bad: #f0857a; --warn: #e2b54f;
  --bad-soft: #3a2220; --warn-soft: #3a3020; --good-soft: #1d3428; --bar: #6fbfa5; --bar-2: #e2b54f; --shadow: none;
  --hol: #f0857a; --hol-soft: #3a2321; color-scheme: dark;
}
html[data-mode="plum"] {
  --bg: #1b1422; --panel: #241b2d; --panel-2: #2d2338; --text: #ece4f3; --muted: #a597b5; --line: #3a2e47;
  --accent: #6fbfa5; --accent-ink: #1b1422; --accent-soft: #24333a; --good: #5cc58f; --bad: #f0857a; --warn: #e2b54f;
  --bad-soft: #3a2220; --warn-soft: #3a3020; --good-soft: #1d3428; --bar: #6fbfa5; --bar-2: #e2b54f; --shadow: none;
  --hol: #f0857a; --hol-soft: #3a2321; color-scheme: dark;
}
html[data-mode="contrastdark"] {
  --bg: #000000; --panel: #000000; --panel-2: #1a1a1a; --text: #ffffff; --muted: #e0e0e0; --line: #ffffff;
  --accent: #7ee0bd; --accent-ink: #000000; --accent-soft: #0f3a2c; --good: #5cc58f; --bad: #f0857a; --warn: #e2b54f;
  --bad-soft: #3a2220; --warn-soft: #3a3020; --good-soft: #1d3428; --bar: #7ee0bd; --bar-2: #e2b54f; --shadow: none;
  --hol: #f0857a; --hol-soft: #3a2321; color-scheme: dark;
}
html[data-mode="contrastdark"] .panel, html[data-mode="contrastdark"] .kpi { border-width: 2px; }
html[data-mode="contrastdark"] a { text-decoration: underline; }
html[data-mode="contrastdark"] :focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
/* Spacing */
html[data-density="compact"] .panel { padding: 10px; }
html[data-density="compact"] .panel + .panel { margin-top: 10px; }
html[data-density="compact"] .grid { gap: 10px; }
html[data-density="compact"] td, html[data-density="compact"] th { padding-top: 3px; padding-bottom: 3px; }
html[data-density="compact"] button, html[data-density="compact"] .btn { padding: 4px 9px; }
html[data-density="comfy"] .panel { padding: 22px; }
html[data-density="comfy"] .panel + .panel { margin-top: 22px; }
html[data-density="comfy"] .grid { gap: 22px; }
html[data-density="comfy"] td, html[data-density="comfy"] th { padding-top: 9px; padding-bottom: 9px; }
html[data-font="mono"] body { font-size: 0.8125rem; }
.own-color { cursor: pointer; }
.own-color input[type="color"] { width: 30px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
body { background-color: var(--bg); background-image: var(--bg-image, none); background-size: var(--bg-size, auto); background-attachment: fixed; background-position: center bottom; }
html[data-bg]:not([data-bg="none"]) .panel, html[data-bg]:not([data-bg="none"]) .kpi { box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 18px rgba(0, 0, 0, .05); }

/* Holidays: a day off is tinted and labelled */
.cal-day.hol { background: var(--hol-soft); }
.cal-day.hol .cal-num span:first-child { color: var(--hol); }
.cal-day.bank { background: repeating-linear-gradient(135deg, transparent 0 8px, var(--panel-2) 8px 10px); }
.cal-off { font-style: normal; font-size: 0.625rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--hol); margin-left: 4px; }
.cal-off.bank { color: var(--muted); }
.cal-chip.k-holiday { border-color: var(--hol); color: var(--hol); background: transparent; font-weight: 600; font-style: normal; }
.cal-dot.k-holiday { color: var(--hol); }
.pill.hol { background: var(--hol-soft); color: var(--hol); }
@media (max-width: 700px) { .cal-chip.k-holiday { color: var(--hol); } .cal-off { display: none; } }

/* Appearance picker */
.theme-row { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
.swatch i { width: 18px; height: 18px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
.swatch.on, .mode-pick.on, .bg-pick.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.bg-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.bg-pick { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 6px; text-align: left; }
.bg-pick .bg-thumb { display: block; width: 100%; height: 70px; border-radius: 6px; border: 1px solid var(--line); background-color: var(--bg); background-size: auto; background-position: center bottom; }
.bg-pick .bg-thumb.scene { background-size: cover; }

.warn-row td { background: var(--warn-soft); }
.radio-opt { display: flex; align-items: flex-start; gap: 10px; text-align: left; cursor: pointer; padding: 4px 0; }
.radio-opt input { margin-top: 3px; flex: none; }
.radio-opt > span { flex: 1; }
.radio-opt input[type=radio] { width: auto; min-width: 0; }
.nav-credit { font-size: 0.6875rem; line-height: 1.5; color: var(--muted); margin: 14px 12px 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.nav-credit a { color: var(--muted); font-weight: 500; text-decoration: none; }
.nav-credit a:hover { color: var(--accent); }
@media (max-width: 860px) { #nav .nav-credit { display: none; } }
@media print { .nav-credit { display: none; } }

.date-warn { border-color: var(--warn); background: var(--warn-soft); margin-bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
button.pill.warn { cursor: pointer; border: 0; font: inherit; font-size: 0.75rem; }

.payoff-deadlines { background: var(--warn-soft); border: 1px solid var(--warn); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
.k-promo { border-color: #d9480f; background: #fff1e6; color: #a33a0c; font-weight: 600; }
.cal-dot.k-promo { color: #d9480f; background: currentColor; }
@media (prefers-color-scheme: dark) { html[data-mode="auto"] .cal-chip.k-promo, html:not([data-mode]) .cal-chip.k-promo { background: #3a2316; color: #ffb38a; } }
html[data-mode="dark"] .cal-chip.k-promo, html[data-mode="dim"] .cal-chip.k-promo, html[data-mode="midnight"] .cal-chip.k-promo, html[data-mode="ocean"] .cal-chip.k-promo, html[data-mode="forestnight"] .cal-chip.k-promo, html[data-mode="mocha"] .cal-chip.k-promo, html[data-mode="plum"] .cal-chip.k-promo, html[data-mode="contrastdark"] .cal-chip.k-promo { background: #3a2316; color: #ffb38a; }
@media (max-width: 700px) { .cal-chip.k-promo { color: #d9480f; } }
.brand-sub { display: block; font-size: 0.6875rem; font-weight: 500; color: var(--muted); }
#brand-name { line-height: 1.2; }
.rcpt-tax summary { cursor: pointer; }
.rcpt-tax label { display: flex; flex-direction: column; gap: 2px; }
.login-box { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 8px; }
.login-box dl { margin: 6px 0 0; grid-template-columns: max-content minmax(0, 1fr); }
.login-box dd { text-align: left; overflow-wrap: anywhere; }

/* Contact photos */
.dot-photo { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; margin-right: 6px; vertical-align: -4px; }
.avatar { position: relative; cursor: pointer; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar-cam { position: absolute; right: 0; bottom: 0; font-size: 0.75rem; background: var(--panel); border-radius: 50%; padding: 1px 2px; opacity: 0; transition: opacity .15s; }
.avatar:hover .avatar-cam, .avatar:focus-within .avatar-cam { opacity: 1; }
.avatar:not(.has-photo) .avatar-cam { opacity: .8; }
.dlg-photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 10px; }

.btn.disabled { opacity: .5; pointer-events: none; }

/* Big contact photos */
.photo-view { max-width: 100%; max-height: 70vh; border-radius: 10px; box-shadow: var(--shadow); }
.contact-hero { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; margin: 0 0 12px; }
.contact-hero img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 10px; display: block; }
.person-card .top.photo-banner { position: relative; margin: -16px -16px 0; padding: 16px; min-height: 120px; align-items: flex-end;
  background: linear-gradient(to right, var(--panel) 30%, color-mix(in srgb, var(--panel) 55%, transparent) 65%, transparent), var(--banner) center / cover no-repeat;
  border-radius: var(--radius) var(--radius) 0 0; }
.person-card .top.photo-banner .avatar { width: 56px; height: 56px; box-shadow: 0 0 0 3px var(--panel); }
button.avatar { cursor: zoom-in; }

/* Orders */
.k-order { border-color: #7a5cc7; } .cal-dot.k-order { color: #7a5cc7; background: currentColor; }
@media (max-width: 700px) { .cal-chip.k-order { color: #7a5cc7; } }

/* Version & releases */
.release { border-left: 3px solid var(--line, #ccc); padding: 2px 0 2px 14px; margin: 14px 0; }
.release.latest { border-left-color: var(--accent, #2e8b57); }
.release h3 { margin: 0 0 6px; }
.release ul { margin: 0; padding-left: 18px; }
.release li { margin: 3px 0; }

/* Calendar: share & export */
.share-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.code-box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow-x: auto; font-size: 0.75rem; line-height: 1.45; white-space: pre; }
@media print {
  .cal-grid { grid-template-columns: repeat(7, 1fr) !important; font-size: 0.6rem; }
  .cal-day { min-height: 80px; break-inside: avoid; }
  .month-nav button { display: none; }
}
.cal-share, .cal-share details, .share-row { min-width: 0; max-width: 100%; }
.cal-share .code-box { max-width: 100%; }

/* Company logos */
.bank-logo { width: 20px; height: 20px; border-radius: 5px; object-fit: contain; background: #fff; vertical-align: -5px; margin-right: 6px; box-shadow: 0 0 0 1px var(--line); }
.small .bank-logo { width: 16px; height: 16px; vertical-align: -3px; border-radius: 4px; }
.logo-strip { margin: 0 0 12px; }
.logo-strip > div { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.logo-pick { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.logo-pick > button:first-child { padding: 4px; border-radius: 10px; background: #fff; border: 2px solid var(--line); line-height: 0; }
.logo-pick.on > button:first-child { border-color: var(--accent, #2e8b57); box-shadow: 0 0 0 2px var(--accent, #2e8b57); }
.logo-pick img { width: 48px; height: 48px; object-fit: contain; }
.contact-hero.logo { background: #fff; display: flex; justify-content: center; padding: 12px; }
.contact-hero.logo img { width: auto !important; height: auto !important; max-width: 128px; max-height: 128px; object-fit: contain; }

/* Fill in from the web: review */
.lookup-table td { vertical-align: top; }
.lookup-table select { width: 100%; min-width: 180px; }

/* Sortable tables: click a heading */
th[data-sortable] { cursor: pointer; user-select: none; white-space: nowrap; }
th[data-sortable]:hover { color: var(--text); text-decoration: underline dotted; text-underline-offset: 3px; }
th[data-sortable]::after { content: ' ↕'; opacity: 0.25; font-size: 0.8em; }
th[data-sorted="asc"]::after { content: ' ▲'; opacity: 0.8; }
th[data-sorted="desc"]::after { content: ' ▼'; opacity: 0.8; }
@media print { th[data-sortable]::after { content: none; } }

/* Words explained: dotted underline + pop-up meaning */
.term { border-bottom: 1px dotted currentColor; cursor: help; }
.term:focus { outline: 2px solid var(--accent, #2e8b57); outline-offset: 1px; border-radius: 2px; }
.tip-pop { position: fixed; z-index: 1000; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); padding: 10px 12px; font-size: 0.875rem; line-height: 1.45; font-weight: 400; text-transform: none; letter-spacing: normal; }
.tip-pop strong { display: block; margin-bottom: 2px; }
.tip-pop a { display: inline-block; margin-top: 6px; }
@media print { .term { border-bottom: none; } .tip-pop { display: none; } }

/* My account: me card + menu photo */
.me-card { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.me-photo { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; padding: 0; border: 3px solid var(--panel-2); background: var(--panel-2); }
.me-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-initials { display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; color: var(--muted); }
.nav-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }

/* Words explained: pictures */
.gpic { width: 100%; height: auto; display: block; }
.tip-pic { background: var(--panel-2); border-radius: 8px; padding: 6px; margin-bottom: 8px; }
.gloss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.gloss-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--panel); }
.gloss-card h3 { margin: 6px 0 4px; }
.gloss-card p { margin: 0; }
.gloss-pic { background: var(--panel-2); border-radius: 10px; padding: 8px; }
.gloss-eg { margin-top: 6px !important; color: var(--muted); }
.gloss-hit { outline: 3px solid var(--accent, #2e8b57); }

/* Linked contacts */
[data-linked] { position: relative; }
[data-linked]::after { content: '🔗'; position: absolute; top: 8px; right: 10px; font-size: 0.95rem; }

/* Company directory */
.dir-row { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; flex-wrap: wrap; }
.dir-noimg { font-size: 1.6rem; width: 36px; text-align: center; }
input[readonly], select:disabled { opacity: .75; cursor: not-allowed; }
.dir-row > div:nth-child(2) { flex: 1 1 180px; }
@media (max-width: 640px) { .dir-row > div:last-child { flex-basis: 100%; justify-content: flex-start !important; } }

/* Clickable totals (a contact's card) */
.kpi-btn { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--line); }
.kpi-btn:hover, .kpi-btn:focus-visible { border-color: var(--accent, #4a7dff); }
.kpi-more { opacity: .6; }

/* Recording an invoice: a "varies" line still to fill in */
tr.needs-fill input[name=amount] { outline: 2px solid var(--warn, #c80); outline-offset: 1px; }
tr.just-filled input[name=amount] { outline: 2px solid var(--good, #2a8); outline-offset: 1px; }

/* How to pay (contacts) */
.pm-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.pm-card { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.pm-card.pm-default { border-color: var(--accent); }
.pm-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Files */
.file-folders { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.file-folder { display: flex; gap: 10px; align-items: center; margin: 0; padding: 10px 12px; cursor: pointer; }
.file-folder:hover { border-color: var(--accent); }
.file-folder > div:nth-child(2) { flex: 1; }
.ff-ico { font-size: 1.6rem; }

/* Calendar: price check reminders */
.cal-chip.k-review { background: color-mix(in srgb, #d08a00 18%, transparent); }

/* Care team */
.care-card { margin: 0; padding: 10px 12px; display: grid; gap: 3px; }
.pill.g-care { background: color-mix(in srgb, #d0426a 15%, transparent); }

/* Find a doctor: photos to check it's really them */
.fd-photos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.fd-photo { padding: 0; border: 2px solid var(--line); border-radius: 8px; width: 72px; height: 88px; overflow: hidden; background: transparent; cursor: pointer; }
.fd-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fd-photo.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }

/* Right-click menu (contextmenu.js) */
.ctx-menu { position: fixed; z-index: 1000; min-width: 220px; max-width: min(360px, calc(100vw - 8px)); max-height: calc(100vh - 8px); overflow: auto; background: var(--panel, var(--bg)); color: var(--text); border: 1px solid var(--line, #8884); border-radius: 10px; box-shadow: 0 10px 30px #0006; padding: 4px; }
.ctx-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 6px; padding: 7px 10px; color: inherit; font: inherit; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-menu button:hover, .ctx-menu button:focus-visible { background: var(--hover, #8882); outline: none; }
.ctx-sep { height: 1px; background: var(--line, #8884); margin: 4px 6px; }
.ctx-hint { font-size: .78em; color: var(--muted, #888); padding: 4px 10px 2px; }
.drop-here { outline: 2px dashed var(--accent, #4a9); outline-offset: -2px; background: color-mix(in srgb, var(--accent, #4a9) 10%, transparent); }
.pv-strip { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.pv-thumb { position: relative; padding: 0; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: none; cursor: pointer; }
.pv-thumb.on { border-color: var(--accent); }
.pv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-thumb span { position: absolute; right: 2px; bottom: 0; font-size: 12px; }
.chips-gap { width: 1px; align-self: stretch; background: var(--border, #444); margin: 2px 6px; }
.care-past { opacity: .8; border-style: dashed; }
.person-card.is-closed { opacity: .72; }
/* a closed business: its logo greyed with a red ring, and a 🚫 by its name */
.person-card.is-closed .avatar, .dlg-photo.is-closed { filter: grayscale(1); box-shadow: 0 0 0 3px var(--bad, #d33); }
.closed-icon { font-size: 1.05em; }

/* Unsorted files (Income page) */
.inbox-panel { margin-bottom: 12px; }
.inbox-empty { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; }
.inbox-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.inbox-row { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.inbox-row.for-admin { background: var(--warn-soft); margin: 0 -14px; padding: 10px 14px; }
.inbox-thumb { flex: 0 0 64px; height: 64px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 28px; text-decoration: none; background: var(--panel); }
.inbox-thumb img { width: 100%; height: 100%; object-fit: cover; }
.inbox-main { flex: 1; min-width: 0; }
.inbox-btns { margin-top: 6px; flex-wrap: wrap; gap: 4px; }
.job-row.is-current { border-left: 3px solid var(--good, #2e9d5b); padding-left: 8px; }

/* Pay stub review and moving */
.stub-review tr.needs-who td { background: var(--warn-soft); }
tr.is-sel td { background: var(--accent-soft); }

/* Monthly paperwork: a bill or statement still to upload */
tr.pw-missing td:first-child { border-left: 3px solid var(--warn); }
.stub-drop.drag { outline: 2px dashed var(--accent, #2563eb); outline-offset: -6px; }
/* Paystubs: filed / not filed at a glance */
.stub-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.stub-stat { display: block; border: 1px solid var(--line, #8883); border-left-width: 5px; border-radius: 8px; padding: 8px 12px; color: inherit; text-decoration: none; }
.stub-stat-n { font-size: 1.35em; font-weight: 700; }
.stub-stat-l { font-weight: 600; }
.stub-stat.is-filed { border-left-color: var(--good); background: var(--good-soft); }
.stub-stat.is-waiting { border-left-color: var(--warn); background: var(--warn-soft); }
.stub-stat.is-none { border-left-color: var(--line, #8885); opacity: .75; }
.stub-review { border: 2px solid var(--warn); }
/* Unsorted files: a real preview of each file */
.inbox-thumb { flex: 0 0 120px; height: 150px; background: #fff; }
.inbox-thumb img { object-fit: cover; object-position: top; }
.inbox-read { margin: 2px 0; }
@media (max-width: 600px) { .inbox-thumb { flex-basis: 84px; height: 108px; } }
/* A form about a file (sorting an upload): the file on the left, the fields on the right */
.form-with-preview { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.form-preview { position: sticky; top: 0; display: flex; flex-direction: column; gap: 6px; }
.form-preview iframe, .form-preview img { width: 100%; height: min(62vh, 640px); border: 1px solid var(--line); border-radius: 8px; background: #fff; object-fit: contain; }
.form-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.form-tools button.busy { opacity: .7; }
.form-tool-msg { flex-basis: 100%; }
.just-read { outline: 2px solid var(--accent); outline-offset: 1px; background: var(--accent-soft) !important; }
@media (max-width: 760px) { .form-with-preview { grid-template-columns: 1fr; } .form-preview iframe, .form-preview img { height: 42vh; } .form-preview { position: static; } }
.stub-emp-in { width: 100%; min-width: 150px; }
.stub-emp-in.is-empty { border-color: var(--warn); }

/* Employment: a job read off pay stubs, not verified yet */
.job-check { margin-top: 6px; padding: 6px 8px; border: 1px dashed var(--line); border-radius: 8px; background: var(--panel-2); }
.job-check a { margin-right: 8px; white-space: nowrap; }

/* Map pins */
.map-pin { padding: 1px 8px; margin-left: 6px; }
.map-pin.is-on { background: var(--accent); color: #fff; }
.map-box { margin: 4px 0 10px; border: 1px solid var(--border, #8884); border-radius: 10px; overflow: hidden; background: var(--panel, transparent); }
.map-box iframe { display: block; width: 100%; height: 240px; border: 0; }
.map-box > div { padding: 6px 10px; }
.contact-info + .map-box, .contact-info .map-box { margin-top: 6px; }

/* Tools page */
.tool-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 16px; margin-top: 8px; }
.tool-facts code, .tool-card h3 + .small code { word-break: break-all; font-size: 0.8em; }
.tool-log { max-height: 260px; overflow: auto; font-size: 0.75rem; white-space: pre-wrap; background: var(--bg-2, #0001); padding: 8px; border-radius: 8px; }
/* Tools: how-to guide */
.guide-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.guide-step { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.guide-n { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: grid; place-items: center; }
.guide-body > strong { display: block; margin: 4px 0 2px; }
.guide-body ul { margin: 4px 0; padding-left: 18px; }
.guide-shot, .guide-draw { display: block; max-width: min(100%, 560px); height: auto; margin-top: 8px; border-radius: 10px; border: 1px solid var(--border, #8884); box-shadow: 0 2px 10px #0002; }
.guide-shot { cursor: zoom-in; }
.copy-line { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.copy-line code { padding: 4px 8px; border-radius: 6px; background: var(--bg-2, #0002); word-break: break-all; font-size: 0.8em; }

/* Retirement */
.ret-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 10px; }
.ret-tile { border: 1px solid var(--border, #8884); border-radius: 10px; padding: 8px 10px; }
.ret-tile.is-done { opacity: 0.6; }
.ret-count { font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.ret-label { font-weight: 600; margin: 2px 0; }
.ret-big { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.ret-amt { font-size: 1.8rem; font-weight: 800; }
.ret-explain ul, .ret-explain ol { padding-left: 20px; margin: 4px 0 10px; }
.ret-explain li { margin: 3px 0; }
.ret-joblist { list-style: none; padding: 0; margin: 4px 0; }
.ret-joblist li { margin: 4px 0; }
.ret-joblist label { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; cursor: pointer; }

/* A contact who has a sign-in account */
.acct-pill { background: color-mix(in srgb, var(--accent) 22%, transparent); border: 1px solid var(--accent); font-weight: 600; vertical-align: middle; font-size: 0.75rem; }
.person-card.is-account { box-shadow: inset 4px 0 0 var(--accent); }
.person-card .acct-pill { display: block; width: fit-content; max-width: 100%; white-space: normal; margin: 3px 0 1px; }

/* IOUs: screenshots / photos of each transfer */
.iou-proofs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.iou-proof { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border: 1px solid var(--line, #3334); border-radius: 6px; overflow: hidden; font-size: 22px; text-decoration: none; background: var(--panel-2, transparent); }
.iou-proof img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Phones (iPhone and other small screens): the menu opens from a ☰ Menu button, full height and scrollable ---- */
.nav-burger { display: none; }
@media (max-width: 860px) {
  .sidebar { padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .brand { padding: 0; min-height: 40px; }
  .nav-burger { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 8px 14px; font-weight: 600; min-height: 40px; }
  #nav { display: none; }
  .sidebar.open #nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; max-height: calc(100dvh - 64px); padding: 8px 0 calc(24px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .sidebar.open #nav a { white-space: normal; padding: 11px 10px; }
  .sidebar.open .nav-group { display: flex; }
  .sidebar.open .nav-head { display: flex; font-size: 0.75rem; padding: 10px 10px 4px; }
  .sidebar.open .nav-custom span { display: inline; }
  .sidebar.open .nav-group.closed a:not(.active) { display: none; }
  .sidebar.open .nav-user { border-bottom: 1px solid var(--line); padding: 0 0 10px; margin-bottom: 8px; }
  .sidebar.open .nav-user .nav-me span { display: inline; }
  .sidebar.open #nav .nav-credit { display: block; }
  /* iPhone zooms the page in when a text box's text is under 16px: keep them at 16px */
  input, select, textarea { font-size: max(16px, 1em); }
  dialog, dialog.wide { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  main { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}
/* Paste a picture: a box to tap, then Paste */
.paste-box { border: 2px dashed var(--line); border-radius: 10px; padding: 10px 12px; color: var(--muted); font-size: 0.875rem; min-height: 44px; outline: none; cursor: text; }
.paste-box:focus { border-color: var(--accent); color: var(--text); }

/* Viewing as another user (root admin): always on top, so it's clear these are someone else's pages, view only. */
#view-as-bar { position: sticky; top: 0; z-index: 1000; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center;
  padding: 8px 16px; background: #7a1f16; color: #fff; font-size: 0.95rem; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
#view-as-bar button { background: #fff; color: #7a1f16; border: 0; font-weight: 600; }
body.viewing-as { outline: 4px solid #7a1f16; outline-offset: -4px; }

/* Document inbox */
.docin-drop { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 2px dashed var(--line, #c9ced6); }
.docin-row { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 12px; margin: 0 0 8px; align-items: start; }
.docin-file { overflow-wrap: anywhere; }
.docin-thumb { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 180px; min-height: 90px; max-height: 230px; overflow: hidden;
  margin: 0 0 6px; padding: 0; border: 1px solid var(--line, #c9ced6); border-radius: 6px; background: #fff; cursor: zoom-in; font-size: 2rem; }
.docin-thumb img { display: block; width: 100%; height: auto; }
.docin-view iframe { width: 100%; height: 75vh; border: 0; }
.docin-view img { max-width: 100%; height: auto; }
.docin-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
@media (max-width: 640px) { .docin-row { grid-template-columns: 1fr; } }

/* Retirement: headshot, "in one look", Social Security */
.ret-who { display: flex; gap: 14px; align-items: center; }
.ret-head { flex: none; width: 76px; height: 76px; border-radius: 50%; overflow: hidden; padding: 0; border: 3px solid var(--panel, #fff);
  box-shadow: 0 1px 4px rgba(0,0,0,.25); background: #8a8f98; cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1.5rem; position: relative; }
.ret-head img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; display: block; }
.ret-head-add span { position: absolute; right: -2px; bottom: -2px; font-size: .9rem; background: var(--panel, #fff); border-radius: 50%; padding: 2px; }
.ret-glance ul li { margin: 2px 0; }
.ss-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; margin-top: 6px; }
.ss-bars { display: grid; gap: 3px; }
.ss-bar { display: grid; grid-template-columns: 2.2em 1fr 5em; gap: 8px; align-items: center; font-size: .9rem; }
.ss-age { font-weight: 600; text-align: right; }
.ss-fill { height: 14px; border-radius: 3px; background: var(--accent, #3b6fd8); opacity: .55; }
.ss-bar.is-fra .ss-fill { opacity: 1; }
.ss-bar.is-fra .ss-age::after { content: ' ★'; color: var(--accent, #3b6fd8); }
.ss-bar.is-sel .ss-age { text-decoration: underline; }
.ss-amt { text-align: right; font-variant-numeric: tabular-nums; }
.ss-protect { border-left: 3px solid var(--good, #2e7d32); padding-left: 12px; }
.ss-earn { display: block; height: 8px; border-radius: 2px; background: var(--accent, #3b6fd8); opacity: .6; min-width: 1px; }
@media (max-width: 720px) { .ss-cols { grid-template-columns: 1fr; } .ret-head { width: 60px; height: 60px; } }/* Fixing data as someone (root admin, changes recorded): the bar turns amber so it's never mistaken for view-only */
body.fixing-as #view-as-bar { background: #8a5a00; }
body.fixing-as #view-as-bar button { color: #8a5a00; }
body.fixing-as { outline-color: #8a5a00; }
#view-as-bar { flex-wrap: wrap; gap: 8px; }

/* Leave types: each its own color everywhere (tiles, table columns, dots) */
.lv-vac { --lv: #2f6fd6; } .lv-sick { --lv: #2e8b57; } .lv-pl { --lv: #8a4fd1; } .lv-ph { --lv: #d9822b; }
.lv-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.lv-tile { border: 1px solid var(--line, #d0d4da); border-top: 5px solid var(--lv); border-radius: 8px; padding: 10px 12px;
  background: color-mix(in srgb, var(--lv) 7%, transparent); }
.lv-name { font-weight: 700; color: var(--lv); }
.lv-big { font-size: 1.45rem; font-weight: 700; margin-top: 2px; }
.lv-sub { color: var(--muted); font-size: .8rem; margin-bottom: 4px; }
.lv-line { font-size: .82rem; margin-top: 2px; }
.lv-src { font-size: .75rem; }
th.lv-c { color: var(--lv); border-bottom: 3px solid var(--lv); }
td.lv-c { background: color-mix(in srgb, var(--lv) 6%, transparent); }
.lv-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--lv); margin-right: 5px; vertical-align: middle; }
@media (max-width: 1000px) { .lv-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .lv-tiles { grid-template-columns: 1fr; } }
.lv-alert { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; border: 1px solid #c0392b; border-left: 6px solid #c0392b;
  background: color-mix(in srgb, #c0392b 10%, transparent); color: inherit; }
.lv-alert strong { color: #c0392b; }
@media (prefers-color-scheme: dark) { .lv-alert strong { color: #ff7a6b; } }
/* Leave planner */
.lv-oth { --lv: #7b8794; } .lv-hol { --lv: #c0392b; } .lv-post { --lv: #2f855a; }
.lv-day { cursor: pointer; min-height: 92px; }
.lv-day:hover { background: color-mix(in srgb, var(--accent, #3b6fd8) 6%, transparent); }
.lv-chip { all: unset; box-sizing: border-box; display: block; font-size: .68rem; line-height: 1.3; padding: 2px 5px; border-radius: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border-left: 3px solid var(--lv); background: color-mix(in srgb, var(--lv) 14%, transparent); }
button.lv-chip { cursor: pointer; font-weight: 600; }
.lv-ledger { margin: 6px 0; border: 1px solid var(--line, #d0d4da); border-left: 5px solid var(--lv); border-radius: 8px; padding: 6px 10px; }
.lv-ledger summary .lv-name { font-weight: 700; color: var(--lv); }
tr.lv-short td { background: color-mix(in srgb, #c0392b 12%, transparent); }
.lv-alert-inline { color: #c0392b; font-weight: 700; }
@media (max-width: 640px) { .lv-chip { font-size: 0; height: 6px; padding: 0; } }
/* Leave planner: planned days checked against the pay stubs */
tr.lv-ok td:nth-child(3) { color: var(--good, #2e7d32); }
tr.lv-pend td:nth-child(3) { color: #b7791f; }
tr.lv-miss td { background: color-mix(in srgb, #c0392b 10%, transparent); }
tr.lv-miss td:nth-child(3) { color: #c0392b; font-weight: 700; }
.lv-chip.lv-miss { outline: 2px solid #c0392b; }
.lv-chip.lv-pend { outline: 1px dashed #b7791f; }
/* Main calendar: time off from the leave planner, colored by kind */
.cal-chip.k-leave { border-left: 3px solid var(--lv, #2f6fd6); background: color-mix(in srgb, var(--lv, #2f6fd6) 16%, transparent); color: inherit; }
.cal-dot.k-leave { background: var(--lv, #2f6fd6); }
/* Leave planner: the list of planned time off */
.lv-group { border: 1px solid var(--line, #d0d4da); border-radius: 8px; padding: 6px 10px; margin-top: 6px; }
.lv-entry { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 3px 0; }
.lv-entry-acts { margin-left: auto; display: inline-flex; gap: 4px; }
.cal-chip .cal-lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* the name shortens, the amount stays */
/* Pay & deductions */
.pc-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin-top: 10px; background: var(--line, #d0d4da); }
.pc-seg { display: block; height: 100%; }
.pc-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.pc-tax { background: #6b7280; } .pc-ss { background: #2f6fd6; } .pc-wa { background: #2e8b57; } .pc-ret { background: #d9822b; }
.pc-health { background: #c0392b; } .pc-other { background: #8a4fd1; } .pc-net { background: #20a37a; }
tr.pc-group td { background: color-mix(in srgb, var(--accent, #3b6fd8) 5%, transparent); }
tr.pc-gross td, tr.pc-net-row td { border-top: 2px solid var(--line, #d0d4da); }
/* Work hours from work schedules on the Calendar: quiet, so bills and paydays stand out */
.cal-chip.k-work { border-left: 3px solid #7b8794; background: color-mix(in srgb, #7b8794 12%, transparent); color: var(--muted); font-weight: 400; }
.cal-dot.k-work { background: #7b8794; }
.eq-job { border: 1px solid var(--line, #d0d4da); border-radius: 8px; padding: 6px 10px; margin-top: 6px; }
/* Leave planner: days off on the work schedule (a 4x10's Fridays) */
.lv-off { --lv: #7b8794; color: var(--muted); }
.cal-day.lv-schedoff { background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, #7b8794 9%, transparent) 6px 12px); }
.lv-who { list-style: none; margin: 6px 0; padding: 0; } .lv-who li { padding: 2px 0; } .lv-who li::before { content: "– "; color: var(--muted); }
/* A weekday off on someone's work schedule (a 4x10's Friday): clearly marked, so nobody goes in by mistake */
.cal-chip.k-workoff { border-left: 3px solid #2e8b57; background: color-mix(in srgb, #2e8b57 14%, transparent); color: inherit; font-weight: 600; }
.cal-dot.k-workoff { background: #2e8b57; }
.lv-fed { --lv: #6b7280; font-style: italic; }
/* Equipment pictures */
.eq-item { display: flex; gap: 8px; align-items: flex-start; }
.eq-thumb { all: unset; box-sizing: border-box; flex: none; width: 44px; height: 44px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line, #d0d4da); cursor: pointer; display: flex; align-items: center; justify-content: center; background: var(--panel-2, #f3f4f6); font-size: 1.1rem; }
.eq-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eq-thumb-add { opacity: .7; } .eq-thumb-add:hover { opacity: 1; }
.eq-paste { border: 2px dashed var(--line, #c9ced6); border-radius: 8px; padding: 14px; text-align: center; outline: none; }
.eq-paste:focus { border-color: var(--accent, #3b6fd8); }
.lv-ok-box { margin: 4px 0 0; padding: 6px 10px; border-radius: 8px; border-left: 5px solid #2e8b57; background: color-mix(in srgb, #2e8b57 10%, transparent); }
.au-imp td { background: color-mix(in srgb, #e0a100 9%, transparent); } .au-table td { vertical-align: top; }
.cal-chip.cal-tent { opacity: .6; border-style: dashed; } /* a trip still being planned */
/* Photo field in forms */
.img-drop { display: flex; gap: 12px; align-items: center; border: 2px dashed var(--line, #c9ced6); border-radius: 8px; padding: 10px; outline: none; }
.img-drop:focus { border-color: var(--accent, #6a4fd8); }
.img-drop img { width: 84px; height: 84px; object-fit: cover; border-radius: 6px; flex: none; }
/* Work info: one tab per person */
.work-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.work-tab { display: flex; gap: 10px; align-items: center; text-align: left; padding: 8px 14px 8px 8px; border-radius: 12px; border: 1px solid var(--line, #d9d4ca); background: var(--panel, #fffaf2); cursor: pointer; }
.work-tab > span { display: flex; flex-direction: column; line-height: 1.25; }
.work-tab img, .work-tab-i { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center; background: var(--panel-2, #eee); }
.work-tab-i { font-size: 22px; } .work-tab strong { font-size: 1.05rem; }
.work-tab.on { border-color: var(--accent, #6a4fd8); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #6a4fd8) 35%, transparent); background: color-mix(in srgb, var(--accent, #6a4fd8) 8%, var(--panel, #fffaf2)); }
.img-prevs { display: flex; gap: 6px; flex-wrap: wrap; }
.img-drop .img-prevs img { width: 64px; height: 64px; }
.eq-thumb { position: relative; }
.eq-n { position: absolute; right: 1px; bottom: 1px; background: rgba(0,0,0,.65); color: #fff; font-size: .7rem; border-radius: 6px; padding: 0 4px; line-height: 1.3; }
.kind-ask { display: inline-flex; gap: 3px; margin-left: 6px; }
.kind-ask button { all: unset; cursor: pointer; width: 1.35em; height: 1.35em; border-radius: 50%; text-align: center; line-height: 1.35em; font-size: .85em; font-weight: 700; }
.kind-ok { background: color-mix(in srgb, #2e8b57 18%, transparent); color: #2e8b57; } .kind-ok:hover { background: #2e8b57; color: #fff; }
.kind-no { background: color-mix(in srgb, #c0392b 15%, transparent); color: #c0392b; } .kind-no:hover { background: #c0392b; color: #fff; }
.pill.kind-guess { border-style: dashed; }
.ag-contact { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 4px 0; border-top: 1px solid var(--line, #e6e1d8); }
.ag-contact .ag-acts { margin-left: auto; }
/* Select an area to read (a pay stub and its check scanned together) */
.area-pick { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; background: var(--panel, #fffaf2); border: 2px solid var(--accent, #6a4fd8); border-radius: 8px; }
.area-pick-full { position: fixed; inset: 4vh 4vw; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.area-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 6px 8px; border-bottom: 1px solid var(--line, #e3ddd2); }
.area-scroll { flex: 1; overflow: auto; padding: 6px; }
.area-stage { position: relative; cursor: crosshair; touch-action: none; user-select: none; }
.area-stage canvas { width: 100%; height: auto; display: block; }
.area-sel { position: absolute; border: 2px solid #e8590c; background: rgba(232, 89, 12, .15); box-shadow: 0 0 0 9999px rgba(0,0,0,.25); pointer-events: none; }
.work-share-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line, #ddd6ca); }
.ws-private { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--panel-2, #f1ece3); color: var(--muted, #7a7266); }
.ws-tab { border-style: dashed; }
.med-chk { border: 1px dashed var(--line, #ddd6ca); border-radius: 10px; padding: 10px 12px; margin-top: 12px; }
.med-g { border-top: 1px solid var(--line, #ddd6ca); padding: 10px 0; display: grid; gap: 4px; }
.med-g [data-past][hidden] { display: none; }
.med-g label.check input { width: auto; min-width: 0; flex: none; }
.med-g [data-f=pick] { width: auto; }
.med-g [data-past] input[type=date] { width: auto; }
.pub-bar { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.pub-bar > button { align-self: flex-start; }
.pub-link { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* Work schedule: the coming weeks day by day */
.wsc { margin-top: 8px; }
.wsc > summary { cursor: pointer; }
.wsc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin-top: 6px; }
.wsc-h { font-size: .75rem; font-weight: 600; text-align: center; color: var(--muted, #7a7266); }
.wsc-day { min-height: 46px; border-radius: 6px; padding: 3px 5px; font-size: .72rem; line-height: 1.25; display: flex; flex-direction: column; overflow: hidden; border: 1px solid transparent; }
.wsc-n { font-weight: 700; }
.wsc-l { overflow: hidden; text-overflow: ellipsis; }
.wsc-work, .wsc-k.wsc-work { background: color-mix(in srgb, #3b6fd8 14%, transparent); }
.wsc-off, .wsc-k.wsc-off { background: color-mix(in srgb, #2e8b57 20%, transparent); }
.wsc-hol, .wsc-k.wsc-hol { background: color-mix(in srgb, #e0a100 26%, transparent); }
.wsc-lv, .wsc-k.wsc-lv { background: color-mix(in srgb, #8e44ad 20%, transparent); }
.wsc-wkend { background: color-mix(in srgb, var(--muted, #888) 8%, transparent); }
.wsc-today { border-color: var(--accent, #6a4fd8); box-shadow: 0 0 0 1px var(--accent, #6a4fd8); }
.wsc-past { opacity: .55; }
.wsc-key { margin-top: 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wsc-k { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
@media (max-width: 600px) { .wsc-l { display: none; } .wsc-day { min-height: 30px; } }
/* Resume */
.rs-doc { max-width: 850px; }
.rs-head h2 { margin: 0; }
.rs-headline { font-size: 1.05rem; margin: 2px 0; }
.rs-sec h3 { text-transform: uppercase; letter-spacing: .05em; font-size: .9rem; border-bottom: 1px solid var(--line, #ddd6ca); padding-bottom: 3px; margin: 16px 0 6px; }
.rs-job { margin: 0 0 12px; }
.rs-job-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rs-dates { white-space: nowrap; color: var(--muted, #7a7266); }
.rs-job ul { margin: 4px 0 0 18px; padding: 0; }
.rs-job-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.rs-org { font-size: 1.02rem; }
.rs-pos { margin: 6px 0 0 14px; padding-left: 10px; border-left: 2px solid var(--line, #ddd6ca); }
/* Career: Resume / Cover letters / References */
.seg-tabs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin: 4px 0 10px; border-bottom: 1px solid var(--line, #ddd6ca); }
.seg-tabs > button:not(.small) { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 8px 12px; font-weight: 600; cursor: pointer; }
.seg-tabs > button.on { border-bottom-color: var(--accent, #6a4fd8); color: var(--accent, #6a4fd8); }
.rs-core { columns: 2; column-gap: 24px; margin: 4px 0 0 18px; padding: 0; }
@media (max-width: 600px) { .rs-core { columns: 1; } }
.cl-list { display: flex; gap: 6px; flex-wrap: wrap; }
.cl-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line, #ddd6ca); background: var(--panel, #fffaf2); cursor: pointer; }
.cl-item.on { border-color: var(--accent, #6a4fd8); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #6a4fd8) 30%, transparent); }
.rs-letter { max-width: 760px; }
.rs-letter p { margin: 0 0 10px; line-height: 1.5; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 20px; }
.ref-card { padding: 6px 0; border-top: 1px solid var(--line, #e6e1d8); }
.ref-acts { display: flex; gap: 4px; align-items: center; margin-top: 4px; }
.rs-check > summary { cursor: pointer; }
.rs-issue { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; padding: 5px 0; border-top: 1px solid var(--line, #e6e1d8); }
.rs-issue-acts { display: flex; gap: 4px; }
.rs-mark { display: inline-block; font-size: .75rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; margin-left: 4px; vertical-align: middle; cursor: help; }
.rs-paid { background: color-mix(in srgb, #2e8b57 16%, transparent); color: #2e7d4f; }
.rs-svc { background: color-mix(in srgb, #e0a100 22%, transparent); color: #8a6200; }
@media print { .rs-mark { display: none !important; } }
/* Cover letter: edited on the page like a document */
.cl-fillbar { background: color-mix(in srgb, var(--accent, #6a4fd8) 7%, var(--panel, #fffaf2)); border: 1px solid var(--line, #ddd6ca); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.cl-fills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.cl-fills label { display: flex; flex-direction: column; gap: 2px; min-width: 200px; flex: 1; }
.cl-tools { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.cl-tools .cl-saved { margin-left: auto; }
.cl-paper { background: #fff; color: #111; padding: 28px 34px; border: 1px solid var(--line, #ddd6ca); border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.08); max-width: 820px; }
.cl-editor { outline: none; min-height: 300px; cursor: text; }
.cl-editor:focus { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #6a4fd8) 25%, transparent); border-radius: 4px; }
.cl-body p { margin: 0 0 10px; line-height: 1.5; }
.cl-chip, .cl-val { background: color-mix(in srgb, #e0a100 22%, transparent); border-radius: 4px; padding: 0 3px; }
.cl-chip { border: 1px dashed #c48a00; cursor: default; }
.cl-chip.empty, .cl-val.empty { background: color-mix(in srgb, #c0392b 15%, transparent); border-color: #c0392b; }
@media print { .cl-val { background: none; padding: 0; } }
.cl-namebox { display: flex; flex-direction: column; gap: 2px; max-width: 560px; }
.cl-namebox input { font-weight: 600; }
/* Reference relationship tags */
.rel-tags { display: inline-flex; gap: 4px; flex-wrap: wrap; vertical-align: middle; }
.rel-tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid transparent; }
.rel-boss { background: color-mix(in srgb, #6a4fd8 16%, transparent); color: #4b33b0; border-color: color-mix(in srgb, #6a4fd8 40%, transparent); }
.rel-peer { background: color-mix(in srgb, #2f6fb5 15%, transparent); color: #235a96; border-color: color-mix(in srgb, #2f6fb5 40%, transparent); }
.rel-report { background: color-mix(in srgb, #138a8a 15%, transparent); color: #0f6b6b; }
.rel-vendor { background: color-mix(in srgb, #d9822b 18%, transparent); color: #9a5410; }
.rel-mentor { background: color-mix(in srgb, #2e8b57 16%, transparent); color: #24704a; }
.rel-friend { background: color-mix(in srgb, #d6457a 15%, transparent); color: #a8305d; }
.rel-other { background: color-mix(in srgb, #888 15%, transparent); color: #555; }
.cl-savebar { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.cl-saved.warn { color: #b06d00; font-weight: 600; }
.cl-saved.good { color: #2e7d4f; }
.cl-saved.bad { color: #c0392b; font-weight: 600; }
/* Document sizes, as in your Word documents (on screen too) */
.rs-doc { font-size: 11pt; }
.rs-doc .rs-head .small { font-size: 11pt; }
.rs-resume .rs-head h2 { font-size: 24pt; }
.rs-refs .rs-head h2, .rs-letter .rs-head h2 { font-size: 16pt; }
.rs-doc .rs-sec h3 { font-size: 14pt; text-transform: none; letter-spacing: 0; }
.rs-doc .rs-job-head strong { font-size: 12pt; }
.rs-letter .cl-body { font-size: 12pt; }
.cl-size { padding: 2px 4px; }
/* Resume: picture, versions, snapshots */
.rs-has-photo { display: flex; gap: 16px; align-items: center; }
.rs-photo { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; flex: none; }
.cv-versions { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin: 0 0 8px; }
.cv-snaps { margin-top: 12px; }
.cv-snaps > summary { cursor: pointer; }
.snap-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; padding: 4px 0; border-top: 1px solid var(--line, #e6e1d8); }
.snap-acts { display: flex; gap: 2px; flex-wrap: wrap; }
.snap-diff { font-size: .9rem; max-height: 60vh; overflow: auto; }
.snap-diff .d-out { color: #b03a2e; background: color-mix(in srgb, #c0392b 8%, transparent); padding: 2px 6px; }
.snap-diff .d-in { color: #22703f; background: color-mix(in srgb, #2e8b57 9%, transparent); padding: 2px 6px; }
/* Washington State agencies on Contacts */
.wa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px 18px; margin-top: 8px; }
.wa-agency { padding: 8px 0; border-top: 1px solid var(--line, #e6e1d8); }
.ag-card { margin: 4px 0; line-height: 1.5; }
.wa-state > summary { cursor: pointer; }
.ag-branches > summary { cursor: pointer; }
.ag-branch { padding: 4px 0 4px 10px; border-left: 2px solid var(--line, #ddd6ca); margin: 4px 0; }
/* Contacts: Washington State, one card */
.wa-card-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.wa-seal { font-size: 1.8rem; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, #2f6fb5 14%, transparent); flex: none; }
.wa-row { all: unset; box-sizing: border-box; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; width: 100%; padding: 7px 4px; border-top: 1px solid var(--line, #e6e1d8); }
.wa-row:hover { background: color-mix(in srgb, var(--accent, #6a4fd8) 6%, transparent); }
.wa-row > span:first-child { min-width: 0; }

/* Possible duplicates: two side by side */
.dup-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .dup-pair { grid-template-columns: 1fr; } }
.dup-side { border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 10px; min-width: 0; }
.dup-facts th { text-align: left; font-weight: 500; padding: 2px 10px 2px 0; color: var(--muted, #777); white-space: nowrap; }
.dup-facts td { padding: 2px 0; }
.dup-facts tr.dup-diff td { font-weight: 700; background: color-mix(in srgb, #f5a623 22%, transparent); }
.dup-preview iframe { width: 100%; height: 460px; border: 1px solid var(--line, #ddd); border-radius: 6px; }
.dup-preview img { max-width: 100%; max-height: 460px; display: block; }

/* pop-ups move: drag the title bar */
dialog#modal .dlg-head { cursor: move; user-select: none; touch-action: none; }
dialog#modal .dlg-head :is(button, a, input, select) { cursor: pointer; }
dialog#modal { margin: auto; }
/* a grip on every pop-up title bar: drag here to move it */
dialog#modal .dlg-head::before { content: "⠿"; color: var(--muted); font-size: 1.1rem; margin-right: 8px; opacity: .7; }
dialog#modal .dlg-head > :first-child { margin-right: auto; }
/* a newer version is on the server */
#update-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50; background: var(--panel); color: var(--text); border: 1px solid var(--accent); border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.25); padding: 8px 12px; display: flex; gap: 8px; align-items: center; font-size: .9rem; max-width: calc(100vw - 24px); flex-wrap: wrap; }
/* Unsorted: tick several */
.inbox-pick { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; align-self: flex-start; padding-top: 4px; }
.inbox-row.is-sel { background: var(--accent-soft); border-radius: 8px; }
/* a health history entry, everything about it */
.ep-facts th { text-align: left; font-weight: 500; color: var(--muted); padding: 2px 12px 2px 0; white-space: nowrap; vertical-align: top; }
.ep-h { margin: 16px 0 6px; }
.gl { border: 1px solid var(--line, #ddd); border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; }
.gl-head { margin: 0 0 6px; font-weight: 600; }
.gl-b h4 { margin: 10px 0 4px; }
.gl-b p { margin: 2px 0; }
.gl .mh-html { overflow-x: auto; }
.ep-list { margin: 0 0 6px; padding-left: 18px; }
.ep-list li { margin: 3px 0; }
.ep-files { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.ep-file { display: flex; flex-direction: column; align-items: center; width: 120px; gap: 4px; text-decoration: none; }
.ep-file img { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.ep-doc { font-size: 2.4rem; }
/* routing and account numbers */
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .02em; }
.acct-nums button { padding: 0 6px; }
/* trip plan sections */
.trip-list { margin: 2px 0 8px; padding-left: 18px; }
.trip-list li { margin: 4px 0; }
.trip-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.trip-pack { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.trip-check.done { text-decoration: line-through; color: var(--muted); }
/* register: waiting for the bank */
tr.tx-open td { background: var(--warn-soft); }
.tx-status { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }

/* Pay a little more (card / loan window). Series colors: the dataviz default palette, slots 1–4, validated light and dark */
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; }
@media (prefers-color-scheme: dark) { :root { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; } }
html[data-mode="light"], html[data-mode="white"] { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; }
html[data-mode="dark"] { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; }
.paymore-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.paymore-opt { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 3px; }
.paymore-opt.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.paymore-opt button { margin-top: 6px; align-self: flex-start; }
.paymore-pay { font-size: 1.35em; font-weight: 700; }
.paymore-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.paymore-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; color: var(--muted); }
.paymore-chart { position: relative; }
.paymore-gridline { stroke: var(--line); stroke-width: 1; }
.paymore-axis { fill: var(--muted); font-size: 11px; }
.paymore-end { fill: var(--text); font-size: 11px; }
.paymore-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.paymore-tip { position: absolute; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; box-shadow: var(--shadow); pointer-events: none; min-width: 160px; z-index: 2; }

/* ⭐ Verified (a card / loan up to date, its payments reconciled) */
.pill.gold { background: #fdf1c7; color: #6b4e00; border: 1px solid #e3c158; }
@media (prefers-color-scheme: dark) { .pill.gold { background: #3a2f0d; color: #f2d27a; border-color: #8a6d1c; } }
html[data-mode="light"] .pill.gold, html[data-mode="white"] .pill.gold { background: #fdf1c7; color: #6b4e00; border-color: #e3c158; }
html[data-mode="dark"] .pill.gold { background: #3a2f0d; color: #f2d27a; border-color: #8a6d1c; }

/* Under the hood (#/about) */
.uh-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.uh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.uh-stat { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel); }
.uh-ico { font-size: 1.4em; line-height: 1.2; }
.uh-val { font-size: 1.35em; font-weight: 700; line-height: 1.2; }
.uh-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.uh-pager { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin: 8px 0; }

/* Issues & bug reports: pinned in the menu, and the tickets */
#nav a.nav-report { margin: 10px 8px 2px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; border-radius: 10px; }
#nav a.nav-report span:first-child { font-size: 1.1em; }
.tk-hero { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-left: 4px solid var(--accent); }
.tk-drop { border: 2px dashed var(--line); border-radius: 12px; padding: 12px 14px; }
.tk-drop.on { border-color: var(--accent); background: var(--accent-soft); }
.tk-pick { color: var(--accent); text-decoration: underline; cursor: pointer; }
.tk-files { margin: 6px 0 0; padding-left: 18px; }
.tk-st { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.85em; border: 1px solid var(--line); white-space: nowrap; }
.tk-open { background: var(--accent-soft); } .tk-in_progress { background: var(--warn-soft); } .tk-waiting { background: var(--bad-soft); } .tk-fixed { background: var(--good-soft); }
.tk-track { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.85em; color: var(--muted); }
.tk-track span.on { color: var(--text); font-weight: 700; background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; }
.tk-track span.done { color: var(--good); }
.tk-track i { font-style: normal; opacity: .5; }
.tk-body { white-space: pre-wrap; margin-top: 2px; }
.tk-up { border-left: 3px solid var(--line); padding: 4px 0 4px 10px; margin: 8px 0; }
.tk-up.admin { border-left-color: var(--accent); }
.tk-gallery { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.tk-file { display: flex; flex-direction: column; gap: 4px; max-width: 220px; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.tk-file img { max-width: 206px; max-height: 160px; object-fit: contain; border-radius: 6px; }
.tk-video { max-width: 360px; } .tk-video video { width: 100%; max-height: 240px; border-radius: 6px; background: #000; }
.tk-doc { flex-direction: row; align-items: center; gap: 8px; font-size: 1.4em; }

/* Notifications: banners above every page */
#site-notices { display: flex; flex-direction: column; gap: 6px; margin: 0 0 10px; }
#site-notices:empty { display: none; }
.site-notice { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.site-notice > div { flex: 1; }
.site-notice .sn-ico { font-size: 1.3em; }
.site-notice.info { border-left: 4px solid var(--accent); }
.site-notice.warning { border-left: 4px solid var(--warn); background: var(--warn-soft); }
.site-notice.urgent { border-left: 4px solid var(--bad); background: var(--bad-soft); font-weight: 600; }
.site-notice.look { background: var(--accent-soft); }

/* Status badges (statusicons.js): green ✓ verified · orange ! out of sync · grey ring not checked yet; words in the tooltip */
.st-ico { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; font-size: 12px; font-weight: 800; line-height: 1; color: #fff; cursor: help; vertical-align: -3px; margin-left: 6px; flex: none; box-sizing: border-box; }
.st-ok { background: #1f8a4c; } .st-sync { background: #e07a10; } .st-no { background: transparent; border: 2px solid var(--muted); opacity: .5; }
.st-summary { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.st-summary .st-ico { margin: 0 4px 0 0; cursor: default; }

/* clickable status badges, Help & FAQ */
.st-click { cursor: pointer; } .st-click:hover { outline: 2px solid var(--accent); outline-offset: 1px; }
details.faq { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
details.faq summary { cursor: pointer; }

/* ---- The menu: pinned / icons only / auto-hide (desktop; phones keep the top menu) ---- */
.nav-modes { display: inline-flex; gap: 2px; margin-left: auto; }
.nav-modes button { all: unset; cursor: pointer; font-size: 12px; line-height: 1; padding: 4px 5px; border-radius: 6px; color: var(--muted); opacity: .7; }
.nav-modes button:hover { background: var(--panel-2); opacity: 1; }
.nav-modes button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); opacity: 1; }
.nav-edge, .nav-float { display: none; }
@media (min-width: 861px) {
  /* icons only */
  html[data-nav="icons"] .shell { grid-template-columns: 64px minmax(0, 1fr); }
  html[data-nav="icons"] .sidebar { padding: 14px 6px; overflow-x: hidden; }
  html[data-nav="icons"] .brand { flex-direction: column; padding: 0 0 12px; gap: 6px; }
  html[data-nav="icons"] .brand #brand-name, html[data-nav="icons"] .nav-head, html[data-nav="icons"] .nav-budget, html[data-nav="icons"] .nav-size,
  html[data-nav="icons"] .nav-credit, html[data-nav="icons"] #nav a > span:last-child, html[data-nav="icons"] .nav-custom span, html[data-nav="icons"] .nav-user .nav-me span { display: none; }
  html[data-nav="icons"] .nav-modes { flex-direction: column; margin: 0; }
  html[data-nav="icons"] #nav a, html[data-nav="icons"] .nav-custom { justify-content: center; padding: 9px 0; }
  html[data-nav="icons"] .nav-group { border-top: 1px solid var(--line); padding-top: 6px; margin-bottom: 6px; }
  html[data-nav="icons"] .nav-group.closed a:not(.active) { display: flex; }
  html[data-nav="icons"] #nav a.nav-report { margin: 8px 4px 2px; }
  html[data-nav="icons"] .nav-ico { width: 20px; height: 20px; }
  /* auto-hide: the page gets the whole width; the menu slides out over it */
  html[data-nav="hide"] .shell { grid-template-columns: minmax(0, 1fr); }
  html[data-nav="hide"] .sidebar { position: fixed; left: 0; top: 0; width: 15rem; z-index: 40; transform: translateX(-102%); transition: transform .18s ease; box-shadow: 0 10px 40px rgba(0,0,0,.18); }
  html[data-nav="hide"].nav-open .sidebar { transform: none; }
  html[data-nav="hide"] .nav-edge { display: block; position: fixed; left: 0; top: 0; width: 10px; height: 100vh; z-index: 39; }
  html[data-nav="hide"] .nav-float { display: block; position: fixed; left: 10px; top: 10px; z-index: 38; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 6px 10px; cursor: pointer; box-shadow: var(--shadow); }
  html[data-nav="hide"].nav-open .nav-float { display: none; }
  html[data-nav="hide"] main { padding-left: 64px; }
}
@media (min-width: 861px) { html[data-nav="icons"] main, html[data-nav="hide"] main { max-width: none; } }

/* small icon buttons in table rows (names on hover) */
.icon-btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; font-size: 15px; }
.icon-btn:hover { background: var(--panel-2); outline: 1px solid var(--line); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); }
.cards-used .progress { min-width: 44px; width: 44px; }

/* menu groups: their pages in one box (a drop-down in the top bar) */
.nav-items { display: flex; flex-direction: column; gap: 1px; }
@media (min-width: 861px) {
  /* ⬆ top bar */
  html[data-nav="top"] .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  html[data-nav="top"] .sidebar { position: sticky; top: 0; z-index: 30; height: auto; overflow: visible; display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  html[data-nav="top"] .brand { padding: 0; flex: none; }
  html[data-nav="top"] .brand .nav-modes { margin-left: 8px; }
  html[data-nav="top"] #nav { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 2px; flex: 1; }
  html[data-nav="top"] .nav-budget, html[data-nav="top"] .nav-size, html[data-nav="top"] .nav-credit, html[data-nav="top"] .nav-custom span, html[data-nav="top"] .nav-me span { display: none; }
  html[data-nav="top"] .nav-user { order: 99; margin-left: auto; border: 0; padding: 0; }
  html[data-nav="top"] .nav-group { position: relative; margin: 0; }
  html[data-nav="top"] .nav-head { padding: 8px 10px; border-radius: 8px; font-size: 0.8125rem; text-transform: none; letter-spacing: 0; color: var(--text); gap: 6px; }
  html[data-nav="top"] .nav-head:hover, html[data-nav="top"] .nav-group:focus-within .nav-head { background: var(--panel-2); }
  html[data-nav="top"] .nav-items { display: none; position: absolute; top: 100%; left: 0; min-width: 230px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.16); padding: 6px; z-index: 50; }
  html[data-nav="top"] .nav-group:hover .nav-items, html[data-nav="top"] .nav-group:focus-within .nav-items { display: flex; }
  html[data-nav="top"] .nav-group.closed a:not(.active) { display: flex; }
  html[data-nav="top"] .nav-group.closed .nav-caret { transform: none; }
  html[data-nav="top"] #nav a.nav-report { margin: 0 4px; padding: 6px 10px; }
  html[data-nav="top"] .nav-custom { padding: 6px 8px; }
  html[data-nav="top"] main { max-width: none; }
  /* ⬇ bottom dock */
  html[data-nav="bottom"] .shell { grid-template-columns: minmax(0, 1fr); }
  html[data-nav="bottom"] .sidebar { position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: auto; z-index: 30; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-right: 0; border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(0,0,0,.08); overflow: visible; }
  html[data-nav="bottom"] .brand { padding: 0; flex: none; }
  html[data-nav="bottom"] .brand #brand-name { display: none; }
  html[data-nav="bottom"] #nav { flex-direction: row; align-items: center; gap: 0; flex: 1; overflow-x: auto; scrollbar-width: thin; }
  html[data-nav="bottom"] .nav-head, html[data-nav="bottom"] .nav-budget, html[data-nav="bottom"] .nav-size, html[data-nav="bottom"] .nav-credit, html[data-nav="bottom"] #nav a > span:last-child, html[data-nav="bottom"] .nav-custom span, html[data-nav="bottom"] .nav-me span { display: none; }
  html[data-nav="bottom"] .nav-user { border: 0; padding: 0; margin: 0 6px 0 0; }
  html[data-nav="bottom"] .nav-group { flex-direction: row; margin: 0; padding: 0 4px; border-left: 1px solid var(--line); }
  html[data-nav="bottom"] .nav-items { flex-direction: row; }
  html[data-nav="bottom"] .nav-group.closed a:not(.active) { display: flex; }
  html[data-nav="bottom"] #nav a, html[data-nav="bottom"] .nav-custom { padding: 8px; }
  html[data-nav="bottom"] #nav a.nav-report { margin: 0 4px; }
  html[data-nav="bottom"] main { max-width: none; padding-bottom: 90px; }
}
@media (min-width: 861px) { html[data-nav="top"] #nav a.nav-report span:last-child { display: none; } html[data-nav="top"] #nav { flex-wrap: nowrap; } }

/* the built-in not-a-robot check (sign-up, and sign-in after wrong passwords) */
.robot-check { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--panel-2); margin: 4px 0; }
.robot-check .rc-box { width: 22px; height: 22px; border-radius: 5px; border: 2px solid var(--muted); flex: none; position: relative; }
.robot-check:not(.done):not(.fail) .rc-box { border-top-color: var(--accent); border-radius: 50%; animation: rc-spin .8s linear infinite; }
.robot-check.done .rc-box { background: #1f8a4c; border-color: #1f8a4c; }
.robot-check.done .rc-box::after { content: '✓'; color: #fff; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.robot-check.fail .rc-box { border-color: var(--bad); }
.robot-check .rc-text { flex: 1; font-weight: 600; }
@keyframes rc-spin { to { transform: rotate(360deg); } }

/* Pay a little more: your own amount (5th series: the dataviz palette's slot 5) */
:root { --s5: #e87ba4; } @media (prefers-color-scheme: dark) { :root { --s5: #d55181; } }
html[data-mode="light"], html[data-mode="white"] { --s5: #e87ba4; } html[data-mode="dark"] { --s5: #d55181; }
.paymore-mine { border-style: dashed; }

/* Admin › Accounts: filter chips, the person cell, the Manage window */
.chip { border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px; padding: 4px 10px; font-size: .9em; cursor: pointer; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip .chip-n { opacity: .7; margin-left: 2px; }
.acct-who { display: flex; align-items: center; gap: 10px; }
.acct-av { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; font-size: .95rem; vertical-align: middle; }
.acct-table td { vertical-align: middle; }
.mg-sec { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.mg-sec h3 { margin: 0 0 6px; font-size: 1rem; }
.mg-roles { display: grid; gap: 8px; margin-top: 8px; }
.mg-role { display: flex; gap: 8px; align-items: flex-start; }
.pair-line { margin-top: 2px; }
.pair-line code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.mg-override { display: flex; gap: 8px; align-items: flex-start; background: var(--panel-2); border: 1px dashed var(--line); border-radius: 6px; padding: 8px; margin-bottom: 8px; }
/* right-click menu (Admin › Accounts) */
.ctx-menu { position: fixed; z-index: 1000; min-width: 240px; max-width: 340px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; display: flex; flex-direction: column; }
.ctx-menu button { all: unset; box-sizing: border-box; padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: .95rem; }
.ctx-menu button:hover:not([disabled]), .ctx-menu button:focus-visible { background: var(--panel-2); outline: none; }
.ctx-menu button[disabled] { opacity: .45; cursor: default; }
.ctx-menu button.danger { color: var(--bad); }
.ctx-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
.ctx-menu .ctx-head { padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ctx-menu .ctx-note { padding: 2px 10px; }

/* ⏰ promo deadlines coming up: a bar at the bottom of every page, louder as a deadline gets closer */
#deadline-bar { position: fixed; right: 16px; bottom: 16px; z-index: 90; width: min(560px, calc(100vw - 32px)); background: var(--panel); color: var(--text); border: 1px solid var(--line); border-left: 6px solid var(--accent, #2a6); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 10px 12px; font-size: .875rem; display: grid; gap: 6px; }
#deadline-bar.dl-warn { border-left-color: var(--warn); background: var(--warn-soft); }
#deadline-bar.dl-urgent { border-left-color: var(--bad); background: var(--bad-soft); animation: dl-pulse 2s ease-in-out infinite; }
#deadline-bar .dl-row { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
#deadline-bar .dl-row.dl-urgent { color: var(--bad); }
#deadline-bar .dl-row button { flex: none; padding: 2px 8px; }
@keyframes dl-pulse { 0%, 100% { box-shadow: 0 8px 28px rgba(0,0,0,.18); } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 35%, transparent), 0 8px 28px rgba(0,0,0,.18); } }
@media (prefers-reduced-motion: reduce) { #deadline-bar.dl-urgent { animation: none; } }
@media print { #deadline-bar { display: none; } }
#deadline-bar { padding: 8px 10px; gap: 4px; font-size: .8125rem; max-height: 40vh; overflow: auto; }
#deadline-bar .dl-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#deadline-bar.dl-min { width: auto; padding: 0; border-radius: 999px; animation: none; opacity: .92; }
#deadline-bar.dl-min:hover { opacity: 1; }
#deadline-bar .dl-tools { display: inline-flex; gap: 4px; flex: none; }
#deadline-bar .dl-open { background: none; border: 0; color: inherit; padding: 8px 12px; cursor: pointer; font: inherit; }
tr.plan-focus td { background: color-mix(in srgb, var(--warn) 22%, transparent); font-weight: 650; }
tr.plan-focus td:first-child { box-shadow: inset 4px 0 0 var(--warn); }
.ac-line { max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.std-tree { margin: 0; padding-left: 1.1em; } .std-tree li { margin: 4px 0; }

/* Import statements: one dot per month (green adds up, red doesn't) */
.imp-months { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.imp-m { font-size: 11px; line-height: 1; padding: 4px 6px; border-radius: 999px; white-space: nowrap; cursor: default; }
.imp-m.ok { background: var(--good-soft); color: var(--good); }
.imp-m.bad { background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.imp-new[hidden] { display: none !important; }

/* 📅 Statement calendar (an account's register, a card's / loan's window): the last 12 months */
.stat-cal { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; }
.stat-cal-m { display: flex; flex-wrap: wrap; gap: 4px; }
.imp-m.gray { background: color-mix(in srgb, var(--muted, #888) 14%, transparent); color: var(--muted, #888); }
.stat-cal .btn, .stat-cal label.btn { padding: 2px 10px; font-size: 13px; }

/* 🚀 Getting started (Start here) */
.start-bar { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--muted, #888) 18%, transparent); overflow: hidden; }
.start-bar > span { display: block; height: 100%; background: var(--good); border-radius: 999px; transition: width .3s; }
.start-step { border: 1px solid var(--border, #8883); border-radius: 10px; padding: 8px 12px; }
.start-step > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.start-step > summary::-webkit-details-marker { display: none; }
.start-step.done { opacity: .8; }
.start-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 13px; font-weight: 700; background: color-mix(in srgb, var(--muted, #888) 20%, transparent); }
.start-step.done .start-num { background: var(--good-soft); color: var(--good); }
.start-body { margin: 8px 0 2px 32px; display: grid; gap: 6px; }

/* Import statements: the fields in even columns, each label above its field, all the same height */
.imp-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px 14px; align-items: end; margin: 8px 0; }
.imp-form > label, .imp-form .imp-new > label { display: block; margin: 0; min-width: 0; }
.imp-form select, .imp-form input { display: block; width: 100%; min-width: 0; max-width: none; height: 42px; margin: 4px 0 0; box-sizing: border-box; }
.imp-form > button { justify-self: start; height: 42px; }
/* Pay a card at its bank */
.pay-ico { display: inline-flex; align-items: center; justify-content: center; padding: 2px 5px; vertical-align: middle; color: var(--accent); }
.pay-ico.pay-none { opacity: .38; } .pay-ico.pay-none:hover, .pay-ico.pay-none:focus-visible { opacity: 1; }
button [aria-hidden="true"] { vertical-align: -3px; }
@media (min-width: 861px) { .table-wrap td.row-actions.cp-acts { min-width: 0; white-space: nowrap; } }
@media (min-width: 861px) and (max-width: 1800px) { .table-wrap td.row-actions.cp-acts { white-space: normal; min-width: 165px; max-width: 190px; } }
.tk-st[class*="tk-done-"] { background: var(--panel-2, rgba(0,0,0,.05)); } .tk-done-implemented { color: var(--good); } .tk-done-declined { color: var(--bad); }
.k-health { border-color: #a0528f; } .cal-dot.k-health { color: #a0528f; }
.mc-note { border-top: 1px solid var(--line); padding: 5px 0; } .mc-note summary { cursor: pointer; } .mc-text { margin: 6px 0; padding: 8px 10px; border-left: 3px solid var(--accent); max-height: 420px; overflow: auto; overflow-wrap: anywhere; }
/* your own profiles under your name */
.nav-mine { display: flex; flex-wrap: wrap; gap: 1px; padding: 2px 4px 8px; } .nav-mine a { display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 27px; border-radius: 8px; text-decoration: none; font-size: 16px; line-height: 1; } .nav-mine a:hover, .nav-mine a:focus-visible { background: var(--accent-soft, rgba(0,0,0,.07)); }
@media (min-width: 861px) { html[data-nav="icons"] .nav-mine { flex-direction: column; align-items: center; padding: 2px 0 8px; } html[data-nav="top"] .nav-mine, html[data-nav="bottom"] .nav-mine { padding: 0 4px; flex-wrap: nowrap; } }
.uh-tabs a[aria-current="page"], .uh-tabs a.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
/* a phone bill, readable */
.phone-bill .pb-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.phone-bill .pb-total { font-size: 1.7em; font-weight: 700; line-height: 1.2; }
.phone-bill .pb-stack { display: flex; gap: 2px; height: 12px; margin: 12px 0 8px; border-radius: 6px; overflow: hidden; } .phone-bill .pb-stack i { display: block; min-width: 3px; }
.phone-bill .pb-key { display: flex; flex-wrap: wrap; gap: 6px 18px; } .phone-bill .pb-key b { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.phone-bill .pb-people { columns: 330px 2; column-gap: 14px; margin-top: 16px; } .phone-bill .pb-people section { break-inside: avoid; margin-bottom: 14px; }
.phone-bill section { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; } .phone-bill section h3 { display: flex; justify-content: space-between; margin: 0 0 6px; padding-bottom: 6px; border-bottom: 2px solid var(--line); text-transform: none; letter-spacing: 0; font-size: 1.08em; color: var(--text); }
.phone-bill .pb-line + .pb-line { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 8px; } .phone-bill .pb-head, .phone-bill .pb-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; } .phone-bill .pb-row { padding: 2px 0; } .phone-bill .pb-row .num { white-space: nowrap; }
.phone-bill .pb-dev { margin: 4px 0; } .phone-bill .pb-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 3px 0; } .phone-bill .pb-bar i { display: block; height: 100%; background: var(--bar-2); }
@media (max-width: 500px) { .phone-bill .pb-people { columns: 1; } }
.ln-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-bottom: 2px; } .ln-bar i { display: block; height: 100%; background: var(--bar-2); }
.pb-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 18px; } .pb-facts div { display: flex; flex-direction: column; }
.ln-id { width: 11.5em; min-width: 9em; padding: 4px 8px; font-size: .95em; }
.ln-fees th { white-space: normal; min-width: 84px; vertical-align: bottom; } .ln-fees .own { background: color-mix(in srgb, #4a78b5 9%, transparent); } .ln-fees tr.acct td { border-top: 2px solid var(--line); }
.ln-phone { border-top: 1px solid var(--line); padding: 10px 0; margin-top: 8px; }
.pill.fam { background: color-mix(in srgb, #7a5bb0 18%, transparent); } .pill.friend { background: color-mix(in srgb, #4a78b5 20%, transparent); } .ln-badges { font-size: .72em; font-weight: 500; vertical-align: middle; }
.dcm-stage { background: #000; border-radius: 10px; display: flex; justify-content: center; align-items: center; min-height: 340px; touch-action: none; cursor: crosshair; } .dcm-stage canvas { width: 100%; height: 58vh; object-fit: contain; image-rendering: auto; } .dcm-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; } .dcm-bar input[type=range] { flex: 1; min-width: 160px; }

/* My Charts clipboard */
.clipboard { position: relative; margin-top: 34px; padding: 34px 16px 18px; border-radius: 22px; background: linear-gradient(135deg, #a8743f, #8a5a2c); box-shadow: var(--shadow); }
.cb-clip { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); width: min(220px, 50%); height: 46px; border-radius: 14px 14px 8px 8px; background: linear-gradient(#d5d9dc, #8d959b); border: 1px solid #757d83; z-index: 1; }
.cb-clip i { position: absolute; left: 50%; top: 8px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: #8a5a2c; border: 2px solid #757d83; }
.cb-paper { background: var(--panel); color: var(--text); border-radius: 8px; padding: 34px 22px 22px; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.cb-top { display: flex; gap: 20px; flex-wrap: wrap; }
.cb-photo { width: 220px; height: 220px; flex: none; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel-2); display: grid; place-items: center; font-size: 6rem; }
.cb-photo img { width: 100%; height: 100%; object-fit: cover; font-size: 1rem; }
.cb-id { flex: 1 1 320px; min-width: 0; }
.cb-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.cb-h h2, .cb-h h3 { margin: 0; }
.cb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 14px; margin-top: 8px; }
.cb-f { min-width: 0; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.cb-f > span { display: block; font-size: .78rem; color: var(--muted); }
.cb-f > strong { font-weight: 600; }
.cb-f.wide { grid-column: span 2; }
.cb-alert { margin-top: 12px; padding: 8px 12px; border-radius: 8px; background: var(--panel-2); }
.cb-alert.bad { background: var(--bad-soft); color: var(--bad); }
.cb-vit { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 14px; }
.cb-vit > div { display: flex; flex-direction: column; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.cb-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 0 24px; }
.cb-sec { margin-top: 20px; border-top: 2px solid var(--accent); padding-top: 8px; min-width: 0; }
.cb-sec h4 { margin: 10px 0 2px; color: var(--muted); font-weight: 600; }
.cb-list { margin: 6px 0 0; padding-left: 18px; }
.cb-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.cb-spark { color: var(--accent); vertical-align: middle; }
.cb-fam { margin-top: 8px; overflow-x: auto; }
.cb-gen { text-align: center; }
.cb-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; }
.cb-couple { display: inline-flex; align-items: stretch; gap: 0; padding: 4px; border: 1px dashed var(--line); border-radius: 14px; } .cb-join { align-self: center; padding: 0 6px; color: #c2410c; font-size: 14px; }
.cb-exes, .cb-kids { display: inline-flex; flex-direction: column; gap: 4px; align-items: center; } .cb-exes { opacity: .9; } .cb-kids { padding: 6px 8px 8px; border-top: 2px solid var(--line); border-radius: 0 0 12px 12px; } .cb-kids.plain { border-top-style: dotted; }
.cb-stem { width: 2px; height: 16px; background: var(--line); margin: 6px auto; }
.cb-branch { display: inline-flex; flex-direction: column; align-items: center; } .cb-branch > .cb-stem { margin: 0 auto; } .cb-row { align-items: flex-start; }
.cb-kin { display: flex; flex-direction: column; gap: 3px; align-items: center; max-width: 220px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--text); font: inherit; text-align: center; white-space: normal; }
.cb-kin.me { border: 2px solid var(--accent); }
.cb-kin.dead { border-style: dashed; }
.cb-kin.wait { border-style: dotted; opacity: .75; }
.cb-kin-ph { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.cb-tree { margin: 4px 0 8px; padding-left: 22px; border-left: 2px solid var(--line); list-style: none; }
.cb-tree li { padding: 2px 0; }
@media (max-width: 600px) { .clipboard { padding: 30px 8px 10px; } .cb-paper { padding: 30px 12px 14px; } .cb-photo { width: 100%; height: auto; aspect-ratio: 1; max-width: 260px; margin: 0 auto; } .cb-f.wide { grid-column: 1 / -1; } }
/* Employment history: papers & supervisors */
.jf { margin-top: 6px; }
.jf > summary { cursor: pointer; }
.jf-body { margin-top: 6px; padding: 8px 10px; border: 1px solid var(--line, #ddd6ca); border-radius: 8px; }
.jf-body.over { outline: 2px dashed var(--accent, #6a4fd8); }
.jf-row { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; border-top: 1px solid var(--line, #e6e1d8); }
.jf-row:first-child, .jf-pos + .jf-row { border-top: 0; }
.jf-row > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.jf-row button { flex: none; }
.jf-pos { font-weight: 600; margin: 8px 0 2px; }
.jf-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.jf-kind { font-weight: 600; margin-top: 8px; }
.jf-use { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.jf-list { max-height: 46vh; overflow: auto; border: 1px solid var(--line, #ddd6ca); border-radius: 8px; padding: 4px 8px; margin: 6px 0; }
.jf-pick { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; font-size: .9rem; }
.jf-pick[hidden] { display: none; }
.jf-use .jf-pick > input[type=checkbox] { flex: 0 0 auto; margin-top: 3px; width: 18px; min-width: 0; }
.jf-pick > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.jf-duties ul { margin: 4px 0 4px 18px; padding: 0; }
.jf-on { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.jf-on input { width: auto; min-width: 0; margin: 0; }
.rs-off { border: 1px dashed var(--line, #ddd6ca); border-radius: 8px; padding: 8px 12px; margin-top: 14px; }
.jf-use textarea, .jf-use select, .jf-use label > input:not([type=checkbox]) { width: 100%; }
.jf-pre { white-space: pre-wrap; max-height: 260px; overflow: auto; font: inherit; font-size: .85rem; }
@media (max-width: 760px) { .jf-use { grid-template-columns: 1fr; } }

/* Recovery updates */
.rc-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.rc-pic { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; }
.rc-pic img { width: 110px; height: 110px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.rc-item { border-left: 3px solid var(--line); padding: 4px 0 4px 10px; margin: 8px 0; }
.rc-warn { border: 1px solid var(--warn, #b7791f); border-radius: 6px; padding: 6px 10px; margin: 6px 0; }
.rc-warn.bad { border-color: var(--bad, #b3261e); font-weight: 600; }
.rc-sym { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 4px 10px; }
.rc-sym label { display: flex; gap: 6px; align-items: center; }

/* Money on a health record */
.mm-kpis { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.mm-kpi { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; min-width: 110px; }
.mm-est { border: 1px dashed var(--line); border-radius: 8px; padding: 8px 12px; margin: 6px 0; }
.mm-file { display: inline-flex; gap: 4px; align-items: center; }
.mm-file select { max-width: 120px; }
.mm-sub td { border-top: 0; padding-top: 0; }

/* MyHealth, rebuilt: calm cards, one clear action per row */
.care-tabs { flex-wrap: wrap; }
.mh { margin-top: 14px; }
.mh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.mh-card { background: var(--panel, #fff); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; min-height: 92px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.mh-card[role=button] { cursor: pointer; transition: transform .12s, box-shadow .12s; } .mh-card[role=button]:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.mh-k { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; opacity: .65; font-weight: 600; }
.mh-v { font-size: 24px; font-weight: 700; margin: 4px 0 2px; line-height: 1.15; overflow-wrap: anywhere; }
.mh-s { font-size: 13px; opacity: .7; }
.mh-panel { background: var(--panel, #fff); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; margin-bottom: 14px; }
.mh-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; } .mh-h h2 { margin: 0; font-size: 18px; }
.mh-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; border-radius: 8px; }
.mh-h + .mh-row, .mh-bar + .mh-row, p + .mh-row { border-top: 0; }
a.mh-row:hover { background: rgba(0,0,0,.035); }
.mh-ic { font-size: 22px; width: 30px; text-align: center; flex: none; }
.mh-main { flex: 1; min-width: 0; } .mh-sub { display: block; font-size: 13px; opacity: .7; overflow-wrap: anywhere; }
.mh-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; } .mh-go { font-size: 22px; opacity: .35; }
.mh-time { font-weight: 700; width: 84px; flex: none; } .mh-time.dim { opacity: .45; }
.mh-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.mh-seg { display: inline-flex; flex-wrap: wrap; background: rgba(0,0,0,.06); border-radius: 10px; padding: 2px; gap: 2px; }
.mh-seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; font-weight: 600; cursor: pointer; color: inherit; }
.mh-seg button.on { background: var(--panel, #fff); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.mh-n { font-size: 11px; opacity: .6; font-weight: 600; }
.mh-q { flex: 1; min-width: 170px; border-radius: 10px; }
.mh-reader details { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 6px 0; } .mh-reader summary { cursor: pointer; }
.mh-reader details details { border-width: 0 0 0 3px; border-radius: 0; margin: 6px 0 6px 4px; }
.mh-pre { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 6px; }
.mh-html { overflow-x: auto; margin-top: 6px; } .mh-html table { border-collapse: collapse; margin: 6px 0; font-size: 13px; } .mh-html td, .mh-html th { border: 1px solid var(--line); padding: 3px 8px; vertical-align: top; text-align: left; } .mh-html th { background: rgba(0,0,0,.04); } .mh-html h5 { margin: 10px 0 2px; font-size: 14px; } .mh-html ul { margin: 4px 0; padding-left: 18px; }
.mh-kind { font-weight: 700; margin: 14px 0 2px; } .mh-peek { display: block; font-size: 13px; opacity: .6; } details[open] > summary > .mh-peek { display: none; }
.mh-whole h4 { margin: 16px 0 4px; border-bottom: 1px solid var(--line); }
.mh-drop { display: block; border: 2px dashed var(--line); border-radius: 16px; padding: 26px; text-align: center; cursor: pointer; }
@media (max-width: 640px) { .mh-chips { display: none; } .mh-v { font-size: 20px; } }

/* Results and Care Team */
.mh-val { font-size: 18px; font-weight: 700; white-space: nowrap; text-align: right; } .mh-val small { font-weight: 500; opacity: .6; font-size: 12px; } .mh-val.bad, .mh-row .bad { color: var(--bad); }
.mh-spark { display: block; } .mh-bigspark svg { width: 100%; height: 70px; } .mh-bigspark { margin-bottom: 8px; color: var(--accent); } .mh-bigspark.bad { color: var(--bad); }
.mh-old { margin-top: 12px; } .mh-old > summary { cursor: pointer; opacity: .75; padding: 6px 0; }
.mh-docs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 6px; }
.mh-doc { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 16px; padding: 14px; } .mh-doc.main { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.mh-doc-b { min-width: 0; flex: 1; } .mh-doc-a { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; font-size: 14px; } .mh-call { font-weight: 600; text-decoration: none; }
.mh-face { width: 52px; height: 52px; border-radius: 50%; flex: none; object-fit: cover; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), #6aa69a); color: #fff; font-weight: 700; font-size: 18px; }
.mh-row .mh-face { width: 36px; height: 36px; font-size: 13px; }
/* My Clipboard: a clean sheet on a board */
.clipboard { background: linear-gradient(160deg, #c79a63, #a9753f) !important; border-radius: 26px !important; }
.cb-paper { border-radius: 18px !important; padding: 44px 30px 30px !important; box-shadow: 0 10px 30px rgba(0, 0, 0, .25) !important; font-size: 15px; }
.cb-id .cb-h h2 { font-size: 30px; letter-spacing: -.01em; }
.cb-photo { border-radius: 22px !important; border: 0 !important; box-shadow: 0 2px 10px rgba(0,0,0,.12); width: 180px !important; height: 180px !important; }
.cb-f { border-bottom: 0 !important; } .cb-f > span { text-transform: uppercase; letter-spacing: .05em; font-size: 11px !important; font-weight: 600; } .cb-f > strong { font-size: 15px; }
.cb-alert { border-radius: 14px !important; padding: 12px 16px !important; font-size: 16px; } .cb-alert.bad { border: 1.5px solid var(--bad); }
.cb-vit > div { border-radius: 14px !important; border: 0 !important; background: rgba(0,0,0,.04); padding: 10px 12px !important; } .cb-vit strong { font-size: 18px; }
.cb-sec { border-top: 1px solid var(--line) !important; margin-top: 26px !important; padding-top: 14px !important; } .cb-sec .cb-h h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; opacity: .7; }
.cb-card { border-radius: 14px !important; } .cb-list li { padding: 2px 0; }
.cb-glance { margin-top: 20px; border-radius: 20px; padding: 18px 20px; background: linear-gradient(180deg, rgba(0,0,0,.035), rgba(0,0,0,.015)); border: 1px solid var(--line); }
.cb-gl-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; } .cb-gl-h strong { font-size: 20px; display: block; } .cb-gl-h span { font-size: 13px; opacity: .65; }
.cb-gl { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 26px; margin-top: 12px; }
.cb-gc h5 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; opacity: .65; } .cb-gc ul { margin: 0; padding: 0; list-style: none; } .cb-gc li { padding: 4px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; } .cb-gc li:last-child { border-bottom: 0; } .cb-gc em { font-style: normal; opacity: .55; font-size: 13px; } .cb-gc p { margin: 0; }
.cb-why { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--panel); border-left: 4px solid var(--accent); } .cb-why span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; opacity: .65; font-weight: 600; } .cb-why.q { border-left-color: #c79a63; }

/* Search at the top of the menu */
.gsearch { position: relative; padding: 4px 10px 8px; }
.gsearch input { width: 100%; border-radius: 10px; padding: 7px 10px; font-size: 14px; }
#gsearch-list { position: absolute; left: 10px; top: calc(100% - 4px); width: min(440px, 92vw); background: var(--panel, #fff); color: var(--text, #222); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 34px rgba(0,0,0,.22); z-index: 60; max-height: 70vh; overflow: auto; padding: 4px; }
.gs-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.gs-row.on, .gs-row:hover { background: rgba(0,0,0,.07); }
.gs-row .nav-ico { width: 18px; height: 18px; flex: none; } .gs-dot { width: 18px; flex: none; }
.gs-main { flex: 1; min-width: 0; } .gs-l { display: block; font-weight: 600; overflow-wrap: anywhere; } .gs-s { display: block; font-size: 12px; opacity: .65; }
.gs-t { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; opacity: .55; white-space: nowrap; } .gs-none { padding: 10px; opacity: .7; }

/* MyAuto planner */
.alog-board { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; }
.alog-col { background: rgba(0,0,0,.04); border-radius: 12px; padding: 8px; min-height: 80px; }
.alog-card { background: var(--panel, #fff); border: 1px solid var(--line); border-radius: 10px; padding: 8px; margin-top: 6px; } .alog-card select { margin-top: 4px; width: 100%; }

/* Add transaction: the payee picker */
label.field { position: relative; }
.tx-pick { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: var(--panel, #fff); color: var(--text, #222); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.2); max-height: 300px; overflow: auto; padding: 4px; }
.tp-h { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .6; font-weight: 700; padding: 8px 10px 2px; }

/* Insurance: coverage cards and the plans chart (one bar per plan; your plan in the second color) */
.ins-card { display: flex; flex-direction: column; gap: 4px; } .ins-card.empty { border-style: dashed; justify-content: center; }
.ins-src { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; } .ins-src-b { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel, #fff); cursor: pointer; font: inherit; color: inherit; } .ins-src-b:hover { border-color: var(--accent, #2a78d6); } .ins-src-b > span:last-child { display: flex; flex-direction: column; gap: 2px; } .ins-src-i { font-size: 24px; }
.sq-row { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); } .sq-row.ask { grid-template-columns: 28px 1fr auto; padding: 12px 0; } .sq-n { width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.08); display: grid; place-items: center; font-weight: 600; font-size: 13px; } .sq-row.ask .sq-n { background: var(--accent, #2a78d6); color: #fff; } .sq-q { display: flex; flex-direction: column; gap: 2px; } .sq-row.ask .sq-q strong { font-size: 16px; } .sq-b { display: inline-flex; gap: 8px; flex-wrap: wrap; } .sq-b button { min-width: 72px; }
@media (max-width: 640px) { .sq-row.ask { grid-template-columns: 28px 1fr; } .sq-row.ask .sq-b { grid-column: 2; } }
button.cb-photo { padding: 0; cursor: pointer; position: relative; font: inherit; color: inherit; } .cb-photo-ed { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 0; font-size: 12px; font-weight: 600; text-align: center; background: rgba(0,0,0,.55); color: #fff; opacity: 0; transition: opacity .15s; } button.cb-photo:hover .cb-photo-ed, button.cb-photo:focus-visible .cb-photo-ed { opacity: 1; } @media (hover: none) { .cb-photo-ed { opacity: .9; } }
#tk-pops { position: fixed; top: 16px; right: 16px; z-index: 90; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); } .tk-pop { background: var(--panel, #fff); color: var(--text); border: 1px solid var(--line); border-left: 5px solid var(--accent, #2a78d6); border-radius: 12px; padding: 12px 14px; box-shadow: 0 8px 28px rgba(0,0,0,.22); display: grid; gap: 4px; } .tk-pop.ok { border-left-color: var(--good, #2e7d32); } .tk-pop-b { white-space: pre-wrap; max-height: 110px; overflow: auto; }
.carmap { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #e9eef0; touch-action: none; cursor: grab; user-select: none; } .carmap:active { cursor: grabbing; } .cm-tiles img { position: absolute; width: 256px; height: 256px; max-width: none; } .cm-svg { position: absolute; inset: 0; width: 100%; height: 100%; } .cm-label { font: 600 12px system-ui, sans-serif; fill: #111; stroke: #fff; stroke-width: 3px; paint-order: stroke; } .cm-btns { position: absolute; top: 10px; left: 10px; display: grid; gap: 4px; } .cm-btns button { display: grid; place-items: center; width: 34px; height: 34px; min-height: 0; padding: 0; font-size: 18px; background: #fff; color: #111; border: 1px solid #bbb; border-radius: 8px; } .cm-street { position: absolute; right: 6px; top: 6px; font-size: 11px; background: rgba(255,255,255,.88); color: #222; padding: 2px 8px; border-radius: 6px; } .cm-street a { color: #1a4f8a; } .cm-street button { font: inherit; padding: 1px 6px; background: none; border: 0; color: #1a4f8a; text-decoration: underline; min-height: 0; } .cm-street .cm-ask { font-size: 13px; padding: 5px 8px; font-weight: 600; } #tm-live .toolbar input, #tm-live .toolbar select { width: auto; max-width: 320px; } .tm-list tbody tr { cursor: pointer; } .tm-list tbody tr:hover { background: rgba(0,0,0,.04); } .tm-addr { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-costs { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; } .ins-costs .mh-panel { margin-bottom: 12px; }
.ins-meter { padding: 8px 0; border-top: 1px solid var(--line); } .ins-meter-k { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .7; margin-bottom: 6px; }
.ins-meter-bar { height: 8px; border-radius: 99px; background: rgba(0,0,0,.09); overflow: hidden; } .ins-meter-bar span { display: block; height: 100%; border-radius: 99px; background: #2a78d6; }
.ins-meter-v { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; font-size: 16px; } .ins-meter-v strong { font-size: 20px; }
.ins-claim { display: grid; grid-template-columns: 1fr auto minmax(110px, auto); gap: 12px; align-items: center; cursor: pointer; } .ins-claim .mh-main { display: flex; flex-direction: column; } .ins-claim-amt { display: flex; flex-direction: column; text-align: right; }
.ins-claims tbody tr { cursor: pointer; } .ins-claims tbody tr:hover { background: rgba(0,0,0,.04); }
.ins-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.ins-facts { font-size: 14px; margin: 6px 0; border-collapse: collapse; width: 100%; } .ins-facts th { text-align: left; font-weight: 500; opacity: .65; padding: 4px 12px 4px 0; vertical-align: top; white-space: nowrap; width: 1%; } .ins-facts td { padding: 4px 0; overflow-wrap: break-word; word-break: normal; }
.ins-chart { --ins-1: #2a78d6; --ins-2: #eb6834; display: grid; gap: 10px; margin: 6px 0 4px; }
.ins-bar { display: grid; grid-template-columns: minmax(150px, 240px) 1fr; gap: 12px; align-items: center; position: relative; border-radius: 6px; outline-offset: 2px; }
.ins-name { font-size: 14px; overflow-wrap: anywhere; } .ins-track { display: flex; align-items: center; gap: 8px; border-left: 1px solid var(--line); min-height: 26px; }
.ins-fill { display: block; height: 18px; background: var(--ins-1); border-radius: 0 4px 4px 0; } .ins-fill.you { background: var(--ins-2); }
.ins-val { font-size: 13px; font-weight: 600; white-space: nowrap; }
.ins-bar:hover::after, .ins-bar:focus-visible::after { content: attr(data-tip); position: absolute; left: 150px; top: -30px; z-index: 5; background: var(--text); color: var(--panel); font-size: 12px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; max-width: 80vw; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.ins-legend { display: flex; gap: 16px; font-size: 13px; margin: 2px 0 8px; } .ins-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: #2a78d6; margin-right: 6px; vertical-align: -1px; } .ins-sw.you { background: #eb6834; }
.ins-mine td { background: rgba(235, 104, 52, .07); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ins-chart { --ins-1: #3987e5; --ins-2: #d95926; } :root:not([data-theme="light"]) .ins-sw { background: #3987e5; } :root:not([data-theme="light"]) .ins-sw.you { background: #d95926; } }
:root[data-theme="dark"] .ins-chart { --ins-1: #3987e5; --ins-2: #d95926; } :root[data-theme="dark"] .ins-sw { background: #3987e5; } :root[data-theme="dark"] .ins-sw.you { background: #d95926; }
@media (max-width: 640px) { .ins-bar { grid-template-columns: 1fr; gap: 2px; } }
.ins-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px 28px; } .ins-two h3 { margin: 6px 0 4px; font-size: 16px; } .ins-two p { margin: 6px 0; }

.tm-stick { position: sticky; top: -1px; z-index: 3; background: var(--panel, #fffaf2); padding-bottom: 6px; } .tm-play { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; } .tm-play input[type=range] { flex: 1 1 200px; min-width: 120px; padding: 0; } .tm-play [data-now] { flex: 0 1 auto; font-variant-numeric: tabular-nums; }
@media (max-height: 700px) { .tm-stick { position: static; } }

.as-dlg h3 { margin: 10px 0 4px; } .as-parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; } .as-parts fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 0; } .as-parts legend { font-weight: 600; padding: 0 4px; } .as-parts label { display: flex; gap: 8px; align-items: center; padding: 3px 0; } .as-row { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); } .as-row > div:first-child { flex: 1 1 260px; }

.tl-bar { position: relative; height: 10px; border-radius: 6px; background: color-mix(in srgb, var(--text, #222) 12%, transparent); margin: 6px 0; } .tl-bar span { display: block; height: 100%; border-radius: 6px; } .tl-bar i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text, #222); opacity: .6; } .tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-top: 10px; } .tl-box { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; min-width: 0; overflow-wrap: anywhere; }

.as-can label { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; } .as-can input { width: auto; flex: none; margin-top: 4px; }

.as-all { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; } .as-all input { flex: none; margin-top: 4px; }

/* 📊 phone use: monthly columns */
.use-cols { display: flex; gap: 2px; align-items: stretch; overflow-x: auto; padding-top: 4px; }
.use-col { flex: 1 1 0; min-width: 30px; max-width: 90px; display: flex; flex-direction: column; align-items: center; border-radius: 6px; }
.use-col:hover, .use-col:focus-visible { background: var(--panel-2); }
.use-plot { height: 160px; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; border-bottom: 1px solid var(--line); }
.use-plot > i { display: block; width: 60%; max-width: 24px; flex: 0 1 auto; background: var(--bar); border-radius: 4px 4px 0 0; }
.use-val { font-size: .75rem; white-space: nowrap; line-height: 1.4; color: var(--text); flex: none; }
.use-none { font-size: .7rem; color: var(--muted); white-space: nowrap; padding-bottom: 2px; }
.use-x { font-size: .75rem; color: var(--muted); white-space: nowrap; padding-top: 3px; }
.use-group { margin: 12px 0 6px; font-size: .85rem; }
.use-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.use-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-width: 0; }
.use-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.use-card-head { flex-wrap: wrap; }
.use-card-head > strong { white-space: nowrap; }
.use-card-head > span { white-space: nowrap; font-size: .85rem; }
.use-mini { display: flex; gap: 2px; height: 56px; align-items: stretch; margin-top: 8px; border-bottom: 1px solid var(--line); }
.use-mcol { flex: 1 1 0; max-width: 24px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.use-mcol:hover { background: var(--panel-2); }
.use-mcol > i { display: block; width: 100%; max-width: 16px; background: var(--bar); border-radius: 3px 3px 0 0; }
.use-mcol > b { display: block; width: 3px; height: 3px; border-radius: 50%; background: var(--muted); margin-bottom: 2px; }
.use-mini-x { display: flex; justify-content: space-between; gap: 6px; font-size: .7rem; margin-top: 2px; }
.ln-kind { max-width: 100%; font-size: .8rem; padding: 2px 4px; }
