/* Cookbooks Back Office and Client Portal — brand styling.
   One typeface, Poppins (the brand kit's: Bold headlines, Medium subheads, Regular body),
   with tabular figures wherever numbers sit in columns. The palette is the kit's:
   Ledger Green is the dominant colour (top bar, headings, primary buttons), Parchment the
   paper-like page, Stainless the neutral for borders, white for cards, and Terracotta a
   warm accent used sparingly — hairlines, section labels, small icons, never a large field.
   Every supporting tint below is derived from those, and every text/background pair the
   stylesheet uses is at least WCAG AA (4.5:1). base.html preconnects to the font hosts so
   this @import resolves early; the import stays here (not in a <link>) so standalone pages
   that link app.css directly still get the typeface. */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  /* Brand palette */
  --green: #2e3529;        /* Ledger Green — top bar, headings, primary buttons */
  --green-700: #3e4738;    /* hover on green (white text 9.7:1) */
  --paper: #f3eee1;        /* Parchment — the page */
  --stainless: #c2c8cc;    /* Stainless — the neutral: borders, quiet surfaces */
  --card: #ffffff;         /* cards */
  --accent: #bd5b33;       /* Terracotta — rules, icons; not for small text on light (3.9:1) */
  --accent-ink: #b5432b;   /* Terracotta as small text on white/Parchment (5.5 / 4.8:1) */
  --accent-soft: #e9a27f;  /* Terracotta on Ledger Green (6.0:1) — the top bar's accents */
  /* Derived */
  --link: #3d6b47;         /* links and interactive text: 6.2:1 on white, 5.3:1 on Parchment */
  --tint: #eef1e8;         /* hover / selection / info tint, from Ledger Green */
  --ink: #1f241b;          /* body text, a green-black */
  --muted: #5a6157;        /* secondary text: 5.5:1 on Parchment, 6.6:1 on white */
  --line: #dfe1dc;         /* card borders */
  --line-soft: #e4e5df;    /* row rules */
  --line-strong: var(--stainless);
  --border: var(--line);   /* alias some inline template styles use */
  --thead: #ecede5;        /* table header */
  --zebra: #faf8f3;        /* alternate rows: a whisper of Parchment */
  --bg: var(--paper);
  --good: #1f7a45;
  --good-bg: #e7f4ec;
  --warn: #9a5b00;
  --warn-bg: #fdf3e2;
  --bad: #b3261e;
  --bad-bg: #fbeae9;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(31,36,27,.05), 0 2px 6px rgba(31,36,27,.05);
  --shadow-md: 0 6px 18px rgba(31,36,27,.14);
  --focus: 0 0 0 3px rgba(61,107,71,.28);
  /* Status tones (templating.py `tone` filter): one tint + one ink per meaning, each ink
     at least 4.5:1 on its tint. */
  --tone-neutral-bg: #eeeee8; --tone-neutral: #474d43;
  --tone-wait-bg: #fdf0d5;    --tone-wait: #855000;
  --tone-active-bg: #e3eefb;  --tone-active: #1c5591;
  --tone-review-bg: #efe7fb;  --tone-review: #5b34a0;
  --tone-ready-bg: #d8f0f5;   --tone-ready: #0b5c70;
  --tone-off-bg: #f1f0eb;     --tone-off: #5e6459;
  --display: 'Poppins', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sans: 'Poppins', -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Column flex so the footer sits at the bottom of short pages (login, an empty list)
   instead of floating mid-screen. .content / .portal-shell take the slack. */
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--sans); color: var(--ink); background: var(--bg);
  font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Keyboard focus is always visible; a mouse click leaves no ring behind. */
a:focus-visible, summary:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
/* The ring's rounded corners, at a specificity any class rule outranks: a focused chip or
   pill link keeps its own shape instead of snapping to a 3px box. */
:where(a, summary):focus-visible { border-radius: 3px; }
/* Poppins Bold for headlines, Medium for subheads, Regular for body (the kit's scale). */
h1, h2, h3, h4 { font-family: var(--display); color: var(--green); margin: 0 0 .45em;
  font-weight: 500; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 700; } h2 { font-size: 1.18rem; font-weight: 600; }
h3 { font-size: 1rem; }
/* Section labels, as the kit sets them: small, uppercase, tracked, Terracotta (the darker
   ink, so it holds 4.5:1 on white and Parchment). */
