/* Small, owner-private additions inherit the existing paper and sage drawers. */
#money .hc-inline-form { grid-column:1/-1; display:grid; gap:12px; padding:14px 12px; margin:8px 0; border:1px solid var(--hc-line); background:var(--hc-paper); min-width:0; }
#money .hc-inline-form[hidden] { display:none; }
#money .hc-inline-form label { display:grid; gap:6px; min-width:0; color:var(--hc-muted); font-size:11px; }
#money .hc-inline-form input, #money .hc-inline-form select, #money .hc-inline-form textarea { width:100%; min-width:0; min-height:40px; padding:8px; border:1px solid var(--hc-line); border-radius:2px; background:transparent; color:var(--hc-ink); font:inherit; }
#money .hc-inline-form textarea { min-height:70px; resize:vertical; }
#money .hc-inline-form h3 { margin:0; font:400 23px var(--font-display,"Cormorant Garamond",serif); }
#money .hc-form-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
#money .hc-form-actions { display:flex; flex-wrap:wrap; gap:16px; align-items:center; }
#money .hc-form-message { margin:0; color:var(--hc-clay); font-size:11px; line-height:1.5; }
#money .hc-row-actions, #money .hc-amount-needed { grid-column:1/-1; min-width:0; }
#money .hc-row-actions > .hc-link { color:var(--hc-muted); font-weight:400; text-decoration:underline; }
#money .hc-inline-form button:disabled { opacity:.55; cursor:wait; }
#money .hc-review-row .hc-row-actions button, #money .hc-review-row .hc-amount-needed button { grid-row:auto; grid-column:auto; }
@media(max-width:767px) { #money .hc-form-fields { grid-template-columns:1fr; } }
/* Keep duplicate review choices within an invoice, not in its amount column. */
.home-costs .hc-duplicate{grid-column:1/-1;min-width:0;padding-top:.6rem;color:var(--muted,#686b61)}
.home-costs .hc-duplicate p{font-size:.8rem;overflow-wrap:anywhere;margin:.3rem 0}
.home-costs .hc-duplicate button{min-height:36px;margin-right:.75rem}
.home-costs .hc-section-strip{display:flex;gap:3px;height:5px;margin:0 0 12px;overflow:hidden;border-radius:3px;background:var(--border,#ddd8cd)}
.home-costs .hc-section-strip span{flex-basis:0;min-width:0}
.home-costs .hc-strip-running{background:#315b47}
.home-costs .hc-strip-repairs{background:#b89151}
.home-costs .hc-strip-maintenance{background:#8c9a80}
.home-costs .hc-strip-legend{display:flex;flex-wrap:wrap;gap:8px 18px;margin:0 0 30px;font-size:11px;color:var(--muted,#77796f)}
.home-costs .hc-strip-legend span{display:inline-flex;gap:6px;align-items:center}
.home-costs .hc-strip-legend i{width:7px;height:7px;border-radius:50%;flex:none}
#money .home-costs {
  --hc-paper: #f5f2eb;
  --hc-ink: #27332f;
  --hc-muted: #6d7770;
  --hc-line: #d9d8cd;
  --hc-sage: #647d6d;
  --hc-clay: #a96f55;
  max-width: 940px;
  margin: 0 auto;
  padding: 31px 8px 108px;
  color: var(--hc-ink);
  font-family: var(--font-ui, sans-serif);
}
#money .home-costs, #money .home-costs * { box-sizing: border-box; }
#money .hc-section-head h2, #money .hc-header h1 { min-width: 0; overflow-wrap: anywhere; }
#money .hc-section-head > strong { flex-shrink: 0; white-space: nowrap; }
@media(max-width:767px){
  .tab[data-tab="money"] > span:first-of-type {
    display:inline-block;
    max-width:62px;
    white-space:normal;
    line-height:1.15;
    text-align:center;
  }
}
#money .hc-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  padding: 0 0 25px;
  border-bottom: 1px solid var(--hc-line);
}
#money .hc-kicker {
  margin: 0 0 8px;
  color: var(--hc-sage);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}
#money .hc-header h1 {
  margin: 0;
  color: var(--hc-ink);
  font: 400 clamp(43px, 7vw, 68px)/.94 var(--font-display, "Cormorant Garamond", serif);
  letter-spacing: -.035em;
}
#money .hc-year {
  display: grid;
  gap: 6px;
  flex: 0 0 145px;
  color: var(--hc-muted);
  font-size: 11px;
}
/* The owner Add control and year picker must not compete on narrow screens. */
#money .hc-header { flex-wrap: wrap; align-items: flex-start; }
#money .hc-header h1 { min-width: 0; flex: 1 1 180px; }
#money .hc-year select {
  min-height: 42px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--hc-line);
  border-radius: 2px;
  color: var(--hc-ink);
  background: var(--hc-paper);
  font: inherit;
}
#money .hc-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 24px 0 33px;
  padding: 21px 24px 22px;
  background: #e9ede5;
  border-left: 3px solid var(--hc-sage);
}
#money .hc-total-label { display: block; margin-bottom: 8px; color: var(--hc-muted); font-size: 11px; }
#money .hc-total { display: block; font: 400 clamp(37px, 6vw, 57px)/.95 var(--font-display, "Cormorant Garamond", serif); letter-spacing: -.025em; }
#money .hc-monthly { align-self: flex-end; padding-bottom: 3px; color: var(--hc-muted); font-size: 12px; line-height: 1.5; text-align: right; }
#money .hc-monthly strong { display: block; color: var(--hc-ink); font: 400 22px/1.1 var(--font-display, "Cormorant Garamond", serif); }
#money .hc-section { margin: 0 0 32px; }
#money .hc-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 7px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hc-line);
}
#money .hc-section-head h2 { margin: 0; font: 400 28px/1 var(--font-display, "Cormorant Garamond", serif); }
#money .hc-add, #money .hc-quiet, #money .hc-footer button, #money .hc-link {
  min-height: 38px;
  padding: 0 4px;
  border: 0;
  color: var(--hc-sage);
  background: transparent;
  font: 500 11px/1.3 var(--font-ui, sans-serif);
  text-align: left;
  text-underline-offset: 3px;
  cursor: pointer;
}
#money .hc-add { white-space: nowrap; }
#money .hc-add:hover, #money .hc-quiet:hover, #money .hc-footer button:hover, #money .hc-link:hover { text-decoration: underline; }
#money .hc-category { border-bottom: 1px solid var(--hc-line); }
#money .hc-category-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto 18px;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 57px;
  padding: 7px 2px;
  border: 0;
  color: var(--hc-ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
#money .hc-category-row:hover .hc-name { color: var(--hc-sage); }
#money .hc-category-row:has(> [data-hc="show"]) { grid-template-columns: minmax(0,1fr) auto auto; }
#money .hc-name { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
#money .hc-category-total { white-space: nowrap; font: 400 20px/1 var(--font-display, "Cormorant Garamond", serif); }
#money .hc-chevron { color: var(--hc-muted); font-size: 17px; transition: transform .18s ease; }
#money .hc-category[open] .hc-chevron { transform: rotate(90deg); }
#money .hc-details { padding: 0 13px 18px; background: rgba(233,237,229,.48); }
#money .hc-details-heading { margin: 0; padding: 14px 0 7px; color: var(--hc-muted); font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
#money .hc-months { display: grid; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
#money .hc-months li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(217,216,205,.75); font-size: 11px; }
#money .hc-months li span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
#money .hc-invoice { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 14px; padding: 11px 0; border-bottom: 1px solid rgba(217,216,205,.75); }
#money .hc-invoice-title { min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
#money .hc-invoice-amount { white-space: nowrap; font: 400 17px/1 var(--font-display, "Cormorant Garamond", serif); }
#money .hc-invoice-date { grid-column:1/-1; justify-self:start; padding:5px 8px; margin-bottom:5px; border:1px solid rgba(140,154,128,.35); color:var(--hc-muted); font:500 10px/1.3 var(--font-ui,sans-serif); text-decoration:none; }
#money .hc-invoice-meta { grid-column: 1 / -1; color: var(--hc-muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
#money .hc-file { grid-column: 1 / -1; width: fit-content; min-height: 30px; padding: 0; border: 0; color: var(--hc-sage); background: transparent; font: 500 10px var(--font-ui, sans-serif); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
#money .hc-warranty { color: var(--hc-clay); }
#money .hc-job { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid rgba(217,216,205,.75); font-size: 11px; }
#money .hc-job-title { font-size: 12px; }
#money .hc-job-dates { grid-column: 1 / -1; color: var(--hc-muted); line-height: 1.5; }
#money .hc-overdue { color: #965842; }
#money .hc-book { color: var(--hc-sage); font-size: 10px; text-underline-offset: 3px; }
#money .hc-controls { display: flex; gap: 14px; border-top: 1px solid rgba(217,216,205,.75); }
#money .hc-controls .hc-quiet { min-height: 31px; font-size: 10px; }
#money .hc-unmapped { margin: 28px 0; padding: 17px 18px; border: 1px solid var(--hc-line); background: rgba(233,237,229,.35); }
#money .hc-unmapped h2 { margin: 0 0 5px; font: 400 23px var(--font-display, "Cormorant Garamond", serif); }
#money .hc-unmapped p { color: var(--hc-muted); font-size: 11px; }
#money .hc-review-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(135px, auto) auto; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--hc-line); font-size: 11px; }
#money .hc-review-row select { min-height: 36px; max-width: 100%; border: 1px solid var(--hc-line); background: var(--hc-paper); color: var(--hc-ink); font: inherit; }
#money .hc-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-top: 34px; padding-top: 16px; border-top: 1px solid var(--hc-line); }
#money .hc-compare { color: var(--hc-muted); font-size: 11px; }
#money .hc-footer-actions { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; }
#money .hc-legacy { color: var(--hc-muted) !important; }
#money .hc-status { min-height: 20px; margin: 11px 0 0; color: var(--hc-muted); font-size: 11px; }
#money .hc-error, #money .hc-empty { margin: 28px 0; padding: 20px; border: 1px solid var(--hc-line); color: var(--hc-muted); font-size: 12px; line-height: 1.6; }
#money .hc-error { border-left: 3px solid var(--hc-clay); }
#money .hc-empty h2 { margin: 0 0 5px; color: var(--hc-ink); font: 400 27px var(--font-display, "Cormorant Garamond", serif); }
#money .hc-skeleton { display: grid; gap: 12px; margin: 26px 0; }
#money .hc-skeleton i { height: 54px; background: linear-gradient(90deg,#e8e9e1,#f0f0e9,#e8e9e1); animation: hc-pulse 1.35s ease-in-out infinite alternate; }
#money .hc-dialog-backdrop { position: fixed; z-index: 10001; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(39,51,47,.35); }
#money .hc-dialog { width: min(100%,430px); padding: 23px; border: 1px solid var(--hc-line); background: var(--hc-paper); box-shadow: 0 16px 50px rgba(39,51,47,.14); }
#money .hc-dialog h2 { margin: 0 0 17px; font: 400 29px var(--font-display, "Cormorant Garamond", serif); }
#money .hc-dialog label { display: grid; gap: 6px; color: var(--hc-muted); font-size: 11px; }
#money .hc-dialog input { min-height: 44px; padding: 8px 10px; border: 1px solid var(--hc-line); background: transparent; color: var(--hc-ink); font: inherit; }
#money .hc-dialog-actions { display: flex; justify-content: flex-end; gap: 16px; margin-top: 18px; }
#money .hc-dialog-actions button { min-height: 42px; padding: 0 14px; border: 1px solid var(--hc-line); color: var(--hc-sage); background: transparent; font: 500 11px var(--font-ui,sans-serif); cursor: pointer; }
#money .hc-dialog-actions button[type=submit] { color: #f5f2eb; background: var(--hc-sage); border-color: var(--hc-sage); }
#money .home-costs :focus-visible { outline: 2px solid var(--hc-clay); outline-offset: 3px; }
@keyframes hc-pulse { from { opacity: .55; } to { opacity: 1; } }
@media (max-width: 767px) {
  #money .home-costs { padding: 19px 0 96px; }
  #money .hc-header { align-items: flex-start; gap: 14px; padding-bottom: 19px; padding-right:58px; }
  #money .hc-header h1 { flex-basis:100%; }
  #money .hc-year { flex-basis: 112px; }
  #money .hc-summary { align-items: flex-start; flex-direction: column; gap: 13px; margin: 19px 0 27px; padding: 17px 16px; }
  #money .hc-monthly { align-self: auto; text-align: left; }
  #money .hc-monthly strong { display: inline; margin-left: 7px; }
  #money .hc-section { margin-bottom: 26px; }
  #money .hc-category-row { grid-template-columns: minmax(0,1fr) auto 15px; gap: 9px; min-height: 54px; }
  #money .hc-category-total { font-size: 18px; }
  #money .hc-details { padding: 0 10px 14px; }
  #money .hc-review-row { grid-template-columns: minmax(0,1fr) auto; }
  #money .hc-review-row select { grid-column: 1; }
  #money .hc-review-row button { grid-column: 2; grid-row: 1 / span 2; }
  #money .hc-footer { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { #money .hc-skeleton i, #money .hc-chevron { animation: none; transition: none; } }

/* Household cost drawers: a quiet index that opens into the detail families need. */
#money .hc-drawer {
  margin: 0 0 10px;
  border: 1px solid var(--hc-line);
  background: rgba(233,237,229,.26);
}
#money .hc-drawer > .hc-section-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto 18px;
  align-items: center;
  min-height: 89px;
  gap: 14px;
  margin: 0;
  padding: 16px 18px;
  border: 0;
  cursor: pointer;
  list-style: none;
}
#money .hc-drawer > .hc-section-head::-webkit-details-marker,
#money .hc-category-row::-webkit-details-marker,
#money .hc-month summary::-webkit-details-marker { display: none; }
#money .hc-drawer-label { display: block; font: 400 28px/1 var(--font-display, "Cormorant Garamond", serif); }
#money .hc-drawer-summary { display: block; margin-top: 8px; color: var(--hc-muted); font-size: 11px; line-height: 1.4; }
#money .hc-drawer > .hc-section-head > strong { font: 400 22px/1 var(--font-display, "Cormorant Garamond", serif); font-variant-numeric: tabular-nums; }
#money .hc-drawer > .hc-section-head .hc-chevron { transition: transform .18s ease; }
#money .hc-drawer[open] > .hc-section-head .hc-chevron { transform: rotate(90deg); }
#money .hc-drawer > .hc-category,
#money .hc-drawer > .hc-empty,
#money .hc-drawer > .hc-add,
#money .hc-drawer > .hc-drop-area,
#money .hc-drawer > .hc-paid-caption { margin-left: 18px; margin-right: 18px; }
#money .hc-drawer .hc-category:first-of-type { border-top: 1px solid var(--hc-line); }
#money .hc-drawer > .hc-add { margin-top: 10px; margin-bottom: 8px; }
#money .hc-drawer > .hc-drop-area { display: block; margin-top: 4px; margin-bottom: 15px; }
#money .hc-paid-caption { margin-top: 0; margin-bottom: 9px; color: var(--hc-muted); font-size: 10px; }
#money .hc-category-row { list-style: none; }
#money .hc-area-name { display: grid; min-width: 0; gap: 5px; }
#money .hc-area-snippet { color: var(--hc-muted); font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
#money .hc-dash-amount { color: #92968d !important; }
#money .hc-details { margin-bottom: 7px; }
#money .hc-area-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 8px; border-bottom: 1px solid rgba(217,216,205,.75); }
#money .hc-toggle { display: inline-flex; padding: 3px; gap: 2px; background: rgba(217,216,205,.42); }
#money .hc-toggle button { min-height: 30px; padding: 0 9px; border: 0; color: var(--hc-muted); background: transparent; font: 500 10px var(--font-ui, sans-serif); cursor: pointer; }
#money .hc-toggle button[aria-pressed=true] { color: var(--hc-ink); background: var(--hc-paper); box-shadow: 0 1px 3px rgba(39,51,47,.08); }
#money .hc-months { display: block; }
#money .hc-month { border-bottom: 1px solid rgba(217,216,205,.75); }
#money .hc-month summary { display: grid; grid-template-columns: minmax(0,1fr) auto 22px; gap: 10px; align-items: center; min-height: 43px; font-size: 11px; cursor: pointer; list-style: none; }
#money .hc-month summary strong { font: 400 16px var(--font-display, "Cormorant Garamond", serif); font-variant-numeric: tabular-nums; }
#money .hc-month-count { color: var(--hc-muted); text-align: right; font-size: 10px; }
#money .hc-month .hc-invoice { margin-left: 8px; }
#money .hc-dash { margin: 13px 0; color: var(--hc-muted); font-size: 11px; }
#money .hc-invoice-expected { color: #7c8178; opacity: .67; }
#money .hc-invoice-expected .hc-invoice-amount { color: #7c8178; }
#money .hc-expected { margin-top: 12px; padding: 0 10px; background: rgba(217,216,205,.25); }
#money .hc-category-note { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -14px 0 17px; padding: 10px 13px; border-left: 2px solid var(--hc-clay); background: rgba(169,111,85,.08); color: var(--hc-ink); font-size: 11px; }
#money .hc-category-note .hc-link { flex: 0 0 auto; }
#money .hc-drop-bottom { min-height: 36px; margin-right: auto; padding: 0 10px !important; border: 1px dashed var(--hc-line) !important; color: var(--hc-sage) !important; }
#money .hc-job-nudge { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; margin-top: 5px; padding: 7px 9px; color: var(--hc-muted); background: rgba(217,216,205,.32); font-size: 10px; }
#money .hc-job-nudge .hc-file { margin: 0; min-height: 28px; }
@media(max-width:767px) {
  #money .hc-drawer { margin-bottom: 8px; }
  #money .hc-drawer > .hc-section-head { grid-template-columns: minmax(0,1fr) auto 14px; min-height: 80px; gap: 8px; padding: 13px 12px; }
  #money .hc-drawer-label { font-size: 25px; }
  #money .hc-drawer > .hc-section-head > strong { font-size: 19px; }
  #money .hc-drawer > .hc-category, #money .hc-drawer > .hc-empty, #money .hc-drawer > .hc-add, #money .hc-drawer > .hc-drop-area, #money .hc-drawer > .hc-paid-caption { margin-left: 12px; margin-right: 12px; }
  #money .hc-area-tools { align-items: flex-start; }
  #money .hc-toggle { flex: 1; }
  #money .hc-toggle button { flex: 1; }
  #money .hc-category-note { margin-top: -8px; }
}
