/* ---------- tokens ---------- */
:root {
  --bg: #0e1116;
  --bg-elev: #161b23;
  --bg-elev-2: #1d232d;
  --line: #262e3a;
  --line-soft: #1f2630;
  --text: #e8edf5;
  --text-dim: #97a3b6;
  --text-faint: #6b7688;
  --accent: #5b9cff;
  --accent-ink: #0b1220;
  --good: #3ecf8e;
  --warn: #f5b544;
  --bad: #ff6b6b;
  --radius: 14px;
  --radius-sm: 10px;
  --tap: 44px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  font-size: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  overscroll-behavior-y: none;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }

.num { font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */
#app { min-height: 100dvh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(14,17,22,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
  padding-top: var(--safe-t);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px; min-height: 56px;
}
.topbar h1 { font-size: 1.3rem; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }

.view {
  flex: 1;
  padding: 14px 14px calc(90px + var(--safe-b));
  max-width: 720px; width: 100%; margin: 0 auto;
}

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex;
  background: rgba(14,17,22,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-soft);
  padding-bottom: var(--safe-b);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px 8px; color: var(--text-faint); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.02em; min-height: var(--tap);
}
.tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab.is-active { color: var(--accent); }

/* ---------- generic bits ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 0 16px; border-radius: var(--radius-sm);
  background: var(--bg-elev-2); color: var(--text);
  font-size: 0.92rem; font-weight: 600; border: 1px solid var(--line);
}
.btn:active { transform: scale(0.985); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-good { background: var(--good); color: #08160f; border-color: transparent; }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-danger { background: transparent; color: var(--bad); border-color: rgba(255,107,107,0.35); }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: 1rem; }
.btn-sm { min-height: 34px; padding: 0 11px; font-size: 0.82rem; border-radius: 8px; }
.btn:disabled { opacity: 0.45; }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 10px; background: var(--bg-elev-2); border: 1px solid var(--line);
  color: var(--text-dim);
}
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.tiny { font-size: 0.78rem; }
.small { font-size: 0.86rem; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.pos { color: var(--good); }
.neg { color: var(--bad); }

.empty {
  text-align: center; padding: 48px 22px; color: var(--text-dim);
}
.empty h3 { color: var(--text); margin-bottom: 8px; font-size: 1.05rem; }
.empty p { margin: 0 0 20px; font-size: 0.92rem; line-height: 1.55; }

.section-label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--text-faint); font-weight: 700; margin: 22px 2px 9px;
}
.section-label:first-child { margin-top: 4px; }

/* ---------- attention strip ---------- */
.alert-card {
  background: linear-gradient(180deg, rgba(245,181,68,0.13), rgba(245,181,68,0.05));
  border: 1px solid rgba(245,181,68,0.28);
  border-radius: var(--radius); padding: 13px 14px; margin-bottom: 16px;
}
.alert-card.is-hot {
  background: linear-gradient(180deg, rgba(255,107,107,0.14), rgba(255,107,107,0.05));
  border-color: rgba(255,107,107,0.3);
}
.alert-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.86rem; margin-bottom: 10px; }
.alert-head svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.alert-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 0; border-top: 1px solid rgba(255,255,255,0.07); width: 100%; text-align: left;
}
.alert-item:first-of-type { border-top: none; }
.alert-item .ai-name { font-weight: 600; font-size: 0.92rem; }
.alert-item .ai-sub { font-size: 0.76rem; color: var(--text-dim); }
.alert-item .ai-amt { font-weight: 700; font-size: 0.95rem; white-space: nowrap; }

