/* «Vergilər» (pages/taxes.html): the tax due as the finance page's hero, the quarter running, the VAT limit as a meter
   with the twelve months under it, the deadlines as dated rows, the wage calculator in two ledgers. Colours from the
   theme's tokens only: the hero keeps the finance hero's dark ground, the states use ok / warn / bad. */
.taxes-page { display: flex; flex-direction: column; gap: 12px; }
.tax-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.tax-top__regime { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; color: var(--ink-2); }
.tax-top__regime .ic { flex: none; color: var(--ink-3); }
.tax-partial { margin: -4px 0 0; }

.tax-grid { display: grid; gap: 12px; }
@media (min-width: 900px) {
  .tax-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .tax-cal, .tax-calc { grid-column: span 1; }
}

/* the tax due: the finance hero, its date as a pill that warms as the day nears */
.tax-hero { gap: 2px; }
.tax-hero__when { margin: 10px 0 2px; }
.tax-when { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: color-mix(in srgb, var(--hero-ink) 12%, transparent); color: var(--hero-ink); }
.tax-when.is-soon { background: #fbbf24; color: #3b2600; }
.tax-when.is-late { background: #f87171; color: #3d0b06; }
.tax-hero__note { margin-top: 8px; font-size: 12.5px; color: var(--hero-muted); max-width: 52ch; }
.tax-hero .hero__split { margin-top: 16px; }
.tax-hero .hero__split[hidden] { display: none; }
.tax-hero__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tax-hero__acts .btn--primary { min-width: 140px; }
.tax-hero__link { color: var(--hero-ink); border: 1px solid var(--hero-line); background: transparent; }
.tax-hero__link:hover { background: color-mix(in srgb, var(--hero-ink) 8%, transparent); }
.tax-hero__paid { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 14px; font-weight: 600; color: #4ade80; }

/* a big figure with its small context */
.tax-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 6px 0 10px; }
.tax-big b { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 28px; letter-spacing: var(--display-tracking); }
.tax-big small { font-size: 13px; color: var(--ink-3); }

/* the quarter's days passed */
.tax-track { display: block; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.tax-track i { display: block; height: 100%; width: var(--v, 0%); border-radius: 99px; background: var(--accent); }
.tax-run__meta { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.tax-run__meta:empty { display: none; }

/* the VAT limit: the meter, its 80 % mark, the months */
.tax-meter { position: relative; display: block; height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.tax-meter i { display: block; height: 100%; width: var(--v, 0%); border-radius: 99px; background: var(--ok); transition: width .3s ease-out; }
.tax-meter::after { content: ""; position: absolute; top: 0; bottom: 0; left: 80%; width: 2px; background: var(--bg); }
.tax-meter.is-soon i { background: var(--warn); }
.tax-meter.is-late i { background: var(--bad); }
.tax-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: 3px; height: 64px; margin: 14px 0 6px; padding: 0; list-style: none; }
.tax-months li { display: grid; grid-template-rows: 1fr auto; height: 100%; min-width: 0; text-align: center; }
.tax-months i { align-self: end; display: block; height: var(--h, 2%); min-height: 2px; border-radius: 3px 3px 0 0; background: color-mix(in srgb, var(--accent) 55%, var(--surface-2)); }
.tax-months li:last-child i { background: var(--accent); }
.tax-months small { margin-top: 4px; font-size: 10.5px; color: var(--ink-3); overflow: hidden; white-space: nowrap; }
.tax-alert { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 6px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn); font-size: 13.5px; font-weight: 500; }
.tax-alert .ic { flex: none; margin-top: 1px; }
.tax-alert.is-late { background: var(--bad-soft); color: var(--bad); }

/* the deadlines */
.tax-list { display: flex; flex-direction: column; margin: 6px 0 0; padding: 0; list-style: none; }
.tax-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; }
.tax-item + .tax-item { border-top: 1px solid var(--line); }
.tax-item__date { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 48px; height: 52px; border-radius: var(--radius-sm); background: var(--surface); line-height: 1.1; }
.tax-item__date b { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.tax-item__date small { font-size: 11.5px; color: var(--ink-3); text-transform: lowercase; }
.tax-item.is-soon .tax-item__date { background: var(--warn-soft); color: var(--warn); }
.tax-item.is-late .tax-item__date { background: var(--bad-soft); color: var(--bad); }
.tax-item.is-paid .tax-item__date { background: var(--ok-soft); color: var(--ok); }
.tax-item__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tax-item__title { font-weight: 600; font-size: 14px; }
.tax-item__sub { font-size: 12.5px; color: var(--ink-2); }
.tax-item__end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.tax-item__end b { font-weight: 600; font-size: 14px; white-space: nowrap; }
.tax-item__end b:empty { display: none; }
.tax-state { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.tax-item.is-soon .tax-state { color: var(--warn); font-weight: 600; }
.tax-item.is-late .tax-state { color: var(--bad); font-weight: 600; }
.tax-item.is-paid .tax-state { color: var(--ok); }
@media (max-width: 479px) {
  .tax-item { grid-template-columns: 44px minmax(0, 1fr); }
  .tax-item__end { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px 10px; text-align: left; }
}

/* the wage calculator */
.tax-calc__dir { display: grid; margin: 6px 0 12px; }
.tax-calc__in { display: grid; gap: 8px; }
.tax-calc__in .input { font-size: 18px; font-weight: 600; }
.tax-calc__out { display: grid; gap: 4px 20px; margin-top: 12px; }
@media (min-width: 560px) { .tax-calc__out { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.tax-calc__head { margin-top: 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.tax-calc__col .ledger { margin: 2px 0 0; padding: 0; list-style: none; }
.tax-calc__col .ledger li { padding: 7px 0; font-size: 13.5px; }
.tax-calc__col .ledger li.is-total { font-weight: 600; }
.tax-calc__col .ledger li.is-total b { font-size: 16px; }
.tax-calc .field__hint { margin-top: 10px; }

/* the regimes to choose from */
.tax-regimes { border: 0; margin: 0; padding: 0; gap: 8px; }
.tax-regime { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; }
.tax-regime:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
.tax-regime input { margin-top: 3px; accent-color: var(--accent); }
.tax-regime span { display: flex; flex-direction: column; gap: 2px; }
.tax-regime small { font-size: 12.5px; color: var(--ink-2); }

.tax-foot { font-size: 12px; color: var(--ink-3); max-width: 70ch; }

/* the finance page's line to the taxes */
.fin-tax { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: inherit; text-decoration: none; }
.fin-tax:hover { background: var(--surface); }
.fin-tax__ic { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--surface); color: var(--ink-2); }
.fin-tax.is-soon .fin-tax__ic { background: var(--warn-soft); color: var(--warn); }
.fin-tax.is-late .fin-tax__ic { background: var(--bad-soft); color: var(--bad); }
.fin-tax__main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.fin-tax__title { font-weight: 600; }
.fin-tax__sub { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
