/* HisabKhata — one small stylesheet, no framework, mobile-first. */
:root {
  --bg: #f1f5f9; --card: #fff; --text: #0f172a; --muted: #64748b; --line: #e2e8f0;
  --primary: #2563eb; --primary-d: #1d4ed8; --primary-soft: #eff6ff;
  --income: #16a34a; --income-soft: #f0fdf4; --expense: #dc2626; --expense-soft: #fef2f2;
  --radius: 14px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 16px rgba(15,23,42,.05);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 "Noto Sans Bengali", "Hind Siliguri", "Nirmala UI", "Vrinda", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .6rem; }
h1 { font-size: 1.35rem; } h2 { font-size: 1.1rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .6rem; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 16px; padding-bottom: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Preloader: top bar starts at once; the overlay fades in only after 450 ms, so fast pages never flash it */
.loadbar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 1000; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, #60a5fa, var(--primary), #16a34a); box-shadow: 0 0 8px rgba(37,99,235,.6); border-radius: 0 3px 3px 0; }
.is-loading .loadbar { opacity: 1; animation: loadbar 8s cubic-bezier(.1,.7,.2,1) forwards; }
@keyframes loadbar { 0% { width: 0 } 10% { width: 35% } 40% { width: 70% } 100% { width: 92% } }
.loader { position: fixed; inset: 0; z-index: 999; display: grid; place-items: center; pointer-events: none;
  background: rgba(241,245,249,.72); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; }
.is-loading .loader { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .25s .45s, visibility 0s .45s; }
.loader-box { display: grid; justify-items: center; gap: 12px; color: var(--primary-d); font-weight: 600; }
.loader-ring { position: relative; width: 64px; height: 64px; display: grid; place-items: center; }
.loader-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 4px solid #dbeafe; border-top-color: var(--primary); border-right-color: #16a34a; animation: spin .8s linear infinite; }
.loader-logo { width: 42px; height: 42px; border-radius: 12px; background: var(--primary); color: #fff; display: grid; place-items: center;
  font-size: 1.35rem; font-weight: 700; animation: pulse 1.2s ease-in-out infinite; }
.loader-text { font-size: .95rem; }
@keyframes spin { to { transform: rotate(360deg) } }
@keyframes pulse { 0%, 100% { transform: scale(1) } 50% { transform: scale(.88) } }
@media (prefers-reduced-motion: reduce) {
  .is-loading .loadbar { animation: none; width: 70%; }
  .loader-ring::before, .loader-logo { animation: none; }
}

/* Top bar */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.brand-icon, .auth-icon, .avatar {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--primary); color: #fff; font-weight: 700;
}
.topnav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
/* Phones: one swipeable row instead of a two-line sticky header. */
@media (max-width: 639px) {
  .topbar-in { gap: 0; padding-top: 6px; }
  .topnav { flex-wrap: nowrap; overflow-x: auto; width: 100%; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: none; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a, .topnav .linklike { white-space: nowrap; flex: 0 0 auto; }
}
.topnav a, .linklike {
  padding: 8px 10px; border-radius: 8px; color: var(--muted); font: inherit; font-size: .95rem;
  background: none; border: 0; cursor: pointer; min-height: 40px;
}
.topnav a:hover, .linklike:hover { background: var(--bg); text-decoration: none; color: var(--text); }
.topnav a.is-active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.topnav form { margin: 0; }

/* Cards, flash, alerts */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.flash { background: var(--income-soft); color: #166534; border: 1px solid #bbf7d0; border-radius: 10px; padding: 8px 8px 8px 14px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; min-height: 44px; }
.flash form { margin: 0; }
.alert { background: var(--expense-soft); color: #991b1b; border: 1px solid #fecaca; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.alert p { margin: 0; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; background: var(--card); border-radius: var(--radius); }

/* Forms */
.form { display: grid; gap: 12px; }
.field { display: grid; gap: 4px; margin: 0; border: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { font-size: .85rem; color: var(--muted); font-weight: 600; padding: 0; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], select {
  width: 100%; min-height: 44px; padding: 9px 12px; font: inherit; color: var(--text);
  background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input:focus, select:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #93c5fd; outline-offset: 1px; border-color: var(--primary); }
.radios { display: flex; gap: 16px; flex-wrap: wrap; min-height: 44px; align-items: center; }
.radios label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
input[type=radio], input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); }
.pw { position: relative; display: block; }
.pw input { padding-right: 48px; }
.pw-toggle { position: absolute; right: 4px; top: 4px; width: 40px; height: 36px; border: 0; background: none; cursor: pointer; border-radius: 8px; }
.pw-toggle::before { content: "👁"; font-size: 1.05rem; opacity: .6; }
.pw-toggle.is-on::before { opacity: 1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600;
  cursor: pointer; white-space: nowrap; text-decoration: none; line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-income { background: var(--income); }
.btn-income:hover { background: #15803d; }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: #fff; color: var(--expense); border-color: #fecaca; }
.btn-danger:hover { background: var(--expense-soft); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn.is-disabled { opacity: .5; cursor: not-allowed; }
.link-sm { justify-self: center; font-size: .9rem; }

/* Auth */
.auth-main { display: grid; gap: 16px; justify-items: center; padding-top: 28px; }
.auth-card { width: 100%; max-width: 420px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 24px 20px; }
.auth-brand { text-align: center; margin-bottom: 16px; }
.auth-brand h1 { font-size: 1.6rem; margin: 8px 0 2px; }
.auth-brand p { color: var(--muted); margin: 0; }
.auth-icon { width: 52px; height: 52px; border-radius: 14px; font-size: 1.6rem; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.auth-tab { text-align: center; padding: 9px; border-radius: 9px; color: var(--muted); font-weight: 600; }
.auth-tab:hover { text-decoration: none; color: var(--text); }
.auth-tab.is-active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }
.org-field { display: none; }
.reg-form:has(input[value=organization]:checked) .org-field { display: grid; }
.about { width: 100%; max-width: 420px; }
.about h2 { font-size: 1.05rem; text-align: center; }
.features { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.features li { background: var(--card); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); font-size: .95rem; }
.error-card { text-align: center; display: grid; gap: 10px; justify-items: center; }

/* Ledger toolbar */
.toolbar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar-head h1 { margin: 0; }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.info { position: relative; }
.info summary { list-style: none; }
.info summary::-webkit-details-marker { display: none; }
.info-box { position: absolute; right: 0; top: 50px; width: min(340px, calc(100vw - 32px)); z-index: 5; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.15); padding: 14px; font-size: .92rem; }
.type-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.type-tab { text-align: center; padding: 10px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.type-tab:hover { text-decoration: none; background: var(--bg); }
.type-tab.is-active { background: var(--expense-soft); border-color: #fecaca; color: var(--expense); }
.type-tab.is-income.is-active { background: var(--income-soft); border-color: #bbf7d0; color: var(--income); }
.add-form, .edit-form, .grid-form { display: grid; gap: 10px; align-items: end; }
.filter { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.filter .field-search { grid-column: 1 / -1; }
.filter .btn { width: 100%; }
input:disabled { background: var(--bg); color: var(--muted); }

/* Budgets */
.flash-warn { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.budget-alerts { border-left: 4px solid #f59e0b; }
.budget-row { margin-bottom: 14px; }
.bar-fill.budget-fill { background: var(--income); }
.budget-row.is-warn .bar-fill.budget-fill { background: #f59e0b; }
.budget-row.is-over .bar-fill.budget-fill { background: var(--expense); }
.budget-note { margin: 4px 0 0; font-size: .82rem; color: var(--muted); }
.budget-row.is-over .budget-note { color: var(--expense); font-weight: 600; }
.budget-row.is-warn .budget-note { color: #b45309; }
.budget-form { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; align-items: end; }
.budget-form .budget-total, .budget-form .btn { grid-column: 1 / -1; }

/* Recurring */
.rule { display: grid; gap: 10px; }
.rule.is-paused { opacity: .65; }
.rule-main { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.rule-main p { margin: 4px 0 0; }
.chip-muted { background: var(--bg); color: var(--muted); }
input[type=number] { width: 100%; min-height: 44px; padding: 9px 12px; font: inherit; border: 1px solid #cbd5e1; border-radius: 10px; }

/* History */
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; gap: 2px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.log li:last-child { border-bottom: 0; }
.log-when { font-size: .8rem; color: var(--muted); }
.log-diff { color: var(--muted); overflow-wrap: anywhere; }
.log-diff s { color: #94a3b8; }

/* Reports */
.month-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mt { margin-top: 18px; }
.donut-wrap { display: grid; gap: 16px; align-items: center; }
.donut { width: 100%; max-width: 230px; justify-self: center; transform: rotate(0deg); }
.donut-label { font-size: 3px; fill: var(--muted); }
.donut-value { font-size: 4.2px; font-weight: 700; fill: var(--text); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.legend li { display: grid; grid-template-columns: 14px 1fr auto auto; gap: 8px; align-items: center; font-size: .92rem; }
.swatch { width: 14px; height: 14px; }
.top-list { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; }
.top-list li span { margin-right: 8px; }
.top-list li { display: list-item; }
.top-list li b { float: right; color: var(--expense); }
.trend { display: grid; gap: 4px; margin: 8px 0; }
.trend-row { display: grid; grid-template-columns: 112px 1fr; gap: 4px 10px; align-items: center; padding: 6px 8px; border-radius: 10px; color: var(--text); }
.trend-row:hover { background: var(--bg); text-decoration: none; }
.trend-row[aria-current] { background: var(--primary-soft); }
.trend-month { font-size: .9rem; font-weight: 600; }
.trend-month small { color: var(--muted); font-weight: 400; }
.trend-bars { display: grid; gap: 3px; }
.trend-nums { grid-column: 2; display: flex; gap: 12px; font-size: .78rem; }
@media (min-width: 640px) {
  .donut-wrap { grid-template-columns: 230px 1fr; }
  .trend-row { grid-template-columns: 110px 1fr 170px; }
  .trend-nums { grid-column: auto; justify-content: flex-end; }
}

/* Summary */
.grand-heading { font-size: 1rem; color: var(--muted); }
.grand-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.grand-item { border-radius: 12px; padding: 10px; background: var(--bg); display: grid; gap: 2px; min-width: 0; }
.grand-item span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.grand-item b { font-size: 1rem; overflow-wrap: anywhere; }
.grand-item.is-income b, .pos { color: var(--income); }
.grand-item.is-expense b { color: var(--expense); }
.neg { color: var(--expense); }
.grand-simple { margin: 0; font-size: 1.05rem; }
.bar { display: block; height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.bar-fill { display: block; }
.bar-thin { height: 6px; }
.bar-fill { height: 100%; background: var(--expense); border-radius: 99px; }
.bar-fill.is-income { background: var(--income); }
.bar-fill.is-over { background: #b91c1c; }
.bar-label { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }
.cats { display: grid; gap: 18px; }
.cat-block h3 { font-size: .95rem; color: var(--muted); }
.cat-row { margin-bottom: 10px; }
.cat-top { display: flex; justify-content: space-between; gap: 8px; font-size: .92rem; margin-bottom: 4px; }

/* Day list */
.list-controls { display: flex; justify-content: flex-end; margin: 4px 0 10px; font-size: .9rem; color: var(--muted); }
.list-controls select { width: auto; min-height: 36px; display: inline-block; margin: 0 4px; padding-top: 4px; padding-bottom: 4px; }
.month-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: .95rem; margin: 18px 4px 8px; color: var(--primary-d); }
.month-head small { color: var(--muted); font-weight: 400; }
.day { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; }
.day-head { display: flex; justify-content: space-between; gap: 8px; padding: 13px 16px; cursor: pointer; font-weight: 600; list-style: none; }
.day-head::-webkit-details-marker { display: none; }
.day-head::after { content: "▸"; color: var(--muted); margin-left: 4px; }
.day[open] > .day-head::after { content: "▾"; }
.day[open] > .day-head { border-bottom: 1px solid var(--line); }
.day[open] .day-sum { display: none; }
.day-sum { color: var(--muted); margin-left: auto; }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.item-main { min-width: 0; overflow-wrap: anywhere; }
.item-no { color: var(--muted); }
.item-amt { font-weight: 700; color: var(--expense); white-space: nowrap; }
.item.is-income .item-amt { color: var(--income); }
.item-actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.item-actions form { margin: 0; }
.edit > summary { list-style: none; }
.edit > summary::-webkit-details-marker { display: none; }
.edit[open] { flex-basis: 100%; }
.edit[open] > summary { margin-bottom: 8px; }
.edit-form { background: var(--bg); border-radius: 12px; padding: 12px; }
.chip { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 99px; background: var(--primary-soft); color: var(--primary-d); vertical-align: 1px; margin-left: 4px; }
.day-total { margin: 0; padding: 10px 16px; font-weight: 600; text-align: right; background: #fafafa; }

/* Pager */
.pager { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.pg { min-width: 40px; min-height: 40px; display: inline-grid; place-items: center; padding: 0 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--text); }
.pg:hover { text-decoration: none; background: var(--bg); }
.pg.is-current { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.pg.is-disabled { color: #cbd5e1; }

/* Manage */
.hero-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.hero-title h1 { margin: 0; flex: 1 1 200px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat { background: var(--bg); border-radius: 12px; padding: 10px; display: grid; }
.stat b { font-size: 1.05rem; overflow-wrap: anywhere; }
.stat span { font-size: .8rem; color: var(--muted); }
.stat.is-income b { color: var(--income); }
.stat.is-expense b { color: var(--expense); }
.masked { letter-spacing: 2px; color: var(--muted); }
.pending { list-style: none; margin: 0; padding: 0; }
.pending li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.user-grid { display: grid; gap: 12px; }
.user-card { margin: 0; display: grid; gap: 10px; }
.user-top { display: flex; gap: 10px; align-items: center; }
.avatar { width: 44px; height: 44px; border-radius: 50%; font-size: 1.1rem; }
.user-name { font-weight: 700; }
.user-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.user-stats > div { background: var(--bg); border-radius: 10px; padding: 8px 10px; display: grid; }
.user-stats span { font-size: .8rem; color: var(--muted); }
.setting { border-bottom: 1px solid var(--line); padding: 12px 0; margin: 0; }
.setting:last-child { border-bottom: 0; }
.switch-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.switch { appearance: none; flex: 0 0 44px; width: 44px !important; height: 26px !important; border-radius: 99px; background: #cbd5e1; position: relative; cursor: pointer; margin-top: 2px; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--primary); }
.switch:checked::after { transform: translateX(18px); }

/* Table (stacks into cards on phones) */
.table-wrap { padding: 0; overflow: hidden; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: left; background: #f8fafc; color: var(--muted); font-size: .8rem; padding: 10px 12px; }
.table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.table .num { text-align: right; white-space: nowrap; }
.tag { font-size: .8rem; padding: 2px 8px; border-radius: 99px; background: var(--expense-soft); color: var(--expense); }
.tag.is-income { background: var(--income-soft); color: var(--income); }
.is-editing td { background: var(--primary-soft); }
@media (max-width: 639px) {
  .table thead { display: none; }
  .table tr { display: block; border-top: 1px solid var(--line); padding: 8px 0; }
  .table td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 14px; }
  .table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .8rem; }
  .table .num { text-align: left; }
  .table td.row-actions { justify-content: flex-end; }
}

/* Footer */
.foot { display: flex; gap: 8px; justify-content: center; color: var(--muted); font-size: .85rem; padding-bottom: 24px; }

/* Wider screens */
@media (min-width: 640px) {
  h1 { font-size: 1.5rem; }
  .add-form { grid-template-columns: 150px 1fr 120px 150px auto; }
  .edit-form { grid-template-columns: 150px 1fr 110px auto auto auto; }
  .grid-form { grid-template-columns: repeat(4, 1fr) auto; }
  .filter { grid-template-columns: 1.4fr 1fr 1fr auto auto; }
  .filter .field-search { grid-column: auto; }
  .budget-form { grid-template-columns: repeat(3, 1fr); }
  .recurring-form { grid-template-columns: auto 1fr 120px 150px 150px auto; }
  .filter .btn { width: auto; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .user-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .item { grid-template-columns: 1fr auto auto; }
  .item-actions { grid-column: auto; }
  .edit[open] { position: static; }
  .grand-item b { font-size: 1.15rem; }
  .auth-card { padding: 28px; }
}
@media (min-width: 640px) and (max-width: 819px) {
  .add-form { grid-template-columns: 1fr 1fr; }
  .add-form .field-grow { grid-column: 1 / -1; }
  .edit-form { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .topbar, .toolbar, .filter, .item-actions, .pager, .list-controls, .foot { display: none !important; }
  .day { box-shadow: none; border: 1px solid #ddd; }
  .day:not([open]) > *:not(summary) { display: block; }
}

/* Width steps for bars (no inline styles, CSP-safe) */
.w-0{width:0%}.w-1{width:1%}.w-2{width:2%}.w-3{width:3%}.w-4{width:4%}.w-5{width:5%}.w-6{width:6%}.w-7{width:7%}.w-8{width:8%}.w-9{width:9%}.w-10{width:10%}.w-11{width:11%}.w-12{width:12%}.w-13{width:13%}.w-14{width:14%}.w-15{width:15%}.w-16{width:16%}.w-17{width:17%}.w-18{width:18%}.w-19{width:19%}.w-20{width:20%}.w-21{width:21%}.w-22{width:22%}.w-23{width:23%}.w-24{width:24%}.w-25{width:25%}.w-26{width:26%}.w-27{width:27%}.w-28{width:28%}.w-29{width:29%}.w-30{width:30%}.w-31{width:31%}.w-32{width:32%}.w-33{width:33%}.w-34{width:34%}.w-35{width:35%}.w-36{width:36%}.w-37{width:37%}.w-38{width:38%}.w-39{width:39%}.w-40{width:40%}.w-41{width:41%}.w-42{width:42%}.w-43{width:43%}.w-44{width:44%}.w-45{width:45%}.w-46{width:46%}.w-47{width:47%}.w-48{width:48%}.w-49{width:49%}.w-50{width:50%}.w-51{width:51%}.w-52{width:52%}.w-53{width:53%}.w-54{width:54%}.w-55{width:55%}.w-56{width:56%}.w-57{width:57%}.w-58{width:58%}.w-59{width:59%}.w-60{width:60%}.w-61{width:61%}.w-62{width:62%}.w-63{width:63%}.w-64{width:64%}.w-65{width:65%}.w-66{width:66%}.w-67{width:67%}.w-68{width:68%}.w-69{width:69%}.w-70{width:70%}.w-71{width:71%}.w-72{width:72%}.w-73{width:73%}.w-74{width:74%}.w-75{width:75%}.w-76{width:76%}.w-77{width:77%}.w-78{width:78%}.w-79{width:79%}.w-80{width:80%}.w-81{width:81%}.w-82{width:82%}.w-83{width:83%}.w-84{width:84%}.w-85{width:85%}.w-86{width:86%}.w-87{width:87%}.w-88{width:88%}.w-89{width:89%}.w-90{width:90%}.w-91{width:91%}.w-92{width:92%}.w-93{width:93%}.w-94{width:94%}.w-95{width:95%}.w-96{width:96%}.w-97{width:97%}.w-98{width:98%}.w-99{width:99%}.w-100{width:100%}
