/* ==========================================================================
   Tax calendar — year-at-a-glance month cards (Peter, 24 Jul 2026)
   12 month cards, NOT a day grid: tax has a yearly rhythm and a day grid is false
   precision. Deadlines are generated from src/js/tax-profile.js.
   Catalogued in preview/index.html (#taxcal).
   ========================================================================== */

/* ===== Tax calendar — the year at a glance (Peter, 24 Jul) =========================
   A second VIEW of the same deadlines, not a second home for them. Month cards, because
   tax has a yearly rhythm — a day grid would be false precision. */
.taxcal { display: flex; flex-direction: column; gap: 20px; }
/* HOME'S CARDS ON TAX (Peter, 8 Sep): the grid, the card and the rows come from dashboard.css; only the
   money count column and the year heading are local */
.taxcards .needs__count { min-width: 64px; font-variant-numeric: tabular-nums; }
.taxcards .needs__empty { margin: 0; padding: 16px 18px; color: var(--color-text-muted); font-size: var(--text-base); }
.taxcards .dcard__line { color: var(--color-text-muted); }
.taxcards .dcard__line strong { color: var(--color-text); font-weight: var(--weight-regular); }
.taxcal__title { margin: 8px 0 -4px; }   /* the cards' label style (icon + bold) sits above the strip */
.taxcal__yearbar { display: flex; align-items: center; gap: 6px; margin-left: -8px; }   /* on the toolbar row, left (Peter, 8 Sep) */
.taxcal__yearbar[hidden] { display: none; }
.taxcal__year { font-size: var(--text-section); font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; }
.taxcal__nav { width: 34px; height: 34px; border: none; background: none; border-radius: 50%; color: var(--color-text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.taxcal__nav:hover { background: var(--color-bg-subtle); color: var(--color-text); }
.taxcal__nav svg { width: 20px; height: 20px; }
/* THREE ACROSS, ROOMIER (Peter, 8 Sep: the four-up grid was crushed) */
.taxcal__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }   /* folded months hug their one line */
@media (max-width: 900px) { .taxcal__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .taxcal__grid { grid-template-columns: 1fr; } }

/* A MONTH IS HOME'S CARD (Peter, 8 Sep): soft elevation, no header band, the month name as the card label */
/* Name pushes the badge + "This month" to the right, together — no competing auto-margins. */
/* the current month is the anchor — one clear mark so the year orients instantly */
/* the picked colour is NAVY everywhere now (Peter, 8 Sep), never a black border */
/* the row that needs you: dot, title, one meta line, a button on the right */
/* the months that are gone and all filed: one quiet line above the grid, tap to open them */
/* Header time badge — "~your time" this month. Overdue is the one alarm; everything else is calm. */

/* One deadline. OVERVIEW = a small dot + the name. Calm by default. */
a.taxdl:hover .taxdl__title { text-decoration: underline; }
/* every marker is a 14px box (the tick is 14px) so titles and meta lines share one left edge (8 Sep) */
/* DETAIL = state · period · your time. Collapsed by default, revealed on hover / keyboard focus. */
/* ONE QUIET LINE, ALWAYS THERE (Peter, 8 Sep): "Filed · Nov to Dec 2025" under the title, muted, no
   hover reveal, nothing jumps */
/* inline text, not flex: if the line has to wrap, the dot stays at the end of line one, never leads line two (8 Sep) */
/* HANDLED is never hidden — "we did this for you" is the most reassuring thing here.
   It's quieter than needs-you, not absent (Peter, 24 Jul). */
/* A FILED item leads with a TICK, not a dot (Peter, 28 Jul) — the green dot read as
   "something needs doing", which is the opposite of what it meant. Hovering it says
   which kind of done; the tooltip is the shared [data-tip] component. */
/* the ONE attention treatment, for genuinely overdue only */

/* Sparse profile: fewer than 4 deadlines in the year — a single line beats 12 empty cards. */
.taxnext { border: var(--border-width) solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); padding: 20px 22px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.taxnext__label { color: var(--color-text-muted); }
.taxnext__what { font-weight: var(--weight-medium); }
.taxnext__link { margin-left: auto; background: none; border: none; padding: 0; font: inherit; color: var(--color-text-muted); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.taxnext__link:hover { color: var(--color-text); }

/* View toggle — list ⇄ calendar, the same deadlines either way */
.taxview { display: inline-flex; border: var(--border-width) solid var(--color-border); border-radius: 999px; overflow: hidden; }
.taxview__btn { border: none; background: none; padding: 7px 14px; font: inherit; font-size: var(--text-sm); color: var(--color-text-muted); cursor: pointer; }
.taxview__btn.is-on { background: var(--color-text); color: var(--color-surface); }


/* WIDE, like Home (demo toggle under Reset, Peter 8 Sep: "show me the same width as the home page"):
   the year runs four across and the current month keeps the whole row */
.app--wide .taxcal__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); }
/* DEMO chrome: the Narrow / Wide toggle (Peter, 8 Sep, back by request: "bring it back so I've the option") */
.taxwide-toggle { position: fixed; top: 12px; left: 164px; z-index: 60; display: inline-flex; gap: 2px; padding: 2px; border: var(--border-width) solid var(--color-border); border-radius: 999px; background: var(--color-surface); font-size: 11px; color: var(--color-text-muted); }
.taxwide-toggle button { border: none; background: none; font: inherit; color: inherit; padding: 2px 8px; border-radius: 999px; cursor: pointer; }
.taxwide-toggle button.is-on { background: var(--color-text); color: #fff; }
@media (max-width: 900px) { .taxwide-toggle { display: none; } }

/* THE YEAR AS A MONTH STRIP (Peter, 8 Sep): twelve tiles, the picked one NAVY, that month's rows underneath */
.taxcal__grid:has(.taxyr) { display: block; }
/* TABS (Peter, 9 Sep: "the cards at the top like a tab that connects to this card here, get rid of all of
   these boxes, mark them very light grey, a shadow on the tab so it is easy to spot"): the twelve months are
   tabs on the month card. Unpicked = the lightest grey, no border, top corners only. Picked = white, joined
   to the card below (it sits over the card's top edge), a soft shadow lifting it. */
.taxyr { display: flex; flex-direction: column; gap: 0; }
.taxyr__strip { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 5px; align-items: end; padding: 0 10px; position: relative; z-index: 2; }
.taxyr__tile { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 10px 0 10px; border: var(--border-width) solid transparent; border-bottom: none; border-radius: 12px 12px 0 0; background: var(--color-bg-subtle-light); font: inherit; color: var(--color-text-muted); cursor: pointer; position: relative; }
.taxyr__tile:hover { color: var(--color-text); background: var(--color-bg-subtle); }
.taxyr__tile.is-on { background: var(--color-surface); border-color: var(--color-border); color: var(--color-text); margin-bottom: -1px; padding-bottom: 12px; box-shadow: 0 -8px 18px -12px rgba(17, 17, 17, 0.28); }
.taxyr__tile.is-on .taxyr__mon { font-weight: var(--weight-medium); }
.taxyr__tile.is-now:not(.is-on) .taxyr__mon { color: var(--color-text); font-weight: var(--weight-medium); }
.taxyr__mon { font-size: var(--text-sm); line-height: 1; }
.taxyr__mark { width: 12px; height: 12px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.taxyr__mark--needs { background: #0b1d3a; width: 8px; height: 8px; margin: 2px 0; }
.taxyr__mark--overdue { background: var(--color-danger); width: 8px; height: 8px; margin: 2px 0; }
.taxyr__mark--ours { background: var(--color-border-strong); width: 8px; height: 8px; margin: 2px 0; }
.taxyr__mark--done { color: var(--color-success); }
.taxyr__mark--done svg { width: 12px; height: 12px; }
.taxyr__month { border: var(--border-width) solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); position: relative; z-index: 1; }
.taxyr__title { font-size: var(--text-base); font-weight: var(--weight-bold); margin: 0; padding: 18px 18px 6px; }
.taxyr__min { font-weight: var(--weight-regular); color: var(--color-text-muted); margin-left: 8px; }
.taxyr__est { color: var(--color-text-muted); }
.taxyr__empty { margin: 0; padding: 6px 18px 20px; color: var(--color-text-muted); font-size: var(--text-base); }
.taxyr .needs__row--calm { cursor: default; }
.taxyr .needs__row--calm:hover { background: none; }
@media (max-width: 640px) { .taxyr__strip { grid-template-columns: repeat(6, minmax(0, 1fr)); } .taxyr__month .needs__row { flex-wrap: wrap; } }
