/* Year-End Organizer. Every rule is scoped under .yeo and uses the host app's color variables (with fallbacks), so the
   module themes itself inside the Realty Desk and in the standalone app. Mobile first (375 px), light and dark. */
.yeo { --y-accent: var(--accent, #1f4e79); --y-accent-ink: var(--accent-ink, #fff); --y-card: var(--card, #fff); --y-text: var(--text, #1a1f1c);
  --y-muted: var(--muted, #5d6762); --y-line: var(--line, #dfe5e0); --y-ok: var(--ok, #1e7a46); --y-ok-bg: var(--ok-bg, #e5f4ea); --y-miss: var(--miss, #b3261e);
  --y-miss-bg: var(--miss-bg, #fdecea); --y-warn: var(--warn, #8a5a00); --y-warn-bg: var(--warn-bg, #fff4dc); --y-link: var(--link, #1f4e79); --y-bg: var(--bg, #f4f6f3);
  color: var(--y-text); }
.yeo *, .yeo *::before, .yeo *::after { box-sizing: border-box; }
.yeo .yeo-wrap { min-width: 0; }
.yeo h2 { font-size: .95rem; margin: 0 0 8px; color: var(--y-accent); text-transform: uppercase; letter-spacing: .04em; }
.yeo h3 { font-size: 1rem; margin: 10px 0 6px; }
.yeo h2.yeo-title { font-size: 1.25rem; text-transform: none; letter-spacing: 0; color: var(--y-text); margin: 6px 0 10px; overflow-wrap: anywhere; }
.yeo h2.yeo-title small { display: block; font-size: .8rem; color: var(--y-muted); font-weight: 600; }
.yeo p { margin: 6px 0; overflow-wrap: anywhere; }
.yeo .yeo-small { font-size: .85rem; } .yeo .yeo-muted { color: var(--y-muted); } .yeo .yeo-center { text-align: center; }
.yeo .yeo-card { background: var(--y-card); border: 1px solid var(--y-line); border-radius: 16px; padding: 14px; margin: 0 0 12px; display: block; width: 100%; text-align: left; color: inherit; font: inherit; }
.yeo button.yeo-card { cursor: pointer; }
.yeo .yeo-link { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.yeo .yeo-link small { color: var(--y-muted); text-align: right; }
.yeo .yeo-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--y-accent); color: var(--y-accent-ink); border: 0; border-radius: 12px;
  padding: 10px 16px; min-height: 44px; font: inherit; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer; margin: 4px 0; }
.yeo .yeo-btn.yeo-ghost { background: transparent; color: var(--y-accent); border: 1px solid var(--y-line); }
.yeo .yeo-btn[aria-disabled="true"] { opacity: .55; }
.yeo .yeo-wide { display: flex; width: 100%; margin: 6px 0 12px; }
.yeo .yeo-linkbtn { background: none; border: 0; color: var(--y-link); text-decoration: underline; padding: 4px 0; min-height: 32px; font: inherit; cursor: pointer; }
.yeo .yeo-danger { color: var(--y-miss) !important; }
.yeo .yeo-back { background: none; border: 0; color: var(--y-accent); font: inherit; font-weight: 600; padding: 6px 0; min-height: 40px; cursor: pointer; }
.yeo .yeo-row { display: flex; gap: 8px; flex-wrap: wrap; }
.yeo .yeo-msgs:empty { display: none; }
.yeo .yeo-alert { background: var(--y-miss-bg); color: var(--y-miss); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.yeo .yeo-flash { background: var(--y-ok-bg); color: var(--y-ok); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.yeo .yeo-warnbox { background: var(--y-warn-bg); color: var(--y-warn); border-radius: 10px; padding: 8px 10px; }
.yeo .yeo-warn { color: var(--y-warn); } .yeo .yeo-ok { color: var(--y-ok); font-weight: 600; } .yeo .yeo-bad { color: var(--y-miss); font-weight: 600; }
.yeo .yeo-note { background: var(--y-warn-bg); border-left: 4px solid var(--y-warn); border-radius: 8px; padding: 8px 10px; font-size: .88rem; }
.yeo .yeo-review { display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--y-warn); background: var(--y-warn-bg);
  border: 1px solid var(--y-warn); border-radius: 8px; padding: 0 6px; vertical-align: middle; }
.yeo .yeo-src { font-size: .85rem; white-space: nowrap; }
.yeo .yeo-footer { font-size: .78rem; color: var(--y-muted); text-align: center; margin: 18px 4px 8px; }
.yeo .yeo-tag { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--y-warn); background: var(--y-warn-bg); border-radius: 8px; padding: 2px 8px; }

/* fields */
.yeo .yeo-f { display: block; margin: 8px 0; min-width: 0; }
.yeo .yeo-f > span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.yeo .yeo-f > small, .yeo .yeo-hint { display: block; font-size: .78rem; color: var(--y-muted); font-weight: 400; margin-top: 2px; }
.yeo input[type="text"], .yeo input[type="date"], .yeo input:not([type]), .yeo select, .yeo textarea {
  width: 100%; min-width: 0; max-width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--y-line); border-radius: 10px; background: var(--y-bg); color: var(--y-text); font: inherit; }
.yeo textarea { min-height: 80px; resize: vertical; }
.yeo input[type="file"] { max-width: 100%; font-size: .85rem; }
.yeo input[inputmode="decimal"], .yeo input[inputmode="numeric"] { text-align: right; font-variant-numeric: tabular-nums; }
.yeo .yeo-check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; cursor: pointer; }
.yeo .yeo-check input { width: 22px; height: 22px; flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--y-accent); }
.yeo .yeo-check.yeo-strong { font-weight: 600; }
.yeo .yeo-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.yeo .yeo-grid3 { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0 8px; }
@media (max-width: 360px) { .yeo .yeo-grid3 { grid-template-columns: minmax(0, 1fr); } }

