/* Trinity Tax Group — shared styles for the website, portals and admin */

:root {
  --ink:        #391262;
  --ink-2:      #4E1D80;
  --ink-line:   #632F99;
  --forest:     #944AE1;
  --forest-dk:  #7A1ADE;
  --paper:      #F8F4FC;
  --paper-2:    #EFE6F7;
  --paper-3:    #FDFBFF;
  --white:      #FFFFFF;
  --line:       #E5DAF0;
  --line-2:     #D6C7E5;
  --line-3:     #F1EBF8;
  --text:       #391262;
  --text-2:     #60477A;
  --muted:      #755C90;
  --on-dark:    #D6C7E5;
  --brass:      #187C80;
  --gold:       #50D8DE;
  --sky:        #DCCAEF;
  --danger:     #9B2C1F;

  --serif: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sans:  'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-sm: 10px; --r-md: 16px; --r-lg: 20px; --pill: 999px;
  --shadow: 0 24px 60px -30px rgba(57,18,98,.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--text); background: var(--paper); line-height: 1.55; font-size: 16px; }
img, svg { display: block; }
a { color: var(--forest); text-decoration: none; }
a:hover { color: var(--forest-dk); }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.muted { color: var(--muted); }

/* ── Buttons ─────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 12px 22px; border-radius: var(--pill); border: 1.5px solid transparent; font-size: 15px; font-weight: 600; cursor: pointer; text-align: center; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--forest); color: var(--white); }
.btn-primary:hover { background: var(--forest-dk); color: var(--white); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #000; color: var(--white); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-ghost { background: transparent; color: var(--forest); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--forest); color: var(--forest-dk); }
.btn-danger { background: transparent; color: var(--danger); border-color: #E3B8B1; }
.btn-danger:hover { background: var(--danger); color: var(--white); border-color: var(--danger); }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 14px; }
.btn-lg { min-height: 54px; padding: 16px 30px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; border-radius: var(--pill); cursor: pointer; }

/* ── Forms ───────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.input, .field input, .field select, .field textarea { font-weight: 400; font-size: 16px; padding: 12px 14px; min-height: 46px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--paper-3); width: 100%; }
.field textarea { min-height: 90px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(148,74,225,.15); }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--forest); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .span-2 { grid-column: span 2; }
.alert { padding: 12px 14px; border-radius: var(--r-sm); font-size: 14px; font-weight: 500; }
.alert-error { background: #F7E4E0; color: #7A2217; }
.alert-ok { background: #DFF3E6; color: #17603A; }

/* ── Cards & pills ───────────────────────── */
.card { position: relative; min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 28px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-head h2 { font-size: 19px; font-weight: 600; }
.card-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.card-sand { background: var(--paper-2); border-color: var(--paper-2); }
.stat { padding: 22px 24px; }
.stat .label { font-size: 14px; color: var(--muted); }
.card-dark.stat .label { color: var(--on-dark); }
.stat .value { font-family: var(--serif); font-size: 36px; font-weight: 700; line-height: 1.1; margin-top: 6px; color: var(--forest); }
.card-dark.stat .value { color: var(--gold); }
.pill { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: var(--pill); white-space: nowrap; background: var(--paper-2); color: var(--ink); }
#cm-sms:not([hidden]) { background: var(--paper-2); border-radius: 14px; padding: 12px 14px; }
.sms-h { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); margin-bottom: 6px; }
#cm-st-notify:not([hidden]) { margin-top: 12px; }
.stat-btn { text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.stat-btn:hover { border-color: var(--forest); }
.stat-hint { font-size: 13px; font-weight: 600; color: var(--forest); margin-top: 4px; min-height: 18px; }
.attn-row { width: 100%; background: none; border: 0; border-top: 1px solid var(--line-3); text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 12px 4px; }
.attn-row:first-child { border-top: 0; }
.attn-row:hover .title { color: var(--forest); }
.svc-box { border: 1px solid var(--line-3); border-radius: 16px; padding: 14px 16px; background: var(--white); }
.svc-box .list-row { flex-wrap: wrap; gap: 8px 10px; }
.svc-box .list-row .grow { min-width: 160px; flex: 1 1 160px; }
.svc-set .svc-box { margin-top: 14px; background: var(--paper-3); }
.icon-btn[data-bki-del], .icon-btn[data-bkq-del], .icon-btn[data-fil-del] { font-size: 20px; line-height: 1; }
.doc-year { border: 1px solid var(--line-3); border-radius: 14px; margin-top: 10px; background: var(--white); }
.doc-year > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 48px; font-weight: 600; }
.doc-year > summary::-webkit-details-marker { display: none; }
.doc-year .dy-ico { color: var(--brass); display: flex; }
.doc-year .dy-name { font-size: 15.5px; color: var(--ink); }
.doc-year .dy-n { margin-left: auto; font-size: 13px; color: var(--muted); font-weight: 500; }
.doc-year .dy-chev { font-size: 20px; color: var(--muted); transition: transform .15s; }
.doc-year[open] .dy-chev { transform: rotate(90deg); }
.doc-year .dy-body { padding: 0 14px 6px; }
.doc-year .dy-body > .list-row:first-child { border-top: 1px solid var(--line-3); }
.pill-amber { background: #F3E6C8; color: #6B4C12; }
.pill-blue  { background: #EFE8F7; color: #582290; }
.pill-green { background: #DFF3E6; color: #17603A; }
.pill-solid { background: var(--forest); color: var(--white); }
.pill-funded { background: #1E7A45; color: var(--white); }
.pill-red   { background: #F7E4E0; color: #7A2217; }
.pill-grey  { background: #F1EBF8; color: #60477A; }
.badge { font-size: 12px; font-weight: 700; background: var(--gold); color: var(--ink); border-radius: var(--pill); padding: 2px 8px; }

/* ── Lists / tables ──────────────────────── */
.table-wrap { overflow-x: auto; position: relative; }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
table.t th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line-3); white-space: nowrap; }
table.t td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line-3); vertical-align: middle; }
table.t tr.row-link { cursor: pointer; }
table.t tr.row-link:hover td { background: var(--paper-3); }
.strong { font-weight: 600; }
.empty { padding: 28px 0; text-align: center; color: var(--muted); font-size: 15px; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line-3); }
.list-row:first-child { border-top: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 600; font-size: 15px; overflow-wrap: break-word; hyphens: auto; }
.list-row .sub { font-size: 13px; color: var(--muted); }
.file-ico { width: 40px; height: 40px; flex: none; border-radius: var(--r-sm); background: var(--paper-2); display: flex; align-items: center; justify-content: center; color: var(--forest); }
.file-ico.solid { background: var(--forest); color: var(--white); }
.dot { width: 22px; height: 22px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.dot-done { background: var(--forest); color: var(--white); }
.dot-open { border: 2px solid #B8862F; }
.dot-wait { border: 2px solid var(--forest); background: #EEE2F9; }

/* ── Message thread ──────────────────────── */
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; padding: 4px 2px 8px; }
.bubble { max-width: 82%; padding: 12px 16px; border-radius: 14px; font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble .who { font-size: 12px; font-weight: 600; margin-bottom: 3px; opacity: .8; }
.bubble.them { background: var(--paper); align-self: flex-start; }
.bubble.me { background: var(--forest); color: var(--white); align-self: flex-end; }
.composer { display: flex; gap: 10px; align-items: flex-end; margin-top: 12px; }
.composer textarea { flex: 1; min-height: 46px; max-height: 160px; resize: vertical; padding: 12px 16px; border: 1px solid var(--line-2); border-radius: 22px; background: var(--paper-3); font-size: 15px; }

/* ── Progress tracker ────────────────────── */
.tracker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tracker .step .bar { height: 6px; border-radius: var(--pill); background: #EAE1F3; }
.tracker .step.done .bar { background: var(--forest); }
.tracker .step.now .bar { background: var(--gold); }
.tracker .step .name { font-size: 14px; font-weight: 600; margin-top: 10px; }
.tracker .step .state { font-size: 13px; color: var(--muted); }
.tracker .step.now .state { color: var(--brass); font-weight: 600; }

/* ── Brand mark ──────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand span { font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.brand img { object-fit: contain; }
.brand img.wordmark { display: block; width: auto; height: auto; max-width: min(220px, 100%); max-height: 64px; }
.panel > .brand img.wordmark { max-width: min(320px, 100%); max-height: 110px; }
.has-wordmark { max-width: 100%; }
.on-dark .brand, .brand.light { color: var(--paper); }

/* ── App shell (portals + admin) ─────────── */
.app { display: flex; min-height: 100vh; }
.side { width: 264px; flex: none; background: var(--ink); color: var(--on-dark); padding: 28px 20px; display: flex; flex-direction: column; gap: 30px; position: sticky; top: 0; height: 100vh; }
.side .brand span { font-size: 19px; }
.side .role-tag { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); background: var(--gold); border-radius: var(--pill); padding: 4px 10px; margin: 12px 8px 0; }
.side .role-tag.sky { background: var(--sky); }
.side nav { display: flex; flex-direction: column; gap: 4px; }
.side nav button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 46px; padding: 12px 14px; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--on-dark); font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; }
.side nav button:hover { color: var(--paper); background: rgba(255,255,255,.04); }
.side nav button[aria-current="page"] { background: var(--ink-2); color: var(--paper); }
.side nav button .lbl { display: flex; align-items: center; gap: 12px; }
.side .spacer { flex: 1; }
.side .who { font-size: 14px; padding: 0 8px; }
.side .who strong { display: block; color: var(--paper); font-weight: 600; }
.side .signout { min-height: 44px; padding: 10px 14px; border-radius: var(--r-sm); border: 1px solid var(--ink-line); background: transparent; color: var(--on-dark); text-align: left; cursor: pointer; }
.side .signout:hover { color: var(--paper); border-color: var(--on-dark); }
.side a.signout { display: flex; align-items: center; text-decoration: none; margin-bottom: 8px; }
.main { flex: 1; min-width: 0; max-width: 100%; padding: 44px 56px 64px; display: flex; flex-direction: column; gap: 28px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.page-head .date { font-size: 14px; color: var(--muted); }
.page-head h1 { font-family: var(--serif); font-weight: 400; font-size: 42px; letter-spacing: -.02em; margin-top: 6px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar .input { width: auto; min-width: 220px; border-radius: var(--pill); background: var(--white); }

/* ── Modal ───────────────────────────────── */
.modal-bg { position: fixed; inset: 0; background: rgba(57,18,98,.55); display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 50; }
.modal-bg.open { display: flex; }
.modal { background: var(--white); border-radius: var(--r-lg); width: 100%; max-width: 760px; box-shadow: var(--shadow); }
.modal.narrow { max-width: 500px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 22px 28px; border-bottom: 1px solid var(--line-3); }
.modal-head h3 { font-family: var(--serif); font-weight: 500; font-size: 26px; }
.modal-body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 24px; }
.modal-sec h4 { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); margin-bottom: 12px; }

/* ── Toast ───────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: var(--pill); font-size: 15px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 80; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--danger); }

/* ── Responsive ──────────────────────────── */
@media (max-width: 1100px) {
  .main { padding: 32px 28px 56px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3, .grid-5 { grid-template-columns: minmax(0, 1fr); }
  .span-2, .span-3 { grid-column: auto; }
}
@media (max-width: 820px) {
  .app { flex-direction: column; }
  .side { width: 100%; height: auto; position: sticky; top: 0; z-index: 20; padding: 12px 16px; gap: 10px; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .side > .brand-wrap { flex: 1; display: flex; align-items: center; gap: 10px; }
  .side .role-tag { margin: 0; }
  .side { max-width: 100vw; }
  .side nav { order: 3; width: 100%; min-width: 0; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 2px; scrollbar-width: none; }
  .side > .brand-wrap { min-width: 0; }
  .side .brand span { font-size: 17px; }
  .side nav button { width: auto; flex: none; min-height: 40px; padding: 8px 14px; }
  .side .spacer, .side .who { display: none; }
  .side .signout { order: 2; min-height: 40px; }
  .side a.signout { margin-bottom: 0; }
  .side .hl-more { display: none; }
  .main { padding: 24px 16px 48px; gap: 20px; }
  .page-head h1 { font-size: 32px; }
  .card { padding: 20px; }
  .tracker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .modal-head, .modal-body { padding-left: 20px; padding-right: 20px; }
  .toolbar .input { min-width: 0; flex: 1; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 16px; }
  .stat .value { font-size: 28px; }
}

/* Segmented buttons (filters, year picker) */
.seg:empty { display: none; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--paper-2); border-radius: var(--pill); max-width: 100%; }
.seg button { min-height: 36px; padding: 6px 14px; border: 0; border-radius: var(--pill); background: transparent; font-weight: 600; font-size: 14px; cursor: pointer; color: #4F3070; font-variant-numeric: tabular-nums; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.seg button:focus-visible { outline: 3px solid var(--gold, #25BDC4); outline-offset: 1px; }
/* Season bar */
.season-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.season-bar .grow { flex: 1 1 260px; min-width: 0; }
.season-bar .title { font-weight: 700; font-size: 17px; }
.season-bar .sub { color: #60477A; font-size: 14px; margin-top: 2px; }
.row-muted td { color: #826C99; }

/* Sortable table headings */
.th-sort { all: unset; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; display: inline-flex; gap: 4px; align-items: center; min-height: 32px; }
.th-sort:hover, .th-sort.on { color: var(--ink); }
.th-sort:focus-visible { outline: 3px solid var(--gold, #25BDC4); outline-offset: 2px; border-radius: 4px; }

/* Inline text-style button */
.linkish { all: unset; cursor: pointer; color: var(--forest); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.linkish:focus-visible { outline: 3px solid var(--gold, #25BDC4); outline-offset: 2px; }

/* Tax documents by year */
details.taxyear > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
details.taxyear > summary::-webkit-details-marker { display: none; }
details.taxyear > summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform .2s; }
details.taxyear:not([open]) > summary::after { transform: rotate(-90deg); }
details.taxyear[open] > summary { margin-bottom: 8px; }
details.taxyear > summary:focus-visible { outline: 3px solid var(--gold, #25BDC4); outline-offset: 4px; border-radius: 6px; }
.taxgroup { margin-top: 14px; }
.taxgroup h3 { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); margin-bottom: 2px; }

/* "Get the app" banner */
.install-banner { position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; box-shadow: 0 10px 30px rgba(57,18,98,.35); display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 12px 14px 12px 18px; border-radius: var(--r-md); background: var(--ink, #391262); color: #F8F4FC; font-size: 15px; line-height: 1.45; }
.install-banner span { flex: 1 1 220px; }
.install-banner .icon-btn { color: #F8F4FC; }
.install-banner .btn-primary { background: #50D8DE; color: #391262; }
/* Installed app: respect the phone's notch / home bar */
@media (display-mode: standalone) { body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); } }

/* ── Client window as tabs ── */
.modal.has-tabs { max-width: 880px; }
.mtabs { position: sticky; top: -40px; z-index: 2; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; background: var(--white);
  margin: -24px -28px 0; padding: 12px 28px 0; border-bottom: 1px solid var(--line-3); }
.mtabs::-webkit-scrollbar { display: none; }
.mtabs button { flex: none; position: relative; min-height: 44px; padding: 0 14px; border: 0; background: transparent; font: inherit; font-weight: 600; font-size: 14.5px; color: #644A80; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.mtabs button:hover { color: var(--ink); }
.mtabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--forest); font-weight: 800; }
.mtabs button:focus-visible { outline: 3px solid var(--gold, #25BDC4); outline-offset: -3px; border-radius: 6px; }
.mtabs .n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #B5442F; color: #fff; font-size: 11.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.modal-body.tabbed { min-height: min(620px, 78vh); }
.modal-body.tabbed > .modal-sec > h4 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.modal-body.tabbed > .modal-sec[hidden] { display: none; }
.modal-body.tabbed > .modal-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line-3); }
@media (max-width: 640px) { .mtabs { margin: -24px -20px 0; padding: 8px 12px 0; top: -40px; } }
.mtabs.page-tabs { position: sticky; top: 0; margin: 0; padding: 4px 0 0; background: var(--paper, #F8F4FC); }
.page-tabbed > [data-tab-key][hidden] { display: none !important; }
@media (max-width: 640px) { .mtabs.page-tabs { margin: 0 -16px; padding: 4px 8px 0; } }

/* ── Season progress (graphs) ── */
.prog-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.prog-tile { background: var(--paper-3, #FDFBFF); border: 1px solid var(--line-3); border-radius: 14px; padding: 12px 14px; }
.prog-tile .l { font-size: 13px; color: var(--muted); font-weight: 600; }
.prog-tile .v { font-size: 26px; font-weight: 800; color: var(--forest); letter-spacing: -.5px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.prog-tile .s { font-size: 12.5px; color: var(--muted); }
.prog-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; }
.prog-grid h3, .prog-sec h3 { font-size: 14px; font-weight: 700; color: #60477A; margin: 0 0 8px; }
.prog-sec { margin-top: 20px; }
@media (max-width: 860px) { .prog-grid { grid-template-columns: 1fr; } }

/* Headings and subheadings in capitals across the site */
h1, h2, h3, h4, h5, h6, #status-title, .org-card .t, .ret-card .t, .svc-card .t { text-transform: uppercase; letter-spacing: .02em; }

/* Menus in capitals: portal sidebars, phone tab bars and "More" sheet, section tabs, and the public site's menus */
.side nav button, .tabbar button, .more button, .mtabs [role="tab"], .site-nav a:not(.btn), .mobile-menu a:not(.btn) { text-transform: uppercase; letter-spacing: .05em; }
.side nav button .lbl { font-size: .94em; }
.tabbar button { font-size: 11px; }

/* Tax-year folders (client portal Documents and the office's client windows) */
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.folder { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 30px 18px 16px; min-height: 150px; border: 0; border-radius: 6px 18px 18px 18px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; box-shadow: 0 1px 2px rgba(57,18,98,.06), 0 10px 24px -18px rgba(57,18,98,.4); transition: transform .12s ease, box-shadow .12s ease; }
.folder::before { content: ""; position: absolute; left: 0; top: -10px; width: 46%; height: 16px; border-radius: 8px 10px 0 0; background: #fff; }
.folder::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: 0 18px 0 0; background: var(--gold); }
.folder:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(57,18,98,.06), 0 16px 30px -18px rgba(57,18,98,.5); }
.folder:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; }
.folder .yr { font-family: var(--serif); font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: .01em; }
.folder .lbl { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brass); margin-top: 6px; }
.folder .ct { font-size: 14px; color: var(--muted); margin-top: auto; padding-top: 14px; }
.folder .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.folder .tag { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 9px; background: #EFE8F7; color: #582290; }
.folder .tag.new { background: var(--gold); color: var(--ink); }
.folder .tag.ok { background: #DFF3E6; color: #17603A; }
.folder.other .yr { font-size: 24px; }
.folder.other::after { background: #D6C7E5; }
.df-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.df-back { display: inline-flex; align-items: center; gap: 6px; border: 0; background: #fff; color: var(--ink); font: inherit; font-weight: 700; font-size: 14px; padding: 9px 14px 9px 10px; border-radius: 999px; cursor: pointer; }
.df-title { font-family: var(--serif); font-weight: 800; font-size: 26px; text-transform: uppercase; letter-spacing: .02em; flex: 1; min-width: 160px; }
@media (max-width: 820px) {
  .folders { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .folder { min-height: 128px; padding: 26px 14px 14px; }
  .folder .yr { font-size: 28px; }
  .df-title { flex-basis: 100%; order: 3; font-size: 24px; }
}
.folder.sm { min-height: 112px; padding: 24px 14px 12px; background: var(--paper-3); border: 1px solid var(--line-3); }
.folder.sm::before { background: var(--paper-3); border: 1px solid var(--line-3); border-bottom: 0; }
.folder.sm .yr { font-size: 26px; }
.yf-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-top: 18px; }
.yf-panel .df-head { margin: 4px 0 6px; }
.yf-panel .df-back { background: var(--paper-2); }
.yf-panel .df-title { font-size: 20px; }

/* Client windows on a computer: the sections as a menu down the left side */
@media (min-width: 900px) {
  .modal.has-tabs { max-width: 1100px; }
  .modal-body.tabbed { display: grid; grid-template-columns: 196px minmax(0, 1fr); column-gap: 28px; row-gap: 24px; align-content: start; }
  .modal-body.tabbed > * { grid-column: 2; min-width: 0; }
  .modal-body.tabbed > .mtabs { grid-column: 1; grid-row: 1 / span 40; align-self: start; position: sticky; top: 16px; flex-direction: column; gap: 2px; margin: 0; padding: 0 14px 0 0; overflow: visible; border-bottom: 0; border-right: 1px solid var(--line-3); background: transparent; mask-image: none !important; -webkit-mask-image: none !important; }
  .modal-body.tabbed > .mtabs button { width: 100%; justify-content: space-between; min-height: 42px; padding: 0 12px; margin: 0; border-bottom: 0; border-left: 3px solid transparent; border-radius: 0 10px 10px 0; font-size: 13.5px; text-align: left; }
  .modal-body.tabbed > .mtabs button:hover { background: var(--paper); }
  .modal-body.tabbed > .mtabs button[aria-selected="true"] { background: var(--paper-2); border-left-color: var(--forest); }
  .modal-body.tabbed > .modal-foot { margin-top: 8px; }
}
/* Settings on a computer: the sections as a menu down the left side */
@media (min-width: 900px) {
  .page-tabbed.side-tabs { display: grid; grid-template-columns: 236px minmax(0, 1fr); column-gap: 28px; row-gap: 0; align-content: start; align-items: start; }
  .page-tabbed.side-tabs > * { grid-column: 2; min-width: 0; }
  .page-tabbed.side-tabs > .page-head { grid-column: 1 / -1; margin-bottom: 24px; }
  .page-tabbed.side-tabs > .mtabs { grid-column: 1; grid-row: 2; position: sticky; top: 16px; flex-direction: column; gap: 2px; margin: 0; padding: 0 14px 0 0; overflow: visible; border-bottom: 0; border-right: 1px solid var(--line-3); background: transparent; mask-image: none !important; -webkit-mask-image: none !important; }
  .page-tabbed.side-tabs > .mtabs button { width: 100%; justify-content: space-between; min-height: 42px; padding: 0 12px; margin: 0; border-bottom: 0; border-left: 3px solid transparent; border-radius: 0 10px 10px 0; font-size: 13.5px; text-align: left; white-space: normal; }
  .page-tabbed.side-tabs > .mtabs button:hover { background: var(--paper-2); }
  .page-tabbed.side-tabs > .mtabs button[aria-selected="true"] { background: var(--white); border-left-color: var(--forest); }
  .page-tabbed.side-tabs > [data-tab-key] { grid-row: 2; }
}
/* Phone: fade at the edge when more tabs are off-screen */
.mtabs.more-r { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
.mtabs.more-l { -webkit-mask-image: linear-gradient(to left, #000 82%, transparent); mask-image: linear-gradient(to left, #000 82%, transparent); }
.mtabs.more-l.more-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 82%, transparent); mask-image: linear-gradient(to right, transparent, #000 12%, #000 82%, transparent); }

/* Sidebar groups: Clients → Tax returns / Bookkeeping / Payroll */
.side .nav-group { display: flex; flex-direction: column; }
.side .nav-parent .chev { margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .7; transition: transform .15s; }
.side .nav-parent { gap: 10px; }
.side .nav-parent .ng-dot { display: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.side .nav-group:has(.nav-sub .badge:not([hidden])):not(.active):not(:hover) .ng-dot { display: inline-block; }
.side .nav-sub { display: flex; flex-direction: column; gap: 2px; max-height: 0; overflow: hidden; transition: max-height .2s ease; }
.side .nav-group:not(.closed):hover .nav-sub, .side .nav-group:has(:focus-visible) .nav-sub, .side .nav-group.active:not(.closed) .nav-sub { max-height: 240px; }
.side .nav-group:not(.closed):hover .chev, .side .nav-group.active:not(.closed) .chev { transform: rotate(225deg) translateY(-2px); }
.side .nav-group.active > .nav-parent { color: var(--paper); }
.side .nav-sub button { min-height: 40px; padding: 9px 14px 9px 30px; font-size: 13.5px; position: relative; }
.side .nav-sub button::before { content: ""; position: absolute; left: 16px; top: 50%; width: 6px; height: 1.5px; background: currentColor; opacity: .5; }
@media (max-width: 820px) {
  .side .nav-group { display: contents; }
  .side .nav-parent { display: none; }
  .side .nav-sub { display: contents; }
  .side .nav-sub button { padding: 8px 14px; font-size: inherit; }
  .side .nav-sub button::before { display: none; }
}

/* ── Training ── */
.tr-bar { height: 10px; border-radius: 99px; background: var(--paper); overflow: hidden; }
.tr-bar span { display: block; height: 100%; background: var(--forest, #4E1D80); border-radius: 99px; transition: width .3s; }
.tr-group { margin-bottom: 14px; }
.tr-gh { font-size: 15px; margin: 0 0 6px; color: var(--muted); letter-spacing: .06em; }
.tr-row { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line, #EBE6F0); text-align: left; cursor: pointer; font: inherit; color: inherit; gap: 12px; }
.tr-row:last-child { border-bottom: 0; }
.tr-row:hover .title { text-decoration: underline; }
.tr-row .title, .tr-row .sub { display: block; }
.tr-num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); font-weight: 700; font-size: 14px; }
.tr-num.done { background: #DDF1E4; color: #17663A; }
.tr-desc { white-space: pre-wrap; font-size: 15.5px; line-height: 1.55; margin-bottom: 12px; }
.tr-video { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #1D0A31; border-radius: 12px; overflow: hidden; margin-top: 10px; }
.tr-video iframe, .tr-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tr-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line, #EBE6F0); }

/* ── Books (a client's ledger) ─────────────────────────── */
.lg-modal { z-index: 55; }
.lg-modal .modal { max-width: 1240px; }
.lg-entry { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lg-entry .grow { flex: 1; min-width: 200px; }
.lg-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.lg-mini { min-width: 150px; }
.lg-mini select { min-height: 40px; }
.lg-tabs { align-self: flex-start; }
.lg-n { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #B5442F; color: #fff; font-size: 11.5px; font-weight: 800; align-items: center; justify-content: center; margin-left: 4px; }
.lg-tools { gap: 12px; margin-bottom: 10px; }
.lg-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 12px; border-radius: 999px; background: var(--paper-2); font-size: 14px; font-weight: 600; }
.lg-chip .icon-btn { width: 30px; height: 30px; }
.lg-bulk { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 10px; border-radius: 12px; background: var(--paper-3, #F9F7FC); border: 1px solid var(--line-3); color: #644A80; font-size: 14px; transition: background .15s, border-color .15s; }
.lg-bulk.on { background: #F3EAFD; border-color: #D9C1F2; color: var(--ink); }
.lg-bulk-act { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lg-bulk select { width: auto; min-width: 220px; min-height: 38px; }
.lg-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.lg-t { font-size: 14.5px; }
table.lg-t td { padding: 8px 10px 8px 0; }
table.lg-t th { padding: 8px 10px 8px 0; }
table.lg-t .num, table.lg-rep .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-cb { width: 34px; }
.lg-cb input { width: 18px; height: 18px; }
.lg-date { white-space: nowrap; color: #644A80; }
.lg-desc { min-width: 220px; word-break: break-word; }
.lg-acct { white-space: nowrap; }
.lg-in { color: #17603A; font-weight: 600; }
.lg-cat select { min-width: 220px; min-height: 38px; padding: 4px 8px; }
.lg-tag { display: inline-block; padding: 0 7px; border-radius: 999px; background: var(--paper-2); color: #644A80; font-size: 11.5px; font-weight: 700; vertical-align: 1px; }
.lg-tag.lg-warn { background: #FBEBD0; color: #7A4B00; }
.lg-alert { background: #FBF3E3; color: #5C3D00; border: 1px solid #F0D9A8; }
.lg-alert .btn { margin-left: 8px; }
.lg-report { max-width: 720px; }
.lg-rep-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
table.lg-rep { font-size: 15px; }
table.lg-rep td { padding: 8px 12px 8px 0; }
table.lg-rep .lg-sec th { padding-top: 18px; font-size: 12px; color: var(--brass, #8A6A2B); border-bottom: 1px solid var(--line-3); }
table.lg-rep .lg-sum td { font-weight: 700; border-top: 1px solid var(--line-2, #E4D9EF); }
table.lg-rep .lg-net td { font-weight: 800; font-size: 17px; border-top: 2px solid var(--ink); border-bottom: 0; }
.lg-line { width: 44px; color: #644A80; font-variant-numeric: tabular-nums; }
.lg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
tr.lg-off td { opacity: .55; }
@media (max-width: 640px) { .lg-cat select { min-width: 170px; } .lg-desc { min-width: 160px; } }
.lg-search { flex: 1 1 220px; max-width: 300px; }
@media (max-width: 640px) { .lg-search { max-width: none; flex-basis: 100%; } .lg-tools > .muted { margin-left: 0 !important; } }
.lg-sample-box { max-height: 380px; overflow-y: auto; }
.lg-pdf { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #EAF5EE; color: #17402A; font-size: 14.5px; display: flex; flex-direction: column; gap: 4px; }
.lg-pdf-warn { background: #FBF3E3; color: #5C3D00; border: 1px solid #F0D9A8; }
/* Books: colors and smoother sorting */
.lg-cat select { transition: background-color .15s, border-color .15s, color .15s; border-left-width: 4px; }
.lg-cat select.lg-uncat, #lg-bulk-cat.lg-uncat { background-color: #FFF1E0; border-color: #E8A355; color: #8A3B00; font-weight: 700; }
.lg-cat select.lg-k-in { border-left-color: #2E8B57; color: #17603A; }
.lg-cat select.lg-k-exp { border-left-color: #A891C0; }
.lg-cat select.lg-k-xfer { border-left-color: #944AE1; color: #6917BE; }
.lg-cat select.lg-k-own { border-left-color: #7A5AA6; color: #563A80; }
table.lg-t tr[data-id] { cursor: pointer; transition: background-color .12s, opacity .25s; }
table.lg-t tr[data-id]:hover td { background: var(--paper-3, #F9F7FC); }
table.lg-t tr.lg-selrow td { background: #F3EAFD !important; }
table.lg-t tr.lg-leaving { opacity: 0; }
table.lg-t tr.lg-leaving td { transition: opacity .25s; }
.lg-uncat-text { color: #9A4A00; font-weight: 600; }
.lg-tabs .lg-n { background: #C2560C; }
/* Books: step 2 */
.lg-dot { display: none; width: 9px; height: 9px; border-radius: 50%; background: #E07A1F; margin-right: 7px; vertical-align: 1px; }
tr.lg-unrow .lg-dot { display: inline-block; }
.lg-th { background: none; border: 0; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.lg-th:hover { color: var(--ink); }
.lg-arrow { font-size: 10px; min-width: 10px; }
th.num .lg-th { justify-content: flex-end; width: 100%; }
.lg-desc-btn { background: none; border: 0; padding: 2px 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: #D9C1F2; text-underline-offset: 3px; }
.lg-desc-btn:hover { color: #6917BE; text-decoration-color: currentColor; }
.lg-tag-x { background: #F3EAFD; color: #6917BE; }
.lg-xfer-box { padding: 12px 14px; margin-bottom: 12px; border-radius: 12px; background: #F5EDFD; border: 1px solid #D9C1F2; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.lg-xfer { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid #E5D5F5; }
.lg-locknote { padding: 10px 14px; border-radius: 12px; background: #F1ECF8; color: #3F2A63; font-size: 14.5px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lg-open { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 14px; }
.lg-open input[type="date"] { width: auto; min-height: 36px; }
.lg-open input[inputmode] { width: 120px; min-height: 36px; }
.lg-recbox, .lg-closebox { margin-bottom: 14px; }
.lg-ok { color: #17603A; font-weight: 600; }
.lg-bad { color: #9A2A1A; font-weight: 600; }
.lg-jline { display: grid; grid-template-columns: minmax(0, 1fr) 130px 130px; gap: 8px; margin-bottom: 6px; }
.lg-rule-form { margin-bottom: 4px; }
.lg-txn-modal { z-index: 60; }
.lg-txn-modal .modal { max-width: 720px; }
.lg-txn-top { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.lg-txn-amt { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lg-txn-desc { font-size: 16px; font-weight: 600; word-break: break-word; }
@media (max-width: 640px) { .lg-jline { grid-template-columns: 1fr 1fr; } .lg-jline select { grid-column: 1 / -1; } }
/* Books: step 3 */
.lg-tag-r { background: #EAF5EE; color: #17603A; display: inline-flex; align-items: center; gap: 3px; }
.lg-tag-q { background: #F3EAFD; color: #6917BE; }
.lg-ans { margin-top: 4px; font-size: 13.5px; color: #17402A; background: #EAF5EE; border-radius: 8px; padding: 4px 8px; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lg-rc-sugg { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; font-size: 14px; }
.lg-invline { display: grid; grid-template-columns: minmax(0, 1fr) 80px 120px; gap: 8px; margin-bottom: 6px; }
.lg-invhead { margin: 12px 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lg-pill-late { background: #FBE3DC; color: #8A2A12; }
@media (max-width: 640px) { .lg-invline { grid-template-columns: 1fr 70px 100px; } }
.lg-subtabs { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; padding-left: 4px; }
.lg-subtabs button { min-height: 36px; padding: 6px 14px; border: 1px solid var(--line-3); border-radius: var(--pill); background: var(--white); font: inherit; font-weight: 600; font-size: 14px; color: #4F3070; cursor: pointer; }
.lg-subtabs button:hover { border-color: #D9C1F2; }
.lg-subtabs button[aria-pressed="true"] { background: #F3EAFD; border-color: #D9C1F2; color: var(--ink); }
/* Getting started checklist */
.ob-card { border: 1px solid #D9C1F2; background: linear-gradient(0deg, var(--white), var(--white)); }
.ob-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.ob-right { display: flex; align-items: center; gap: 12px; }
.ob-bar { width: 180px; height: 10px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.ob-bar span { display: block; height: 100%; background: var(--forest); border-radius: 999px; transition: width .3s; }
.ob-steps { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; }
.ob-step { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-3); }
.ob-mark { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; background: var(--paper-2); color: #4F3070; }
.ob-step.done .ob-mark { background: #1E7A45; color: #fff; }
.ob-step.skipped { opacity: .65; }
.ob-text { flex: 1; min-width: 0; }
.ob-title { font-weight: 700; font-size: 15px; }
.ob-why { color: #644A80; font-size: 14px; margin-top: 2px; }
.ob-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .ob-step { flex-wrap: wrap; } .ob-act { width: 100%; justify-content: flex-start; padding-left: 44px; } .ob-bar { width: 120px; } }