/* ---------- card block ---------- */
.cardblock {
  background: var(--bg-elev); border: 1px solid var(--line-soft);
  border-radius: var(--radius); margin-bottom: 14px; overflow: hidden;
}
.cardblock-head {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  width: 100%; text-align: left;
}
.swatch {
  width: 42px; height: 42px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 0.9rem;
  color: rgba(255,255,255,0.95); letter-spacing: -0.02em;
}
.cardblock-title { flex: 1; min-width: 0; }
.cardblock-title .cb-name {
  display: block;
  font-weight: 650; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cardblock-title .cb-sub { display: block; font-size: 0.77rem; color: var(--text-dim); margin-top: 1px; line-height: 1.35; }
.chev { width: 18px; height: 18px; flex: none; color: var(--text-faint); transition: transform 0.18s ease; }
.chev svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cardblock.is-open .chev { transform: rotate(90deg); }

.fee-meter { padding: 0 14px 12px; }
.fee-track {
  height: 7px; border-radius: 99px; background: var(--bg-elev-2); overflow: hidden; position: relative;
}
.fee-fill { height: 100%; border-radius: 99px; background: var(--good); transition: width 0.35s ease; }
.fee-fill.under { background: var(--warn); }
.fee-legend { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 0.75rem; color: var(--text-dim); }
.fee-when { margin-top: 4px; font-size: 0.72rem; color: var(--text-faint); }

.cardblock-body { display: none; border-top: 1px solid var(--line-soft); }
.cardblock.is-open .cardblock-body { display: block; }

/* ---------- benefit row ---------- */
.brow {
  display: block; width: 100%; text-align: left;
  padding: 12px 14px; border-bottom: 1px solid var(--line-soft);
}
.brow:last-child { border-bottom: none; }
.brow-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.brow-name { font-weight: 600; font-size: 0.95rem; }
.brow-amt { font-size: 0.9rem; font-weight: 700; white-space: nowrap; }
.brow-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; font-size: 0.76rem; color: var(--text-dim); flex-wrap: wrap; }

.bar { display: block; height: 6px; border-radius: 99px; background: var(--bg-elev-2); margin-top: 9px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width 0.3s ease; }
.bar.done > i { background: var(--good); }
.bar.urgent > i { background: var(--warn); }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 99px; font-size: 0.7rem; font-weight: 700;
  background: var(--bg-elev-2); color: var(--text-dim); letter-spacing: 0.01em;
}
.pill.warn { background: rgba(245,181,68,0.16); color: var(--warn); }
.pill.hot { background: rgba(255,107,107,0.16); color: var(--bad); }
.pill.good { background: rgba(62,207,142,0.15); color: var(--good); }
.pill.info { background: rgba(91,156,255,0.15); color: var(--accent); }

.addrow {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 12px; color: var(--accent); font-weight: 600; font-size: 0.88rem;
  border-top: 1px solid var(--line-soft);
}

/* ---------- sheet / modal ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(5,7,10,0.65);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade 0.16s ease;
}
@keyframes fade { from { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(22px); opacity: 0.4; } }

.sheet {
  background: var(--bg-elev); width: 100%; max-width: 560px;
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--line);
  max-height: 92dvh; display: flex; flex-direction: column;
  animation: slideUp 0.2s cubic-bezier(.22,.9,.3,1);
  padding-bottom: var(--safe-b);
}
@media (min-width: 620px) {
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 18px; max-height: 88dvh; border: 1px solid var(--line); }
}
.sheet-grip { width: 38px; height: 4px; border-radius: 99px; background: var(--line); margin: 9px auto 2px; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px 12px; border-bottom: 1px solid var(--line-soft);
}
.sheet-head h2 { font-size: 1.08rem; }
.sheet-head .sh-sub { font-size: 0.78rem; color: var(--text-dim); margin-top: 2px; }
.sheet-body { padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: 12px 16px 16px; border-top: 1px solid var(--line-soft); display: flex; gap: 10px; }
.sheet-foot .btn { flex: 1; }

/* ---------- forms ---------- */
.field { margin-bottom: 15px; }
.field > label {
  display: block; font-size: 0.78rem; font-weight: 650; color: var(--text-dim);
  margin-bottom: 6px; letter-spacing: 0.01em;
}
.field .hint { font-size: 0.74rem; color: var(--text-faint); margin-top: 5px; line-height: 1.4; }
input[type=text], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); outline: none; appearance: none; font-size: 16px;
}
textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2397a3b6' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 17px;
  padding-right: 36px;
}
.field-row { display: flex; gap: 10px; }
.field-row > .field { flex: 1; }

.money-input { position: relative; }
.money-input span {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-faint); font-weight: 600; pointer-events: none;
}
.money-input input { padding-left: 26px; }

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  flex: 1 1 auto; min-width: 74px; min-height: 40px; padding: 0 10px;
  border-radius: 9px; border: 1px solid var(--line); background: var(--bg);
  color: var(--text-dim); font-size: 0.84rem; font-weight: 600;
}
.seg button.on { background: var(--accent); border-color: transparent; color: var(--accent-ink); }

.swatches { display: flex; gap: 9px; flex-wrap: wrap; }
.swatches button {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent;
}
.swatches button.on { border-color: var(--text); }