/* chips */
.yeo .yeo-chips, .yeo .yeo-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.yeo .yeo-chip { background: var(--y-card); color: var(--y-text); border: 1px solid var(--y-line); border-radius: 20px; padding: 6px 12px; min-height: 40px; font: inherit; font-size: .88rem; cursor: pointer; }
.yeo .yeo-chip.on { background: var(--y-accent); color: var(--y-accent-ink); border-color: var(--y-accent); font-weight: 600; }

/* home */
.yeo .yeo-act { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; background: transparent; border: 0; border-top: 1px solid var(--y-line);
  padding: 10px 0; color: inherit; font: inherit; text-align: left; cursor: pointer; min-height: 52px; }
.yeo .yeo-act:first-of-type { border-top: 0; }
.yeo .yeo-act span:first-child { min-width: 0; overflow-wrap: anywhere; }
.yeo .yeo-act small { display: block; color: var(--y-muted); font-size: .8rem; }
.yeo .yeo-adds { display: grid; gap: 8px; }
.yeo .yeo-add { display: block; width: 100%; text-align: left; background: var(--y-bg); border: 1px dashed var(--y-accent); border-radius: 12px; padding: 10px 12px; color: inherit; font: inherit; cursor: pointer; }
.yeo .yeo-add b { display: block; color: var(--y-accent); } .yeo .yeo-add small { color: var(--y-muted); font-size: .8rem; }
.yeo .yeo-num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.yeo .yeo-num.neg { color: var(--y-miss); }

