/* hl-boards.css - "Around the house" boards (hl-boards.js). Uses only the :root tokens from style.css. */
.hb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.hb-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; position: relative; }
.hb-cat { grid-column: 1 / -1; }
.hb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hb-head .k { margin: 0 0 2px; color: var(--mint2); }
.hb-title { margin: 0; font: 600 24px/1.1 var(--f-display); color: var(--text); }
.hb-head .pill { flex: none; margin-top: 2px; }
.hb-copy { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.hb-copy a { color: var(--mint2); }
.hb-foot { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding-top: 10px; border-top: 1px solid var(--line); font: 500 12px var(--f-mono); color: var(--dim); }
.hb-err { margin: 0; padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); color: var(--warn); font-size: 13px; }
.hb-stale .num { opacity: .6; }
.hb-dim { color: var(--dim); }

.hb-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hb-stats > div { min-width: 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg2); border: 1px solid var(--line); }
.hb-stats .k { margin: 0 0 4px; font-size: 10px; }
.hb-mid { margin: 0; font-size: clamp(17px, 1.9vw, 22px); font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.hb-stats-col { grid-template-columns: 1fr; }

/* treat jar */
.hb-jar-body { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: center; }
.hb-jar-fig { margin: 0; }
.hb-jar-fig svg { width: 112px; height: auto; overflow: visible; }
.hb-jar-lid { fill: var(--line2); stroke: var(--mint2); stroke-width: 1.5; }
.hb-jar-glass { fill: color-mix(in srgb, var(--mint) 5%, transparent); stroke: var(--mint); stroke-width: 2.5; }
.hb-jar-fill { transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); transform: translateY(150px); }
.hb-jar-fill rect { fill: color-mix(in srgb, var(--mint2) 38%, transparent); }
.hb-jar-fill circle { fill: var(--warn); stroke: var(--bg); stroke-width: 1; }
.hb-jar-label { font: 700 11px var(--f-mono); fill: var(--mint); letter-spacing: .08em; }
.hb-jar-nums { min-width: 0; }
.hb-jar-nums p { margin: 0; }
.hb-big { font-size: clamp(28px, 3.6vw, 44px); font-weight: 700; line-height: 1.05; color: var(--mint); text-shadow: 0 0 24px color-mix(in srgb, var(--mint) 30%, transparent); overflow-wrap: anywhere; }
.hb-unit { color: var(--muted); font-size: 14px; margin-bottom: 8px !important; }
.hb-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 4px 0; border-top: 1px dashed var(--line); font-size: 15px; }
.hb-line b { color: var(--text); }
.hb-line .k { font-size: 10px; }

/* nap-o-meter sparkline */
.hb-spark { min-height: 100px; }
.hb-spark svg { width: 100%; height: 84px; }
.hb-sp-line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.hb-sp-up .hb-sp-line { stroke: var(--long); }
.hb-sp-down .hb-sp-line { stroke: var(--short); }
.hb-sp-up .hb-sp-area { fill: color-mix(in srgb, var(--long) 14%, transparent); }
.hb-sp-down .hb-sp-area { fill: color-mix(in srgb, var(--short) 14%, transparent); }
.hb-sp-zero { stroke: var(--line2); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.hb-sp-cap { display: flex; justify-content: space-between; margin: 4px 0 0; font: 500 11px var(--f-mono); color: var(--dim); }

/* catnip board */
.hb-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.hb-tabs button { min-height: 38px; padding: .4em 1em; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--muted); font: 600 14px var(--f-body); cursor: pointer; }
.hb-tabs button .num { opacity: .7; font-size: 12px; margin-left: 2px; }
.hb-tabs button[aria-selected="true"] { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.hb-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg2); }
.hb-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.hb-table th, .hb-table td { padding: 9px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.hb-table tbody tr:last-child > * { border-bottom: 0; }
.hb-table tbody tr:hover { background: var(--panel2); }
.hb-table .r { text-align: right; }
.hb-table thead th { position: sticky; top: 0; background: var(--panel); padding: 0; }
.hb-table thead button { display: block; width: 100%; min-height: 38px; padding: 8px 12px; border: 0; background: none; color: var(--muted); font: 600 11px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; text-align: inherit; cursor: pointer; }
.hb-table thead th.r button { text-align: right; }
.hb-table thead button:hover { color: var(--text); }
.hb-table thead th[aria-sort="descending"] button::after { content: " ▼"; color: var(--mint); }
.hb-table thead th[aria-sort="ascending"] button::after { content: " ▲"; color: var(--mint); }
.hb-table tbody th { font-weight: 400; position: sticky; left: 0; z-index: 1; background: var(--bg2); }
.hb-table tbody tr:hover th { background: var(--panel2); }
.hb-table thead th:first-child { left: 0; z-index: 2; }
.hb-tick { font: 700 13px var(--f-mono); color: var(--mint); background: color-mix(in srgb, var(--mint) 8%, transparent); border-radius: 5px; padding: 2px 6px; }
.hb-empty { color: var(--muted); text-align: center !important; padding: 22px !important; }
.hb-cat-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* tail wag */
.hb-tail-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: center; }
.hb-kit { width: 150px; height: auto; overflow: visible; }
.hb-kit-fur { fill: var(--muted); }
.hb-kit-belly { fill: var(--cream); }
.hb-kit-ear { fill: var(--pink); }
.hb-kit-stripe { fill: none; stroke: var(--dim); stroke-width: 3; stroke-linecap: round; }
.hb-kit-eye { fill: var(--ink); }
.hb-kit-nose { fill: var(--pink); }
.hb-kit-tail path { fill: none; stroke: var(--muted); stroke-width: 9; stroke-linecap: round; }
.hb-kit-tail { transform-box: view-box; transform-origin: 92px 96px; }
.hb-kit-tail.wag { animation: hb-wag var(--wag-ms, 600ms) ease-in-out var(--wags, 1); }
@keyframes hb-wag { 25% { transform: rotate(-22deg); } 75% { transform: rotate(14deg); } }

/* new cat in town */
.hb-bar { height: 12px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); overflow: hidden; }
.hb-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mint2), var(--mint)); border-radius: inherit; transition: width .9s linear; }
.hb-new .hint { margin: 0; font-size: 13px; }

@media (max-width: 900px) {
  .hb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hb-stats > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .hb-stats-col { grid-template-columns: 1fr; }
  .hb-stats-col > div:last-child:nth-child(odd) { grid-column: auto; }
}
@media (max-width: 760px) {
  .hb-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 440px) {
  .panel.hb-card { padding: 14px; }
  .hb-jar-body { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; }
  .hb-jar-fig svg { width: 76px; }
  .hb-tail-body { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
  .hb-kit { width: 96px; }
  .hb-title { font-size: 21px; }
}
