/* Donorbook. Sized for Windows desktops at 100% (17px base). Fixed sidebar, 68px toolbar, dense content on a flat ground. 1px borders, 7px radius, no shadows, one blue. */
:root { color-scheme: light;
  --bg: #f6f7f8; --panel: #ffffff; --side: #1d2229; --side-fg: #c5cbd3; --fg: #1d2229; --fg-2: #5b6470;
  --line: #dde1e6; --line-2: #eceef1; --accent: #1f5fbf; --accent-soft: #e6eefb;
  --ok: #2a7a46; --ok-soft: #e4f3e9; --warn: #9a5b12; --warn-soft: #fbefd9; --danger: #b3261e; --danger-soft: #fbe7e5;
  --sans: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif; --mono: "IBM Plex Mono", "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--fg); font: 400 17px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h3 { font-size: 16px; color: var(--fg-2); text-transform: uppercase; letter-spacing: .04em; margin-top: 10px; padding-top: 14.5px; border-top: 1px solid var(--line-2); }
.num { font-variant-numeric: tabular-nums; } .mono { font-family: var(--mono); font-size: 15.5px; } .muted { color: var(--fg-2); }
.danger { color: var(--danger); } .nowrap { white-space: nowrap; } .wrap { white-space: normal !important; } .inline { display: inline; }
.req { font-weight: 400; color: var(--fg-2); font-size: 14px; margin-left: 5px; }

.shell { display: grid; grid-template-columns: max-content 1fr; min-height: 100%; } /* the sidebar is as wide as the brand line */
.side { background: var(--side); color: var(--side-fg); padding: 19px 12px; display: flex; flex-direction: column; gap: 17px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 5px 24px 5px 10px; color: #fff; font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.brand .mark { width: 34px; height: 34px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; flex: none; }
.brand .mark svg { width: 20.5px; height: 20.5px; fill: #fff; } .brand:hover { text-decoration: none; }
.side .grp { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #7d8794; padding: 12px 10px 5px; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 7px; color: var(--side-fg); font-weight: 500; }
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.side nav a[aria-current="page"] { background: rgba(255,255,255,.1); color: #fff; }
.side nav svg { width: 20.5px; height: 20.5px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.side nav a:hover svg, .side nav a[aria-current="page"] svg { opacity: 1; }
.side .foot .start-over { margin-top: 7px; padding: 0; border: 0; background: none; color: var(--side-fg); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; } .side .foot .start-over:hover { color: #fff; }
.side .foot:has(.org-logo) { display: flex; gap: 10px; align-items: center; } .side .foot .org-logo { width: 36px; height: 36px; object-fit: contain; background: #fff; border-radius: 7px; padding: 3px; flex: none; }
.side .foot { margin-top: auto; padding: 12px 10px 2px; font-size: 14.5px; border-top: 1px solid rgba(255,255,255,.08); line-height: 1.4; contain: inline-size; } .side .foot b { color: #fff; font-weight: 500; display: block; font-size: 13.5px; white-space: pre-line; }

.main { min-width: 0; display: flex; flex-direction: column; }
.bar { height: 68px; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 19px; padding: 0 29px; position: sticky; top: 0; z-index: 5; }
.crumbs { display: flex; align-items: center; gap: 10px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.crumbs a { color: var(--fg-2); font-weight: 400; } .crumbs .muted { font-weight: 400; }
.search { margin-left: auto; position: relative; }
.search .sbtn { position: absolute; left: 0; top: 0; width: 38.5px; height: 38.5px; border: 0; border-radius: 7px; background: none; cursor: pointer; display: grid; place-items: center; z-index: 1; }
.search:not(.open) .sbtn:hover { background: var(--bg); }
.search input { width: 38.5px; height: 38.5px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: transparent; font: 400 16.5px var(--sans); padding: 0 12px 0 38.5px; outline: none; cursor: pointer; transition: width .15s ease; }
.search input::placeholder { color: transparent; } .search.open input::placeholder { color: var(--fg-2); } .search input::-webkit-search-cancel-button { display: none; }
.search.open input { width: min(435.5px, 50vw); border-color: var(--line); background: var(--bg); color: var(--fg); cursor: text; }
.search.open input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--panel); }
.search svg { width: 19px; height: 19px; fill: none; stroke: var(--fg-2); stroke-width: 2; stroke-linecap: round; }
.dd { position: relative; display: inline-flex; } .dd > .menu { right: 0; left: auto; top: 46px; min-width: 205.5px; } .btn .caret { font-size: 12px; margin-left: 2px; color: var(--fg-2); } .btn.primary .caret { color: inherit; }
.print-head { display: none; }
@media print {
  .side, .bar, .filterbar, .page-head .actions, .how, .flash, .ask-panel, .dd, .menu, .suggest { display: none !important; }
  .shell { display: block; } .content, .content.wide { padding: 0; max-width: none; } body { background: #fff; color: #000; }
  .page-head { margin-bottom: 7px; } .page-head h1 { font-size: 22px; } .print-head { display: block; font-size: 13px; color: #555; margin-bottom: 12px; line-height: 1.5; }
  .panel { border: 0; border-radius: 0; margin: 0; overflow: visible; } .scroll { overflow: visible; } .ph { padding: 0 0 7px; } .ph h2 { font-size: 14.5px; }
  .tbl { font-size: 13px; } .tbl th, .tbl td { padding: 5px 10px; white-space: normal; } .tbl th { background: #fff; color: #000; border-bottom: 1px solid #000; }
  thead { display: table-header-group; } tfoot { display: table-footer-group; } tr { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
.avatar { width: 38.5px; height: 38.5px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font: 600 16px var(--sans); cursor: pointer; display: grid; place-items: center; }
.avatar:hover, .avatar[aria-expanded="true"] { box-shadow: 0 0 0 4px var(--accent-soft); }
.me .menu { right: 0; top: 48.5px; min-width: 266px; max-height: none; }
.menu .who { padding: 10px 12px 12px; margin-bottom: 5px; border-bottom: 1px solid var(--line-2); font-size: 15.5px; color: var(--fg-2); } .menu .who b { display: block; color: var(--fg); font-weight: 500; font-size: 16.5px; }
.menu a { display: block; padding: 7px 12px; border-radius: 5px; color: var(--fg); font-size: 16.5px; } .menu a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.content { padding: 26.5px 29px 72.5px; max-width: 1597px; width: 100%; margin: 0 auto; }   /* centered on big screens; every page the same width */ .content.wide { max-width: none; }

.flash { background: var(--accent-soft); color: var(--accent); border: 1px solid transparent; border-radius: 7px; padding: 11px 17px; margin-bottom: 19px; font-weight: 500; }
.errors { background: var(--danger-soft); color: var(--danger); border-radius: 7px; padding: 11px 17px; margin-bottom: 19px; font-weight: 500; }
.notice { background: var(--warn-soft); color: var(--warn); border-radius: 7px; padding: 11px 17px; margin-bottom: 19px; }
.notice a { color: inherit; text-decoration: underline; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 19px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head > :first-child { flex: 1 1 340px; min-width: 0; } .page-head > .actions { flex: 0 1 auto; justify-content: flex-end; }   /* a long subtitle wraps; the buttons stay up right */
.page-head h1 { font-size: 24px; letter-spacing: -.01em; } .page-head .sub { color: var(--fg-2); margin-top: 4px; display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.h-sub { font-weight: 400; font-size: 18px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn { height: 38.5px; padding: 0 14.5px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); font: 500 16.5px var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.btn:hover { background: var(--bg); text-decoration: none; } .btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.primary:hover { filter: brightness(1.08); }
.btn.sm { height: 31.5px; padding: 0 11px; font-size: 15.5px; } .btn.ghost { border-color: transparent; background: transparent; color: var(--fg-2); }
.btn.danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn .count { background: var(--warn-soft); color: var(--warn); border-radius: 1209px; padding: 0 8px; font-size: 14.5px; }
.btn:focus-visible, .tbl tbody tr:focus-visible, .side nav a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14.5px; margin-bottom: 22px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 17px 19px; min-width: 0; }
.tile .k { font-size: 15.5px; color: var(--fg-2); font-weight: 500; } .tile .v { font-size: 29px; font-weight: 600; letter-spacing: -.01em; margin-top: 5px; line-height: 1.2; }
.tile .d { font-size: 15.5px; color: var(--fg-2); margin-top: 5px; } .tile .d.up { color: var(--ok); } .tile .d.down { color: var(--danger); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 7px; overflow: clip; margin-bottom: 19px; }
.panel .ph { display: flex; align-items: center; justify-content: space-between; gap: 14.5px; padding: 12px 19px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel .ph h2 { font-size: 17px; } .panel .ph .muted { font-size: 15.5px; }
.pad { padding: 14.5px 19px; } .pad-sm { padding: 10px 19px; border-bottom: 1px solid var(--line-2); } .pad-sm:last-child { border-bottom: 0; }
.panel-pad { background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 14.5px 19px; margin-bottom: 19px; }
.cols { display: grid; grid-template-columns: 411.5px 1fr; gap: 19px; align-items: start; } .cols > * { min-width: 0; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 19px; align-items: start; } .cols-2 > * { min-width: 0; }
.scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 16.5px; }
.tbl th { text-align: left; font-weight: 500; font-size: 14.5px; color: var(--fg-2); padding: 10px 17px; border-bottom: 1px solid var(--line); background: var(--bg); white-space: nowrap; }
.tbl th.sortable a { color: inherit; } .tbl th.on a { color: var(--fg); font-weight: 600; } .tbl .arrow { font-size: 11px; }
.tbl td { padding: 10px 17px; border-bottom: 1px solid var(--line-2); white-space: nowrap; vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; } .tbl tbody tr[data-href] { cursor: pointer; } .tbl tbody tr[data-href]:hover td { background: var(--accent-soft); }
/* the gifts ledger: long names wrap so Amount stays on screen */ .tbl.ledger td.wrapname { white-space: normal; }
.tbl th.r, .tbl td.r { text-align: right; } .tbl td.pri { font-weight: 500; } .tbl td.wrap { white-space: normal; min-width: 266px; }
.tbl tfoot td { font-weight: 600; border-top: 1px solid var(--line); background: var(--bg); }
.tbl tr.void td { color: var(--fg-2); } .tbl tr.void td.num, .tbl tr.void .pri { text-decoration: line-through; } .tbl tr.soft td { color: var(--fg-2); font-style: italic; }
.tbl tr.dim td { color: var(--fg-2); } .tbl .memo { font-style: normal; max-width: 314.5px; white-space: normal; }
.tbl.merge td { white-space: normal; } .tbl.merge tr.diff td:nth-child(3) { background: var(--warn-soft); }
.tbl.map .sample { display: inline-block; margin-right: 12px; } .tbl.map td { white-space: normal; }
.empty { color: var(--fg-2); padding: 22px 19px; white-space: normal !important; }
.badge { display: inline-block; font-size: 14px; font-weight: 500; padding: 1px 8px; border-radius: 5px; border: 1px solid var(--line); color: var(--fg-2); vertical-align: 1px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; } .badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.info { background: var(--accent-soft); color: var(--accent); border-color: transparent; } .badge.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14.5px; }
.pager { display: flex; gap: 14.5px; align-items: center; justify-content: flex-end; padding: 12px 19px; border-top: 1px solid var(--line); }
.tabs { display: flex; gap: 2px; margin-bottom: 17px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 17px; color: var(--fg-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; } .tabs a.on { color: var(--fg); border-color: var(--accent); } .tabs a:hover { text-decoration: none; color: var(--fg); }

.dl { margin: 0; padding: 5px 19px 12px; } .dl div { display: grid; grid-template-columns: 109px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-2); } .dl div:last-child { border-bottom: 0; }
.dl dt { color: var(--fg-2); font-size: 16px; } .dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; } .kv > div { padding: 14.5px 19px; border-right: 1px solid var(--line); min-width: 0; } .kv > div:last-child { border-right: 0; }
.kv .k { font-size: 15.5px; color: var(--fg-2); } .kv .v { font-size: 24px; font-weight: 600; margin-top: 2px; white-space: nowrap; } .kv .v small { font-size: 16px; font-weight: 400; color: var(--fg-2); }
.kv .muted { font-size: 15.5px; }
.years { display: flex; gap: 17px; flex-wrap: wrap; padding: 10px 19px; border-top: 1px solid var(--line); font-size: 15.5px; color: var(--fg-2); background: var(--bg); } .years b { color: var(--fg); font-weight: 500; }
.bar-line { height: 7px; background: var(--line); border-radius: 4px; overflow: hidden; width: 169.5px; display: inline-block; vertical-align: middle; } .bar-line i { display: block; height: 100%; background: var(--accent); }
.chart { display: flex; align-items: flex-end; gap: 7px; height: 218px; padding: 19px 19px 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: stretch; height: 100%; min-width: 0; }
.chart .bars { position: relative; flex: 1; display: flex; align-items: flex-end; } .chart .bar { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.chart .tick { position: absolute; left: -2px; right: -2px; height: 2px; background: var(--fg); opacity: .55; }
.chart .lbl { text-align: center; font-size: 14px; color: var(--fg-2); margin-top: 7px; }

.filters { background: var(--panel); border: 1px solid var(--line); border-radius: 7px; margin-bottom: 19px; }
.filters summary { padding: 11px 19px; cursor: pointer; font-weight: 500; list-style: none; } .filters summary::-webkit-details-marker { display: none; }
.filters summary::before { content: "▸ "; color: var(--fg-2); } .filters[open] summary::before { content: "▾ "; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205.5px, 1fr)); gap: 12px 17px; padding: 5px 19px 17px; align-items: end; }
.panel-pad.filter-grid { padding: 14.5px 19px; }
.actions-inline { display: flex; gap: 10px; align-items: flex-end; }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .filters .inline-form { padding: 0 19px 14.5px; }
.inline-form input, .inline-form select { height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; font: 400 16px var(--sans); background: var(--panel); color: var(--fg); }

.form-panel .form { padding: 19px; } 
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 24px; } .form > * { min-width: 0; } .form .full, .form h3, .form details { grid-column: 1 / -1; }
.form.compact { gap: 12px 17px; padding: 0; } .form.compact .field label { font-size: 14.5px; }
.field label { display: block; font-size: 15.5px; font-weight: 500; color: var(--fg-2); margin-bottom: 6px; }
.field input, .field select, .field textarea, .filter-grid input, .filter-grid select { width: 100%; height: 41px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--fg); font: 400 16.5px var(--sans); padding: 0 12px; outline: none; }
.field textarea { height: auto; padding: 10px 12px; resize: vertical; font-family: var(--sans); } .field input[type=checkbox] { width: auto; height: auto; }
.field input:focus, .field select:focus, .field textarea:focus, .filter-grid input:focus, .filter-grid select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input[type=file] { padding: 6px; }
.field .amt { position: relative; } .field .amt input { padding-left: 26.5px; font-weight: 600; font-size: 19px; height: 48.5px; }
.field .amt::before { content: "$"; position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--fg-2); }
.field .hint, .hint { font-size: 14.5px; color: var(--fg-2); margin-top: 5px; white-space: normal; } .hint a { margin-right: 2px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 16.5px; color: var(--fg); font-weight: 400; cursor: pointer; margin: 7px 0; }
.flags-row { display: flex; gap: 29px; flex-wrap: wrap; }
.form-foot { display: flex; gap: 10px; justify-content: flex-end; align-items: center; padding: 14.5px 19px; border-top: 1px solid var(--line); background: var(--bg); flex-wrap: wrap; }
.form-foot .check { margin-right: auto; }
.splits { display: grid; gap: 10px; margin-top: 10px; } .split-row { display: grid; grid-template-columns: 1fr 169.5px; gap: 10px; }
.split-row select, .split-row input { height: 38.5px; border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; background: var(--panel); color: var(--fg); font: 400 16px var(--sans); }
.danger-zone { margin-top: 24px; display: flex; gap: 12px; align-items: center; }

.list-nav { display: flex; flex-direction: column; } .list-nav a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 19px; border-bottom: 1px solid var(--line-2); color: var(--fg); }
.codes-more > summary { display: block; padding: 10px 19px; color: var(--fg-2); cursor: pointer; } .codes-more[open] > summary { border-bottom: 1px solid var(--line-2); }
.list-nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 500; } .list-nav a:hover { text-decoration: none; background: var(--bg); } .list-nav .muted { font-family: var(--mono); font-size: 14px; }
.report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14.5px; }
.report-card { display: flex; flex-direction: column; gap: 5px; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 17px 19px; color: var(--fg); }
.report-card:hover { border-color: var(--accent); text-decoration: none; } .report-card span { color: var(--fg-2); font-size: 16px; line-height: 1.4; }
.report-card b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps { margin: 0; padding-left: 22px; } .steps li { margin-bottom: 10px; }
.log { margin: 0; font: 15.5px/1.5 var(--mono); white-space: pre-wrap; max-height: 484px; overflow: auto; }
.changes div { white-space: normal; } .changes s { text-decoration: line-through; }

@media (max-width: 1161.5px) {
  .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 7px 14.5px; padding: 12px 19px; }
  .side .grp, .side .foot { display: none; } .side nav { display: flex; gap: 2px; flex-wrap: wrap; } .side nav a { padding: 7px 12px; }
  .bar { padding: 0 19px; gap: 12px; } .search.open input { width: min(435.5px, 55vw); } .content { padding: 19px; }
  .tiles { grid-template-columns: 1fr 1fr; } .cols, .cols-2, .form { grid-template-columns: 1fr; } .kv { grid-template-columns: 1fr 1fr; grid-auto-flow: row; } .kv div:nth-child(2) { border-right: 0; }
}
@media (prefers-reduced-motion: no-preference) { .btn, .side nav a { transition: background-color .12s; } }

/* ---- polish pass ---- */
::placeholder { color: var(--fg-2); opacity: .6; }
.tbl td { padding: 11px 17px; vertical-align: middle; }
.tbl thead th { position: sticky; top: 68px; z-index: 1; }
.sub-cell { font-size: 14.5px; line-height: 1.35; margin-top: 1px; font-weight: 400; }
.name-cell { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.tbl.donors td.pri { white-space: normal; min-width: 314.5px; }
.tbl.gifts td { white-space: normal; } .tbl.gifts td.num, .tbl.gifts td.act { white-space: nowrap; }
.tbl td.act { width: 1%; } .hover-only { visibility: hidden; display: inline-flex; gap: 2px; } tr:hover .hover-only, dd:hover .hover-only, tr:focus-within .hover-only { visibility: visible; }
.kv-panel { margin-bottom: 19px; overflow: visible; }
.link { color: var(--accent); cursor: pointer; font-weight: 500; font-size: 16px; list-style: none; } .link::-webkit-details-marker { display: none; } .link::before { content: "+ "; }
details[open] > .link::before { content: "− "; }
button.inline-link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }   /* a form button that reads as a link in a sentence */
details .form.inner { margin-top: 14.5px; padding-top: 14.5px; border-top: 1px solid var(--line-2); }
.field.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .field.two label { display: block; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; width: max-content; }
.seg-opt { padding: 8px 17px; cursor: pointer; font-weight: 500; color: var(--fg-2); display: flex; gap: 10px; align-items: center; } .seg-opt + .seg-opt { border-left: 1px solid var(--line); }
.seg-opt:has(input:checked) { background: var(--accent-soft); color: var(--accent); } .seg-opt input { position: absolute; opacity: 0; }
.flag-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 1209px; font-size: 15.5px; font-weight: 500; cursor: pointer; color: var(--fg-2); background: var(--panel); }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; } .chip:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #fff; }
.amt.big input { height: 58.5px; font-size: 26.5px; padding-left: 31.5px; } .amt.big::before { font-size: 22px; left: 13px; }
.how-rows .row-fields { display: flex; gap: 19px; flex-wrap: wrap; align-items: flex-end; }
.how-rows .row-fields > .field { flex: 1 1 220px; max-width: 360px; }
.gift-form .rp-body > .field { max-width: 1118px; } .gift-form .amount-field { max-width: 260px; }

/* list toolbar */
.toolbar { display: flex; align-items: center; gap: 14.5px; flex-wrap: wrap; margin-bottom: 14.5px; }
.tabs.slim { margin: 0; border: 0; gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 4px; }
.tabs.slim a { padding: 6px 14.5px; border-radius: 5px; border: 0; margin: 0; font-size: 16px; } .tabs.slim a.on { background: var(--accent-soft); color: var(--accent); }
.tabs.slim a .muted { font-weight: 400; margin-left: 5px; }
.lq { flex: 1 1 314.5px; min-width: 0; height: 41px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--fg); padding: 0 14.5px; font: 400 16.5px var(--sans); outline: none; }
.lq:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.saved a { margin-right: 2px; }

/* typeahead */
.suggest { position: absolute; left: 0; right: 0; top: 46px; z-index: 30; }
.suggest-list { list-style: none; margin: 0; padding: 5px; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 12px 36.5px -10px rgba(0,0,0,.3); }
.suggest-list li a { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 5px; color: var(--fg); }
.suggest-list li a:hover, .suggest-list li.active a { background: var(--accent-soft); text-decoration: none; }
.suggest-list .s-name { font-weight: 500; } .suggest-list .s-meta { font-size: 14.5px; color: var(--fg-2); }
.suggest-list .s-all { border-top: 1px solid var(--line-2); margin-top: 5px; padding-top: 5px; } .suggest-list .s-all a { flex-direction: row; color: var(--accent); font-size: 16px; }
.search:not(:focus-within) .suggest { display: none; }
.htmx-request .lq { background-image: linear-gradient(90deg, transparent, var(--accent-soft), transparent); background-size: 200% 100%; animation: shimmer 1s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0 } to { background-position: -200% 0 } }
@media (max-width: 1161.5px) { .tbl thead th { position: static; } }

/* fixes after screenshot review */
[hidden] { display: none !important; }
/* A table that fits keeps its sticky header (an overflow wrapper would trap it). One that is wider than the panel
   gets .wide from app.js and scrolls sideways instead, with a scrollbar that is always visible. */
.scroll { overflow-x: visible; }
.scroll.wide, .scroll.wide:hover { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--fg-2) transparent; }
.scroll.wide::-webkit-scrollbar { height: 12px; } .scroll.wide::-webkit-scrollbar-track { background: var(--bg); }
.scroll.wide::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; border: 2px solid var(--bg); } .scroll.wide::-webkit-scrollbar-thumb:hover { background: var(--fg-2); }
.scroll.wide .tbl thead th { position: static; }
@media (max-width: 1161.5px) { .scroll { overflow-x: auto; } }
.chart .bar { position: relative; } .chart .val { position: absolute; left: 0; right: 0; bottom: 100%; margin-bottom: 4px; text-align: center; font: 500 13px var(--mono); color: var(--fg-2); white-space: nowrap; }
.chart { padding-top: 34px; }