/* profit and loss lines */
.yeo .yeo-line { display: grid; grid-template-columns: 2.6em minmax(0, 1fr) minmax(0, 7.5em); gap: 4px 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--y-line); }
.yeo .yeo-line:first-of-type { border-top: 0; }
.yeo .yeo-line.yeo-wp { grid-template-columns: 2.6em minmax(0, 1fr) minmax(0, 1fr); }
.yeo .yeo-line.yeo-wp .yeo-lbl { grid-column: 2 / 4; }
.yeo .yeo-line.yeo-wp input:first-of-type { grid-column: 2; }
.yeo .yeo-line.yeo-wp .yeo-var { grid-column: 2 / 4; text-align: right; }
.yeo .yeo-line.yeo-head { font-size: .78rem; color: var(--y-muted); font-weight: 700; padding: 0; border: 0; }
.yeo .yeo-line.yeo-head span:nth-child(3) { grid-column: 2; text-align: right; }
.yeo .yeo-line.yeo-head span:nth-child(4) { grid-column: 3; text-align: right; }
.yeo .yeo-line.yeo-head span:nth-child(2) { display: none; }
.yeo .yeo-ln { font-size: .78rem; font-weight: 700; color: var(--y-accent); text-align: center; background: var(--y-bg); border-radius: 8px; padding: 2px 0; align-self: start; margin-top: 10px; }
.yeo .yeo-lbl { font-size: .92rem; min-width: 0; overflow-wrap: break-word; }
.yeo .yeo-line output { text-align: right; }
.yeo .yeo-var { font-size: .78rem; color: var(--y-muted); }
.yeo details > summary { cursor: pointer; min-height: 32px; padding: 4px 0; }
.yeo .yeo-item { border-top: 1px solid var(--y-line); padding: 8px 0; }
.yeo .yeo-item:first-of-type { border-top: 0; }
.yeo section.yeo-item { border: 1px solid var(--y-line); }

/* totals */
.yeo .yeo-tot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--y-line); }
.yeo .yeo-totals .yeo-tot:has(> :nth-child(3)) { grid-template-columns: minmax(0, 1fr) auto auto; }
.yeo .yeo-tot.yeo-head { font-size: .78rem; color: var(--y-muted); font-weight: 700; border: 0; }
.yeo .yeo-tot.yeo-strong { font-weight: 700; font-size: 1.05rem; }
.yeo .yeo-tot span { min-width: 0; overflow-wrap: anywhere; }

/* balance sheet: the label on its own line, beginning and end of year side by side under it */
.yeo .yeo-bsrow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--y-line); }
.yeo .yeo-bsrow > :first-child { grid-column: 1 / -1; }
.yeo .yeo-bsrow.yeo-head { font-size: .75rem; color: var(--y-muted); font-weight: 700; border: 0; text-align: right; padding: 0; }
.yeo .yeo-bsrow.yeo-head > :first-child { display: none; }
.yeo .yeo-bsrow .yeo-lbl { font-size: .9rem; }
.yeo .yeo-bstot b { text-align: right; font-size: .9rem; }
.yeo .yeo-bstot > span { font-weight: 700; font-size: .88rem; }
.yeo .yeo-bs h3 { margin-top: 14px; }
@media (min-width: 560px) {
  .yeo .yeo-bsrow { grid-template-columns: minmax(0, 1fr) minmax(0, 9em) minmax(0, 9em); }
  .yeo .yeo-bsrow > :first-child { grid-column: auto; }
  .yeo .yeo-bsrow.yeo-head > :first-child { display: block; }
}

/* health months */
.yeo .yeo-months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 8px; }
.yeo .yeo-month .yeo-f { margin: 4px 0; }
.yeo .yeo-month .yeo-check { margin: 0 0 6px; font-size: .75rem; gap: 4px; }
.yeo .yeo-month .yeo-check input { width: 18px; height: 18px; }
.yeo .yeo-same { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.yeo .yeo-list { padding-left: 20px; } .yeo .yeo-list li { margin: 4px 0; }
.yeo .yeo-steps { padding-left: 22px; } .yeo .yeo-steps li { margin: 6px 0; }

@media print {
  .yeo .yeo-btn, .yeo .yeo-back, .yeo .yeo-tabs, .yeo .yeo-linkbtn { display: none !important; }
  .yeo .yeo-card { break-inside: avoid; border-color: #999; }
}