.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 0;
}
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; z-index: 2; }
.switch i {
  position: absolute; inset: 0; border-radius: 99px; background: var(--bg-elev-2);
  border: 1px solid var(--line); transition: background 0.18s;
}
.switch i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--text-dim); transition: transform 0.18s, background 0.18s;
}
.switch input:checked + i { background: var(--accent); border-color: transparent; }
.switch input:checked + i::after { transform: translateX(20px); background: #fff; }

/* ---------- use sheet ---------- */
.use-hero {
  text-align: center; padding: 6px 0 18px;
}
.use-hero .uh-amt { font-size: 2.4rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; }
.use-hero .uh-label { font-size: 0.82rem; color: var(--text-dim); margin-top: 4px; }
.use-hero .bar { margin-top: 14px; }

.amount-choice { display: flex; gap: 9px; margin-bottom: 14px; }
.amount-choice button {
  flex: 1; min-height: 46px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--bg); color: var(--text-dim);
  font-weight: 650; font-size: 0.88rem;
}
.amount-choice button.on { border-color: var(--accent); background: rgba(91,156,255,0.12); color: var(--text); }

.hist-item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-top: 1px solid var(--line-soft);
}
.hist-item:first-child { border-top: none; }
.hist-note { font-size: 0.82rem; color: var(--text-dim); margin-top: 2px; line-height: 1.45; word-break: break-word; }
.hist-del { color: var(--text-faint); padding: 2px 6px; font-size: 0.76rem; }

.notebox {
  background: var(--bg-elev-2); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 11px 13px; font-size: 0.87rem;
  color: var(--text-dim); line-height: 1.55; white-space: pre-wrap; word-break: break-word;
  margin-bottom: 16px;
}

/* ---------- year view ---------- */
.year-nav { display: flex; align-items: center; gap: 6px; }
.year-nav .yn-label { font-weight: 700; font-size: 0.95rem; min-width: 52px; text-align: center; }

.bignum {
  background: var(--bg-elev); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 18px; text-align: center; margin-bottom: 12px;
}
.bignum .bn-val { font-size: 2.2rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1.15; }
.bignum .bn-label { font-size: 0.82rem; color: var(--text-dim); margin-top: 3px; }

.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 6px; }
.stat {
  background: var(--bg-elev); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 12px 10px; text-align: center;
}
.stat .s-val { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.02em; }
.stat .s-label { font-size: 0.68rem; color: var(--text-faint); margin-top: 2px; line-height: 1.3; }

.ycard {
  background: var(--bg-elev); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 14px; margin-bottom: 11px;
}
.yc-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.yc-verdict { font-size: 0.78rem; font-weight: 700; margin-top: 2px; }
.yline {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 7px 0; font-size: 0.87rem; border-top: 1px solid var(--line-soft);
}
.yline:first-of-type { border-top: none; }
.yline .yl-name { color: var(--text-dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yline .yl-name.yl-wrap { white-space: normal; overflow: visible; }
.yline .yl-val { white-space: nowrap; font-weight: 600; }
.ymath {
  margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line);
  font-size: 0.87rem;
}
.ymath .yline { border: none; padding: 4px 0; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(20px);
  bottom: calc(84px + var(--safe-b)); z-index: 60;
  background: var(--bg-elev-2); border: 1px solid var(--line);
  color: var(--text); padding: 10px 16px; border-radius: 99px;
  font-size: 0.86rem; font-weight: 600; box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- settings ---------- */
.panel {
  background: var(--bg-elev); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 4px 14px; margin-bottom: 14px;
}
.panel .toggle-row + .toggle-row { border-top: 1px solid var(--line-soft); }
.panel-title { font-weight: 650; font-size: 0.95rem; }
.panel-sub { font-size: 0.78rem; color: var(--text-dim); margin-top: 2px; line-height: 1.45; }
.linkrow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 0; width: 100%; text-align: left; border-top: 1px solid var(--line-soft);
}
.panel > .linkrow:first-child { border-top: none; }
.linkrow .chev { transform: none !important; }

.callout {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 13px; font-size: 0.83rem; color: var(--text-dim); line-height: 1.55;
  background: var(--bg-elev-2);
}
.callout b { color: var(--text); font-weight: 650; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.yc-window {
  font-size: 0.74rem; color: var(--text-faint); margin: -6px 0 11px;
  padding-bottom: 10px; border-bottom: 1px dashed var(--line);
}

.brow-child {
  padding-left: 30px;
  background: linear-gradient(90deg, var(--bg-elev-2) 0 3px, transparent 3px);
}
.brow-child .brow-name { font-weight: 550; font-size: 0.9rem; }
.yline-child .yl-name { padding-left: 4px; }

/* ---------- sign-in prompt ---------- */
.signin-card {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: linear-gradient(180deg, rgba(91,156,255,0.14), rgba(91,156,255,0.05));
  border: 1px solid rgba(91,156,255,0.32);
  border-radius: var(--radius); padding: 13px 14px; margin-bottom: 16px;
}
.signin-card.is-warn {
  background: linear-gradient(180deg, rgba(245,181,68,0.13), rgba(245,181,68,0.05));
  border-color: rgba(245,181,68,0.3);
}
.signin-card .sc-icon { flex: none; color: var(--accent); }
.signin-card.is-warn .sc-icon { color: var(--warn); }
.signin-card .sc-icon svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round;
}
.signin-card .sc-text { flex: 1; min-width: 0; }
.signin-card .sc-title { display: block; font-weight: 650; font-size: 0.93rem; }
.signin-card .sc-sub { display: block; font-size: 0.78rem; color: var(--text-dim); margin-top: 1px; line-height: 1.4; }
.signin-card .sc-cta {
  flex: none; background: var(--accent); color: var(--accent-ink);
  font-weight: 650; font-size: 0.84rem; padding: 8px 14px; border-radius: 8px;
}

/* ---------- search ---------- */
.searchbar {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-elev); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 0 12px; margin-bottom: 14px;
}
.searchbar .search-icon {
  width: 17px; height: 17px; flex: none; fill: none; stroke: var(--text-faint);
  stroke-width: 2; stroke-linecap: round;
}
.searchbar input {
  flex: 1; background: none; border: none; min-height: 44px; padding: 0;
}
.searchbar input:focus { border: none; outline: none; }
.searchbar:focus-within { border-color: var(--accent); }
.search-clear {
  width: 30px; height: 30px; display: grid; place-items: center; flex: none;
  color: var(--text-faint);
}
.search-clear svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
mark { background: rgba(91,156,255,0.28); color: var(--text); border-radius: 3px; padding: 0 2px; }