/* ---- custom reports: the + card, the builder, the saved report page ---- */
.report-grid .report-card { min-height: 84px; }
.report-card.add { border-style: dashed; background: transparent; display: grid; grid-template-columns: 41px 1fr; column-gap: 14.5px; row-gap: 2px; align-content: center; }
.report-card.add .plus { align-self: center; width: 41px; height: 41px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font: 400 29px/1 var(--sans); }
.report-card.add:hover { background: var(--panel); } .report-card.add:hover .plus { background: var(--accent); color: #fff; }
.report-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* groups on the Reports page: sections you drag cards between; the ··· appears on hover */
.rg { margin-bottom: 26.5px; border-radius: 10px; } .rg-title { font-size: 20px; font-weight: 600; margin: 24px 0 12px; } .rg-title:first-of-type { margin-top: 4px; }
.rg-quiet { color: var(--fg-2); font-size: 16px; padding: 2px 0 6px; }
.rg-head { display: flex; align-items: center; gap: 7px; margin: 0 0 12px; }
.rg-head h2 { font-size: 16px; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-2); font-weight: 600; }
.rc { position: relative; display: grid; min-width: 0; } .rc .report-card { height: 100%; min-width: 0; overflow: hidden; } .rc.dragging { opacity: .4; }
.dots { position: absolute; top: 10px; right: 10px; width: 31.5px; height: 26.5px; border: 0; border-radius: 5px; background: transparent; color: var(--fg-2); font: 400 22px/1 var(--sans); cursor: pointer; opacity: 0; }
.rc:hover .dots, .rc:focus-within .dots, .rg-head .dots { opacity: 1; } .rg-head .dots { position: static; } .dots:hover { background: var(--accent-soft); color: var(--accent); }
.rg-empty { grid-column: 1 / -1; min-height: 68px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 7px; color: var(--fg-2); font-size: 16px; }
.rg.over { background: var(--accent-soft); outline: 1px dashed var(--accent); outline-offset: 7px; } .rg.over .rg-empty { border-color: var(--accent); color: var(--accent); }
.rg-new { display: none; } .rg-new .rg-empty { min-height: 53.5px; } body.dragging-report .rg-new { display: block; }
.menu .sep { height: 1px; background: var(--line); margin: 5px 7px; }
.report-card b .badge { margin-left: 10px; font-size: 13px; color: var(--fg-2); vertical-align: 1px; }
.report-card .clamp { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
/* the list's picture: its symbol on a square in its section's color (app/services/list_icons.py) */
.rc .report-card { flex-direction: row; align-items: center; gap: 14.5px; }
.rc-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; padding-right: 22px; }
.rc .report-card b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.li-ic { flex: none; width: 43.5px; height: 43.5px; border-radius: 10px; display: grid; place-items: center; background: var(--ic-bg); color: var(--ic-fg); }
.li-ic svg { width: 24px; height: 24px; }
.rg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--ic-fg); flex: none; }
.menu button .rg-dot { margin-right: 10px; vertical-align: 0; }
.c-blue { --ic-bg: #e3edfc; --ic-fg: #1f5fbf; } .c-green { --ic-bg: #def3e6; --ic-fg: #1d7a45; } .c-amber { --ic-bg: #fbefd5; --ic-fg: #a3620a; }
.c-red { --ic-bg: #fbe3e1; --ic-fg: #b8352b; } .c-purple { --ic-bg: #ede6fb; --ic-fg: #6a43c2; } .c-teal { --ic-bg: #dcf2f1; --ic-fg: #137a77; }
.c-gray { --ic-bg: #eceef1; --ic-fg: #5b6573; }

/* Views page: star (each person's own), filter */
.star-form { position: absolute; top: 10px; right: 44px; } .rc:not(:has(.dots)) .star-form { right: 10px; }
.star { width: 29px; height: 26.5px; border: 0; border-radius: 5px; background: transparent; color: var(--fg-2); font: 400 17px/1 var(--sans); cursor: pointer; opacity: 0; }
.rc:hover .star, .rc:focus-within .star, .star.on { opacity: 1; } .star.on { color: #d9a21b; } .star:hover { background: var(--accent-soft); color: #d9a21b; }
.run-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; color: var(--fg-2); font-size: 14px; }
.star-inline { display: inline-block; margin-left: 8px; vertical-align: 3px; } .star-inline .star { opacity: 1; }
.page-head .actions form { display: inline; }


/* ===== reports ===========================================================================================
   One vocabulary on every reports screen:
   .tok       something you click to change: a field, a choice, a column
   .tok.sum   a summary of the gifts or donors behind a row (blue)
   .tok.when  the dates a summary counts: the period, the period before, ever
   .tok.calc  a formula over the other columns
   .op        a comparison word; grey, clickable
   .w         a plain word in the sentence
   inputs     typed values, sized by kind: money 104, number 72, date 136, text 170
   Controls are 34px tall in the editor and 41px on the filter bar. Nothing has a chevron; the token is the control. */

/* the Ask box: its own panel above the editor, a quiet gradient at rest, alive only while Claude works */
.ask-panel { position: relative; margin-bottom: 19px; padding: 17px 19px; border-radius: 10px; border: 1px solid transparent;
  background: linear-gradient(var(--panel), var(--panel)) padding-box, linear-gradient(120deg, #9dbcf0, #c4b5fd, #f5b8d3, #9dbcf0) border-box; }
.ask-panel::before { content: ""; position: absolute; inset: 0; border-radius: 10px; pointer-events: none;
  background: linear-gradient(120deg, var(--accent-soft), transparent 40%, transparent 60%, #fbe2ee); opacity: .7; }
.ask-row { display: flex; gap: 10px; align-items: center; position: relative; }
.ask-panel .ask-turn { position: relative; }
.ask-panel.thinking .ask-row input { border-color: transparent; box-shadow: none;
  background: linear-gradient(var(--panel), var(--panel)) padding-box, linear-gradient(90deg, var(--accent), #a78bfa, #f0a3c0, var(--accent)) border-box;
  background-size: auto, 300% 100%; animation: drift 1.8s linear infinite; }
@keyframes drift { to { background-position: 0 0, -300% 0; } }
.ask-panel.thinking .btn, .ask-panel.thinking .spark { animation: breathe 1.2s ease-in-out infinite; } @keyframes breathe { 50% { opacity: .5; } }
.rp-head input.glow { animation: glow 1.8s ease-out; }

.rp-sec.glow { animation: glow 1.8s ease-out; } @keyframes glow { 0%, 35% { background: var(--accent-soft); } 100% { background: transparent; } }
.ask-turn.problem { color: var(--danger); }
@media (prefers-reduced-motion: reduce) { .ask-panel.thinking .ask-row input, .ask-panel.thinking .btn, .ask-panel.thinking .spark, .rp-sec.glow, .rp-head input.glow { animation: none; } }
.ask-row input { flex: 1; min-width: 0; height: 43.5px; border: 1px solid var(--line); border-radius: 7px; padding: 0 14.5px; font: 400 17px var(--sans); background: var(--panel); color: var(--fg); outline: none; }
.ask-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); } .ask-row .btn { height: 43.5px; }
.ask-turn { margin-bottom: 10px; line-height: 1.45; font-size: 16.5px; } .ask-turn .who { font-weight: 600; margin-right: 10px; }
.ask-turn.assistant { background: var(--accent-soft); border-radius: 7px; padding: 10px 14.5px; }

/* the report page: filter bar and "how this report works" */
.filterbar { display: flex; gap: 12px 19px; flex-wrap: wrap; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 14.5px 19px; margin-bottom: 19px; }
.filterbar .field { min-width: 0; } .filterbar .field label { white-space: nowrap; }
.filterbar .field > select, .filterbar .field > input { width: auto; min-width: 181.5px; max-width: 339px; }
.filterbar .fb-narrow input { width: 133px; min-width: 0; }
.filterbar .fb-go label { visibility: hidden; }
.fb-custom { display: flex; gap: 7px; margin-top: 7px; } .fb-two { display: flex; gap: 7px; align-items: center; } .fb-two input { width: 157.5px; min-width: 0; }
.fb-static { height: 41px; display: flex; align-items: center; color: var(--fg-2); font-size: 16px; max-width: 387px; }
.fb-multi { position: relative; } .fb-multi summary { list-style: none; } .fb-multi summary::-webkit-details-marker { display: none; }
.pick { height: 41px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); cursor: pointer; white-space: nowrap; font: 400 16.5px var(--sans); color: var(--fg); min-width: 133px; max-width: 339px; overflow: hidden; }
.pick .more { color: var(--fg-2); font-size: 15.5px; } .pick:hover { border-color: var(--accent); } .pick.any { color: var(--fg-2); }
.fb-pop { position: absolute; z-index: 8; top: 46px; left: 0; min-width: 266px; max-height: 363px; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 10px 14.5px; box-shadow: 0 10px 29px -8px rgba(0,0,0,.25); }
.fb-pop .check { margin: 5px 0; white-space: nowrap; }
.resolved { font-size: 14.5px; color: var(--fg-2); margin-top: 5px; }
.how summary { padding: 12px 19px; cursor: pointer; font-weight: 500; } .how[open] summary { border-bottom: 1px solid var(--line); }
/* a view's chart (app/static/chart.js): series colors are a validated categorical order; one series uses the accent */
.vchart { --vc1: #2a78d6; --vc2: #eb6834; --vc3: #1baf7a; --vc4: #eda100; --vc5: #e87ba4; --vc6: #008300; padding: 14.5px 19px 12px; position: relative; }

.vc-pick { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14.5px; } .vc-pick .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.vc-legend { display: flex; gap: 17px; flex-wrap: wrap; font-size: 15px; margin-bottom: 10px; align-items: center; } .vc-legend i, .vc-tip i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; }
.vc-plot { position: relative; } .vc-plot svg { display: block; overflow: visible; }
.vc-grid { stroke: var(--line-2); stroke-width: 1; } .vc-axis { stroke: var(--line); stroke-width: 1; }
.vc-tick { fill: var(--fg-2); font-size: 13px; font-variant-numeric: tabular-nums; } .vc-cat { fill: var(--fg); font-size: 14px; } .vc-val { fill: var(--fg-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.vc-partial path { opacity: .4; } .vc-hit { fill: transparent; } .vc-hit:hover { fill: var(--fg); fill-opacity: .04; }
.vc-tip { position: absolute; z-index: 3; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 7px 12px; font-size: 14.5px; min-width: 160px; white-space: nowrap; }
.vc-tip div { display: flex; align-items: center; gap: 0; } .vc-tip span { margin-left: auto; padding-left: 17px; font-variant-numeric: tabular-nums; } .vc-tip .vc-sum { border-top: 1px solid var(--line-2); margin-top: 3px; padding-top: 3px; }
.vc-note { font-size: 14.5px; color: var(--fg-2); margin-top: 7px; }
.how .dl div { grid-template-columns: 133px 1fr; } .how .ln { display: block; padding: 1px 0; } .how .ln .badge { margin-left: 7px; }

/* the editor */
.rp { overflow: visible; }
.rp-head { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 14.5px 19px; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.rp-head input { width: 100%; height: 41px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--fg); font: 500 17px var(--sans); padding: 0 12px; outline: none; }
.rp-head input.desc { font-weight: 400; }
.rp-head.has-icon { grid-template-columns: auto minmax(0, 2fr) minmax(0, 3fr); align-items: center; }
.icon-pick > .li-ic { border: 0; cursor: pointer; width: 41px; height: 41px; } .icon-pick > .li-ic:hover { outline: 2px solid var(--ic-fg); outline-offset: 1px; }
.dd > .menu.icon-menu { left: 0; right: auto; top: 48.5px; padding: 10px; width: max-content; max-width: none; } .icon-grid { display: grid; grid-template-columns: repeat(9, 38px); gap: 7px; }
.icon-grid .li-ic { width: 38px; height: 38px; border: 0; cursor: pointer; } .icon-grid .li-ic svg { width: 21px; height: 21px; }
.icon-grid .li-ic:hover, .icon-grid .li-ic.on { outline: 2px solid var(--ic-fg); outline-offset: 1px; }
.rp-head input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.rp-sec { display: grid; grid-template-columns: 181.5px minmax(0, 1fr); gap: 10px 19px; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.rp-lbl { font-weight: 600; font-size: 16px; padding-top: 6px; }
.rp-lbl .info { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-left: 7px; vertical-align: 1px;
  border: 1px solid var(--line); border-radius: 50%; color: var(--fg-2); font: italic 600 12px Georgia, serif; cursor: help; outline: none; }
.rp-lbl .info:hover, .rp-lbl .info:focus { color: var(--accent); border-color: var(--accent); }
.rp-lbl .info::after { content: attr(data-tip); position: absolute; left: -8px; top: 26.5px; z-index: 30; width: 326.5px; padding: 10px 12px; border-radius: 7px;
  background: var(--fg); color: var(--bg); font: 400 14.5px/1.45 var(--sans); white-space: normal; box-shadow: 0 5px 17px rgba(0,0,0,.18); display: none; }
.rp-lbl .info:hover::after, .rp-lbl .info:focus::after { display: block; }
.rp-body { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.line, .cond { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; min-height: 34px; }
.w { color: var(--fg-2); font-size: 16px; white-space: nowrap; }
.tok { display: inline-flex; align-items: center; height: 34px; max-width: 314.5px; border: 1px solid var(--line); border-radius: 6px; padding: 0 11px; background: var(--panel); color: var(--fg);
       font: 400 16px var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.tok:hover { border-color: var(--accent); } .tok.open, .tok:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tok.sum { border-color: transparent; background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.tok.calc { border-color: var(--accent); color: var(--accent); background: var(--panel); font-weight: 500; }
.tok.add { border-style: dashed; color: var(--accent); background: transparent; } .tok.add:hover { background: var(--accent-soft); border-color: transparent; }
.tok.period { border-style: dashed; } .tok.empty { color: var(--fg-2); font-style: italic; }
.pair { display: inline-flex; max-width: 100%; }
.pair .tok { border-radius: 0; } .pair .tok:first-child { border-radius: 6px 0 0 6px; } .pair .tok:last-child { border-radius: 0 6px 6px 0; }
.pair .tok.when { background: var(--panel); color: var(--accent); border: 1px solid var(--accent-soft); border-left: 0; font-weight: 400; }
.pair .tok.fld { background: var(--panel); color: var(--accent); border: 1px solid var(--accent-soft); border-left: 0; font-weight: 400; }
.op { color: var(--fg-2); font-size: 16px; background: none; border: 0; padding: 0 2px; height: 34px; cursor: pointer; font-family: var(--sans); text-decoration: underline dotted transparent; text-underline-offset: 4px; white-space: nowrap; }
.op:hover { text-decoration-color: var(--fg-2); }
.line input:not([type=checkbox]), .cond input:not([type=checkbox]) { height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; font: 400 16px var(--sans); background: var(--panel); color: var(--fg); outline: none; }
.line input:focus, .cond input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input.money { width: 126px !important; padding-left: 24px !important; } input.n { width: 87px; } input.d { width: 164.5px; } input.t { width: 205.5px; } input.as { width: 266px; }
textarea.sql { width: 100%; font-family: var(--mono); font-size: 16px; line-height: 1.5; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; resize: vertical; tab-size: 2; }
.sqlref summary { cursor: pointer; color: var(--fg-2); font-size: 16px; } .sqlref .sqlt { margin: 7px 0 0 17px; font-size: 16px; } .sqlref .cols { font-family: var(--mono); font-size: 14.5px; color: var(--fg-2); }
.sqlhint { white-space: normal !important; font-size: 15.5px; color: var(--fg-2); line-height: 1.45; }
.rp-switch { padding: 7px 19px 12px; text-align: right; } .rp-switch .op { font-size: 15.5px; }
pre.sqlshow { margin: 0; font-family: var(--mono); font-size: 15.5px; white-space: pre-wrap; }
input.fx { width: 411.5px; font-family: var(--mono); font-size: 16px; }
.fxhelp { flex-wrap: wrap; row-gap: 5px; } .fxhelp .tok { height: 29px; font-size: 15.5px; } .fxhelp > .w:last-child { font-size: 14.5px; color: var(--fg-2); }
.rp .amt { position: relative; display: inline-flex; } .rp .amt::before { content: "$"; position: absolute; left: 10px; top: 50%; translate: 0 -50%; color: var(--fg-2); font-size: 16px; }
.conds { display: flex; flex-direction: column; }
.cond { padding: 6px 0; border-bottom: 1px solid var(--line-2); } .cond:last-of-type { border-bottom: 0; }
.cond .tools { margin-left: auto; display: inline-flex; gap: 2px; align-items: center; }
.cond .x { visibility: hidden; } .cond:hover .x, .cond:focus-within .x { visibility: visible; }
.x { width: 34px; height: 34px; border: 0; background: transparent; border-radius: 6px; color: var(--fg-2); cursor: pointer; font: 400 19px var(--sans); }
.x:hover { background: var(--bg); color: var(--fg); }
.tok.where { border-color: transparent; color: var(--fg-2); font-size: 15.5px; background: transparent; } .tok.where:hover { background: var(--bg); }
.tok.where.on { background: var(--bg); color: var(--fg); }
.menu button small { display: block; font-size: 14.5px; color: var(--fg-2); font-weight: 400; } .menu button:hover small { color: inherit; }
.menu button .mi { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.nest { margin: 2px 0 5px 14.5px; padding: 2px 0 2px 14.5px; border-left: 2px solid var(--accent-soft); }
.nest .cond { padding: 5px 0; border-bottom: 0; } .nest .w.lead { display: block; margin: 5px 0 2px; }
.addrow { margin-top: 5px; }
.sub-add { flex-basis: 100%; min-height: 0; } .cond > .sub-add { display: none; } .cond:hover > .sub-add, .cond:focus-within > .sub-add { display: flex; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: 0; }
.colpanel { margin-top: 10px; padding: 12px 14.5px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); display: flex; flex-direction: column; gap: 7px; }
.colpanel .line .tools { margin-left: auto; display: inline-flex; gap: 2px; } .colpanel .nest { border-left-color: var(--line); }
.rp-foot { display: flex; gap: 10px; align-items: center; padding: 14.5px 19px; border-top: 1px solid var(--line); background: var(--bg); flex-wrap: wrap; }
.rp-foot .btn.ghost.danger { border-color: transparent; margin-right: auto; } .rp-foot > a.btn { margin-left: auto; }
.rp .check { margin: 0 0 0 19px; }
@media (max-width: 1161.5px) { .rp-head, .rp-sec { grid-template-columns: 1fr; } .rp-lbl { padding-top: 0; } }

/* ===== section tabs and the donor picker ================================================================== */
.tabs.slim.gifts-tabs { display: inline-flex; margin-bottom: 17px; }
.picker { position: relative; } .picker.chosen input:not([type=hidden]) { border-color: var(--ok); font-weight: 500; }
.picker .pick-list { position: absolute; left: 0; right: 0; top: 46px; z-index: 30; }
.picker:not(:focus-within) .pick-list { display: none; }
.pick-list .suggest-list li button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 8px 12px; border: 0; border-radius: 5px; background: none; color: var(--fg); font: 400 16.5px var(--sans); text-align: left; cursor: pointer; }
.pick-list .suggest-list li button:hover, .pick-list .suggest-list li.active button { background: var(--accent-soft); }
.pick-meta { margin-top: 5px; }
@media print { .no-print { display: none !important; } }

/* ===== read checks ==========================================================================================
   The photo on the left stays in view while the form on the right is checked against it. */
.drop { margin-bottom: 19px; } .drop-zone input { display: none; }
.drop-zone { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 34px 19px; margin: 14.5px; border: 2px dashed var(--line); border-radius: 10px; cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.drop-zone .spark { margin-bottom: 7px; } .drop-zone u { color: var(--accent); text-underline-offset: 2px; }
.drop-zone:hover, .drop.over .drop-zone { border-color: #a78bfa; background: linear-gradient(120deg, var(--accent-soft), transparent 50%, #fbe2ee); }
.drop.thinking .spark { animation: breathe 1.2s ease-in-out infinite; }
/* a drop with no AI behind it (a Word template): no Claude colors, the plain accent */
.drop.plain .drop-zone:hover, .drop.plain.over .drop-zone { border-color: var(--accent); background: var(--accent-soft); }
/* the sparkle tile, wherever Claude does the work; .btn.ai is a button whose work is Claude's */
.spark { width: 43.5px; height: 43.5px; border-radius: 10px; display: inline-grid; place-items: center; flex: none; color: #fff;
  background: linear-gradient(135deg, var(--accent), #a78bfa); } .spark svg { width: 24px; height: 24px; fill: currentColor; }
.btn.ai { border: 1px solid transparent; background: linear-gradient(var(--panel), var(--panel)) padding-box, linear-gradient(120deg, #9dbcf0, #c4b5fd, #f5b8d3, #9dbcf0) border-box; }
.btn.ai .spark { width: 22px; height: 22px; border-radius: 5.5px; margin-left: -2px; } .btn.ai .spark svg { width: 14px; height: 14px; }
.btn.ai:hover { background: linear-gradient(var(--accent-soft), var(--accent-soft)) padding-box, linear-gradient(120deg, #9dbcf0, #c4b5fd, #f5b8d3, #9dbcf0) border-box; }
.ask-line { flex: 1; min-width: 0; height: 43.5px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; padding: 0 14.5px; font-size: 17px; color: var(--fg-2); background: var(--panel); }
.ask-panel.thinking .ask-line { border-color: transparent;
  background: linear-gradient(var(--panel), var(--panel)) padding-box, linear-gradient(90deg, var(--accent), #a78bfa, #f0a3c0, var(--accent)) border-box;
  background-size: auto, 300% 100%; animation: drift 1.8s linear infinite; }
.read-by { display: flex; align-items: center; gap: 10px; padding: 12px 19px; border-bottom: 1px solid var(--line); color: var(--fg-2); font-size: 16px;
  background: linear-gradient(120deg, var(--accent-soft), transparent 55%, #fbe2ee); }
.read-by .spark { width: 24px; height: 24px; border-radius: 6px; } .read-by .spark svg { width: 14.5px; height: 14.5px; }
.check-form.arrive { animation: arrive 1.6s ease-out; } @keyframes arrive { 0%, 30% { box-shadow: 0 0 0 4px #c4b5fd; } 100% { box-shadow: 0 0 0 0 transparent; } }
.check-form .field.unsure > label::after { content: "check this"; margin-left: 7px; font-weight: 500; font-size: 14.5px; color: var(--warn); }
.check-form .field.unsure input, .check-form .field.unsure select { border-color: var(--warn); }

@media (prefers-reduced-motion: reduce) { .drop.thinking .spark, .ask-panel.thinking .ask-line, .check-form.arrive { animation: none; } }
.check-review { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 19px; align-items: start; }
.check-img { position: sticky; top: 19px; padding: 10px; } .check-img img { display: block; width: 100%; height: auto; border-radius: 5px; } .check-img iframe { width: 100%; height: 75vh; border: 0; }
.check-form .form { grid-template-columns: 1fr 1fr; } .check-form > .errors, .check-form > .notice { margin: 14.5px 19px 0; }
.check-form .payer { margin-bottom: 10px; } .check-form .choices { display: grid; gap: 7px; margin-bottom: 10px; }
.check-form .choice { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-weight: 400; }
.check-form .choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); } .check-form .choice input { width: auto; height: auto; flex: none; margin-top: 4.5px; }
.check-form .as-new { margin-top: 10px; }
@media (max-width: 1161.5px) { .check-review { grid-template-columns: 1fr; } .check-img { position: static; } }

/* ===== sign-in and roles ===================================================================================
   body.plain is a page outside the shell (sign-in, not-allowed): one card on the flat ground. */
body.plain { display: grid; place-items: center; padding: 29px 19px; }
.card { width: 100%; max-width: 484px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 31.5px 34px 29px; display: flex; flex-direction: column; gap: 17px; }
.card h1 { font-size: 22px; } .card p { margin: 0; line-height: 1.5; } .card .field { margin: 0; } .card .errors, .card .flash { margin: 0; }
.card .btn.wide { width: 100%; justify-content: center; height: 46px; margin-top: 5px; }
.brand-row { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 18px; color: var(--fg); margin-bottom: 5px; }
.brand-row .mark { width: 34px; height: 34px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; flex: none; }
.brand-row .mark svg { width: 20.5px; height: 20.5px; fill: #fff; }
.me .menu form { margin: 0; } .me .menu form button { font: 400 16.5px var(--sans); }
.code-input { font-size: 24px; letter-spacing: .18em; height: 53.5px; text-align: center; }
/* the sign-in cards on a phone: from the top, full width, the phone's sizes (m.css) */
@media (max-width: 600px) {
  body.plain { place-items: start stretch; padding: calc(28px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); }
  .card { max-width: none; padding: 26px 20px 24px; border-radius: 14px; gap: 16px; }
  .card h1 { font-size: 24px; letter-spacing: -.01em; }
  .card .field input { height: 50px; font-size: 17px; border-radius: 10px; }
  .card .code-input { font-size: 26px; height: 58px; }
  .card .btn.wide { height: 52px; font-size: 17px; border-radius: 12px; }
  .card .check { font-size: 16px; }
}
.card details summary.link { font-size: 16px; } .card details p { margin-top: 7px; font-size: 16px; }
.qr { width: 237px; height: 237px; margin: 14.5px 0; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 7px; } .qr svg { width: 100%; height: 100%; display: block; }
.key { user-select: all; }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(169.5px, 1fr)); gap: 10px 19px; padding: 14.5px 17px; border: 1px dashed var(--line); border-radius: 7px; font-size: 18px; }
/* a viewer sees the records without the controls that would only lead to "not allowed" */
body[data-role="viewer"] .page-head .actions .btn.primary, body[data-role="viewer"] .page-head .actions form,
body[data-role="viewer"] .form-foot .btn.primary, body[data-role="viewer"] .danger-zone, body[data-role="viewer"] .hover-only,
body[data-role="viewer"] .ask-panel { display: none !important; }
body[data-role="viewer"] .page-head .actions a.btn.primary[href="/backup/download"] { display: inline-flex !important; }

/* the menu a token opens */
.menu { position: absolute; z-index: 40; min-width: 242px; max-width: 387px; max-height: 435.5px; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 5px; box-shadow: 0 12px 36.5px -10px rgba(0,0,0,.3); }
.menu .mg { font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-2); padding: 10px 12px 4px; } .menu .mg:first-child { padding-top: 5px; }
.menu button, .menu label { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 12px; border: 0; background: none; border-radius: 5px; font: 400 16.5px var(--sans); color: var(--fg); cursor: pointer; white-space: nowrap; }
.menu button:hover, .menu label:hover, .menu button.cur { background: var(--accent-soft); color: var(--accent); }
.menu button.on { font-weight: 500; } .menu button.on::after { content: "✓"; margin-left: auto; color: var(--accent); }
.menu label input { margin: 0; } .menu .msearch { display: block; width: 100%; height: 36.5px; margin: 2px 0 5px; border: 1px solid var(--line); border-radius: 5px; padding: 0 10px; font: 400 16px var(--sans); background: var(--bg); color: var(--fg); outline: none; }
.menu .msearch:focus { border-color: var(--accent); } .menu .mhint { padding: 7px 12px; color: var(--fg-2); font-size: 15.5px; }
.menu .mdone { position: sticky; bottom: 0; background: var(--panel); border-top: 1px solid var(--line-2); padding: 5px 0 0; margin-top: 5px; display: flex; gap: 7px; }
.menu .mdone .btn { height: 34px; }

/* ===== mailings and templates ==============================================================================
   The Mailings page is a queue: one row per thing that can go out (receipts, tribute notices, statements, a
   letter to a list), each opening to its form and its waiting list. The template editor is text on the left,
   the fields and a live preview on the right; the preview is the letter as it will read for a real donor. */
/* mailings: upcoming ones are rows with a count and one button; a sent one is a record */
.mail-list .pri { font-weight: 600; } .mail-list .what { color: var(--fg-2); font-size: 15.5px; margin-top: 1px; white-space: normal; } .mail-list .what i { color: var(--fg); font-style: normal; }
.mail-list td small { display: block; color: var(--fg-2); font-size: 15px; margin-top: 3.5px; white-space: normal; max-width: 339px; }
.how-rows .rp-sec { grid-template-columns: 133px minmax(0, 1fr); } .how-rows > .rp-sec:last-of-type { border-bottom: 0; }
.how-rows .rp-body { gap: 7px; } .how-rows .choose { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.how-rows .choose .lead { color: var(--fg-2); }
.how-rows .choose select { height: 36.5px; border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; background: var(--panel); color: var(--fg); font: 500 16.5px var(--sans); min-width: 339px; max-width: 100%; }
.how-rows .why { color: var(--fg-2); font-size: 16px; white-space: normal; }
.how-rows .field { margin: 0; } .how-rows .field input { height: 38.5px; }
.how-rows .pair2 { display: flex; gap: 19px; align-items: flex-end; flex-wrap: wrap; } .how-rows .pair2 .field:first-child { flex: 1; max-width: 508px; min-width: 266px; }
.how-rows .choice label { display: flex; gap: 10px; align-items: flex-start; font-size: 16.5px; cursor: pointer; } .how-rows .choice label input { margin-top: 4px; } .how-rows .choice small { color: var(--fg-2); }
.how-rows .form-foot { border-top: 1px solid var(--line); } .how-rows .form-foot .muted { margin-right: auto; }
.seg.sm .seg-opt { padding: 6px 14.5px; font-size: 16px; }
.inplace { border: 1px solid var(--accent); border-radius: 7px; background: var(--panel); margin: 5px 0 0; box-shadow: 0 0 0 4px var(--accent-soft); overflow: visible; }
.inplace .rp-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 12px 17px; }
.inplace .rp-sec { grid-template-columns: 84.5px minmax(0, 1fr); padding: 12px 17px; }
.inplace .rp-sec.folded { padding: 10px 17px; } .inplace .rp-sec.folded .rp-lbl { color: var(--fg-2); cursor: pointer; }
.inplace .rp-foot { padding: 12px 17px; border-radius: 0 0 7px 7px; } .inplace .rp-foot .muted { margin-right: auto; }
.inplace #re-preview .ph { border-top: 1px solid var(--line); } .inplace #re-preview .tbl { font-size: 15.5px; } .inplace #re-preview .tbl thead th { position: static; }
.files-row { display: flex; gap: 26.5px; align-items: baseline; padding: 14.5px 19px; flex-wrap: wrap; } .files-row a { font-weight: 500; } .files-row .muted { font-size: 16px; }
.pv-for-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tpl-list td { white-space: normal; }
.map-tbl td { padding: 6px 10px; } .map-tbl td:first-child { width: 266px; } .map-tbl select { height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; font: 500 16px var(--sans); background: var(--panel); color: var(--fg); min-width: 266px; }
.map-tbl .badge { margin-left: 10px; } .tok.copied { background: var(--ok); color: #fff; border-color: var(--ok); }
/* the template editors: the form in how-rows sections on the left, How it reads on the right (sticky) */
.tpl-side { position: sticky; top: 19px; }
.chip-edit { min-height: 41px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); padding: 7px 12px; font: 400 16.5px/1.6 var(--sans); outline: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.chip-edit:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.chip-edit.empty::before { content: attr(data-placeholder); color: var(--fg-2); pointer-events: none; }
.chip-edit.line { white-space: nowrap; overflow: hidden; }
.mail-sheet { border: 1px solid var(--line); border-radius: 7px; background: var(--panel); padding: 14.5px 17px; display: flex; flex-direction: column; gap: 10px; }
.mail-sheet .chip-edit { border-color: transparent; padding: 2px 4px; margin: 0 -4px; min-height: 266px; }
.mail-sheet .chip-edit:focus { border-color: var(--line); box-shadow: none; }
.mail-fixed { color: var(--fg-2); font-size: 16.5px; line-height: 1.6; }
.mail-closing { border: 1px solid transparent; border-radius: 5px; padding: 2px 4px; margin: 0 -4px; font: 400 16.5px var(--sans); color: var(--fg); background: transparent; outline: none; width: 290.5px; }
.mail-closing:hover, .mail-closing:focus { border-color: var(--line); }
.fchip { display: inline-block; padding: 0 8px; margin: 0 1px; border-radius: 1209px; background: var(--accent-soft); color: var(--accent); font-weight: 500; font-size: 15.5px; line-height: 1.6; user-select: all; cursor: default; }
.fchip.bad { background: var(--warn-soft); color: var(--warn); }
.mail-fixed .fchip { opacity: .8; }
.dd > .menu.field-menu { left: 0; right: auto; top: 38.5px; width: 387px; }
.pv-mail { margin: -26.5px -31.5px 19px; padding: 12px 31.5px; border-bottom: 1px solid var(--line-2); background: var(--bg); font: 400 15.5px var(--sans); display: grid; gap: 4px; }
.pv-mail div { display: grid; grid-template-columns: 72.5px 1fr; } .pv-mail dt { color: var(--fg-2); } .pv-mail dd { margin: 0; }
.drop-foot { padding: 0 19px 17px; text-align: center; color: var(--fg-2); font-size: 16px; }
details.fold > summary { cursor: pointer; list-style: none; } details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h2::before { content: "+ "; color: var(--accent); } details.fold[open] > summary h2::before { content: "− "; }
details.fold:not([open]) > summary { border-bottom: 0; }
.how-rows .map-tbl td:first-child { width: auto; } .how-rows .map-tbl select { min-width: 0; width: 266px; }
.field-ref .grp td { background: var(--bg); font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-2); padding: 7px 17px; }
.field-ref .grp .muted { text-transform: none; letter-spacing: 0; }
.field-ref .tok { height: 29px; font: 500 15px var(--mono); color: var(--accent); }
@media (max-width: 1161.5px) { .tpl-edit { grid-template-columns: 1fr; } .tpl-side { position: static; } }
.how-rows .why.warn-line { color: var(--warn); }
.pv-for-row .btn { margin-right: 5px; }

.tpl-edit { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 19px; align-items: start; }
.map-dl div { grid-template-columns: minmax(109px, auto) 1fr; } .map-dl dt { font-size: 15.5px; color: var(--fg); }
.checks { background: var(--warn-soft); color: var(--warn); font-size: 15.5px; padding: 10px 17px; display: flex; flex-direction: column; gap: 4px; border-bottom: 1px solid var(--line-2); }
.pv-for { flex: 1; min-width: 193.5px; max-width: 290.5px; } .pv-for input:not([type=hidden]) { height: 34px; font-size: 15.5px; width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; background: var(--bg); color: var(--fg); }
.pv-for .pick-list { top: 38.5px; } .pv-for .pick-meta { display: none; }
.letter-preview { padding: 26.5px 31.5px; font: 400 16.5px/1.55 Georgia, "Times New Roman", serif; color: var(--fg); background: var(--panel); }
.pv-who { padding: 12px 31.5px 12px; font-size: 15.5px; } .pv-who + .letter-preview { padding-top: 26.5px; }
.letter-preview p { margin: 0 0 14.5px; } .letter-preview .pv-date { margin-bottom: 17px; } .letter-preview .pv-addr { margin-bottom: 17px; line-height: 1.4; }
.letter-preview .pv-sign { margin-top: 31.5px; } .letter-preview .pv-empty { color: var(--fg-2); font-style: italic; margin: 0 0 14.5px; }
.pv-table { width: 100%; border-collapse: collapse; margin: 5px 0 17px; font-size: 15.5px; } .pv-table th { text-align: left; font-weight: 600; border-bottom: 1px solid var(--fg); padding: 4px 5px; }
.pv-table td { padding: 4px 5px; border-bottom: 1px solid var(--line-2); } .pv-table .r { text-align: right; } .pv-table .tot td { font-weight: 600; border-top: 1px solid var(--fg); border-bottom: 0; }
.tpl-hist .clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 677.5px; }
.notify-field .picker { max-width: 532.5px; }
@media (max-width: 1331px) { .tpl-edit { grid-template-columns: 1fr; } }
/* the mailing page: the form, and beside it What happens + How it reads, redrawn as the form changes */
.mail-side .dl div { grid-template-columns: 96.5px 1fr; } .mail-side .ln { display: block; margin-top: 2px; font-size: 15.5px; }
.mail-side .side-warn-t { color: var(--warn); } .mail-side .side-warn { background: var(--warn-soft); color: var(--warn); font-size: 15.5px; padding: 8px 19px; border-top: 1px solid var(--line-2); }
.mail-side .letter-preview { font-size: 15.5px; padding: 19px 22px; }
.when-opt { margin-top: 12px; } #when-seg { flex-wrap: wrap; }
body[data-role="viewer"] .how-rows .form-foot, body[data-role="viewer"] .tpl-text .form-foot, body[data-role="viewer"] .tpl-hist form { display: none !important; }

.brand-grid { display: grid; grid-template-columns: 1fr; }
.brand-cell { display: grid; grid-template-columns: 181.5px 1fr; gap: 17px; padding: 14.5px 19px; border-bottom: 1px solid var(--line-2); align-items: start; } .brand-cell:last-child { border-bottom: 0; }
.brand-show { height: 87px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; } .brand-show img { max-width: 100%; max-height: 100%; }
.brand-ctl .inline-form { margin-top: 10px; } .brand-ctl input[type=file] { font-size: 15.5px; max-width: 290.5px; }
@media (max-width: 1161.5px) { .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 792px) { .report-grid { grid-template-columns: 1fr; } }
.copy-link { width: 100%; min-width: 314.5px; font: 400 14.5px/1.4 var(--mono); color: var(--fg-2); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; }
.copy-link:focus { color: var(--fg); }

/* ===== donors: the edit form (how-rows sections), the record page, the list =================================== */
.donor-form .nm-row { display: grid; grid-template-columns: 121px minmax(0, 1.25fr) minmax(0, .8fr) minmax(0, 1.25fr) 114.5px; gap: 12px; align-items: end; }
.donor-form .nm-row .field label { display: block; font-size: 14.5px; color: var(--fg-2); margin-bottom: 4px; font-weight: 500; }
.donor-form .field input, .donor-form .field select, .donor-form .inline-pair select, .donor-form .inline-pair input[type=date], .donor-form .dear-in {
  height: 38.5px; width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 0 11px; background: var(--panel); color: var(--fg); font: 400 16.5px var(--sans); }
.donor-form .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 9px 11px; font: 400 16.5px/1.5 var(--sans); background: var(--panel); color: var(--fg); resize: vertical; }
.donor-form input:focus, .donor-form select:focus, .donor-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.donor-form .addr-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.donor-form .addr-row:has(.a-c) { grid-template-columns: minmax(0, 1.4fr) 84.5px 133px minmax(0, 1fr); }
.donor-form .a-co { display: flex; flex-direction: column; justify-content: flex-end; } .donor-form .a-co #country-add { align-self: flex-start; height: 41px; white-space: nowrap; }
.donor-form .reach-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); }
.donor-form .up { text-transform: uppercase; }
.donor-form [hidden] { display: none !important; }
.donor-form .partner { border: 1px solid var(--line-2); background: var(--bg); border-radius: 7px; padding: 10px 14.5px 12px; display: flex; flex-direction: column; gap: 7px; }
.donor-form .partner-head { display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 15.5px; color: var(--fg-2); }
.donor-form .inline-pair { display: flex; align-items: center; gap: 14.5px; flex-wrap: wrap; } .donor-form .inline-pair label { flex: none; }
.donor-form .inline-pair select, .donor-form .inline-pair input[type=date] { width: auto; min-width: 218px; }
.donor-form .dear-in { width: min(411.5px, 100%); font-family: Georgia, "Times New Roman", serif; font-size: 17.5px; }
.donor-form .earlier { border-top: 1px solid var(--line-2); padding-top: 7px; margin-top: 2px; }
.donor-form .earlier-row { display: flex; gap: 12px; justify-content: space-between; font-size: 16px; padding: 4px 0; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; cursor: pointer; } .link-btn:hover { text-decoration: underline; }
@media (max-width: 1078px) { .donor-form .nm-row, .donor-form .addr-row:has(.a-c), .donor-form .reach-row { grid-template-columns: 1fr 1fr; } }
.who-head { display: flex; gap: 17px; align-items: center; }
.envelope { line-height: 1.55; } .envelope .env-name { font-weight: 500; }
.line-note { font-size: 15.5px; color: var(--fg-2); margin-top: 7px; } .line-note.warn { color: var(--warn); }
.earlier-list { margin-top: 10px; font-size: 16px; } .earlier-list summary { cursor: pointer; } .earlier-list div { padding: 4px 0; }
.dear { font-family: Georgia, "Times New Roman", serif; font-size: 18.5px; } .small { font-size: 15.5px; margin-top: 5px; }
.record-meta { font-size: 14.5px; padding: 0 2px 19px; line-height: 1.6; }
.menu .danger { color: var(--danger); }
.tbl.donors .why-cell { font-size: 14.5px; color: var(--fg-2); margin-top: 2px; } .tbl.donors .why-cell b { font-weight: 500; color: var(--fg); background: var(--warn-soft); border-radius: 3.5px; padding: 0 3.5px; }
.tbl.donors .who-cell { display: flex; gap: 12px; align-items: center; }
.tbl.gifts td.nw { white-space: nowrap; }
.after-form { margin: 0 2px; font-size: 15.5px; }
.tbl .intent { font-style: italic; color: var(--fg-2); white-space: normal; }

/* donor score 1-100: red (0) through yellow (60) to green (120) */
.score { display: inline-block; min-width: 2.4em; text-align: center; padding: 1px 8px; border-radius: 1209px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: hsl(var(--h) 75% 90%); color: hsl(var(--h) 70% 27%); }
.tbl.donors td.dot, .tbl.donors th.dot { width: 1%; padding-right: 0; text-align: center; }
.score-dot { width: 36.5px; height: 36.5px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 600; font-size: 14px;
  font-variant-numeric: tabular-nums; background: hsl(var(--h) 75% 90%); color: hsl(var(--h) 70% 27%); }
.score-dot.none { background: var(--line-2); color: var(--fg-3, var(--fg-2)); font-weight: 400; }


.info-i { display: inline-grid; place-items: center; width: 15px; height: 15px; border: 1px solid var(--line); border-radius: 50%; font: italic 600 10.5px/1 Georgia, serif; color: var(--fg-2); vertical-align: 1px; margin-left: 3px; }
.kv .kv-score { cursor: help; position: relative; outline: 0; }
.score-pop { display: none; position: absolute; top: calc(100% - 6px); left: 14px; z-index: 40; width: 340px; padding: 12px 14px; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 36px -10px rgba(0,0,0,.3); font-size: 15px; cursor: default; }
.score-pop b { display: block; font-weight: 600; margin-bottom: 6px; }
.score-pop .sp-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.kv-score:hover .score-pop, .kv-score:focus-within .score-pop { display: block; }
.kv .kv-score { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; } .kv .kv-score .score { font-size: 30px; padding: 1px 19px; }
/* starred views under Views in the sidebar */

/* ---------- Home (app/templates/dashboard.html) ---------- */
.home-row { display: grid; grid-template-columns: 2fr 3fr; gap: 19px; margin-bottom: 19px; } .home-row > * { min-width: 0; }
.home-box { height: 360px; display: flex; flex-direction: column; margin-bottom: 0; }
.home-box .scroll-y { flex: 1; overflow-y: auto; }
.box-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--fg-2); }
/* the AI look (as the Ask panel): a gradient edge and a soft wash */
.ai-box { position: relative; border-radius: 7px; border: 1px solid transparent; padding: 14.5px 19px;
  background: linear-gradient(var(--panel), var(--panel)) padding-box, linear-gradient(120deg, #9dbcf0, #c4b5fd, #f5b8d3, #9dbcf0) border-box; }
.ai-box::before { content: ""; position: absolute; inset: 0; border-radius: 7px; pointer-events: none;
  background: linear-gradient(120deg, var(--accent-soft), transparent 40%, transparent 60%, #fbe2ee); opacity: .7; }
.ai-box > * { position: relative; }
.ai-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; } .ai-head h2 { font-size: 17px; }
.ai-head .spark { transform: scale(.8); transform-origin: left center; margin-right: -4px; }
.note-text { flex: 1; margin: 0; font-size: 16.5px; line-height: 1.55; overflow-y: auto; }
.note-text.waiting { animation: breathe 1.2s ease-in-out infinite; }
.ai-ask { display: flex; gap: 7px; margin-top: 12px; }
.ai-ask input { flex: 1; min-width: 0; height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; font: 400 15.5px var(--sans); background: var(--panel); color: var(--fg); outline: none; }
.ai-ask input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
body[data-role="viewer"] .ai-ask { display: none; }

.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px; margin-bottom: 19px; } .chart-grid > .panel { margin-bottom: 0; min-width: 0; }
@media (max-width: 1000px) { .home-row, .chart-grid { grid-template-columns: 1fr; } }
.tiles.tiles-3 { grid-template-columns: repeat(3, 1fr); }
a.tile-link { color: inherit; display: block; } a.tile-link:hover { text-decoration: none; border-color: var(--accent); } a.tile-link .d { color: var(--accent); }
.pace { position: relative; padding: 14.5px 19px 0; }
.pace svg { width: 100%; height: auto; display: block; overflow: visible; }
.pace .grid { stroke: var(--line-2); stroke-width: 1; } .pace .yl { font: 400 13px var(--sans); font-variant-numeric: tabular-nums; fill: var(--fg-2); text-anchor: end; }
.pace .xl { font: 400 13px var(--sans); fill: var(--fg-2); text-anchor: start; }
.pace path { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.pace path.cur { stroke: var(--accent); } .pace path.prev { stroke: var(--fg-2); opacity: .45; stroke-dasharray: 5 4; }
.pace .end { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.pace .cross { stroke: var(--fg-2); stroke-width: 1; opacity: 0; } .pace.hover .cross { opacity: .5; }
.pace .hit { fill: transparent; cursor: crosshair; }
.pace-tip { position: absolute; top: 6px; background: var(--side); color: #fff; font-size: 14px; line-height: 1.4; padding: 6px 10px; border-radius: 6px; pointer-events: none; white-space: nowrap; transform: translateX(-50%); }
.pace-key { font-size: 14.5px; color: var(--fg-2); display: inline-flex; gap: 7px; align-items: center; }
.pace-key .sw { display: inline-block; width: 18px; height: 0; border-top: 2.5px solid var(--accent); } .pace-key .sw.prev { border-top: 2.5px dashed var(--fg-2); opacity: .6; margin-left: 10px; }
.pace-foot { font-size: 14.5px; padding: 4px 19px 14.5px; }
.tbl.look .look-head th { background: var(--bg); color: var(--fg); font-weight: 600; font-size: 15px; }
.tbl.look td.pri { white-space: nowrap; width: 1%; }
@media (max-width: 900px) { .tiles.tiles-3 { grid-template-columns: 1fr; } }
/* Home: the day's questions */
.ai-qs { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.ai-qs a { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 13px; border-radius: 7px; background: var(--panel);
  border: 1px solid var(--line); color: var(--fg); font-size: 16px; line-height: 1.35; }
.ai-qs a:hover { border-color: var(--accent); text-decoration: none; } .ai-qs a span { color: var(--accent); flex: none; }
.ai-qs.waiting li { animation: breathe 1.2s ease-in-out infinite; padding: 10px 2px; }
/* Home: who gave (kept / back / new), validated categorical colors with direct labels */
:root { --c-kept: #1f5fbf; --c-back: #a05cc4; --c-new: #2a9d8f; }

.mix { padding: 17px 19px; display: flex; flex-direction: column; gap: 17px; }
.mix-label { font-size: 15.5px; margin-bottom: 6px; }
.mix-bar { display: flex; gap: 2px; height: 34px; }
.mix-bar .seg { display: flex; align-items: center; padding-left: 8px; color: #fff; font: 500 13.5px var(--sans); font-style: normal; min-width: 3px; }
.mix-bar .seg:first-child { border-radius: 4px 0 0 4px; } .mix-bar .seg:last-child { border-radius: 0 4px 4px 0; }
.seg.kept, .sw.kept { background: var(--c-kept); } .seg.back, .sw.back { background: var(--c-back); } .seg.new, .sw.new { background: var(--c-new); }
.mix-key { display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; color: var(--fg-2); }
.mix-key .sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; } .mix-key b { color: var(--fg); font-weight: 500; margin-right: 4px; }
/* Home: gift sizes */
.sizes { width: 100%; border-collapse: collapse; margin: 10px 0 0; }
.sizes th { text-align: left; font-weight: 400; font-size: 15px; color: var(--fg-2); padding: 7px 10px 7px 19px; white-space: nowrap; width: 1%; }
.sizes td { padding: 7px 19px 7px 0; font-size: 15px; white-space: nowrap; } .sizes td.r { width: 1%; text-align: right; }
.sz-bars { display: flex; flex-direction: column; gap: 3px; padding-right: 14px !important; }
.sz-bars i { display: block; height: 10px; border-radius: 0 4px 4px 0; min-width: 2px; } .sz-bars i.cur { background: var(--accent); } .sz-bars i.prev { background: var(--fg-2); opacity: .35; height: 6px; }
/* Home: gifts by day */
.cal { padding: 17px 19px 0; } .cal svg { width: 100%; height: auto; display: block; }
.cal .xl { font: 400 10px var(--sans); fill: var(--fg-2); } .cal .yl { font: 400 9px var(--sans); fill: var(--fg-2); text-anchor: end; }
.cal .l0, .cal-key .l0 { fill: var(--line-2); background: var(--line-2); }
.cal .l1, .cal-key .l1 { fill: color-mix(in srgb, var(--accent) 25%, var(--panel)); background: color-mix(in srgb, var(--accent) 25%, var(--panel)); }
.cal .l2, .cal-key .l2 { fill: color-mix(in srgb, var(--accent) 50%, var(--panel)); background: color-mix(in srgb, var(--accent) 50%, var(--panel)); }
.cal .l3, .cal-key .l3 { fill: color-mix(in srgb, var(--accent) 75%, var(--panel)); background: color-mix(in srgb, var(--accent) 75%, var(--panel)); }
.cal .l4, .cal-key .l4 { fill: var(--accent); background: var(--accent); }
.cal-key { display: flex; gap: 3px; align-items: center; justify-content: flex-end; font-size: 13px; margin-top: 8px; }
.cal-key i { width: 11px; height: 11px; border-radius: 2px; display: inline-block; } .cal-key i:first-of-type { margin-left: 4px; } .cal-key i:last-of-type { margin-right: 4px; }

/* Mailings · Templates: the tabs, and templates as cards with how each one looks (an email as it arrives, a Word file's first lines) */
.tabs.slim.mail-tabs { display: inline-flex; margin-bottom: 17px; }
.menu a .mi { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; } .menu .mi small { color: var(--fg-2); font-size: 14px; white-space: normal; max-width: 290px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 14.5px; margin-bottom: 26px; }
.tpl-card { display: flex; flex-direction: column; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; color: var(--fg); }
.tpl-card:hover { border-color: var(--accent); text-decoration: none; } .tpl-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tpl-thumb { position: relative; height: 196px; overflow: hidden; background: #F9F5F2; border-bottom: 1px solid var(--line); }
.tpl-thumb iframe { position: absolute; top: 0; left: 50%; width: 660px; height: 1000px; margin-left: -330px; border: 0; transform: scale(.37); transform-origin: top center; pointer-events: none; }
.tpl-thumb.paper { background: #E9E6E1; } .tpl-thumb.paper iframe { top: 14px; width: 816px; height: 1056px; margin-left: -408px; transform: scale(.29); box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.tpl-info { display: flex; flex-direction: column; gap: 2px; padding: 12px 15px 14px; min-width: 0; }
.tpl-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tpl-info .muted { font-size: 15px; line-height: 1.4; }
.tpl-info .clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .tpl-info .badge { align-self: flex-start; margin-top: 4px; }

/* the email editor's layouts: sections shown for the chosen one; pictures picked in place */
#tpl-form:not([data-design="letter"]) .for-letter, #tpl-form:not([data-design="flyer"]) .for-flyer, #tpl-form:not([data-design="stories"]) .for-stories,
#tpl-form[data-design="letter"] .for-designed { display: none; }
#tpl-form:not([data-design="letter"]) .mail-sheet .chip-edit { min-height: 110px; }
.chip-edit.short { min-height: 96px; }
.story-edit { display: flex; flex-direction: column; gap: 10px; }
.pic-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pic-pick img { display: none; max-width: 100%; max-height: 220px; border-radius: 5px; border: 1px solid var(--line); flex-basis: 100%; object-fit: contain; object-position: left; }
.pic-pick.has img { display: block; } .pic-pick:not(.has) [data-pic-remove] { display: none; } .pic-pick label.btn { cursor: pointer; }
.mail-links { border-top: 1px solid var(--line); } .mail-links td a { overflow-wrap: anywhere; }
.mail-list td small { display: block; color: var(--fg-2); }
.email-files { flex-basis: 100%; } .email-files summary { cursor: pointer; color: var(--accent); }
.email-files[open] { display: flex; flex-wrap: wrap; gap: 6px 22px; } .email-files[open] summary { flex-basis: 100%; }

/* the picture picker: its squares keep their color against the menu's own button look (declared after it) */
.menu .icon-grid button.li-ic { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; background: var(--ic-bg); color: var(--ic-fg); border-radius: 9px; }
.menu .icon-grid button.li-ic:hover, .menu .icon-grid button.li-ic.on { background: var(--ic-bg); color: var(--ic-fg); outline: 2px solid var(--ic-fg); outline-offset: 1px; }
.menu .icon-grid button.li-ic.on::after { content: none; }

/* the mailing form: How often (One time / Ongoing, then that kind's choices); What happens and How it reads on the right */
.kind-seg { align-self: flex-start; } .kind-opt { display: flex; flex-direction: column; gap: 10px; margin-top: 5px; }
.kind-opt label > span { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; } .kind-opt small { font-size: 15px; flex-basis: 100%; }
.kind-opt .inline-date { height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; background: var(--panel); color: var(--fg); font: inherit; }
.paused-opt { margin-top: 5px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.mail-right { display: flex; flex-direction: column; gap: 0; min-width: 0; } .mail-right .tpl-side { position: static; }
.run-title { display: flex; gap: 14.5px; align-items: flex-start; min-width: 0; flex: 1; }
.run-title > .li-ic { width: 48px; height: 48px; border-radius: 11px; margin-top: 1px; } .run-title > .li-ic svg { width: 26px; height: 26px; }

/* layouts drawn as skeletons (grey bars = text, soft blocks = pictures): the Layout choice in the email editor */
.sk-page { border-color: var(--accent); }
.sk-page { position: relative; aspect-ratio: 3 / 3.6; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); padding: 12% 12% 0; display: flex; flex-direction: column; gap: 7px; overflow: hidden; }
.sk-page i { display: block; flex: none; }
.sk-head { height: 12px; width: 45%; border-radius: 3px; background: var(--accent); opacity: .55; margin-bottom: 6px; } .sk-head.center { margin: 0 auto 8px; width: 35%; }
.sk-t { height: 11px; width: 70%; border-radius: 3px; background: var(--fg-2); opacity: .55; margin-top: 2px; }
.sk-l { height: 6px; width: 100%; border-radius: 3px; background: var(--line); } .sk-l.dark { background: var(--fg-2); opacity: .45; }
.sk-l.w30 { width: 30%; } .sk-l.w40 { width: 40%; } .sk-l.w50 { width: 50%; } .sk-l.w60 { width: 60%; } .sk-l.w80 { width: 80%; }
.sk-pic { border-radius: 5px; background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent) 25%, var(--accent-soft))); }
.sk-pic.big { height: 34%; margin: 3px 0; } .sk-pic.sq { width: 30%; aspect-ratio: 1; }
.sk-row { display: flex; gap: 8px; align-items: center; } .sk-row > div { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.sk-sign { height: 10px; width: 32%; margin-top: 6px; border-bottom: 2px solid var(--fg-2); opacity: .45; border-radius: 0 0 40% 10%; }

/* example values in a template preview glow: each person gets their own; never printed or sent (letters.MARK_CSS) */
mark.pv-x{background:rgba(250,204,21,.18);color:inherit;border-radius:3px;padding:0 2px;box-decoration-break:clone;-webkit-box-decoration-break:clone;animation:pvx 2.6s ease-in-out infinite}
@keyframes pvx{0%,100%{background:rgba(250,204,21,.10);box-shadow:0 0 0 0 rgba(250,204,21,0)}
50%{background:rgba(250,204,21,.42);box-shadow:0 0 0 2px rgba(250,204,21,.25)}
}
@media (prefers-reduced-motion:reduce){mark.pv-x{animation:none;background:rgba(250,204,21,.3)}
}

.sk-picks { display: flex; gap: 12px; flex-wrap: wrap; }
.sk-pick { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; width: 108px; }
.sk-pick input { position: absolute; opacity: 0; pointer-events: none; }
.sk-pick b { font-size: 15px; font-weight: 500; color: var(--fg-2); }
.sk-page.mini { width: 100%; aspect-ratio: 3 / 3.4; padding: 11% 11% 0; gap: 4px; border-radius: 6px; background: var(--panel); }
.sk-page.mini .sk-head { height: 6px; margin-bottom: 3px; } .sk-page.mini .sk-t { height: 6px; } .sk-page.mini .sk-l { height: 3.5px; }
.sk-page.mini .sk-sign { height: 6px; margin-top: 3px; border-bottom-width: 1.5px; } .sk-page.mini .sk-row { gap: 5px; } .sk-page.mini .sk-row > span { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.sk-page.mini .sk-pic.big { height: 30%; margin: 1px 0; } .sk-page.mini .sk-pic.sq { width: 28%; }
.sk-pick:hover .sk-page { border-color: var(--fg-2); }
.sk-pick:has(input:checked) .sk-page { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); } .sk-pick:has(input:checked) b { color: var(--accent); }
.sk-pick:has(input:focus-visible) .sk-page { outline: 2px solid var(--accent); outline-offset: 2px; }

/* the mailing's What: template cards, one email and/or one printed letter picked; the editor in a panel over it */
.tc-group + .tc-group { margin-top: 14.5px; } .tc-head { font-weight: 600; font-size: 15.5px; margin-bottom: 7px; } .tc-head .muted { font-weight: 400; }
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.tc { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; cursor: pointer; text-align: left; padding: 0; font: inherit; color: var(--fg); }
.tc:hover { border-color: var(--fg-2); } .tc:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tc.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); } .tc.on .tc-name { color: var(--accent); font-weight: 600; }
.tc .tpl-thumb { height: 96px; } .tc .tpl-thumb iframe { transform: scale(.2); } .tc .tpl-thumb.paper iframe { transform: scale(.16); top: 8px; }
.tc-name { padding: 6px 9px; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-edit { position: absolute; top: 6px; right: 6px; }
.tc-new { align-items: center; justify-content: center; gap: 4px; min-height: 128px; border-style: dashed; background: transparent; color: var(--fg-2); font-size: 14.5px; }
.tc-new .plus { font-size: 26px; line-height: 1; color: var(--accent); } .tc-new:hover { border-color: var(--accent); color: var(--accent); background: var(--panel); }
.tpl-panel { width: min(1320px, 94vw); height: 92vh; max-width: none; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); }
.tpl-panel::backdrop { background: rgba(15, 20, 30, .45); } .tpl-panel iframe { width: 100%; height: 100%; border: 0; display: block; }
.shell.embed { display: block; } .shell.embed .main { margin: 0; } .shell.embed .content { padding-top: 22px; }

/* Who and What: a quiet field showing what is picked; clicking it opens a picker window on top */
.pf-row { display: flex; align-items: center; gap: 10px; } .pf-row + .pf-row { margin-top: 8px; }
.pf-label { width: 104px; flex: none; color: var(--fg-2); }
.pf { flex: 1; max-width: 560px; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 7px 12px 7px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; text-align: left; font: inherit; color: var(--fg); cursor: pointer; min-height: 52px; }
.pf:hover { border-color: var(--accent); } .pf.empty { border-style: dashed; }
.pf .li-ic { width: 36px; height: 36px; border-radius: 8px; } .pf .li-ic svg { width: 20px; height: 20px; }
.pf-text { display: flex; flex-direction: column; min-width: 0; flex: 1; } .pf-text b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-text .muted { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-caret { color: var(--fg-2); font-size: 13px; }
.pf-thumb.tpl-thumb { position: relative; flex: none; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 5px; }
.pf-thumb.tpl-thumb iframe { transform: scale(.07); } .pf-thumb.tpl-thumb.paper iframe { transform: scale(.055); top: 3px; }
.pick-dialog { width: min(980px, 94vw); max-height: 86vh; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--fg); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); }
.pick-dialog[open] { display: flex; flex-direction: column; } .pick-dialog::backdrop { background: rgba(15, 20, 30, .4); }
.pd-head { display: flex; align-items: center; gap: 14.5px; padding: 14.5px 19px; border-bottom: 1px solid var(--line); background: var(--panel); }
.pd-head h2 { font-size: 18px; margin: 0; white-space: nowrap; } .pd-search { flex: 1; margin: 0; } .pd-head [data-dialog-close] { margin-left: auto; font-size: 20px; }
.pd-body { overflow: auto; padding: 17px 19px 19px; }
.lc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-bottom: 14.5px; }
.lc { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; text-align: left; font: inherit; color: var(--fg); cursor: pointer; }
.lc:hover { border-color: var(--accent); } .lc.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.lc .li-ic { width: 34px; height: 34px; border-radius: 8px; } .lc .li-ic svg { width: 19px; height: 19px; }
.lc-text { display: flex; flex-direction: column; min-width: 0; } .lc-text b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-text .muted { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-new { border-style: dashed; background: transparent; } .lc-new .plus { width: 34px; text-align: center; font-size: 24px; color: var(--accent); }
.tc-grid.big { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14.5px; } .tc-grid.big .tpl-thumb { height: 150px; }
.tc-grid.big .tpl-thumb iframe { transform: scale(.3); } .tc-grid.big .tpl-thumb.paper iframe { transform: scale(.23); top: 10px; }
.tc-grid.big .tc-new { min-height: 186px; }

/* ===== settings: one form in how-rows sections, a narrow side column (admin pages, database) ===== */
.set-cols { display: grid; grid-template-columns: minmax(0, 1fr) 302.5px; gap: 19px; align-items: start; }
.set-form .rp-sec { grid-template-columns: 181.5px minmax(0, 1fr); scroll-margin-top: 19px; }
.set-form .rp-lbl .why { font-weight: 400; font-size: 14.5px; margin-top: 3px; }
.set-form .rp-body { gap: 14.5px; max-width: 739px; }
.set-form .row-fields > .field { max-width: none; }
.set-form .field input, .set-form .field select { height: 38.5px; }
.set-unit { display: flex; align-items: center; gap: 10px; } .set-unit input { max-width: 96.5px; } .set-unit span { color: var(--fg-2); white-space: nowrap; }

.set-form .row-fields > .set-short { flex: 1 1 170px; max-width: 242px; } .set-form .row-fields > .set-wide { flex: 3 1 290px; }
.set-colors > .field:not(:last-child) { flex: 0 0 auto; } .set-colors input[type=color] { width: 96.5px; padding: 3px; cursor: pointer; }
.set-pics { display: flex; gap: 14.5px; flex-wrap: wrap; }
.set-pic { flex: 1 1 242px; max-width: 351px; border: 1px solid var(--line); border-radius: 7px; overflow: clip; }
.set-pic-img { height: 109px; display: flex; align-items: center; justify-content: center; padding: 12px; background: #fff; border-bottom: 1px solid var(--line); }
.set-pic-img img { max-width: 100%; max-height: 100%; } .set-pic-img .muted { color: #8a8f98; }
.set-pic-foot { display: flex; gap: 7px; align-items: center; padding: 7px 10px; background: var(--bg); } .set-pic-foot b { font-weight: 500; margin-right: auto; }
.set-nav a { display: block; padding: 7px 19px; border-bottom: 1px solid var(--line-2); color: var(--fg); text-decoration: none; }
.set-nav a:last-child { border-bottom: 0; } .set-nav a:hover { background: var(--bg); color: var(--accent); }
.set-nav a span { display: block; font-size: 14.5px; color: var(--fg-2); }
.set-db { font-size: 13px; }
body[data-role="viewer"] .set-pic-foot .btn { display: none; }
@media (max-width: 1161.5px) { .set-cols { grid-template-columns: 1fr; } .set-form .rp-sec { grid-template-columns: 1fr; } }
.set-tabs { margin-bottom: 19px; }
.reach-gap { height: 6px; border-top: 1px solid var(--line-2); margin-top: 6px; }
.acct-form .rp-body > .field { max-width: 560px; }
.codes-cols { grid-template-columns: 240px minmax(0, 1fr); }
.re-name-row { display: flex; gap: 12px; align-items: center; }
.rp-input { width: 100%; height: 41px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--fg); font: 500 17px var(--sans); padding: 0 12px; outline: none; }
.rp-input.desc { font-weight: 400; } .rp-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
/* a Viewer sees everything, changes nothing: no buttons that lead to a change (the server refuses them anyway) */
body[data-role="viewer"] a.btn[href$="/edit"], body[data-role="viewer"] a.btn[href*="/new"], body[data-role="viewer"] a.btn[href*="copy="],
body[data-role="viewer"] form[action$="/complete"], body[data-role="viewer"] [data-panel], body[data-role="viewer"] [data-unpick],
body[data-role="viewer"] .pf-caret, body[data-role="viewer"] .tc-new, body[data-role="viewer"] .lc-new { display: none !important; }
body[data-role="viewer"] .pf, body[data-role="viewer"] #re-form input, body[data-role="viewer"] #re-form .seg { pointer-events: none; }
.tpl-panel { position: fixed; } .dlg-x { position: absolute; top: 12px; right: 14px; z-index: 2; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); color: var(--fg-2); font-size: 22px; line-height: 1; cursor: pointer; }
.dlg-x:hover { color: var(--fg); border-color: var(--fg-2); }
/* the in-app question box (window.ask in app.js) */
.ask-dlg { width: min(460px, 92vw); padding: 26px 24px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--fg); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); }
.ask-dlg::backdrop { background: rgba(15, 20, 30, .4); } .ask-dlg .dlg-x { top: 10px; right: 10px; width: 32px; height: 32px; font-size: 20px; }
.ask-text { margin: 0 34px 16px 0; font-size: 17px; line-height: 1.45; } .ask-input { width: 100%; height: 40px; margin-bottom: 16px; }
.ask-foot { display: flex; justify-content: flex-end; gap: 10px; }
/* Settings, Codes, Offerings: one panel per offering, its choices as a small table of inputs */
.off-block { margin-bottom: 14.5px; } .off-choices { max-width: 560px; } .off-choices td { padding: 4px 6px; } .off-choices input { width: 100%; height: 36px; }
.off-choices td:nth-child(2) { width: 140px; } .off-choices td:nth-child(3) { width: 96px; }
.off-foot { border: 1px solid var(--line); border-radius: 7px; background: var(--panel); position: sticky; bottom: 0; }
.off-choices input { border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; font: inherit; background: var(--panel); color: var(--fg); } .off-choices .amt input { padding-left: 24px; }
/* Home: the greeting and the sections each person adds (app/services/home_layout.py) */
.hello { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: min(30vh, 300px); padding: 24px 0 36px; transform-origin: 50% 0; will-change: opacity, transform; }
.hello.alone { min-height: calc(100vh - 180px); }
.hello h1, .m-hello h1 { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 420; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 96; letter-spacing: -.01em; }
.hello h1 { font-size: 54px; line-height: 1.1; }
.hello p { margin: 26px 0 14px; }
.hs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 19px; }
.hs { position: relative; min-width: 0; } .hs.full { grid-column: 1 / -1; }
.hs > .panel, .hs > .tiles, .hs > .ai-box { margin-bottom: 0; } .hs > .panel { height: 100%; }
.hs > .home-box { height: 100%; min-height: 360px; max-height: 420px; } .hs.full > .home-box { height: 360px; }
.hs-tools { position: absolute; top: -13px; right: 14px; z-index: 5; display: flex; align-items: center; gap: 1px; padding: 1px 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 2px 8px -3px rgba(0,0,0,.15); opacity: 0; transition: opacity .15s; }
.hs:hover .hs-tools, .hs:focus-within .hs-tools { opacity: 1; }
.hs-tools form { display: contents; }
.hs-tools button { border: 0; background: none; color: var(--fg-2); font: 500 14px var(--sans); height: 24px; min-width: 26px; padding: 0 5px; border-radius: 999px; cursor: pointer; letter-spacing: -.1em; }
.hs-tools button:hover { background: var(--accent-soft); color: var(--fg); } .hs-tools .hs-x { font-size: 18px; letter-spacing: 0; } .hs-tools .hs-drag { cursor: grab; letter-spacing: 0; }
.hs.moving { opacity: .35; }
.hs-add { display: block; width: 100%; margin-top: 22px; height: 56px; border: 1.5px dashed var(--line-2); border-radius: 7px; background: transparent; color: var(--fg-2); font: 500 16px var(--sans); cursor: pointer; }
.hs-add:hover { border-color: var(--accent); color: var(--accent); }
#add-dialog { width: min(760px, 94vw); } #add-dialog form { display: contents; }
#add-dialog .lc:disabled { opacity: .55; cursor: default; border-color: var(--line); box-shadow: none; }
@media (max-width: 1000px) { .hs-grid { grid-template-columns: 1fr; } .hs.half { grid-column: auto; } .hs-size { display: none; } .hello h1 { font-size: 40px; } }
.hs.half .tiles.tiles-3 .tile .v { font-size: 25px; }
/* Home: raised by month (columns) and the bar charts' key */
.pace.months .bar.cur { fill: var(--accent); } .pace.months .bar.prev { fill: var(--fg-2); opacity: .35; }
.pace.months .xl.mid { text-anchor: middle; } .pace.months .hit { fill: transparent; cursor: default; }
.pace.months .mcol:hover .bar { filter: brightness(1.12); } .pace.months .mcol:hover .xl { fill: var(--fg); }
.bar-key .sw { width: 11px; height: 11px; border: 0; border-radius: 3px; background: var(--accent); } .bar-key .sw.prev { border: 0; background: var(--fg-2); opacity: .35; margin-left: 10px; }

/* The donor form's USPS line (services/usps.py) */
.usps-line:empty { display: none; }
.usps.ok { color: var(--ok); }
.usps.warn { color: var(--warn); }
.usps b { font-weight: 500; color: var(--fg); }

/* ===== Mailings page (2026-11-22, sketches/mailings-v5.html): three blocks; each row shows its two versions as small
   pictures (email, printed), or an empty frame where one could be. ===== */
.blk-h { display: flex; align-items: baseline; gap: 12px; margin: 22px 0 9px; flex-wrap: wrap; } .blk-h h2 { margin: 0; font-size: 18px; } .blk-h .muted { font-size: 15px; }
.page-head + .blk-h { margin-top: 0; }
.mlist .mrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 19px; align-items: center; padding: 12px 17px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.mlist .mrow:last-child { border-bottom: 0; } .mlist .mrow:hover { background: var(--accent-soft); }
.mlist .mr-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; } .mlist .mr-text .pri { font-weight: 600; color: var(--fg); }
.mlist .mr-text .what { color: var(--fg-2); font-size: 15.5px; }
.mlist .mr-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; font-size: 15px; text-align: right; }
.mlist .empty { padding: 22px 17px; }
.vers { display: flex; gap: 8px; }
.mthumb { position: relative; flex: none; width: 70px; height: 88px; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; display: grid; place-items: center; }
.mthumb.tpl-thumb { height: 88px; border-bottom: 1px solid var(--line); }
.mthumb.tpl-thumb iframe { transform: scale(.106); } .mthumb.tpl-thumb.paper iframe { transform: scale(.08); top: 4px; }
.mthumb small { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; line-height: 1.4; text-align: center; background: rgba(255,255,255,.92); color: var(--fg-2); }
.mthumb.none { border-style: dashed; color: var(--fg-2); font-size: 12px; text-align: center; padding: 4px; background: transparent; }
.sw { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; font: 500 15px var(--sans); color: var(--fg-2); cursor: pointer; }
.sw i { width: 34px; height: 20px; border-radius: 10px; background: var(--line); position: relative; display: inline-block; transition: background .15s; }
.sw i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.sw.on { color: var(--ok); } .sw.on i { background: var(--ok); } .sw.on i::after { left: 16px; }
/* the mailing page: its two versions as big pictures, an empty frame where one could be */
.vpair { display: grid; grid-template-columns: 1fr 1fr; gap: 19px; margin-bottom: 10px; }
.vslot { background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vslot h3 { margin: 0; padding: 0; border: 0; font-size: 15px; font-weight: 500; color: var(--fg-2); text-transform: none; letter-spacing: 0; }
.vslot .meta { font-size: 15.5px; color: var(--fg-2); } .vslot .meta b { color: var(--fg); font-weight: 500; }
.vslot .acts { display: flex; gap: 8px; flex-wrap: wrap; } .vslot .acts form { margin: 0; }
.vbig { position: relative; display: block; width: 100%; height: 300px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; padding: 0; cursor: pointer; background: #F9F5F2; }
.vbig.tpl-thumb iframe { transform: scale(.45); } .vbig.tpl-thumb.paper { background: #E9E6E1; } .vbig.tpl-thumb.paper iframe { transform: scale(.34); top: 12px; }
.vbig.none { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed var(--line); background: transparent; color: var(--accent); font: 500 16.5px var(--sans); }
.vbig.none .plus { font-size: 30px; line-height: 1; } .vbig.none:hover { border-color: var(--accent); background: var(--accent-soft); }
.vpair-why { margin: 0 0 19px; }
@media (max-width: 1161.5px) { .vpair { grid-template-columns: 1fr; } }
/* the pictures of a layout in the picker (no template yet) */
.lay-th { display: grid; gap: 6px; height: 150px; padding: 14px 18px; background: #F9F5F2; border-bottom: 1px solid var(--line); align-content: start; }
.lay-th i { display: block; height: 7px; border-radius: 3px; background: #dcd6cf; } .lay-th i:first-child { height: 10px; width: 60%; background: #c9bfb4; }
.lay-th.lay-flyer i:nth-child(2) { height: 64px; background: linear-gradient(135deg, #cfdcf3, #f1d9e3); }
.lay-th.lay-stories { grid-template-columns: 1fr 1fr; } .lay-th.lay-stories i:first-child { grid-column: span 2; } .lay-th.lay-stories i:nth-child(2), .lay-th.lay-stories i:nth-child(3) { height: 54px; background: linear-gradient(135deg, #cfdcf3, #f1d9e3); }
.lay-th.paper { background: #E9E6E1; } .lay-th.paper i:first-child { width: 30%; margin: 0 auto 6px; }
.lay-th.none { place-items: center; align-content: center; color: var(--fg-2); font-size: 14px; background: transparent; border: 0; border-bottom: 1px dashed var(--line); }
.tc-grid form { margin: 0; display: contents; } .tc .tc-name small { font-weight: 400; }
.addr-choice { padding: 2px 0; }
/* Tasks (2026-11-22): cards with a tick; a print task holds its sending's files */
.tasks { display: flex; flex-direction: column; gap: 10px; }
.task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 14px 17px; }
.tk-form { margin: 0; } .tk-box { width: 24px; height: 24px; border: 2px solid var(--line); border-radius: 6px; background: var(--panel); display: grid; place-items: center; cursor: pointer; padding: 0; font: 600 15px var(--sans); color: #fff; margin-top: 1px; }
.tk-box:hover { border-color: var(--ok); } .tk-box.on { background: var(--ok); border-color: var(--ok); } .tk-link { color: var(--accent); text-decoration: none; font-size: 18px; }
.tk-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; } .tk-title { font-weight: 600; } .tk-title a { color: var(--fg); }
.tk-sub { color: var(--fg-2); font-size: 15px; } .tk-when { color: var(--fg-2); font-size: 15px; white-space: nowrap; }
.tk-files { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tk-files a { border: 1px solid var(--line); border-radius: 7px; padding: 6px 11px; font-size: 15px; background: var(--bg); } .tk-files a small { display: block; color: var(--fg-2); font-size: 13px; }
.tk-done-h { font-size: 17px; margin: 26px 0 10px; } .tasks.done .task { opacity: .7; padding: 10px 17px; } .tasks.done .tk-title { font-weight: 500; }
.tk-when.danger { color: var(--danger); font-weight: 500; }
