/* Tax Season Tracker demo */
.wrap--wide { max-width: calc(1440px + var(--gutter) * 2); }
.tracker { border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--bg); padding: 14px; display: grid; gap: 12px; box-shadow: var(--shadow); }
@media (min-width: 720px) { .tracker { padding: 18px; } }
.tk__bar, .tk__filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.tk__views { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tk__savebox { display: flex; gap: 6px; align-items: center; }
.tk__savebox .input { width: 170px; }
.tk__search { position: relative; flex: 1 1 220px; max-width: 360px; }
.tk__search svg { position: absolute; left: 11px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; color: var(--fg-3); pointer-events: none; }
.tk__search .input { width: 100%; padding-left: 34px; padding-right: 34px; }
.tk__search .kbd { position: absolute; right: 9px; top: 50%; translate: 0 -50%; }
.tk__date { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.tk__date .seg button { padding: 6px 10px; font-family: var(--font-mono); font-size: 12px; }
@media (max-width: 720px) { .tk__date { margin-left: 0; } .tk__date .seg { overflow-x: auto; max-width: 100%; } }
.tk__gcount { margin-left: 6px; font-size: 11px; color: var(--fg-3); }
.seg button[aria-pressed="true"] .tk__gcount { color: var(--fg-2); }
.tk__forms .chip { min-height: 30px; padding: 3px 10px; font-size: 13px; }
.tk__owners { display: inline-flex; gap: 4px; }
.tk-av { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--bg); font: 600 11px/1 var(--font-primary); letter-spacing: 0.02em; color: var(--fg-2); transition: background-color var(--d-state), color var(--d-state), transform var(--d-press); }
.tk-av:active { transform: scale(0.94); }
.tk-av[aria-pressed="true"] { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
.tk__filters .select { min-height: 34px; padding-top: 5px; padding-bottom: 5px; }
.tk__chips { gap: 6px; }
.tk__chips .chip { min-height: 34px; }
.tk__chips .kbd { font-size: 10px; padding: 0 5px; border-bottom-width: 1px; }
.tk__chips .chip[aria-pressed="true"] .kbd { background: transparent; color: inherit; border-color: currentColor; opacity: 0.7; }
@media (max-width: 720px) { .tk__chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; } .tk__chips .kbd { display: none; } }

.tk__stages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 720px) { .tk__stages { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tk-stage { position: relative; display: grid; gap: 2px; text-align: left; padding: 8px 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-elev); color: var(--fg); overflow: hidden; transition: border-color var(--d-state), background-color var(--d-state); }
.tk-stage:hover { border-color: var(--line-strong); }
.tk-stage[aria-pressed="true"] { border-color: var(--fg); background: var(--bg); box-shadow: inset 0 0 0 1px var(--fg); }
.tk-stage__n { font-size: 1.375rem; line-height: 1.1; letter-spacing: -0.02em; }
.tk-stage__l { font-size: 12px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-stage__bar { position: absolute; left: 10px; right: 10px; bottom: 6px; height: 3px; border-radius: 2px; background: var(--line); }
.tk-stage__bar i { position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 100%); border-radius: 2px; background: var(--signal); transition: width var(--d-move) var(--ease-move); }

.tk__bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--sel-bg); color: var(--sel-fg); }
.tk__bulk .select { min-height: 32px; padding-block: 4px; }
.tk__bulk .btn--ghost { --_fg: var(--sel-fg); --_bd: color-mix(in srgb, var(--sel-fg) 40%, transparent); }
.tk__bulk .btn--quiet { --_fg: var(--sel-fg); }
.tk__bulk:not([hidden]) { animation: ib-in 260ms var(--ease-out); }