.section-label { color: var(--accent-ink); font-size: .7rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; line-height: 1.3; }
summary { cursor: pointer; }
::selection { background: #dce5d3; }

/* Top bar: Ledger Green with a thin Terracotta hairline. The full logo lockup would be far
   under its 60px minimum here, so the bar carries the icon-only mark beside a text
   wordmark set in Poppins Bold, widely tracked, as the kit sets it; the section label
   ("Back Office") follows after a rule. The current module's link is marked (base.html
   sets .active from the request path) so a page always says where it lives. */
.topbar { display: flex; align-items: center; gap: 1rem; background: var(--green); color: #fff;
  padding: 0 1.25rem; min-height: 60px; border-bottom: 2px solid var(--accent); }
.topbar a { color: #c9d1c3; }
.topbar .brand { display: flex; align-items: center; gap: .85rem; flex: 0 0 auto; }
.topbar .brand a { display: flex; align-items: center; gap: .6rem; color: #fff; }
.topbar .brand a:hover { text-decoration: none; }
.topbar .brand-mark { height: 34px; width: auto; display: block; }
.topbar .wordmark { font-weight: 700; font-size: .95rem; letter-spacing: .32em;
  margin-right: -.32em; line-height: 1; color: #fff; }
.topbar .brand .section-label { color: var(--accent-soft); font-size: .66rem; letter-spacing: .16em;
  text-transform: uppercase; font-weight: 600; line-height: 1.2;
  padding-left: .85rem; border-left: 1px solid rgba(255,255,255,.2); white-space: nowrap; }
.topbar nav { display: flex; flex-wrap: wrap; gap: .1rem; flex: 1 1 auto; padding: .35rem 0; }
.topbar nav a { display: inline-block; padding: .36rem .55rem; border-radius: var(--radius-sm);
  font-weight: 500; font-size: .86rem; white-space: nowrap; line-height: 1.2;
  transition: background .12s, color .12s; }
.topbar nav a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.topbar nav a.active { color: #fff; background: rgba(255,255,255,.1);
  box-shadow: inset 0 -2px 0 var(--accent-soft); }
.topbar a:focus-visible { outline-color: var(--accent-soft); }
.userbox { display: flex; align-items: center; gap: .9rem; flex: 0 0 auto;
  font-size: .8rem; color: #b9c2b3; white-space: nowrap; }
.userbox .who { display: flex; align-items: center; gap: .55rem; }
.userbox .avatar { min-width: 30px; height: 30px; padding: 0 .35rem; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(233,162,127,.6);
  color: var(--accent-soft); font-weight: 700; font-size: .68rem; letter-spacing: .05em;
  display: inline-flex; align-items: center; justify-content: center; }
.userbox .who-text { display: flex; flex-direction: column; }
.userbox .who-name { color: var(--paper); font-weight: 600; line-height: 1.15; }
.userbox .who-role { color: #b0b9aa; font-size: .64rem; text-transform: uppercase;
  letter-spacing: .1em; line-height: 1.2; }
.userbox .btn-link { color: #c9d1c3; text-decoration: none; }
.userbox .btn-link:hover { color: #fff; text-decoration: underline; }
/* Nine module links, the wordmark and the account box share one row only on a wide
   window. Narrower, things step aside in order — the section label, then the name beside
   the avatar — and below 1280px the links move to a second line of their own that
   scrolls sideways (never a wrapped block of links, never a clipped one). The strip
   bleeds to the edges so a half-visible last link hints there is more to swipe. */
@media (max-width: 1500px) { .topbar .brand .section-label { display: none; } }
@media (max-width: 1280px) {
  .userbox .who-text { display: none; }
  .topbar { flex-wrap: wrap; gap: 0 .75rem; min-height: 0; }
  .topbar .brand { flex: 1 1 auto; padding: .6rem 0; }
  .userbox { padding: .6rem 0; }
  .topbar nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin: 0 -1.25rem; padding: 0 1.25rem .45rem; }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a { flex: 0 0 auto; }
}

.content { width: 100%; max-width: 1120px; margin: 1.75rem auto 2.5rem; padding: 0 1.5rem; flex: 1 0 auto; }
.content.wide { max-width: 96vw; padding: 0 1rem; }   /* dashboard: use nearly the full window width */

/* Cards: white on the Parchment page, bound along the top edge in Ledger Green so a page
   reads as a set of bound panels rather than boxed text. A card whose first child is its
   title (an <h2>, or a .toolbar carrying one) also gets a header rule. */
.card { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--green);
  border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; box-shadow: var(--shadow-sm); }
.card h2 { margin-top: 0; }
.card > h2:first-child, .card > .toolbar:first-child { padding-bottom: .7rem;
  border-bottom: 1px solid var(--line-soft); margin-bottom: 1rem; }
/* A card with data-collapse folds to its header (static/cards.js): the ▾ in front of the
   title turns to ▸ and everything under the header goes — except an alert, which is
   there because something needs doing (an organizer parsed but no request made yet), and
   a fold is remembered across pages. The header's rule and gap go too, so a folded card
   is a single bar. !important on the margin: several headers set their own inline
   (style="margin-bottom:.5rem"), and a folded bar must close up. */
.card-title { cursor: pointer; user-select: none; }
.card-toggle { background: none; border: none; padding: 0; margin: 0 .45rem 0 0;
  cursor: pointer; color: var(--muted); font: inherit; font-size: .75em; line-height: 1;
  display: inline-block; width: 1em; vertical-align: .12em; transition: transform .12s; }
.card-toggle::before { content: "\25BE"; }
.card-title:hover .card-toggle { color: var(--green); }
.card.is-folded .card-toggle { transform: rotate(-90deg); }
.card.is-folded > :not(.card-head):not(.alert) { display: none; }
.card.is-folded > .card-head { border-bottom: none; padding-bottom: 0; margin-bottom: 0 !important; }
/* A record shown read-only until its Edit button opens the form (the client page's
   Details): columns of label/value pairs, a line each. The scoped [hidden] rule is needed
   because .btn's display would otherwise beat the attribute and leave Edit showing. */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .4rem 2rem; }
dl.info { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .3rem .9rem;
  align-items: baseline; margin: 0; align-content: start; }
dl.info dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
  color: var(--muted); }
dl.info dd { margin: 0; font-size: .92rem; overflow-wrap: anywhere; }
.client-info [hidden] { display: none !important; }
.client-info .is-changed:not([type="checkbox"]) { background: var(--warn-bg); border-color: #c98a2b; }
.client-info input[type="checkbox"].is-changed { outline: 2px solid #c98a2b; outline-offset: 1px; }
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* Stat tiles */
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.25rem; box-shadow: var(--shadow-sm); }
.stat .n { font-family: var(--display); font-size: 1.9rem; color: var(--green); font-weight: 600;
  line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .07em;
  font-weight: 600; margin-top: .3rem; }
.stat.warn .n { color: var(--warn); }

/* Tables. Headers are Ledger Green on a pale green tint with a firm rule beneath, and plain data tables
   stripe alternate rows so a long list reads as rows rather than a wash. The binder's own
   grids (tree, TB, statements, K-1, key/value and calendar tables) draw their own cells and
   opt out of the stripe. */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .65rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--green); font-weight: 700; }
thead th { background: var(--thead); border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
/* :where() keeps the stripe's specificity below the hover rule that follows it. */
:where(table:not(.wp-table):not(.fin-table):not(.kv):not(.k1-table):not(.timecal)) > tbody > tr:nth-child(even) { background: var(--zebra); }
tbody tr:hover { background: var(--tint); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
/* Dense rows: a client's statement transactions, where one statement is a few hundred
   lines and each should read as one line. Long descriptions clip with the full text on
   hover. */
table.dense th, table.dense td { padding: .14rem .4rem; font-size: .82rem; }
table.dense th { font-size: .66rem; }
table.dense td.nowrap { white-space: nowrap; }
table.dense td.desc { max-width: 26rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.dense .pill { padding: 0 .4rem; font-size: .68rem; }
/* A table that IS the card (class="card" style="padding:0"): round the header into the
   card's corners and drop the last row rule that would double the card's own border. */
.card > table:first-child > thead > tr:first-child > th:first-child,
.card > .table-scroll:first-child > table > thead > tr:first-child > th:first-child { border-top-left-radius: calc(var(--radius) - 1px); }
.card > table:first-child > thead > tr:first-child > th:last-child,
.card > .table-scroll:first-child > table > thead > tr:first-child > th:last-child { border-top-right-radius: calc(var(--radius) - 1px); }
.card > table:last-child > tbody > tr:last-child > td,
.card > .table-scroll:last-child > table > tbody > tr:last-child > td { border-bottom-color: transparent; }
/* On a phone base.html wraps each table in this so a wide table swipes sideways inside
   its card instead of stretching the whole page (the wrapper is not added on desktop). */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

/* Forms */
label { display: block; font-size: .8rem; color: #262c22; font-weight: 700; margin-bottom: .3rem; }
input, select, textarea { width: 100%; padding: .5rem .65rem; border: 1px solid #b4bab6;
  border-radius: var(--radius-sm); font: inherit; background: #fff; color: var(--ink);
  transition: border-color .12s, box-shadow .12s; }
input::placeholder, textarea::placeholder { color: #8e938a; }
/* Not on a disabled field: a locked field must not answer the pointer. :where() keeps the
   specificity level with :focus below, so a focused field keeps its focus border. */
input:hover:where(:not(:disabled)), select:hover:where(:not(:disabled)),
textarea:hover:where(:not(:disabled)) { border-color: #858c88; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--link); box-shadow: var(--focus); }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--green); }
/* Role-locked fields must LOOK locked, not just refuse focus (clients page edit tiers). */
input:disabled, select:disabled, textarea:disabled { background: #f2f1ec; color: #6b7280; cursor: not-allowed; }
.field { margin-bottom: 1rem; }
.row { display: flex; gap: 1rem; } .row > * { flex: 1; }
@media (max-width: 640px) { .row { flex-wrap: wrap; } .row > * { flex-basis: 100%; } }

/* Buttons. Primary is Ledger Green; secondary is quiet; .active marks the selected
   filter in a row of secondaries (work list, report tabs); .small fits toolbars. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--green); color: #fff; border: 1px solid var(--green);
  padding: .5rem 1rem; border-radius: var(--radius-sm); font: inherit; font-size: .9rem;
  font-weight: 600; line-height: 1.25; cursor: pointer; text-decoration: none;
  transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: var(--green-700); border-color: var(--green-700); color: #fff; text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:active:not(:disabled) { transform: translateY(1px); }
/* A button's label stays on one line where there is room for it ("Write off" beside a
   text box was folding in two). Phones keep wrapping: a long label must not widen the page. */
@media (min-width: 761px) { .btn { white-space: nowrap; } }
.btn.secondary { background: #fff; color: var(--green); border-color: #c2c8cc; }
.btn.secondary:hover { background: #f4f3ee; border-color: #a9b0b4; color: var(--green); }
.btn.secondary.active { background: var(--tint); border-color: var(--link); color: var(--green);
  box-shadow: inset 0 0 0 1px var(--link); }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: #962019; border-color: #962019; }
.btn.small { padding: .32rem .7rem; font-size: .82rem; }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-link { background: none; border: none; color: var(--link); cursor: pointer; padding: 0; font: inherit; }
.btn-link:hover { text-decoration: underline; }
.btn-link:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 3px; }
.btn-link.danger-link { color: var(--bad); }
/* A <button> no rule styles would otherwise be the browser's grey system button, which is
   what "Edit notes", "Delete work item" and the Books page's Add/Upload buttons were.
   Outside the binder (which has its own button look) a bare button, .ghost or .secondary
   is the quiet small button and .danger its red twin. :where() keeps these at the lowest
   specificity, so every component's own button rule still wins. */
:where(.content) :where(button:not([class]), button.ghost, button.secondary, button.danger) {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  font: inherit; font-size: .82rem; font-weight: 600; line-height: 1.25; cursor: pointer;
  background: #fff; color: var(--green); border: 1px solid #c2c8cc;
  border-radius: var(--radius-sm); padding: .32rem .7rem;
  transition: background .12s, border-color .12s; }
:where(.content) :where(button:not([class]), button.ghost, button.secondary):hover {
  background: #f4f3ee; border-color: #a9b0b4; }
:where(.content) :where(button.danger) { color: var(--bad); border-color: #e3b3af; }
:where(.content) :where(button.danger):hover { background: var(--bad-bg); border-color: var(--bad); }
:where(.content) :where(button:not([class]), button.ghost, button.secondary, button.danger):focus-visible {
  outline: none; box-shadow: var(--focus); }
:where(.content) :where(button:not([class]), button.ghost, button.secondary, button.danger):disabled {
  opacity: .55; cursor: not-allowed; }
/* Any author `display` outranks the browser's own [hidden] rule, so the look above would
   put a hidden button back on the page (the e-sign page's "Remove" for a lone signer). */
:where(.content) button[hidden] { display: none; }
button.linklike { background: none; border: none; padding: 0; font: inherit; color: var(--link);
  cursor: pointer; text-decoration: underline; }

/* Badges / pills */
.pill { display: inline-block; padding: .12rem .6rem; border-radius: 999px; font-size: .74rem;
  font-weight: 600; line-height: 1.5; white-space: nowrap; background: #edeee8; color: var(--green); }
.pill.review { background: var(--warn-bg); color: var(--warn); }
.pill.off { background: #eceefc; color: #44569b; }
.pill.muted { background: #eeeee8; color: var(--muted); }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.dup { background: #efe7fb; color: #6b3fb0; }
a.pill:hover { text-decoration: none; filter: brightness(.96); }
/* A solid red count that must not be missed: "6 overdue", "balance due $1,250.00". */
.pill.solid-bad { background: var(--bad); color: #fff; }
/* Status badges take their color from what the status means (the `tone` filter in
   templating.py), so a long column of them can be read without reading each word:
   grey = not started, amber = waiting on someone, blue = being worked, violet = in
   review, teal = ready for the next step, green = done, red = void / written off. The
   dot repeats the tone for anyone who can't tell the tints apart side by side. */
.pill[class*="tone-"]::before { content: ""; display: inline-block; width: .42em; height: .42em;
  border-radius: 50%; background: currentColor; margin-right: .4em; vertical-align: .1em; opacity: .85; }
.pill.tone-neutral { background: var(--tone-neutral-bg); color: var(--tone-neutral); }
.pill.tone-neutral::before { background: none; box-shadow: inset 0 0 0 1.5px currentColor; }
.pill.tone-wait { background: var(--tone-wait-bg); color: var(--tone-wait); }
.pill.tone-active { background: var(--tone-active-bg); color: var(--tone-active); }
.pill.tone-review { background: var(--tone-review-bg); color: var(--tone-review); }
.pill.tone-ready { background: var(--tone-ready-bg); color: var(--tone-ready); }
.pill.tone-done { background: var(--good-bg); color: var(--good); }
.pill.tone-off { background: var(--tone-off-bg); color: var(--tone-off); }
.pill.tone-off::before { background: none; box-shadow: inset 0 0 0 1.5px currentColor; }

/* Alerts */
.alert { padding: .75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem;
  border: 1px solid transparent; border-left-width: 4px; }
.alert.error { background: var(--bad-bg); color: var(--bad); border-color: #f0c7c4; border-left-color: var(--bad); }
.alert.warn { background: var(--warn-bg); color: var(--warn); border-color: #f0dcb5; border-left-color: var(--warn); }
.alert.info { background: var(--tint); color: var(--green-700); border-color: #d3dccb; border-left-color: var(--link); }
.alert.success { background: var(--good-bg); color: var(--good); border-color: #bfe3cc; border-left-color: var(--good); }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.right { text-align: right; }
.mono { font-variant-numeric: tabular-nums; }
.toolbar { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar form { display: flex; gap: .5rem; align-items: center; }
/* A form that IS the toolbar (filter rows): its fields size to their content instead of
   each taking the full width the default `width: 100%` gives them. Desktop only. */
@media (min-width: 761px) {
  form.toolbar > :is(select, input:not([type="checkbox"], [type="radio"], [type="hidden"])) {
    width: auto; flex: 0 1 auto; }
}
.toolbar > h1 { margin: 0; }
.spacer { flex: 1; }
/* Boxes whose text doesn't fit them. Every field defaults to `width: 100%`, so in a row of
   controls the browser squeezes each one until its own text is cut off ("All return ty…").
   The house fix is to set the text inside the box smaller rather than make the box bigger,
   and to keep labels and buttons in the row on one line.

   .compact goes on a form, row or table whose boxes are too small for their own text: a
   placeholder, the default choice, a file picker's "No file chosen". Desktop only: phones
   keep 16px field text, which stops iOS zooming into a field, and wrap toolbar rows
   instead. Fields are as tall as a .btn so a row of mixed controls lines up. */
@media (min-width: 761px) {
  .compact :is(input:not([type="checkbox"], [type="radio"], [type="file"]), select) {
    height: 2.25rem; font-size: .7rem; }
  .compact input:not([type="checkbox"], [type="radio"], [type="file"]) { padding: 0 .35rem; }
  .compact select { padding: 0 .1rem 0 .35rem; }   /* its arrow already brings ~20px of its own */
  .compact input[type="file"] { font-size: .7rem; }
  .compact :is(label, .btn, .btn-link) { white-space: nowrap; }
}
/* A dropdown listing the firm's own names (staff, billing groups, return types) can be
   given a choice longer than its box. In Chrome and Edge it then widens just enough to show
   the chosen text; until then, and in other browsers, it keeps its size. Desktop only,
   where there is room to widen into. */
@supports (field-sizing: content) {
  @media (min-width: 761px) {
    select:not([multiple], [size]) { field-sizing: content; min-width: max-content; }
  }
}

/* Clients list filter row: .compact text, fixed box sizes (7.5rem for a dropdown) and
   one-line checkbox labels. The whole row, "clear" link included, fits the 1072px content
   width; a narrower window wraps it between controls, never inside one. Phones keep the
   wider text boxes that 16px text needs. */
.client-filters > [name="q"] { width: 200px; }
.client-filters > [name="due"] { width: 90px; }
.client-filters > [name="letter"] { width: 56px; }
@media (min-width: 761px) {
  .toolbar form.client-filters { flex-wrap: wrap; gap: .35rem; }
  .client-filters > :is(input, select, label) { flex: none; }
  .client-filters > select { width: 7.5rem; }
  .client-filters > [name="q"] { width: 150px; }
  .client-filters > [name="due"] { width: 80px; }
  .client-filters > [name="letter"] { width: 50px; }
  .client-filters > label { font-size: .7rem; }
  .client-filters > label > input[type="checkbox"] { margin: 0; }
  .client-filters > .btn-link { font-size: .75rem; }
}

/* Footer, shared by every staff page */
.site-footer { text-align: center; padding: 1.25rem 1rem; color: var(--muted); font-size: .8rem;
  border-top: 1px solid var(--line); }
.site-footer a { color: var(--green); }

/* Sign-in and the other pre-login screens: the page is Ledger Green, so the white lockup
   (never under 60px tall) sits directly on it with clear space around it, and the form
   floats on one white card. */
.login-page { background: var(--green); }
.login-wrap { width: 100%; max-width: 420px; margin: 8vh auto 3vh; padding: 0 .5rem; }
.login-wrap .brand { text-align: center; margin-bottom: 2rem; padding-top: .5rem; }
.login-wrap .brand-logo { height: 150px; width: auto; max-width: 100%; margin: 0 auto; display: inline-block; }
.login-wrap .brand .section-label { display: block; margin-top: .9rem; color: var(--accent-soft);
  font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.login-wrap .card { padding: 1.6rem 1.75rem 1.75rem; }
/* The sign-in card keeps a Terracotta rule under the heading instead of the cap, so the two
   don't double up on one small card. */
.login-page .login-wrap .card { border: 1px solid rgba(255,255,255,.1); box-shadow: 0 8px 28px rgba(0,0,0,.22); }
.login-wrap .card > h2:first-child { border-bottom: none; padding-bottom: 0; margin-bottom: 1.1rem; font-size: 1.35rem; }
.login-wrap .card > h2:first-child::after { content: ""; display: block; width: 2.25rem; height: 2px;
  background: var(--accent); margin-top: .55rem; }
.login-page .site-footer { color: rgba(255,255,255,.72); border-top-color: rgba(255,255,255,.1); }
.login-page .site-footer a { color: #fff; }

/* Client portal shell (portal/base.html) */
.portal-shell { width: 100%; max-width: 760px; margin: 0 auto; padding: 1rem 1rem 2rem; flex: 1 0 auto; }
.portal-brand { text-align: center; margin: 1.75rem 0 1.75rem; }
.portal-brand a { display: inline-block; }
.portal-brand img { height: 120px; width: auto; display: block; margin: 0 auto; }
.portal-brand .section-label { display: block; margin-top: .75rem; }
.portal-who { justify-content: space-between; }
.portal-footer { text-align: center; margin: 2.5rem 0 1rem; line-height: 1.6; }
.portal-menu { padding-left: 1.1rem; line-height: 1.5; }
.portal-menu li { margin-bottom: .55rem; }
.portal-menu a { font-weight: 600; }
/* The public legal pages (/privacy, /terms): the portal shell, one long card of prose. */
.card.legal { line-height: 1.65; padding: 1.75rem 2rem; }
.card.legal h2 { margin-top: 1.6rem; border: none; padding: 0; }
.card.legal > h1 + .muted { margin-top: -.2rem; }
.card.legal ul { padding-left: 1.2rem; }
.card.legal li { margin-bottom: .4rem; }

@media print { .site-footer { display: none; } body { background: #fff; display: block; } }

/* ============================ Engagement binder ============================
   Scoped under .binder-page so none of these rules bleed into other screens.
   Uses the host palette variables (green/link/line/muted/good/bad). */
/* The page sits centred in the (nearly full-width) content area: the tree is capped at
   70rem below, so the page itself is capped at tree + notes pane + gap and the whole
   thing floats to the middle instead of hugging the left edge of a wide window. */
.binder-page { max-width: calc(70rem + 300px + 1.25rem); margin: 0 auto; }
.binder-page .two-col { display: grid; grid-template-columns: 1fr 300px; gap: 1.25rem; }
.binder-page .binder-grid { display: grid; grid-template-columns: 1fr 300px; gap: 1.25rem; }
/* The workpaper tree needs its width (see .wp-name-cell): under 1200px the notes pane
   narrows, and under 1100px — half a 1920px monitor — it moves below the tree, which
   otherwise has no room left for a workpaper's name beside seven fixed columns. */
@media (max-width: 1200px) { .binder-page .binder-grid { grid-template-columns: minmax(0, 1fr) 240px; } }
@media (max-width: 1100px) { .binder-page .binder-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .binder-page .two-col, .binder-page .binder-grid { grid-template-columns: 1fr; } }
.binder-page .small { font-size: .8rem; }
.binder-page .crumb { margin: 0; font-size: .82rem; color: var(--muted); }
.binder-page .search-bar { display: flex; gap: .4rem; }
.binder-page .search-bar input { flex: 0 1 360px; }

/* binder uses bare <button> in popovers/forms — give them the host button look
   (but never restyle host .btn buttons that appear on binder pages) */
.binder-page button:not(.btn) {
  font: inherit; font-size: .82rem; cursor: pointer; background: var(--green); color: #fff;
  border: 1px solid var(--green); border-radius: 6px; padding: .3rem .7rem; }
.binder-page button.ghost, .binder-page button.danger { background: #fff; }
.binder-page button.ghost { color: var(--green); }
.binder-page button.danger { color: var(--bad); border-color: var(--bad); }
.binder-page .ghost-link { font-size: .82rem; }
/* links sitting in the binder header toolbar (Trial balance, Binder PDF, Audit trail) are
   peers of the buttons next to them — give them the same box so the row reads as one set */
.binder-page .binder-status .ghost-link {
  display: inline-block; text-decoration: none; line-height: 1.2;
  background: #fff; color: var(--green); border: 1px solid var(--green);
  border-radius: 6px; padding: .3rem .7rem; }
.binder-page .binder-status .ghost-link:hover { background: var(--green); color: #fff; }
.binder-page .pill { display: inline-block; font-size: .72rem; padding: .1rem .5rem;
  border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; }
.binder-page .pill.locked { background: var(--green); border-color: var(--green); color: #fff; }

.binder-page .client-head { display: flex; gap: .6rem; align-items: center; margin-bottom: .4rem; }
.binder-page .client-no { font-variant-numeric: tabular-nums; color: var(--link); font-weight: 700; }
.binder-page table.flat { width: 100%; border-collapse: collapse; }
.binder-page table.flat td { padding: .22rem .4rem .22rem 0; border-bottom: 1px solid #ecede7; }
/* A row that opens something should look like it does. */
.binder-page tr.row-open { cursor: pointer; }
.binder-page tr.row-open:hover td { background: var(--tint); }
.binder-page tr.row-open:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }

.binder-page .binder-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; }
.binder-page .binder-status { display: flex; gap: .6rem; align-items: center; }

/* the binder tree — the signature element. Drawn the way CCH Engagement draws its
   binder: compact single-line rows, classic +/− expander boxes with dotted guide
   lines, a folder icon per section and a file-type icon per workpaper, sign-offs as
   green "AB 6/15/26" text in fixed columns, modified date on the right. */
.binder-page .tree { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: .35rem .55rem .9rem; font-size: .875rem;
  /* capped so the sign-off/date columns sit near the names instead of drifting to the
     far edge of a wide window */
  max-width: 70rem; }
.binder-page .tree-cols { margin: 0 0 .1rem; }
.binder-page .tree-tools { display: flex; gap: .9rem; justify-content: flex-end;
  padding: .05rem .3rem 0; }
.binder-page .tree-tools .linklike { text-decoration: none; }
.binder-page .tree-tools .linklike:hover { text-decoration: underline; }
.binder-page .sec .sec { margin-left: .6rem; border-left: 1px dotted #b3b8ae; padding-left: .8rem; }
.binder-page .sec > summary { display: flex; align-items: center; gap: .35rem; list-style: none;
  padding: .1rem .3rem; cursor: pointer; border-radius: 3px; font-weight: 600; color: var(--green);
  line-height: 1.35; }
.binder-page .sec > summary::-webkit-details-marker { display: none; }
/* classic tree expander: a small bordered box showing + (closed) / − (open) */
.binder-page .sec > summary::before { content: "+"; flex: 0 0 auto; width: 13px; height: 13px;
  line-height: 11px; text-align: center; font-size: 11px; font-weight: 600; color: #4e5549;
  background: #fff; border: 1px solid #a3a89e; border-radius: 2px;
  font-family: Consolas, monospace; }
.binder-page .sec[open] > summary::before { content: "−"; }
.binder-page .sec > summary:hover { background: var(--tint); }
.binder-page .idx { font-variant-numeric: tabular-nums; color: var(--link); display: inline-block; min-width: 3.2em; font-weight: 700; }
.binder-page .sec-body { padding: 0 0 .2rem 1.35rem; }
.binder-page .sec-actions { margin-left: auto; opacity: .35; }
.binder-page .sec > summary:hover .sec-actions { opacity: 1; }
.binder-page .sec-actions summary { font-weight: 400; }

/* folder / file-type icons (inline SVG so there's nothing to fetch) */
.binder-page .ficon { display: inline-block; width: 15px; height: 15px; flex: 0 0 auto;
  vertical-align: -2px; margin-right: .25rem;
  background-repeat: no-repeat; background-position: center; background-size: contain; }
.binder-page .ficon.folder { width: 16px; height: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M1 3.6h4.8l1.3 1.7H15v8.7H1z' fill='%23f7c94b' stroke='%23977010' stroke-width='.9'/><path d='M1 3.6h2.4v10.4H1z' fill='%23c0392b'/></svg>"); }
.binder-page .sec[open] > summary .ficon.folder {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M1 3.6h4.8l1.3 1.7H15v8.7H1z' fill='%23eab52c' stroke='%23977010' stroke-width='.9'/><path d='M4 7h11.6l-2.3 7H1.6z' fill='%23ffe28f' stroke='%23977010' stroke-width='.9'/><path d='M1 3.6h2.4v10.4H1z' fill='%23c0392b'/></svg>"); }
.binder-page .ficon.excel {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 1h6.8L13 3.7V15H3.5z' fill='white' stroke='%23808c99' stroke-width='.9'/><path d='M10.3 1v2.7H13z' fill='%23dde3ea' stroke='%23808c99' stroke-width='.7'/><path d='M5.2 6.8h6v5.4h-6z' fill='none' stroke='%231f8a4c' stroke-width='.9'/><path d='M5.2 9.5h6M8.2 6.8v5.4' stroke='%231f8a4c' stroke-width='.7'/></svg>"); }
.binder-page .ficon.word {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 1h6.8L13 3.7V15H3.5z' fill='white' stroke='%23808c99' stroke-width='.9'/><path d='M10.3 1v2.7H13z' fill='%23dde3ea' stroke='%23808c99' stroke-width='.7'/><path d='M5.4 7h5.2M5.4 9.2h5.2M5.4 11.4h3.6' stroke='%232b579a' stroke-width='1.2'/></svg>"); }
.binder-page .ficon.pdf {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 1h6.8L13 3.7V15H3.5z' fill='white' stroke='%23808c99' stroke-width='.9'/><path d='M10.3 1v2.7H13z' fill='%23dde3ea' stroke='%23808c99' stroke-width='.7'/><path d='M5.4 7h5.2M5.4 9.2h5.2M5.4 11.4h3.6' stroke='%23c0392b' stroke-width='1.2'/></svg>"); }
.binder-page .ficon.image {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 1h6.8L13 3.7V15H3.5z' fill='white' stroke='%23808c99' stroke-width='.9'/><path d='M10.3 1v2.7H13z' fill='%23dde3ea' stroke='%23808c99' stroke-width='.7'/><circle cx='6.3' cy='7.6' r='1' fill='%237d4bb8'/><path d='M4.8 12.2l2.2-2.6 1.5 1.5 1.7-2.2 1.4 3.3z' fill='%237d4bb8'/></svg>"); }
.binder-page .ficon.file {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 1h6.8L13 3.7V15H3.5z' fill='white' stroke='%23808c99' stroke-width='.9'/><path d='M10.3 1v2.7H13z' fill='%23dde3ea' stroke='%23808c99' stroke-width='.7'/><path d='M5.4 7h5.2M5.4 9.2h5.2M5.4 11.4h3.6' stroke='%23708090' stroke-width='1.2'/></svg>"); }

.binder-page .wp-table { width: 100%; border-collapse: collapse; margin: 0; }
.binder-page .wp-table th { text-align: center; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: .12rem .35rem; }
.binder-page .wp-table th:first-child { text-align: left; }
/* no row rules — the tree reads as one continuous list; hover carries the row */
.binder-page .wp-table td { padding: .12rem .35rem; border-bottom: none; vertical-align: top;
  line-height: 1.45; }
.binder-page .wp-table tr:hover td { background: var(--tint); }
.binder-page .wp-table .idx { min-width: 0; }
/* width:1% shrinks the index column to its content, so the name starts right after it */
.binder-page .wp-table td.idx { width: 1%; white-space: nowrap; padding-right: .55rem; }
.binder-page .col-stamp { width: 7rem; text-align: center; white-space: nowrap; }
.binder-page .col-idx { width: 5.5rem; }
.binder-page .col-actions { width: 2rem; }
.binder-page .col-notes { width: 3.4rem; text-align: center; }
.binder-page .col-mod { width: 6.5rem; text-align: right; color: var(--link);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
/* The workpaper name never wraps: a long one ends in "…" (its tooltip has the full name).
   width:100% + max-width:0 hands the name column whatever the other columns leave
   instead of growing it to fit the longest name; the min-widths stop it taking that from
   the sign-off columns, which must stay under their header. The name keeps a 9rem run
   before it gives way: when the row furniture after it (history, Download, Check in, a
   signature pill) doesn't fit beside that, the furniture wraps onto a second line under
   the name. It never squeezes the name to nothing or spills over the sign-off cells.
   Nothing clips here — the history popover hangs off this cell. */
.binder-page .wp-table td.wp-name-cell { width: 100%; max-width: 0; }
.binder-page .tree .col-stamp { min-width: 7rem; }
.binder-page .tree .col-mod { min-width: 6.5rem; }
.binder-page .tree .col-notes { min-width: 3.4rem; }
.binder-page .tree .col-actions { min-width: 2rem; }
.binder-page .wp-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .35rem;
  white-space: nowrap; }
.binder-page .wp-line > * { flex: none; }
.binder-page .wp-line .ficon { align-self: center; margin-right: 0; }
.binder-page .wp-line > .wp-label, .binder-page .wp-line > .checkout-form { flex: 1 1 9rem;
  min-width: 0; max-width: max-content; }
.binder-page .wp-line .wp-label { display: block; overflow: hidden; text-overflow: ellipsis; }
.binder-page .wp-line .checkout-form .wp-label { max-width: 100%; }
.binder-page .wp-line .inline-edit { margin-left: 0; }
/* A window under ~1200px wide has too little left for the name once seven fixed columns
   are paid for: the columns close up to what a stamp ("AD 10/28/26") and a date need,
   and the notes pane narrows and then moves below the tree (.binder-grid above). */
@media (max-width: 1200px) {
  .binder-page .col-stamp, .binder-page .tree .col-stamp { width: 5.8rem; min-width: 5.8rem; }
  .binder-page .col-mod, .binder-page .tree .col-mod { width: 5.4rem; min-width: 5.4rem; }
}
/* "history" is a <summary> (display:list-item by default) — inline keeps the row one line */
.binder-page .ver-hist > summary { display: inline; }
/* secondary row furniture (history / Download / Check in) stays out of the way until
   the row is pointed at — the row itself stays a single clean line */
.binder-page .wp-table td .ver-hist, .binder-page .wp-table td a.small,
.binder-page .wp-table td .inline-edit { opacity: .3; transition: opacity .12s; }
.binder-page .wp-table tr:hover td .ver-hist, .binder-page .wp-table tr:hover td a.small,
.binder-page .wp-table tr:hover td .inline-edit,
.binder-page .wp-table tr:focus-within td .ver-hist, .binder-page .wp-table tr:focus-within td a.small,
.binder-page .wp-table tr:focus-within td .inline-edit { opacity: 1; }
/* the check-out form IS the name for an Office file, so it is not row furniture to fade */
.binder-page .wp-table td .checkout-form { opacity: 1; }
.binder-page .stamp { display: inline-block; background: var(--tint); color: var(--green);
  border: 1px solid var(--link); border-radius: 3px; font-size: .72rem; font-weight: 700; padding: 0 .3rem; }
.binder-page .stamp.out { background: var(--warn-bg); border-color: #c98a2b; color: #7a5416; text-decoration: none; }
.binder-page .inline-edit { display: inline; margin-left: .25rem; }
.binder-page button.linklike { background: none; border: none; padding: 0; cursor: pointer;
  color: var(--link); font-size: .78rem; text-decoration: underline; }
.binder-page button.linklike:hover { color: var(--green); background: none; }
.binder-page button.linklike.wp-name { font-size: inherit; text-decoration: none; }
.binder-page button.linklike.wp-name:hover { text-decoration: underline; }

/* sign-off cells: a signed one reads "AB 6/15/26" in green on one line, the way a
   CCH sign-off column does. The whole thing is still the same button (click to unsign). */
/* button.stampbtn out-specifies the host `button:not(.btn)` look above */
.binder-page button.stampbtn, .binder-page span.stampbtn { background: none; border: none;
  padding: 0; cursor: pointer; font: inherit; color: inherit;
  display: inline-flex; align-items: baseline; gap: .3rem; white-space: nowrap; }
.binder-page span.stampbtn { cursor: default; }
.binder-page .stampbtn.signed .stamp { background: none; border: none; padding: 0;
  color: var(--good); font-size: .82rem; font-weight: 700; }
.binder-page .stamp-date { display: inline; margin: 0; font-size: .8rem;
  color: var(--good); font-weight: 600; background: none;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.binder-page .stampbtn.signed:hover .stamp, .binder-page button.stampbtn.signed:hover .stamp-date {
  color: var(--bad); }
/* Stale = signed before the file was last edited: amber with a warning mark until the
   signer re-signs (clicking your own stale stamp re-dates it). */
.binder-page .stampbtn.stale .stamp, .binder-page .stampbtn.stale .stamp-date { color: #a8661c; }
.binder-page .stampbtn.stale .stamp-date::after { content: " \26A0"; }
/* clicking your own stale stamp re-signs, so its hover says "sign", not the red "remove" */
.binder-page button.stampbtn.resign:hover .stamp,
.binder-page button.stampbtn.resign:hover .stamp-date { color: var(--good); }
/* Unsigned = an empty box you click to sign; faint until the row is hovered. */
.binder-page button.stampbtn.empty { color: transparent; background: #fff;
  border: 1px dashed var(--line); border-radius: 3px;
  width: 1.9rem; height: 1.1rem; align-items: center; justify-content: center; font-size: .7rem; }
.binder-page .wp-table tr:hover button.stampbtn.empty { color: var(--muted); }
.binder-page button.stampbtn.empty:hover { color: var(--green); border-color: var(--link); background: var(--tint); }

/* Popovers, site-wide (behavior in popovers.js). The work and client pages use the same
   <details class="popover"> markup as the binder, but these base rules were binder-only —
   so there the panel rendered inline, shoved the layout apart, and looked impossible to
   dismiss (the review-note form complaint). Kept at single-class specificity so the
   .binder-page refinements below still win on binder pages. */
.popover { position: relative; }
.popover > summary { list-style: none; cursor: pointer; }
.popover > summary::-webkit-details-marker { display: none; }
.pop-body { position: absolute; right: 0; z-index: 10; min-width: 280px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(31,36,27,.14); padding: .7rem .8rem; text-align: left; }
/* A panel holding a real form needs form width, not menu width (falls back to the
   280px floor on browsers without :has — still usable, just narrow). */
.pop-body:has(form) { width: min(30rem, 92vw); max-height: min(34rem, 78vh); overflow-y: auto; }

/* per-workpaper review notes + popovers */
.binder-page .notes-sum { color: var(--muted); font-size: .8rem; }
.binder-page .notes-sum:hover { color: var(--link); }
.binder-page .note-count { display: inline-block; min-width: 1.1rem; padding: 0 .25rem;
  background: var(--green); color: #fff; border-radius: 999px; font-size: .7rem; font-weight: 700; text-align: center; }
.binder-page .wp-note { border-bottom: 1px solid var(--line); padding: .3rem 0 .4rem; margin-bottom: .4rem; }
.binder-page .wp-note p { margin: .2rem 0; }
.binder-page .col-notes .pop-body { min-width: 260px; text-align: left; }
.binder-page .popover { position: relative; }
.binder-page .popover > summary { list-style: none; cursor: pointer; padding: 0 .3rem; color: var(--muted); }
.binder-page .popover > summary::-webkit-details-marker { display: none; }
.binder-page .pop-body { position: absolute; right: 0; z-index: 10; min-width: 280px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 18px rgba(31,36,27,.14); padding: .6rem .7rem; }
/* A popover holding a real form needs room to be read while it's filled in — 280px is a
   menu width, not a form width. Capped to the viewport so it can't run off a small screen. */
.binder-page .pop-form .pop-body { width: min(34rem, 92vw); max-height: min(34rem, 78vh);
  overflow-y: auto; padding: .8rem .9rem; }
.binder-page .pop-form .pop-body textarea { min-height: 4.5rem; }
.binder-page .pop-form .pop-body label { margin-bottom: .7rem; }
.binder-page .pop-rule { border: none; border-top: 1px solid var(--line); margin: .5rem 0; }
.binder-page .row-form { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: .25rem 0; }
/* A .stack form stacks — including inside a .toolbar, whose `form { display: flex }` would
   otherwise fold a whole popover form onto one line and crush every field to a few
   characters wide. The second selector out-specifies `.toolbar form`. */
form.stack, .toolbar form.stack { display: block; }
.binder-page .stack label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: .6rem; }
.binder-page .stack label input, .binder-page .stack label select, .binder-page .stack label textarea { display: block; width: 100%; margin-top: .15rem; }
.binder-page .inline-form > summary { font-size: .8rem; color: var(--link); cursor: pointer; padding: .2rem .4rem; }
.binder-page .notes-sum { opacity: .35; }
.binder-page .wp-table tr:hover .notes-sum, .binder-page .col-notes .popover[open] .notes-sum,
.binder-page .notes-sum:has(.note-count) { opacity: 1; }
.binder-page .top-add { margin-top: .6rem; }
.binder-page .notes-pane .note p { margin: .3rem 0; }

/* Review-note replies. Not scoped to .binder-page: the same thread renders on the work
   item's Review card, and the two pages must not drift into looking like different
   features. The left rule is the whole visual idea — a reply is indented under the point
   it answers, so a note with three replies reads as one conversation rather than four
   equal entries. */
.note-thread { margin: .35rem 0 .4rem; border-left: 2px solid var(--line); padding-left: .55rem; }
.note-reply + .note-reply { margin-top: .35rem; border-top: 1px dotted var(--line); padding-top: .35rem; }
.note-reply-who { font-weight: 600; }
.note-reply-body { white-space: pre-wrap; margin: .1rem 0 0; }
.note-reply-form > summary { cursor: pointer; color: var(--link); font-size: .8rem;
  list-style: none; display: inline-block; padding: .1rem 0; }
.note-reply-form > summary::-webkit-details-marker { display: none; }
.note-reply-form > summary::before { content: "↩ "; }
.note-reply-form[open] > summary { color: var(--muted); }
.note-reply-form form { margin: .3rem 0 .2rem; }
.note-reply-form textarea { display: block; width: 100%; margin-bottom: .3rem; }
.binder-page .drop-hint { margin: .2rem .4rem .4rem; }

/* drag-and-drop upload, and dragging a workpaper row into another folder */
.binder-page .sec.drop-target > summary { background: var(--tint); outline: 2px dashed var(--link); outline-offset: -2px; }
/* The grab cursor is the only hint that a row moves, so it sits on the row itself —
   but not over the links, buttons and fields inside it, which do their own thing. */
.binder-page tr.wp-row { cursor: grab; }
.binder-page tr.wp-row a, .binder-page tr.wp-row button, .binder-page tr.wp-row summary,
.binder-page tr.wp-row input, .binder-page tr.wp-row textarea, .binder-page tr.wp-row select { cursor: pointer; }
.binder-page tr.wp-row input, .binder-page tr.wp-row textarea { cursor: text; }
.binder-page tr.wp-row.dragging { cursor: grabbing; }
.binder-page tr.wp-row.dragging td { opacity: .45; background: var(--tint); }
.binder-page tr.hl td { background: var(--tint); }
.binder-page #drop-dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; min-width: 540px;
  box-shadow: 0 10px 30px rgba(31,36,27,.25); }
.binder-page #drop-dialog::backdrop { background: rgba(31,36,27,.35); }
.binder-page .drop-row { display: grid; grid-template-columns: minmax(0,1fr) 110px 230px; gap: .45rem; align-items: center; margin-bottom: .45rem; }
.binder-page .drop-row.drop-head span { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.binder-page .drop-file { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.binder-page .tb-table .num, .binder-page .wp-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.binder-page .tb-table th.num { text-align: right; }
.binder-page .tb-total td { border-top: 1px solid var(--green); font-weight: 700; }

/* The TB grid reads like a spreadsheet: gridlines around every cell on a white sheet,
   a shaded header row that freezes at the top of the window while you scroll, and a
   Total row pinned at the bottom until you reach it — Excel's frozen panes. separate
   borders (not collapse) so each border travels with its cell when it sticks; clip
   (not hidden/auto) so the card's rounded corners crop the grid WITHOUT becoming the
   scroll container, which would trap the sticky rows inside the card. */
.binder-page .tb-sheet { padding: 0; overflow: clip; }
.binder-page .tb-table { border-collapse: separate; border-spacing: 0; font-size: .85rem; }
.binder-page .tb-table th, .binder-page .tb-table td {
  border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.binder-page .tb-table th:last-child, .binder-page .tb-table td:last-child { border-right: none; }
.binder-page .tb-table td { background: #fff; padding: .3rem .5rem; }
/* .idx is inline-block for the binder tree; on a real grid cell that cracks the cell
   open (background and gridline stop at the number, row hover bleeds through the gap) */
.binder-page .tb-table td.idx { display: table-cell; }
.binder-page .tb-table thead th { position: sticky; top: 0; z-index: 3;
  background: linear-gradient(#faf9f5, #eeede6); border-bottom: 1px solid #c9ccc4;
  padding: .34rem .5rem; }
.binder-page .tb-table tr.tb-total td { position: sticky; bottom: 0; z-index: 2;
  background: #f6f5f0; border-top: 2px solid var(--green); }

/* click-to-sum: any parseable amount cell toggles into a running Sum/Count/Avg,
   read off a floating bar — Excel's status bar for tying out on screen */
td.summable { cursor: cell; }
td.num.sum-sel { background: #dce5d3; box-shadow: inset 0 0 0 1px var(--link); }
/* TB cells carry an opaque background, so the selection tint must out-rank it */
.binder-page .tb-table td.sum-sel { background: #dce5d3; }
.sum-bar[hidden] { display: none; }
.sum-bar { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 1.1rem; background: var(--green); color: #fff;
  border-radius: 999px; padding: .45rem 1.1rem; font-size: .85rem; z-index: 60;
  box-shadow: 0 6px 18px rgba(31,36,27,.35); white-space: nowrap; }
.sum-bar .sum-bar-stat strong { font-variant-numeric: tabular-nums; margin-left: .3rem; }
.sum-bar .sum-bar-hint { font-size: .72rem; opacity: .65; }
.sum-bar .sum-clear { background: transparent; border: none; color: #fff; font-size: 1rem;
  cursor: pointer; padding: 0 .1rem; line-height: 1; opacity: .75; }
.sum-bar .sum-clear:hover { opacity: 1; }

/* prior-year columns sit apart from the current year's figures */
.binder-page .tb-table .py { background: #f8f7f3; color: var(--muted); }
.binder-page .tb-table th.py { color: var(--muted); }
.binder-page .tb-actions { margin: .25rem 0 .4rem; align-items: baseline; }

/* retained-earnings rollforward panel — the verdict is carried by the figure, not chrome */
.binder-page .rollfwd { padding: .55rem .8rem; margin: .3rem 0 .6rem; max-width: 34rem; }
.binder-page .rollfwd-table { font-size: .84rem; margin-top: .3rem; }
.binder-page .rollfwd-table td:last-child { text-align: right;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.binder-page .rollfwd.break .tb-total td { color: var(--bad); }

/* editable TB grid: inputs that read as cells until focused, so the table still scans
   as a trial balance rather than as a form. cell-in means "unlocked by Edit mode";
   wpref-quick looks the same but is live all the time, so it is deliberately not one. */
.binder-page .tb-table .cell-in,
.binder-page .tb-table .wpref-quick { font: inherit; font-size: .82rem; width: 100%;
  padding: .12rem .25rem; border: 1px solid transparent; border-radius: 4px;
  background: transparent; color: inherit; }
.binder-page .tb-table .cell-in:hover,
.binder-page .tb-table .wpref-quick:hover { border-color: var(--line); background: #fff; }
.binder-page .tb-table .cell-in:focus,
.binder-page .tb-table .wpref-quick:focus { border-color: var(--link); background: #fff;
  outline: 2px solid rgba(61,107,71,.2); outline-offset: 0; }
.binder-page .tb-table .num-in { text-align: right; font-variant-numeric: tabular-nums; }
/* The Acct cell is width:1% + nowrap so it hugs its content. A width:100% input has no
   content width of its own, so in edit mode the column collapsed to a few characters and
   the account number scrolled out of view. Let the input's size attribute (set from the
   longest account number on the page) carry the width instead. */
.binder-page .tb-table .idx-in { font-variant-numeric: tabular-nums; width: auto; min-width: 7ch; }
.binder-page .tb-table select.cell-in { max-width: 220px; }
/* The W/P column sits between Final and TJE, so it is sized to an index number and no
   more — the workpaper NAME is the option's tooltip, not part of the label, because a
   name here pushed the tax columns off the right edge of the screen. */
.binder-page .tb-table .col-wp { width: 7rem; }
.binder-page .tb-table select.wpref-quick { min-width: 5.5rem; max-width: 7rem; }

/* W/P reference saves on change outside edit mode, so it needs to say so: a green flash
   on save, and a link to the workpaper it now points at. */
.binder-page .wpref { display: flex; align-items: center; gap: .2rem; }
.binder-page .wpref-go { text-decoration: none; color: var(--link); font-size: .8rem; }
.binder-page .tb-table select.just-saved { border-color: var(--good);
  background: #e6f4ec; transition: background .3s ease; }
.binder-page .add-account { margin: .5rem 0 .8rem; }
.binder-page .add-account label { font-size: .8rem; color: var(--muted); }
.binder-page .add-account-note { color: var(--green); margin: .2rem .4rem; }

/* Binder-level actions live under the workpapers, not beside the client's name. */
.binder-page .binder-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
  margin: 1.1rem 0 .4rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.binder-page .binder-actions .lbl { font-size: .72rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.binder-page .warn-bar { background: var(--warn-bg); border: 1px solid #c98a2b; color: #7a5416; border-radius: var(--radius); padding: .45rem .8rem; font-size: .85rem; }
.binder-page .error { color: var(--bad); }
.binder-page .je-card { padding-top: .6rem; }
.binder-page .je-head { display: flex; align-items: center; gap: .6rem; }
.binder-page .je-actions { margin-left: auto; display: flex; align-items: center; gap: .4rem; }
.binder-page .je-actions form { margin: 0; }
.binder-page .je-form select { max-width: 360px; }
/* New journal entry: a small floating window over the trial balance (tb.html). Fixed
   so it stays put while the TB behind it scrolls; the title bar is the drag handle. */
.binder-page .je-popup { position: fixed; z-index: 40; width: min(640px, calc(100vw - 16px));
  max-height: calc(100vh - 80px); overflow: auto; background: var(--card);
  border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(31,36,27,.28); }
.binder-page .je-popup-head { display: flex; align-items: center; gap: .6rem; padding: .45rem .5rem .45rem .8rem;
  border-bottom: 1px solid var(--line); font-weight: 600; cursor: move; user-select: none;
  position: sticky; top: 0; background: var(--card); z-index: 1; }
.binder-page .je-popup.dragging { opacity: .92; }
.binder-page .je-popup-hint { margin-left: auto; font-weight: 400; }
.binder-page button.je-popup-close { background: none; border: 0; color: var(--muted); font-size: 1.3rem;
  line-height: 1; padding: .1rem .45rem; margin: 0; cursor: pointer; border-radius: var(--radius); }
.binder-page button.je-popup-close:hover { color: var(--ink); background: var(--tint); }
.binder-page .je-popup .je-form { padding: .7rem .8rem .8rem; }
.binder-page .je-popup .je-form select, .binder-page .je-popup .acct-pick { max-width: 100%; width: min(320px, 100%); }
@media print { .binder-page .je-popup { display: none; } }
.binder-page .je-status.good { color: var(--good); }
/* Journal-entry account picker (acctpick.js): type-to-filter box over the hidden
   account select. Balances live in the dropdown only — never in the picked field. */
.binder-page .acct-pick { position: relative; display: inline-block; width: min(360px, 100%); }
.binder-page .acct-pick .acct-search { width: 100%; box-sizing: border-box; }
.binder-page .acct-menu { position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 20;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(31,36,27,.14); max-height: 16rem; overflow-y: auto; min-width: 22rem; }
/* button.acct-opt, not .acct-opt: must out-rank the ".binder-page button:not(.btn)"
   green-button look above — these are menu rows, not buttons. */
.binder-page button.acct-opt { display: flex; justify-content: space-between; align-items: baseline; gap: .9rem;
  width: 100%; text-align: left; padding: .3rem .6rem; margin: 0; border: 0; border-radius: 0;
  background: none; cursor: pointer; font: inherit; font-size: .88rem; color: var(--ink); }
.binder-page button.acct-opt:hover, .binder-page button.acct-opt.active { background: var(--tint); }
.binder-page .acct-opt-bal { font-variant-numeric: tabular-nums; color: var(--muted);
  white-space: nowrap; font-size: .82rem; }
.binder-page .acct-empty { padding: .3rem .6rem; color: var(--muted); font-size: .82rem; }
.binder-page .je-form .je-totals td { font-variant-numeric: tabular-nums; }
.binder-page .je-form .je-totals.je-off td.num { color: var(--bad); }
.binder-page .dd-inactive { opacity: .45; }
.binder-page .report { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.8rem; max-width: 880px; }
.binder-page .report-head { border-bottom: 2px solid var(--green); margin-bottom: 1rem; padding-bottom: .6rem; }
.binder-page .report-head h1 { margin-bottom: .2rem; }
.binder-page .report-head p { margin: 0; }
.binder-page .report-je { margin-bottom: 1.4rem; }
/* Fixed layout + explicit column widths: without these each entry table sized its own
   columns from its own content, so Debit and Credit sat at a different x-position on
   every entry and nothing footed visually down the page (or on paper). */
.binder-page .report-je, .binder-page .report-grand { table-layout: fixed; }
.binder-page .report .c-acct { width: 5.5rem; }
.binder-page .report .c-name { width: auto; }
.binder-page .report .c-amt  { width: 7.5rem; }
.binder-page .je-title { font-size: .85rem; text-transform: none; letter-spacing: 0; color: var(--green); }
.binder-page .je-meta { text-align: right; font-weight: 400; text-transform: none; letter-spacing: 0; }
.binder-page .report-grand { margin-top: 1rem; }
@media print { .topbar, .sum-bar, .binder-page .no-print { display: none !important; } .binder-page .report { border: none; padding: 0; max-width: none; } td.num.sum-sel, .binder-page .tb-table td.sum-sel { background: none; box-shadow: none; }
  /* paper has no scrollbars or frozen panes — the whole sheet prints, in order */
  .binder-page .tb-sheet { overflow: visible; max-height: none; }
  .binder-page .tb-table thead th, .binder-page .tb-table tr.tb-total td { position: static; } }

/* In-house financial statements (Balance Sheet / P&L) rendered from the trial balance */
.binder-page .fin-report { max-width: 720px; }
.binder-page .fin-table { width: 100%; border-collapse: collapse; }
.binder-page .fin-table td, .binder-page .fin-table th { border: none; padding: .12rem .2rem; }
.binder-page .fin-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.binder-page .fin-section th { text-align: left; font-family: var(--display); color: var(--green);
  font-size: 1rem; font-weight: 600; padding-top: .5rem; text-transform: none; letter-spacing: 0; }
.binder-page .fin-line td:first-child { padding-left: 1.1rem; }
.binder-page .fin-acct { margin-right: .35rem; }
.binder-page .fin-subtotal td { border-top: 1px solid var(--line); font-weight: 600; }
.binder-page .fin-subtotal td:first-child { padding-left: 1.1rem; }
.binder-page .fin-total td { border-top: 2px solid var(--green); font-weight: 700; }
.binder-page .fin-spacer td { height: .4rem; }
.binder-page .fin-note td { color: var(--bad); padding-top: .5rem; }
.binder-page .fin-disclaimer { margin-top: 1.4rem; padding-top: .6rem; border-top: 1px solid var(--line);
  font-size: .78rem; font-style: italic; color: var(--muted); }

/* -------------------------------------------------------- delivery: K-1 table ---- */
/* A K-1 already sent is locked: what that partner holds is the record of what went out.
   Readonly inputs are otherwise indistinguishable from editable ones. */
.k1-table td { padding: .25rem .4rem .25rem 0; vertical-align: middle; }
.k1-table th { padding: 0 .4rem .25rem 0; font-size: .75rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); }
.k1-table input[readonly] { background: #f4f3ee; color: var(--muted); cursor: default; }

/* ---------------------------------------------------------------- client vault ---- */
/* Folders collapse so a client with years of history isn't a wall of rows, and each is
   a drop target for filing a document by dragging it. */
.vault-tree { padding: .25rem .5rem .75rem; }
/* .drawers: the client page's Books card, whose bank, card and loan accounts open like the
   vault's folders (it can't be .vault — vault.js binds to the first one on the page). */
.vault .vfolder > summary, .drawers .vfolder > summary { cursor: pointer; padding: .35rem .5rem;
  border-radius: 6px; list-style: none; display: flex; align-items: baseline; gap: .4rem; }
.drawers .vfolder > summary { flex-wrap: wrap; }
.vault .vfolder > summary::-webkit-details-marker,
.drawers .vfolder > summary::-webkit-details-marker { display: none; }
.vault .vfolder > summary::before, .drawers .vfolder > summary::before { content: "\25B8";
  color: var(--muted); font-size: .7rem; transition: transform .12s ease; }
.vault .vfolder[open] > summary::before,
.drawers .vfolder[open] > summary::before { transform: rotate(90deg); }
.vault .vfolder > summary:hover, .drawers .vfolder > summary:hover { background: #f7f6f1; }
.vault .vfolder-body, .drawers .vfolder-body { margin-left: .9rem;
  border-left: 1px solid var(--line); }
.vault .vfolder table, .drawers .vfolder table { width: 100%; border-collapse: collapse; }
.vault .doc-row { cursor: grab; }
.vault .doc-row.dragging { opacity: .45; }
.vault .vfolder.drop-target > summary { background: #eef1e8; outline: 1px solid var(--link); }
.vault .doc-pick-cell { vertical-align: middle; }
.vault .folder-pick { align-self: center; }
/* The bulk bar sits between the card header and the tree and appears only once something
   is ticked, so the vault reads exactly as before until you start selecting. Sticky: on a
   client with years of folders the selection scrolls past the top of the card otherwise,
   and the delete button has to stay reachable from wherever the last tick was. */
.vault .vault-bulk { position: sticky; top: 0; z-index: 4; display: flex; flex-wrap: wrap;
  align-items: center; gap: .5rem; margin: .5rem 1.25rem 0; padding: .5rem .75rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--tint); }
.vault .vault-bulk[hidden] { display: none; }
.vault .vault-bulk input[name="reason"] { flex: 1; min-width: 12rem; padding: .35rem .5rem; }
/* Client page → Send documents securely: the vault as a checklist. */
.send-pick-group { padding: .25rem 0 .4rem; border-bottom: 1px solid var(--line); }
.send-pick-group:last-child { border-bottom: 0; }
.send-pick label { display: flex; align-items: baseline; gap: .4rem; margin: .15rem 0;
  font-weight: normal; text-transform: none; letter-spacing: 0; cursor: pointer; }
.send-pick .send-pick-doc { padding-left: 1.3rem; }
.send-pick .send-pick-doc .muted { margin-left: auto; white-space: nowrap; }

/* Per-document actions collapse into one ⋯ menu so a vault row stays a single line.
   Each action inside is its own <details> accordion holding its existing form — the
   menu floats over the table; the forms expand within it. */
.doc-menu { position: relative; display: inline-block; text-align: left; }
.doc-menu > summary { list-style: none; cursor: pointer; }
.doc-menu > summary::-webkit-details-marker { display: none; }
.doc-menu .menu-body { position: absolute; right: 0; z-index: 20; min-width: 21rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(31,36,27,.14); padding: .4rem; white-space: normal; }
.doc-menu .menu-item > summary { display: block; padding: .45rem .6rem; border-radius: 6px;
  cursor: pointer; list-style: none; font-size: .85rem; }
.doc-menu .menu-item > summary::-webkit-details-marker { display: none; }
.doc-menu .menu-item > summary:hover { background: var(--tint); }
.doc-menu .menu-item[open] { background: #faf9f5; border-radius: 6px; padding-bottom: .4rem; }
.doc-menu .menu-form { padding: .2rem .6rem 0; }
.doc-menu form.menu-item-form { margin: 0; }
.doc-menu form.menu-item-form button { display: block; width: 100%; text-align: left;
  padding: .45rem .6rem; border-radius: 6px; font-size: .85rem; font-weight: inherit;
  background: none; border: none; cursor: pointer; color: inherit; }
.doc-menu form.menu-item-form button:hover { background: var(--tint); }
.doc-menu .menu-rule { border: none; border-top: 1px solid var(--line); margin: .3rem 0; }
/* A link in the menu (Download, Request e-signature) reads as one of its items. */
.doc-menu a.menu-link { display: block; padding: .45rem .6rem; border-radius: 6px;
  font-size: .85rem; color: inherit; text-decoration: none; }
.doc-menu a.menu-link:hover { background: var(--tint); }

/* A work item's document rows (work/_doc_row.html) are one line each, like a vault row:
   the name ends in "…" with the full name in its tooltip, and the actions live in the
   row's ⋯ menu. width:100% + max-width:0 gives the name whatever the other columns
   leave rather than growing to fit the longest name — but never less than 9rem: the
   card widens into the page's spare room before a name shrinks to a few letters. On its
   line the name keeps a 7rem run; what follows it (the size, a "new" pill, check in)
   wraps under it when there isn't room beside. */
.doc-table td { white-space: nowrap; vertical-align: middle; }
.doc-table td.doc-name-cell { width: 100%; max-width: 0; min-width: 9rem; }
.doc-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .4rem; }
.doc-line > * { flex: none; }
.doc-line > .doc-label, .doc-line > .checkout-form { flex: 1 1 7rem; min-width: 0;
  max-width: max-content; }
.doc-line .doc-label { display: block; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.doc-line .checkout-form .doc-label { max-width: 100%; }
/* Filing and sending give way to the name: each is capped, and what doesn't fit ends in
   "…" with the whole of it in a tooltip. A link is its address over its state; the
   address is cut short (width:0 + min-width:100% stops a long one setting the column's
   width) and the state wraps between its parts, so opened/downloaded and the expiry
   always show. */
.doc-table td.doc-folder { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; }
.doc-table td.doc-sent { max-width: 13rem; }
.doc-table td.doc-sent.has-links { min-width: 10rem; }
.doc-table .doc-sent-line + .doc-sent-line { margin-top: .3rem; }
.doc-table .doc-sent-email { display: block; width: 0; min-width: 100%; overflow: hidden;
  text-overflow: ellipsis; }
.doc-table .doc-sent-state { display: block; white-space: normal; }
.doc-table .doc-sent-state > span { white-space: nowrap; }
.doc-table .doc-sent-esign { display: flex; align-items: baseline; gap: .3rem; }
.doc-table .doc-sent-esign > * { flex: none; }
.doc-table .doc-sent-esign > .doc-sent-who { flex: 0 1 auto; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; }
.doc-table td.doc-actions { text-align: right; }

/* Client portal — document-request upload UX (drag-drop, camera, "not applicable") */
.dr-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .4rem; }
.dr-actions form { margin: 0; display: inline-flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.dr-file { flex: 1 1 11rem; min-width: 10rem; }
[data-dropzone] { border-radius: 8px; outline: 2px dashed transparent; outline-offset: 3px;
                  transition: outline-color .1s, background .1s; }
/* portal.js adds drag-over, work.js adds drop-target — same visual either way */
[data-dropzone].drag-over, [data-dropzone].drop-target { outline-color: var(--link); background: var(--tint); }
[data-dropzone].busy { opacity: .6; }
.dr-na { display: inline-flex; margin: 0; }
.dr-na details > summary { cursor: pointer; list-style: none; }
.dr-na details > summary::-webkit-details-marker { display: none; }
.dr-na-body { display: inline-flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-top: .4rem; }
.dr-na-body input[type="text"] { flex: 1 1 14rem; min-width: 12rem; padding: .4rem .5rem; }
.dr-other .dr-note { width: 100%; padding: .45rem .5rem; }
.dr-hint { margin-top: .35rem; }
label.btn input[type="file"] { display: none; }
/* Uploads post one file at a time, so a multi-file drop needs to say it is still working
   or the page looks frozen. Pinned to the card, not the viewport — it belongs to the vault. */
.vault { position: relative; }
.vault .vault-busy { position: absolute; right: 1rem; bottom: 1rem; z-index: 5;
  background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: .5rem .85rem; font-size: .82rem; max-width: 60%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 6px 18px rgba(31,36,27,.28); }

/* "Update" — download, edit locally, upload back as a new version */
.binder-page .update-wp > summary { color: var(--link); cursor: pointer; }
.binder-page .update-wp .pop-body { min-width: 20rem; }

/* Delivery review — the return PDF beside the form, with clickable page chips */
.dlv-layout { display: flex; gap: 1.2rem; align-items: flex-start; flex-wrap: wrap; }
.dlv-forms { flex: 1 1 620px; min-width: 0; max-width: 800px; }
.dlv-viewer { flex: 1 1 460px; min-width: 380px; max-width: 860px;
  position: sticky; top: .6rem; display: flex; flex-direction: column;
  max-height: calc(100vh - 1.2rem);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.dlv-viewer-head { display: flex; align-items: center; gap: .6rem;
  padding: .55rem .8rem; border-bottom: 1px solid var(--line); }
.dlv-viewer-scroll { overflow-y: auto; padding: .6rem; background: #eeede7;
  border-radius: 0 0 var(--radius) var(--radius); }
.pdf-page { position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: 3px; margin: 0 auto .6rem; max-width: 800px; }
.pdf-page img { display: block; width: 100%; height: 100%; }
.pdf-page .pdf-page-no { position: absolute; top: .3rem; right: .3rem; z-index: 2;
  background: rgba(31,36,27,.72); color: #fff; border-radius: 999px;
  font-size: .72rem; font-weight: 600; padding: .05rem .5rem; }
.pdf-page.flash { animation: pdf-page-flash 1.6s ease-out; }
@keyframes pdf-page-flash {
  0%, 55% { outline: 3px solid var(--link); outline-offset: -1px; }
  100% { outline: 3px solid transparent; outline-offset: -1px; } }
.page-chips { display: inline-flex; flex-wrap: wrap; gap: .25rem; margin: .25rem 0 0;
  vertical-align: middle; }
label > .page-chips { display: flex; }        /* the e-sign range chips on their own row */
.page-chip { border: 1px solid var(--line); background: var(--tint); color: var(--link);
  border-radius: 999px; font-size: .74rem; font-weight: 600; padding: .1rem .55rem;
  cursor: pointer; line-height: 1.3; }
.page-chip:hover { background: var(--link); color: #fff; }
/* A K-1 row carrying edits restored from this browser tab — still needs "Save K-1s". */
.k1-table tr.unsaved input { background: var(--warn-bg, #fdf3df); }

/* ===================== Fixed assets — the treatment grid =====================
   One asset depreciates four ways at once (federal, book, state, AMT). As stacked rows
   of loose fields you could not see that federal took bonus and book did not; as a grid
   with one column per treatment, every input lines up against its opposite number and
   the comparison reads itself. A State or AMT column still derived from Federal is
   dimmed, not hidden, so the grid never changes shape while you tick Override. */
table.treatments { width: auto; min-width: 100%; border-collapse: collapse; }
table.treatments th, table.treatments td { border-bottom: 1px solid var(--line, #dfe1dc);
  padding: .28rem .5rem; vertical-align: middle; }
table.treatments thead th { background: var(--thead); color: var(--green, #2e3529);
  font-size: .82rem; text-align: center; white-space: nowrap; }
table.treatments thead th:first-child { text-align: left; }
table.treatments tbody th { text-align: left; font-weight: 500; font-size: .84rem;
  color: var(--muted, #5a6157); white-space: nowrap; width: 1%; }
table.treatments td { text-align: center; }
table.treatments input, table.treatments select { width: 100%; min-width: 6.5rem; }
table.treatments input[type="date"] { min-width: 8.5rem; }
table.treatments td.na { color: var(--muted, #5a6157); font-size: .8rem; }
/* A derived column — its inputs are inert and the server ignores them until Override. */
table.treatments td.same input, table.treatments td.same select { opacity: .45; }
table.treatments col.same-col { background: var(--zebra, #f8f7f3); }

/* ============================ Shared page furniture ============================ */
/* Filter chips: a row of choices where exactly one is on (the work list's and the filing
   board's status filter). The chosen chip is filled; each carries its count, and a
   status with nothing in it steps back without disappearing. */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0 0 1rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .26rem .7rem;
  border: 1px solid #c2c8cc; border-radius: 999px; background: #fff; color: var(--green);
  font-size: .8rem; font-weight: 600; line-height: 1.4; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s; }
.chip:hover { background: var(--tint); border-color: var(--link); text-decoration: none; }
.chip .n { min-width: 1.4rem; padding: 0 .38rem; border-radius: 999px; background: #edeee8;
  color: var(--muted); font-size: .72rem; font-weight: 600; text-align: center;
  font-variant-numeric: tabular-nums; }
.chip.zero:not(.on) { color: var(--muted); border-color: var(--line); }
.chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.chip.on .n { background: rgba(255,255,255,.18); color: #fff; }

/* Billable hours for the day, week, month and year: four figures in one ruled strip
   (dashboard Time card, Time page) instead of a run of grey text. */
.hours-strip { display: flex; margin: 0 0 .9rem; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fbfaf6; overflow: hidden; }
.hours-strip > div { flex: 1 1 0; min-width: 4.4rem; padding: .4rem .8rem;
  border-left: 1px solid var(--line); }
.hours-strip > div:first-child { border-left: none; }
.hours-strip dt { font-size: .64rem; text-transform: uppercase; letter-spacing: .08em;
  font-weight: 700; color: var(--muted); }
.hours-strip dd { margin: 0; font-family: var(--display); font-size: 1.15rem; font-weight: 600;
  color: var(--green); line-height: 1.25; font-variant-numeric: tabular-nums; }
.toolbar > .hours-strip { margin: 0; background: var(--card); }
.toolbar > .hours-strip > div { flex: 0 0 auto; }

/* Day stepper: ← date →. The date keeps a fixed width so the arrows stay under the
   pointer while stepping through days whose names differ in length. */
.day-nav { display: inline-flex; align-items: center; gap: .5rem; }
.day-nav .btn { padding: .4rem .7rem; }
.day-nav strong { min-width: 13.5rem; text-align: center; }

/* A to-do's tick box: a real box that fills green when done, not a text glyph. */
.check { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  width: 1.2rem; height: 1.2rem; padding: 0; border: 1.5px solid #8a9187; border-radius: 4px;
  background: #fff; cursor: pointer; transition: background .12s, border-color .12s, box-shadow .12s; }
.check:hover { border-color: var(--link); box-shadow: var(--focus); }
.check:focus-visible { outline: none; border-color: var(--link); box-shadow: var(--focus); }
.check.is-done { background: var(--good); border-color: var(--good); }
.check.is-done::after { content: ""; width: .3rem; height: .6rem; margin-top: -.12rem;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Per-row actions (edit / move / remove) stay out of the way until the row is pointed at
   or focused, so a list reads as its content. A touch screen has no hover: always shown. */
@media (hover: hover) {
  .row-actions > * { opacity: .5; transition: opacity .12s; }
  tr:hover > .row-actions > *, .row-actions:focus-within > *, .row-actions > [open] { opacity: 1; }
}
.row-actions > * + * { margin-left: .55rem; }
.pop-body.pop-mini { min-width: 0; width: max-content; padding: .5rem .55rem; }
.pop-body.pop-mini input { width: auto; }

/* An empty list says so in the middle of its space, quietly. */
tr.empty-row > td { padding: 1.4rem .85rem; text-align: center; color: var(--muted); }
tr.empty-row:hover { background: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important;
    animation-iteration-count: 1 !important; }
  .btn:active:not(:disabled) { transform: none; }
}

/* ============================ Phones and small tablets ============================
   One breakpoint, 760px, so the rules are easy to reason about. Desktop is untouched:
   everything here only tightens spacing, stacks side-by-side layouts, and turns the nav
   into a swipeable strip. Tables are handled by the .table-scroll wrapper above. */
@media (max-width: 760px) {
  /* iOS Safari zooms the page into any field whose text is under 16px; sizing fields
     at 16px stops the jump, and the slightly larger type is easier to hit anyway. */
  input, select, textarea { font-size: 16px; }
  h1 { font-size: 1.45rem; }
  .content { margin: 1rem auto 1.75rem; padding: 0 .9rem; }
  .content.wide { max-width: none; padding: 0 .9rem; }
  .card { padding: 1rem .95rem; margin-bottom: 1rem; }
  .card > h2:first-child, .card > .toolbar:first-child { margin-bottom: .75rem; }
  th, td { padding: .5rem .5rem; }
  .stat .n { font-size: 1.6rem; }
  /* Comfortable tap targets; .small stays compact for inline table actions. */
  .btn { min-height: 2.5rem; }
  .btn.small { min-height: 2.1rem; }

  /* Top bar (the second-line nav is set up at 1280px above): tighter gutters. */
  .topbar { padding: 0 .9rem; }
  .topbar .brand-mark { height: 30px; }
  .topbar .wordmark { font-size: .85rem; letter-spacing: .26em; margin-right: -.26em; }
  .userbox { gap: .7rem; }
  .topbar nav { margin: 0 -.9rem; padding: 0 .9rem .45rem; }
  .topbar nav a { padding: .45rem .6rem; }

  /* Toolbars: a page title takes its own line, the controls wrap beneath it, and a form
     inside a toolbar wraps its own fields instead of forcing one long row. */
  .toolbar { gap: .5rem .6rem; }
  .toolbar > h1 { flex-basis: 100%; }
  .toolbar form { flex-wrap: wrap; }
  .row { flex-wrap: wrap; } .row > * { flex-basis: 100%; }

  /* Side-by-side layouts stack. Several pages set their column split inline (work detail,
     the PDF review palette, e-sign placement), which a class rule cannot outrank, hence
     the attribute selector and !important — scoped to this breakpoint only. */
  .grid-2, .grid-3, .binder-page .two-col, .binder-page .binder-grid,
  .content [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .content [style*="position:sticky"], .content [style*="position: sticky"] { position: static !important; }

  /* Floating panels and dialogs sized for a desktop shrink to the screen. */
  .pop-body, .binder-page .pop-body, .binder-page .col-notes .pop-body { min-width: min(280px, 92vw); }
  .doc-menu .menu-body { min-width: min(21rem, 92vw); }
  /* No width to share out on a phone (the table swipes): a fixed run before the "…". */
  .doc-table td.doc-name-cell { width: auto; max-width: none; }
  .doc-line .doc-label { max-width: 12rem; }
  .binder-page .acct-menu { min-width: 0; }
  /* A phone has no width for the desktop columns to share out: let them shrink to their
     content as before, and give the name a fixed run before its "…" instead. */
  .binder-page .wp-table td.wp-name-cell { width: auto; max-width: none; }
  .binder-page .wp-line .wp-label { max-width: 8rem; }
  .binder-page .tree .col-stamp, .binder-page .tree .col-mod, .binder-page .tree .col-notes,
  .binder-page .tree .col-actions { min-width: 0; }
  .binder-page #drop-dialog { min-width: 0; width: min(540px, 94vw); }
  .binder-page .drop-row { grid-template-columns: 1fr; }
  .binder-page .search-bar input { flex: 1 1 auto; }
  .binder-page .report { padding: 1rem .9rem; }
  .sum-bar { max-width: calc(100vw - 1.5rem); white-space: normal; gap: .6rem .9rem;
    flex-wrap: wrap; justify-content: center; border-radius: var(--radius); }
  .vault .vault-bulk { margin: .5rem .5rem 0; }

  /* A grid column may be narrower than its widest child (a table, a row of fields):
     without this the column grows to fit and pushes the whole page sideways. */
  .grid > * { min-width: 0; }
  /* Every table here sits in a .table-scroll box (base.html), which clips anything hanging
     out of it, and a row's actions are a swipe away at its far end. So a row's Move panel
     opens as a sheet pinned to the bottom of the screen: fixed positioning is not clipped
     by the scroller, and the date and its button are both in reach without swiping. */
  .row-actions .pop-body.pop-mini { position: fixed; left: .9rem; right: .9rem; bottom: 1rem;
    width: auto; z-index: 50; padding: .7rem; box-shadow: var(--shadow-md); }
  .row-actions .pop-body.pop-mini input { flex: 1 1 auto; min-width: 0; }
  /* The four hour figures share the width; the day stepper fills its line. */
  .hours-strip > div, .toolbar > .hours-strip > div { flex: 1 1 0; min-width: 0; padding: .4rem .55rem; }
  .toolbar > .hours-strip { flex: 1 1 100%; }
  .day-nav { flex: 1 1 100%; }
  .day-nav strong { flex: 1 1 auto; min-width: 0; }
  .chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; margin-left: -.9rem; margin-right: -.9rem; padding: 0 .9rem; }
  .chips::-webkit-scrollbar { display: none; }
  .check { width: 1.45rem; height: 1.45rem; }

  .login-wrap { margin-top: 4vh; }
  .login-wrap .card { padding: 1.25rem 1.1rem 1.35rem; }
  .portal-shell { padding: .75rem .9rem 1.5rem; }
}

/* Busy feedback (busy.js). The clicked submit shows a spinner and a label; a thin bar
   runs along the top of the viewport until the next page paints. The tb_groupings AI
   button had its own .ai-spin — this is that, for everything. */
.spin { display: inline-block; width: .85em; height: .85em; border: 2px solid currentColor;
        border-right-color: transparent; border-radius: 50%; vertical-align: -.1em;
        flex: none; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.is-busy { pointer-events: none; cursor: progress; }
.btn.is-busy, .btn.is-busy:disabled, .btn.is-busy[disabled] { opacity: .85; cursor: progress; }
.busy-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 10000;
            pointer-events: none; opacity: 0; overflow: hidden; transition: opacity .15s; }
.busy-bar::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
                    background: var(--link); border-radius: 3px; transform: translateX(-100%); }
.busy-bar.on { opacity: 1; }
.busy-bar.on::before { animation: busy-slide 1.1s ease-in-out infinite; }
@keyframes busy-slide { to { transform: translateX(250%); } }

/* "New from the client" — a client-sent document no staff member has looked at yet.
   The worklist row gets a light down its left edge and a pill in the Docs column; the
   work item highlights the rows and marks them seen on the way out. */
.pill.new { background: var(--tint); color: var(--green); font-weight: 600;
            box-shadow: inset 0 0 0 1px var(--link); }
.pill.new::before { content: ""; display: inline-block; width: .45em; height: .45em;
                    border-radius: 50%; background: var(--link); margin-right: .35em;
                    vertical-align: .08em; }
tr.has-new > td:first-child { box-shadow: inset 3px 0 0 var(--link); }
.doc-new { background: var(--tint); border-radius: 4px; padding-left: .3rem !important;
           margin-left: -.3rem; }
tr.doc-new > td { background: var(--tint); }
.new-docs-note { background: var(--tint); border-left: 4px solid var(--link);
                 border-radius: var(--radius-sm); padding: .5rem .75rem; margin: 0 0 .6rem; }

/* Secure upload link (/upload) — the public drop box. The file input stays real and
   focusable inside the drop zone, so the page works with no JS (upload.js adds the
   list and progress on top). The honeypot is off-screen, not display:none, which some
   bots check for. */
.upload-card h2 { margin-bottom: .35rem; }
.upload-card .row { row-gap: 0; }     /* stacked on a phone, .field already spaces them */
.upload-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.upload-drop { display: flex; flex-direction: column; align-items: center; gap: .35rem;
  padding: 1.4rem 1rem; border: 2px dashed var(--line-strong); border-radius: var(--radius);
  background: #fbfaf6; text-align: center; font-weight: 400; cursor: pointer;
  transition: border-color .12s, background .12s; }
.upload-drop:hover, .upload-drop.drag { border-color: var(--link); background: var(--tint); }
.upload-drop input[type="file"] { max-width: 100%; width: auto; border: 0; padding: 0;
  background: none; font-size: .85rem; }
.upload-drop.enhanced input[type="file"] { position: absolute; width: 1px; height: 1px;
  opacity: 0; }
.upload-drop:focus-within { border-color: var(--link); box-shadow: var(--focus); }
.upload-drop-text { font-size: 1rem; color: var(--green); }
.upload-list { list-style: none; margin: .6rem 0 0; padding: 0; }
.upload-list li { display: flex; align-items: center; gap: .5rem; padding: .4rem .2rem;
  border-bottom: 1px solid var(--line); font-size: .9rem; word-break: break-word; }
.upload-list li:last-child { border-bottom: 0; }
.upload-list .size { margin-left: auto; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.upload-list .bad { color: var(--bad); font-size: .8rem; }
.upload-list button { background: none; border: 0; color: var(--muted); cursor: pointer;
  font-size: 1.1rem; line-height: 1; padding: 0 .25rem; }
.upload-list button:hover { color: var(--bad); }
.upload-ok { color: var(--good); font-weight: 700; }
.upload-ref { letter-spacing: .08em; }
.upload-progress { margin: 0 0 .8rem; }
.upload-progress-bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.upload-progress-bar span { display: block; height: 100%; width: 0; background: var(--green);
  transition: width .15s; }

/* Secure uploads filing page: files + preview on the left, sender + destination right. */
.upload-route { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: flex-start; }
.upload-route-main { flex: 2 1 560px; min-width: 300px; margin-bottom: 0; }
.upload-route-side { flex: 1 1 300px; min-width: 280px; display: flex; flex-direction: column;
  gap: 1rem; }
.upload-route-side .card { margin-bottom: 0; }
/* A big send scrolls inside its own list so the preview stays in view. */
.upload-files-scroll { max-height: 15.5rem; overflow-y: auto; }
.upload-files-scroll .table { margin: 0; }
.upload-files tr.selected > td { background: var(--tint); }
.upload-files tr.selected a.preview-link { font-weight: 600; }
.upload-preview { display: block; width: 100%; height: 70vh; min-height: 420px;
  margin-top: .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; }
/* ===== Licenses & permits (routers/licenses.py, templates/licenses/) ===== */
.lic-card tr.lic-inactive > td, .card tr.lic-inactive > td { color: var(--muted); }
.lic-card tr.lic-inactive a { color: var(--muted); }
.lic-form h2 { margin-top: 1.25rem; }
.lic-form h2:first-of-type { margin-top: 0; }
label.inline-check { display: inline-flex; gap: .45rem; align-items: center; font-weight: normal; }
label.inline-check input { width: auto; margin: 0; }
/* ===== end Licenses & permits ===== */
/* ===== Period packages (routers/packages.py, templates/packages/) — BEGIN =====
   Existing tokens only, so a rebrand carries through. */
.pkg-matrix th.pkg-col, .pkg-matrix td.pkg-cell { text-align: center; white-space: nowrap; }
.pkg-matrix td.pkg-client { min-width: 12rem; }
.pkg-chip { display: inline-flex; flex-direction: column; align-items: center; gap: .15rem;
  min-width: 4.6rem; padding: .25rem .5rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.pkg-chip:hover { border-color: var(--link); text-decoration: none; }
.pkg-chip .n { font-variant-numeric: tabular-nums; font-weight: 600; font-size: .85rem; }
.pkg-bar { display: block; width: 100%; height: 4px; border-radius: 999px;
  background: var(--line); overflow: hidden; }
.pkg-bar > span { display: block; height: 100%; background: var(--green); }
.pkg-chip.tone-done { background: var(--good-bg); border-color: var(--good-bg); }
.pkg-chip.tone-done .pkg-bar > span { background: var(--good); }
.pkg-chip.tone-ready { background: var(--tone-ready-bg); border-color: var(--tone-ready-bg); }
.pkg-chip.tone-ready .pkg-bar > span { background: var(--tone-ready); }
.pkg-chip.tone-bad { background: var(--bad-bg); border-color: var(--bad-bg); }
.pkg-chip.tone-bad .pkg-bar > span { background: var(--bad); }
.pkg-chip.tone-active .pkg-bar > span { background: var(--tone-active); }
.pkg-progress { height: 8px; margin: .4rem 0 .2rem; }
.pkg-slot { border-top: 1px solid var(--line-soft); padding: .65rem 1.25rem; }
.pkg-slot:target { background: var(--tint); }
.pkg-slot-head { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }
.pkg-slot-head .spacer { flex: 1; }
.pkg-slot-docs { list-style: none; margin: .35rem 0 0; padding: 0; }
.pkg-slot-docs li { display: flex; gap: .5rem; align-items: center; font-size: .9rem; }
.pkg-slot-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
  margin-top: .4rem; }
.pkg-slot-actions form { display: inline-flex; gap: .35rem; align-items: center; margin: 0; }
.pkg-drop { border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  padding: .25rem .6rem; color: var(--muted); font-size: .82rem; cursor: pointer; }
.pkg-drop.is-over { border-color: var(--link); background: var(--tint); color: var(--green); }
.pkg-drop input[type=file] { max-width: 15rem; font-size: .8rem; }
.pkg-cat { margin: 0; padding: .7rem 1.25rem .2rem; font-size: .8rem; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted); font-family: var(--sans); }
.pkg-stack { display: flex; flex-direction: column; gap: .5rem; }
/* ===== Period packages — END ===== */