/* ---------- drag handles ---------- */
.grip {
  flex: none; width: 26px; align-self: stretch;
  display: grid; place-items: center;
  color: var(--text-faint); opacity: 0.45;
  cursor: grab; touch-action: none;
}
.grip:active { cursor: grabbing; opacity: 1; }
.grip svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.grip-sm svg { width: 15px; height: 15px; }

body.is-sorting { user-select: none; -webkit-user-select: none; }
body.is-sorting .cardblock,
body.is-sorting .bgroup { transition: none; }
[data-sort-item].is-dragging {
  opacity: 0.9;
  box-shadow: 0 10px 30px -6px rgba(0,0,0,0.6);
  position: relative; z-index: 5;
}
.bgroup.is-dragging { background: var(--bg-elev-2); }
.cardblock.is-dragging { outline: 1px solid var(--accent); }

/* ---------- card header, rebuilt around what's left ---------- */
.cardblock-head { display: flex; align-items: stretch; gap: 0; padding: 0; }
.cardblock-main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px;
  padding: 14px 14px 14px 4px; text-align: left;
}
.cardblock-title .cb-left {
  display: block; font-size: 0.84rem; color: var(--text-dim);
  margin-top: 2px; line-height: 1.35;
}
.cardblock-title .cb-left b { color: var(--text); font-weight: 700; font-size: 0.95rem; }
.cb-left.is-warn b { color: var(--warn); }
.cb-left.is-urgent b { color: var(--bad); }
.cb-left .cb-dot { opacity: 0.5; }
.cb-left .cb-days { color: var(--text-faint); }
.cb-left.is-urgent .cb-days { color: var(--bad); }

/* ---------- credit rows, rebuilt around what's left ---------- */
.brow {
  display: flex; align-items: stretch; gap: 0; padding: 0;
  border-bottom: 1px solid var(--line-soft);
}
.bgroup:last-of-type .brow:last-child { border-bottom: none; }
.brow-main { flex: 1; min-width: 0; display: block; text-align: left; padding: 12px 14px 12px 2px; }
.brow-child { padding-left: 24px; }
.brow-child .brow-main { padding-left: 2px; }

.brow-left {
  font-size: 1.02rem; font-weight: 700; white-space: nowrap; letter-spacing: -0.01em;
}
.brow-left.is-hot { color: var(--bad); }
.brow-left.is-warn { color: var(--warn); }
.brow-left.is-pos { color: var(--good); }
.brow-left.is-done { color: var(--good); font-size: 0.86rem; font-weight: 650; }
.brow-left.faint { font-size: 0.86rem; font-weight: 600; }
.brow-detail { color: var(--text-faint); font-size: 0.72rem; }
.brow-top { align-items: baseline; }
