/* Home page. Uses the board's colours and buttons from styles.css; everything here is scoped to #home. */
#home .hm-stack > * + * { margin-top: 12px; }
#home .card { margin: 0; }
#home h3 { margin: 0 0 8px; font-size: 1.05rem; }
#home p { margin: 8px 0 0; }
#home .small { font-size: .82rem; }
#home .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
#home .due { color: var(--bad); }
#home .pay { color: var(--ok); }
#home .hm-fresh { color: var(--ok); }
#home .hm-old { color: var(--warn); }
#home .hm-stale { color: var(--bad); }

#home .hm-tally { border-left: 6px solid var(--ok); padding: 16px; }
#home .hm-tally.hm-old { border-left-color: var(--warn); color: inherit; }
#home .hm-tally.hm-stale { border-left-color: var(--bad); color: inherit; }
#home .hm-label { font-size: .9rem; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#home .hm-badge { font-size: .75rem; font-weight: 700; border: 1px solid currentColor; border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
#home .hm-when { font-size: 2rem; font-weight: 800; line-height: 1.15; margin-top: 6px; }
#home .hm-ago { font-size: 1.35rem; font-weight: 700; }
#home .hm-firms { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .9rem; }
#home .hm-firms td { padding: 7px 0 7px 10px; border-top: 1px dashed var(--line); text-align: right; }
#home .hm-firms td:first-child { padding-left: 0; text-align: left; font-weight: 600; }
#home .hm-helper { border-top: 1px dashed var(--line); padding-top: 8px; }

#home .hm-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#home .hm-work { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
#home .hm-fig { display: block; background: var(--bg); border-radius: 10px; padding: 10px; text-decoration: none;
                color: var(--text); text-align: left; border: 0; font: inherit; min-width: 0; }
#home .hm-fig b { display: block; font-size: clamp(.95rem, 4.6vw, 1.2rem); white-space: nowrap; }
#home .hm-fig span { display: block; }
#home .hm-work .hm-fig b { font-size: 1.6rem; }
#home .hm-tap, #home .hm-split tbody tr, #home a.hm-fig, #home button.hm-fig { cursor: pointer; }

#home .hm-split { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .85rem; }
#home .hm-split th { text-align: right; font-weight: 500; font-size: .75rem; color: var(--muted); padding: 2px 0 6px 8px; }
#home .hm-split td { padding: 7px 0 7px 8px; border-top: 1px dashed var(--line); text-align: right; }
#home .hm-split td:first-child { padding-left: 0; text-align: left; font-weight: 600; }

#home .hm-link { background: none; color: var(--brand); padding: 0; text-decoration: underline; border-radius: 0; }
#home .hm-msg { border-radius: 10px; padding: 10px 12px; font-size: .9rem; margin: 0;
                background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }

#home .hm-chg-firm { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 8px; }
#home .hm-chg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
#home .hm-chg-moved { margin-top: 4px; }
#home .hm-chg { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; border-top: 1px dotted var(--line); margin-top: 6px; font-size: .9rem; }
#home .hm-chg-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
#home .hm-chg-tag { font-size: .7rem; font-weight: 700; border: 1px solid currentColor; border-radius: 999px; padding: 1px 7px; white-space: nowrap; margin-top: 2px; }
#home .hm-chg-new { color: var(--ok); }
#home .hm-chg-changed { color: var(--warn); }
#home .hm-chg-removed { color: var(--bad); }
#home .hm-chg-earlier { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 8px; }
#home .hm-chg-row { display: flex; width: 100%; justify-content: space-between; align-items: baseline; gap: 8px; background: none; color: var(--text);
                    border: 0; border-top: 1px dotted var(--line); border-radius: 0; padding: 9px 0; font: inherit; text-align: left; cursor: pointer; }
#home .hm-chg-row .small { text-align: right; }
#home .hm-link { min-height: 44px; }
#home button.hm-chg-bill { width: 100%; background: none; color: inherit; border: 0; border-top: 1px dotted var(--line); border-radius: 0;
                           font: inherit; font-size: .9rem; text-align: left; cursor: pointer; min-height: 44px; }
#home .hm-chg-go { color: var(--brand); font-size: 1.3rem; line-height: 1; align-self: center; }

#home .hm-move { display: block; width: 100%; text-align: left; background: var(--bg); color: var(--text); border-radius: 10px; padding: 10px; margin-top: 8px; min-height: 44px; }
#home .hm-move b { display: block; font-size: 1.2rem; color: var(--ok); }
#home .hm-move span { display: block; }

/* Dues: three figures in a row */
#home .hm-three { grid-template-columns: repeat(3, 1fr); }
/* Local names given lately */
#home .hm-name { display: block; width: 100%; text-align: left; background: transparent; color: var(--text); border: 0; border-top: 1px dashed var(--line); border-radius: 0; padding: 8px 0; min-height: 44px; }
#home .hm-name span { display: block; overflow-wrap: anywhere; }
#home .hm-name-more { min-height: 44px; }