.tk__scroll { position: relative; overflow: auto; max-height: min(620px, 72vh); border: 1px solid var(--line); border-radius: 10px; overscroll-behavior: contain; }
.tk { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 13px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.tk th, .tk td { padding: 0 10px; height: 38px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; background: var(--bg); }
.tk thead th { position: sticky; top: 0; z-index: 3; background: var(--bg-elev); height: 36px; border-bottom: 1px solid var(--line-strong); font-weight: 600; font-size: 12px; color: var(--fg-2); }
.tk .tk-sel { position: sticky; left: 0; z-index: 2; width: 38px; min-width: 38px; padding: 0 0 0 12px; }
.tk thead .tk-sel { z-index: 5; }
.tk .tk-first { position: sticky; left: 38px; z-index: 2; box-shadow: 1px 0 0 var(--line-strong); }
.tk thead .tk-first { z-index: 5; }
.tk input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--color-primary); vertical-align: middle; }
:root[data-theme="dark"] .tk input[type="checkbox"] { accent-color: var(--color-accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tk input[type="checkbox"] { accent-color: var(--color-accent); } }
.tk .is-num { text-align: right; }
.tk-sort { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; padding: 6px 0; }
.tk-sort:hover { color: var(--fg); }
.tk-sort__i { color: var(--fg); }
.tk-sort__i sup { font-size: 9px; }
.tk tbody tr:hover td { background: var(--bg-elev); }
.tk tbody tr.is-sel td { background: var(--signal-soft); }
.tk tbody tr.is-sel td.tk-first, .tk tbody tr.is-sel td.tk-sel { background: color-mix(in srgb, var(--color-accent) 12%, var(--bg)); }
.tk td:focus { outline: 2px solid var(--signal); outline-offset: -2px; border-radius: 0; }
.tk td:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
.tk td.is-edit { cursor: cell; }
.tk td.is-editing { padding: 0 4px; background: var(--bg) !important; }
.tk-input { width: 100%; min-width: 110px; height: 30px; padding: 2px 8px; border-radius: 6px; border: 2px solid var(--signal); background: var(--bg); color: var(--fg); font-size: 13px; }
.tk-client { font-weight: 600; }
.tk-link { font-size: 11px; color: var(--fg-3); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); margin-left: 4px; }
.tk-form { font-family: var(--font-mono); font-size: 12px; padding: 1px 6px; border-radius: 5px; background: var(--bg-sunk); }
.tk-tier { color: var(--fg-2); }
.tk-owner { display: inline-flex; align-items: center; gap: 6px; }
.tk-owner::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.tk-owner[data-o="Julian"]::before { background: var(--fg); }
.tk-org[data-v="Submitted"] { color: var(--ok); font-weight: 500; }
.tk-org[data-v="Not sent"] { color: var(--fg-3); }
.tk-stg { display: inline-flex; align-items: center; gap: 6px; }
.tk-stg::before { content: ""; width: 26px; height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--fg) calc(var(--sp) * 100%), var(--line) 0); }
.tk-stg[data-i="0"] { --sp: 0.08; } .tk-stg[data-i="1"] { --sp: 0.25; } .tk-stg[data-i="2"] { --sp: 0.45; } .tk-stg[data-i="3"] { --sp: 0.65; } .tk-stg[data-i="4"] { --sp: 0.85; } .tk-stg[data-i="5"] { --sp: 1; }
.tk-dl { display: inline-flex; gap: 8px; align-items: center; }
.tk-dl .mono { font-size: 12px; color: var(--fg-2); min-width: 44px; }
.tk-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; cursor: help; }
.tk-badge--ok { background: var(--ok-bg); color: var(--ok); }
.tk-badge--bad { background: var(--bad-bg); color: var(--bad); }
.tk-badge--warn { background: var(--warn-bg); color: var(--warn); }
.tk-badge--decide { color: var(--warn); box-shadow: inset 0 0 0 1.5px currentColor; }
.tk-badge--ext { background: var(--signal-soft); color: var(--fg); }
.tk-badge--plain { color: var(--fg-3); }
.tk-sig[data-v="Sent"] { color: var(--warn); }
.tk-sig[data-v="Signed"] { color: var(--ok); }
.tk-sig[data-v="Not sent"] { color: var(--fg-3); }
.tk-check { width: 15px; height: 15px; color: var(--ok); }
.tk-dash { color: var(--fg-3); }
.tk-notes { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; color: var(--fg-2); }
.tk-flag { color: var(--warn); }
.tk-empty { text-align: center !important; height: 120px !important; color: var(--fg-2); }
.tk tr.is-overdue .tk-first { box-shadow: inset 3px 0 0 var(--bad), 1px 0 0 var(--line-strong); }

.tk__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.tk__foot p { margin: 0; color: var(--fg-2); }
.tk__foot-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tk__colmenu { position: relative; }
.tk__cols { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 10; display: grid; gap: 2px; padding: 8px; min-width: 190px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow-lift); font-size: 13px; }
.tk__cols label { display: flex; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.tk__cols label:hover { background: var(--bg-elev); }
.tk__help { margin: 0; }
.kb { display: grid; gap: 8px; margin: 0; }
.kb div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; align-items: center; font-size: var(--text-body-small); }
.kb dd { margin: 0; color: var(--fg-2); }

/* Compare table */
.compare { margin-top: clamp(48px, 6vw, 80px); }
.compare__head { max-width: 46rem; margin-bottom: 20px; }
.compare__head h3 { margin: 10px 0; }
.compare__head p { color: var(--fg-2); }
.compare__wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.compare__t { width: 100%; min-width: 720px; border-collapse: collapse; font-size: var(--text-body-small); }
.compare__t th, .compare__t td { padding: 12px 14px; text-align: left; border-top: 1px solid var(--line); vertical-align: top; }
.compare__t thead th { border-top: 0; font-size: var(--text-body); font-weight: 600; vertical-align: bottom; }
.compare__t thead th span { display: block; font-size: var(--text-caption); font-weight: 500; color: var(--fg-3); letter-spacing: 0.04em; text-transform: uppercase; }
.compare__t tbody th { font-weight: 500; color: var(--fg-2); width: 22%; }
.compare__t .is-lead { background: var(--bg-elev); }
.compare__t thead th.is-lead span { color: var(--fg); }
.compare__t i { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 8px; vertical-align: -2px; }
.compare__t i.y { background: var(--signal-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232A9D8F' stroke-width='3.5'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 10px no-repeat; }
.compare__t i.p { box-shadow: inset 0 0 0 1.5px var(--fg-3); background: linear-gradient(90deg, var(--fg-3) 50%, transparent 50%); }
.compare__t i.n { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.compare__intuit { margin-top: 16px; max-width: 60rem; }
@media (max-width: 720px) {
  .tk th.tk-first, .tk td.tk-first { min-width: 132px !important; max-width: 150px; white-space: normal; line-height: 1.25; }
  .tk .tk-link { display: none; }
  .tk .tk-sel { width: 32px; min-width: 32px; padding-left: 8px; }
  .tk .tk-first { left: 32px; }
}
