/* Foundation Lookup, signed-in side (plan days 8-9). Loaded after site.css and built on its tokens.
   Direction (unslop, reusing v2): exact, civic, patient; the public record in a reading room.
   Chrome stays quiet: an ink sidebar, paper surfaces, hairlines, one accent (navy) for actions and the
   figure that matters. The moments: the ink band with a photo of the work being funded (as on the public
   pages), and on matches the "slip" of real grant lines behind each match. Signature: the filing tag.
   Status colors carry meaning only: green funded / accepts applications, ochre declined / preselected. */

.app { min-height: 100vh; }
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--ink) 0 256px, var(--bg) 256px); }

/* ------------------------------------------------------------ sidebar */
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 24px;
  padding: 20px 16px; background: var(--ink); color: var(--on-ink-2); border-right: 1px solid var(--ink-line);
}
.side > .brand { padding: 4px 8px; }
.orgs > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; cursor: pointer;
  list-style: none; border: 1px solid var(--ink-line); border-radius: var(--r-m); transition: background-color 140ms var(--ease);
}
.orgs > summary::-webkit-details-marker { display: none; }
.orgs > summary:hover { background: rgba(255, 255, 255, 0.04); }
.orgs > summary svg { flex: none; color: var(--on-ink-3); transition: transform 160ms var(--ease); }
.orgs[open] > summary svg { transform: rotate(180deg); }
.orgs-who { min-width: 0; display: grid; gap: 2px; }
.orgs-name { color: var(--on-ink); font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orgs-meta { font-size: 12px; color: var(--on-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orgs-panel { display: grid; gap: 2px; padding: 8px 0 0; }
.orgs-item {
  width: 100%; display: grid; gap: 2px; text-align: left; padding: 8px 12px; border: 0; border-radius: var(--r-s);
  background: transparent; color: var(--on-ink-2); font: 400 14px/1.35 var(--sans); cursor: pointer;
}
.orgs-item small { font-size: 12px; color: var(--on-ink-3); }
.orgs-item:hover, .orgs-item.on { background: rgba(255, 255, 255, 0.06); color: var(--on-ink); }
.orgs-add { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 14px; color: var(--on-ink-2); border-radius: var(--r-s); }
.orgs-add:hover { color: var(--on-ink); background: rgba(255, 255, 255, 0.06); text-decoration: none; }

.side-nav { display: grid; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: var(--r-s);
  color: var(--on-ink-2); font-size: 14px; transition: background-color 140ms var(--ease), color 140ms var(--ease);
}
.side-nav a svg { flex: none; color: var(--on-ink-3); }
.side-nav a:hover { background: rgba(255, 255, 255, 0.05); color: var(--on-ink); text-decoration: none; }
.side-nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.08); color: var(--on-ink); box-shadow: inset 0 0 0 1px var(--ink-line); }
.side-nav a[aria-current="page"] svg { color: var(--on-ink); }
.side-nav .count { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--on-ink); background: rgba(255, 255, 255, 0.12); padding: 2px 8px; border-radius: var(--r-s); }
.side-foot { margin-top: auto; display: grid; gap: 8px; padding: 16px 8px 0; border-top: 1px solid var(--ink-line); }
.side-plan { margin: 0; font-size: 13px; color: var(--on-ink-3); }
.side-out { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: var(--on-ink-2); font: 400 14px var(--sans); cursor: pointer; }
.side-out:hover { color: var(--on-ink); }
.app-menu-panel .side-out { padding: 0 12px; height: 36px; }
.nowrap { white-space: nowrap; }

.app-top { display: none; }
.app-main { min-width: 0; }
.app-body { padding: 40px 48px 96px; max-width: 1280px; }

/* ------------------------------------------------------------ the ink band (dashboard, matches, a foundation) */
.band { position: relative; background: var(--ink); color: var(--on-ink); isolation: isolate; }
.band-photo { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--ink-2); }
.band-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.35) contrast(1.02); }
.band-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(19, 26, 35, 0.95) 0%, rgba(19, 26, 35, 0.86) 45%, rgba(19, 26, 35, 0.62) 100%),
              linear-gradient(0deg, rgba(19, 26, 35, 0.6) 0%, rgba(19, 26, 35, 0) 50%);
}
.band-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; align-items: end; padding: 48px 48px 56px; max-width: 1280px; }
/* the band holds the card (as on the public pages): text centred beside it, only 40 px hang below */
.band.has-card .band-in { grid-template-columns: minmax(0, 1fr) 380px; align-items: center; padding: 40px 48px 0; }
.band.has-card .band-text { padding-bottom: 40px; }
.band .crumbs ol { margin: 0 0 20px; color: var(--on-ink-3); }
.band .crumbs a { color: var(--on-ink-2); }
.band .crumbs a:hover { color: #fff; }
.band .crumbs li:not(:last-child)::after { color: var(--on-ink-3); opacity: 0.6; }
.band-text { min-width: 0; max-width: 680px; }
.band h1 { font: 500 44px/1.08 var(--serif); letter-spacing: -0.015em; color: #fff; text-wrap: balance; overflow-wrap: anywhere; }
.band-kicker { margin: 0 0 12px; font-size: 14px; color: var(--on-ink-3); }
.band-lead { margin: 16px 0 0; font-size: 17px; line-height: 1.55; color: var(--on-ink-2); max-width: 38rem; }
.band-card { margin-bottom: -40px; align-self: end; }
.band.has-card + .app-body { padding-top: 88px; }
.range-big { font-size: 32px; }
.range-why { margin: 12px 0 0; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.range-edit { border-top: 1px solid var(--line); padding: 12px 24px 16px; }
.range-edit > summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--navy); }
.range-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; margin-top: 16px; }
.range-form .field:only-of-type, .range-form .field + button { grid-column: auto; }
.range-form:last-of-type { grid-template-columns: 1fr; }

/* light surfaces carry the filing tag in ink-on-paper colors */
.app-body .filing, .panel .filing { border-color: var(--line-strong); color: var(--text-2); }
.app-body .filing > span + span { border-left-color: var(--line-strong); }
.app-body .filing b { color: var(--text); }
.filing.small { font-size: 12px; margin: 0; }
.filing.small > span { padding: 6px 8px; }

/* ------------------------------------------------------------ page heads, panels, controls */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 24px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.page-head h1 { font: 500 40px/1.1 var(--serif); letter-spacing: -0.01em; text-wrap: balance; }
.page-lead { margin: 8px 0 0; font-size: 16px; color: var(--text-2); max-width: 44rem; }
.app-crumbs ol { margin: 0 0 16px; }
.toast { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 24px; padding: 8px 12px; border-radius: var(--r-s); background: var(--open-soft); color: var(--open); font-size: 14px; font-weight: 500; }
.form-alert { margin: 0 0 20px; padding: 12px 16px; border-radius: var(--r-m); border: 1px solid rgba(180, 35, 24, 0.25); background: #fbeceb; color: #8a1c13; font-size: 15px; }
.notice-box { margin: 0 0 20px; padding: 14px 16px; border-radius: var(--r-m); border: 1px solid rgba(43, 106, 71, 0.25); background: var(--open-soft); color: var(--open); font-size: 15px; }
.muted { color: var(--muted); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px 24px; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.panel-head h2 { font: 500 20px/1.25 var(--serif); }
.panel-head a { font-size: 14px; }
.panel-title { margin: 0; font: 500 20px/1.25 var(--serif); }
.panel-meta { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.panel-head + .panel-meta { margin-top: -4px; }
.panel-empty { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.sec-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.app .field input, .app .field select { height: 44px; }
.app .field span { font-size: 14px; }
.btn-small {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border: 0; border-radius: var(--r-s);
  background: var(--navy); color: #fff; font: 500 14px/1 var(--sans); cursor: pointer; white-space: nowrap;
  transition: background-color 140ms var(--ease), transform 120ms var(--ease);
}
.btn-small:hover { background: var(--navy-ink); color: #fff; text-decoration: none; }
.btn-small:active { transform: scale(0.98); }
.btn-small:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-quiet, .btn-line {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong);
  border-radius: var(--r-s); background: var(--card); color: var(--text); font: 500 14px/1 var(--sans); cursor: pointer;
  transition: border-color 140ms var(--ease), background-color 140ms var(--ease), color 140ms var(--ease);
}
.btn-quiet:hover, .btn-line:hover { border-color: var(--navy); color: var(--navy); }
.btn-line { width: 100%; height: 40px; color: var(--navy); }
.link-btn { padding: 0; border: 0; background: none; color: var(--navy); font: 500 14px var(--sans); cursor: pointer; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-btn.danger { color: #b42318; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--r-s); background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--raised); color: var(--text); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text-2); }
.check input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--navy); }
.stack { display: grid; gap: 16px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 16px; }
.inline-form .field { flex: 1 1 240px; }
.inline-form .field-error { flex-basis: 100%; }

/* segmented filters */
.seg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 24px; }
.seg a {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-s);
  background: var(--card); color: var(--text-2); font-size: 14px; transition: border-color 140ms var(--ease), background-color 140ms var(--ease);
}
.seg a b { font-weight: 500; color: var(--text); }
.seg a:hover { border-color: var(--navy); color: var(--text); text-decoration: none; }
.seg a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.seg a[aria-current="page"] b { color: #fff; }
.seg-act { margin-left: auto; }

/* radio and checkbox pickers */
.pick { position: relative; display: inline-flex; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-s);
  background: var(--card); font-size: 14px; color: var(--text-2); cursor: pointer; transition: background-color 140ms var(--ease), border-color 140ms var(--ease);
}
.pick input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.pick input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }
.seg-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.seg-form .btn-small { margin-left: 8px; }
.status-pick { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; }
.status-pick legend { font-size: 14px; color: var(--text-2); margin-bottom: 8px; padding: 0; }
.status-pick .pick span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--st, var(--rule)); }
.status-pick .pick input:checked + span::before { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25); }
.choose { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
.choose legend { padding: 0; margin-bottom: 12px; font-size: 14px; font-weight: 500; color: var(--text); }
.choice {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; margin-bottom: 8px; border: 1px solid var(--line-strong); border-radius: var(--r-m);
  background: #fff; cursor: pointer; transition: border-color 140ms var(--ease), background-color 140ms var(--ease);
}
.choice:hover { border-color: var(--navy); }
.choice:has(input:checked) { border-color: var(--navy); background: #f6f8fb; }
.choice input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--navy); flex: none; }
.choice-body { min-width: 0; }
.choice-body b { display: block; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.choice-body small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.choose.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.choose.two-up legend { grid-column: 1 / -1; }

/* status colors: one variable per status, used by pills, bars, dots */
.st-researching { --st: var(--rule); }
.st-contacted { --st: #8fb0cf; }
.st-applied { --st: var(--navy); }
.st-declined { --st: var(--c3); }
.st-funded { --st: var(--open); }
.st { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-s); font-size: 13px; font-weight: 500; white-space: nowrap; background: var(--raised); color: var(--text-2); }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--st); }
.st.st-contacted { background: var(--navy-soft); color: var(--navy); }
.st.st-applied { background: rgba(31, 78, 121, 0.16); color: var(--navy-ink); }
.st.st-declined { background: var(--closed-soft); color: var(--closed); }
.st.st-funded { background: var(--open-soft); color: var(--open); }
.st-fill-researching { background: var(--rule); }
.st-fill-contacted { background: #8fb0cf; }
.st-fill-applied { background: var(--navy); }
.st-fill-declined { background: var(--c3); }
.st-fill-funded { background: var(--open); }
.st-bar { display: flex; gap: 2px; height: 12px; margin: 16px 0; border-radius: 4px; overflow: hidden; background: var(--card); }
.st-bar.big { height: 20px; border-radius: 6px; }
.st-bar i { display: block; height: 100%; flex: 0 0 var(--w); transform-origin: 0 50%; }
.st-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.st-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.st-legend b { font-weight: 500; color: var(--text); }
.st-legend.wide { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.st-legend.wide li { display: inline-flex; }
.st-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.seg .st-dot { width: 8px; height: 8px; }

/* usage meters */
.use { margin-top: 16px; }
.use:first-child { margin-top: 0; }
.use-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-2); }
.use-top b { font-weight: 500; color: var(--text); white-space: nowrap; }
.use .meter { margin-top: 8px; }
.use .meter i { background: var(--navy); }

/* ------------------------------------------------------------ dashboard */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.mini-matches { list-style: none; margin: 16px 0 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.mini-matches li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 16px 20px; }
.mini-matches li + li { border-top: 1px solid var(--line); }
.mini-who { min-width: 0; display: grid; gap: 2px; }
.mini-why { font-size: 14px; color: var(--text-2); margin-top: 6px; }
.mini-alerts { list-style: none; margin: 0; padding: 0; }
.mini-alerts li { display: grid; gap: 2px; padding: 10px 0; border-top: 1px dashed var(--line-strong); font-size: 14px; line-height: 1.45; }
.mini-alerts li:first-child { border-top: 0; padding-top: 0; }
.mini-alerts a { color: var(--text); }
.mini-alerts a:hover { color: var(--navy); }
.mini-alerts .unread a { font-weight: 500; }
.mini-alerts small { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------ matches */
.match-rank { font: 500 18px/1.4 var(--serif); color: var(--muted); }
.match-name { font: 500 21px/1.3 var(--serif); color: var(--text); overflow-wrap: anywhere; }
a.match-name:hover { color: var(--navy); }
.mini-matches .match-name { font-size: 18px; }
.match-meta { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
.matches { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.match-group { padding: 24px 0 0; border-top: 1px solid var(--line-strong); }
.match-group h2 { font: 500 24px/1.25 var(--serif); }
.match-group p { margin: 6px 0 0; font-size: 15px; color: var(--text-2); max-width: 44rem; }
.match { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); padding: 24px; }
.match-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.match-who { min-width: 0; }
.match-act { display: flex; align-items: center; gap: 12px; }
.match-act form { margin: 0; }
.saved { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: var(--r-s); background: var(--sunk); color: var(--text-2); font-size: 14px; font-weight: 500; }
.saved svg { color: var(--open); }
.saved:hover { color: var(--text); text-decoration: none; }
.facts { list-style: none; margin: 16px 0 0 56px; padding: 0; display: grid; gap: 6px; }
.fact { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.fact::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--navy); }
.fact-like { color: var(--text); font-weight: 500; }
.fact-norange::before, .fact-apps-unstated::before { background: var(--rule); }
.fact-apps-open { color: var(--open); }
.fact-apps-open::before { background: var(--open); }
.fact-apps-preselected { color: var(--closed); }
.fact-apps-preselected::before { background: var(--closed); }
.fact-own::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--navy); }
.fact-mg::before { background: var(--rule); }

/* the slip: grant lines behind a match, as filed */
.slip { list-style: none; margin: 16px 0 0 56px; padding: 0; border: 1px dashed var(--line-strong); border-radius: var(--r-m); background: #fbf9f4; }
.slip-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 128px; gap: 16px; align-items: baseline; padding: 12px 16px; }
.slip-row + .slip-row { border-top: 1px dashed var(--line-strong); }
.slip-who { min-width: 0; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.slip-who small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--muted); }
.slip-purpose { font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; }
.slip-amt { font: 500 18px/1.3 var(--serif); text-align: right; white-space: nowrap; color: var(--text-2); }
.slip-amt.in { color: var(--navy); }

/* the teaser: count and three rows with the names veiled (no name is in the page) */
.teaser { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.teaser-rows { list-style: none; margin: 0; padding: 0; }
.teaser-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 16px; align-items: center; padding: 16px 24px; }
.teaser-row + .teaser-row { border-top: 1px solid var(--line); }
.teaser-who { min-width: 0; display: grid; gap: 8px; }
.veil { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--text-2); }
.veil svg { flex: none; color: var(--muted); }
.teaser-who small { font-size: 13px; color: var(--muted); }
.teaser-facts { font-size: 14px; color: var(--text-2); }
.teaser-lock { padding: 20px 24px; border-top: 1px solid var(--line); background: var(--sunk); }
.teaser-title { display: flex; align-items: center; gap: 10px; margin: 0; font: 500 20px/1.3 var(--serif); }
.teaser-title svg { flex: none; color: var(--muted); }
.teaser-note { margin: 8px 0 0; font-size: 14px; color: var(--text-2); }

/* plans */
.plans { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); padding: 24px; }
.plan.current { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.plan-name { margin: 0; font-size: 15px; font-weight: 500; color: var(--text-2); }
.plan-price { margin: 8px 0 0; display: flex; align-items: baseline; gap: 8px; }
.plan-price b { font: 500 40px/1 var(--serif); color: var(--text); }
.plan-price span { font-size: 14px; color: var(--muted); }
.plan-year { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.plan-limits { list-style: none; margin: 16px 0 20px; padding: 0; flex: 1; }
.plan-limits li { padding: 8px 0; border-top: 1px dashed var(--line-strong); font-size: 14px; color: var(--text-2); }
.plans-note { margin: 16px 0 0; font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------ a foundation inside the app */
.two { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.two-main { min-width: 0; }
.two-side { min-width: 0; }
.two-main .section { margin-bottom: 56px; }
.years-seg a b { font-weight: 500; }
.track-form { display: grid; gap: 16px; }
.track-form .btn-small { justify-self: start; }
.tracker textarea { min-height: 132px; font-size: 15px; }
.saved-in { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.saved-in li { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.apply-line { margin: 0 0 12px; }
.mini-lines { margin: 0; }
.mini-lines > div { padding: 10px 0; border-top: 1px dashed var(--line-strong); }
.mini-lines dt { font-size: 13px; color: var(--muted); }
.mini-lines dd { margin: 2px 0 0; font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; }

/* ------------------------------------------------------------ saved lists */
.pipeline { margin-bottom: 24px; }
.pipe-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.pipe-k { margin: 0; font-size: 14px; color: var(--muted); }
.pipe-big { margin: 4px 0 0; font: 500 48px/1 var(--serif); }
.pipe-sub { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.pipe-limit { width: 280px; }
.pipe-limit-text { margin: 0; font-size: 14px; color: var(--muted); }
.list-cards { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.list-card {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px 24px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-l); color: var(--text); transition: border-color 140ms var(--ease), box-shadow 160ms var(--ease);
}
.list-card:hover { text-decoration: none; border-color: var(--line-strong); box-shadow: var(--shadow-card); }
.lc-name { font: 500 22px/1.25 var(--serif); }
.list-card:hover .lc-name { color: var(--navy); }
.lc-meta { font-size: 14px; color: var(--muted); }
.lc-counts { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--text-2); }
.lc-counts b { font-weight: 500; color: var(--text); }
.list-card .st-bar { margin: 10px 0 4px; }
.lc-empty { margin-top: 8px; font-size: 14px; color: var(--text-2); }
.new-list > summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; font-size: 15px; font-weight: 500; color: var(--navy); }
.new-list > summary::-webkit-details-marker { display: none; }
.new-list { margin-top: 8px; }
.tracked { list-style: none; margin: 0; padding: 0; }
.tracked-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 16px 24px; }
.tracked-row + .tracked-row { border-top: 1px solid var(--line); }
.tr-who { min-width: 0; }
.tr-who .match-name { font-size: 19px; }
.tr-note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-2); overflow-wrap: anywhere; }
.tr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.tr-date { font-size: 13px; color: var(--muted); }
.danger-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 32px; font-size: 14px; }

/* ------------------------------------------------------------ alerts */
.inbox { list-style: none; margin: 0; padding: 0; }
.alert { padding: 20px 24px; }
.alert + .alert { border-top: 1px solid var(--line); }
.alert.unread { background: #fffefb; }
.al-top { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); }
.al-kind { display: inline-flex; align-items: center; gap: 8px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--navy); flex: none; }
.al-head { margin: 8px 0 0; font: 500 20px/1.35 var(--serif); }
.al-head a { color: var(--text); }
.al-head a:hover { color: var(--navy); }
.al-lines { list-style: none; margin: 12px 0 0; padding: 0; max-width: 640px; }
.al-lines li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 0; border-top: 1px dashed var(--line-strong); font-size: 14px; }
.al-lines li span { min-width: 0; overflow-wrap: anywhere; }
.al-lines small { display: block; font-size: 13px; color: var(--muted); }
.al-lines b { font-weight: 500; white-space: nowrap; }
.al-lines .al-more { color: var(--muted); font-size: 13px; }
.al-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.al-foot form { margin: 0 0 0 auto; }
.rules { display: grid; }
.rule { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--line-strong); font-size: 14px; color: var(--text-2); cursor: pointer; }
.rule:first-of-type { border-top: 0; }
.rule input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--navy); flex: none; }
.rules .btn-small { justify-self: start; margin-top: 12px; }
.peers { list-style: none; margin: 0; padding: 0; }
.peers li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px dashed var(--line-strong); font-size: 14px; }
.peers small { display: block; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------ exports */
.export-form { padding: 24px; }
.export-go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.export-go .muted { font-size: 14px; }
.export-form + .section { margin-top: 48px; }
.inbox + .pager { margin-top: 16px; }
.quota-big { margin: 0 0 16px; font: 500 44px/1 var(--serif); }
.quota-big small { display: block; margin-top: 8px; font: 400 14px/1.4 var(--sans); color: var(--muted); }
.past { list-style: none; margin: 0; padding: 0; }
.past li { display: grid; grid-template-columns: minmax(0, 1fr) auto 120px; gap: 24px; align-items: center; padding: 14px 24px; }
.past li + li { border-top: 1px solid var(--line); }
.past-what b { display: block; font-size: 15px; font-weight: 500; }
.past-what small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.past-rows { font-size: 14px; color: var(--text-2); }
.past-date { font-size: 14px; color: var(--muted); text-align: right; }

/* ------------------------------------------------------------ account */
.acct { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; padding: 32px 0; border-top: 1px solid var(--line); }
.page-head + .acct { border-top: 0; padding-top: 0; }
.acct-k h2 { font: 500 24px/1.2 var(--serif); }
.acct-k p { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.acct-v { min-width: 0; }
.plan-now-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.plan-src { margin: 0; font-size: 14px; color: var(--muted); max-width: 22rem; }
.uses { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px; }
.uses .use { margin: 0; }
.rows-list { list-style: none; margin: 0; padding: 0; }
.rows-list li { display: flex; align-items: center; gap: 16px; padding: 14px 20px; }
.rows-list li + li { border-top: 1px solid var(--line); }
.rows-list form { margin: 0; }
.rl-who { flex: 1; min-width: 0; }
.rl-who b { display: block; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.rl-who small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.rl-fig { font-size: 14px; color: var(--text-2); white-space: nowrap; }
.add-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; font-weight: 500; }
.email-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font-size: 15px; }
.email-line svg { color: var(--muted); }
.ok { font-size: 13px; font-weight: 500; color: var(--open); }
.warn-text { font-size: 13px; font-weight: 500; color: var(--warn); }
.panel.stack .btn-small { justify-self: start; }
.dev { margin-top: 16px; }
.dev > summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--navy); margin-bottom: 16px; }

/* ------------------------------------------------------------ add an organization */
.find { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-bottom: 24px; }
.pick-org { max-width: 760px; }
.budget { max-width: 560px; margin: 8px 0 20px; }
.app-empty { grid-template-columns: 240px minmax(0, 1fr); margin-bottom: 24px; }
.app-empty .empty-act { margin-top: 16px; }
.calm { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-bottom: 24px; padding: 20px 24px;
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--navy); border-radius: var(--r-l); }
.calm p { margin: 0; font-size: 15px; color: var(--text-2); max-width: 40rem; }
.calm b { display: block; font: 500 20px/1.3 var(--serif); color: var(--text); margin-bottom: 4px; }
.calm-act { display: flex; flex-wrap: wrap; gap: 12px; }
.calm-act .btn-quiet, .calm-act .btn-small { height: 40px; padding: 0 16px; }
.find[aria-disabled="true"] { opacity: 0.55; }
/* No EIN? Add your organization by hand (owner 5408) */
.manual { max-width: 760px; margin-top: 24px; }
.manual > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.manual > summary::-webkit-details-marker { display: none; }
.manual > summary svg { flex: none; color: var(--muted); transition: transform 160ms var(--ease); }
.manual[open] > summary svg { transform: rotate(180deg); }
.manual .panel-meta { margin: 8px 0 16px; max-width: 40rem; }
.manual-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.manual-name, .manual-budget { grid-column: 1 / -1; }
.manual-form .btn-small { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 640px) { .manual-form { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .manual > summary svg { transition: none; } }
/* a cause for an organization the IRS lists without one (12 Nov 2026) */
.pick-cause { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; max-width: 560px; margin: 0 0 8px; }
.pick-cause .note { grid-column: 1 / -1; margin: 0; }
.cause-pick { max-width: 760px; margin-bottom: 24px; }
.cause-pick .panel-meta { margin: 8px 0 16px; }
.cause-row { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.cause-row .field { flex: 1 1 260px; }
@media (max-width: 640px) { .pick-cause { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ sign-in, sign-up */
.auth { background: var(--bg); }
.auth-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-side { position: relative; isolation: isolate; display: flex; flex-direction: column; background: var(--ink); color: var(--on-ink); }
.auth-photo { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.auth-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.35) contrast(1.02); }
.auth-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(19, 26, 35, 0.9) 0%, rgba(19, 26, 35, 0.76) 50%, rgba(19, 26, 35, 0.92) 100%); }
.auth-side-in { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; padding: 32px 48px 48px; }
.auth-pitch h2 { font: 500 48px/1.05 var(--serif); letter-spacing: -0.02em; color: #fff; text-wrap: balance; max-width: 34rem; }
.auth-lead { margin: 20px 0 0; font-size: 17px; line-height: 1.55; color: var(--on-ink-2); max-width: 32rem; }
.auth-card { max-width: 420px; margin-bottom: 0; align-self: flex-start; box-shadow: var(--shadow-float); }
.auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px 64px; }
.auth-form-wrap { width: 100%; max-width: 420px; }
.auth-form-wrap h1 { font: 500 40px/1.1 var(--serif); letter-spacing: -0.01em; margin-bottom: 8px; }
.auth-sub { margin: 0 0 24px; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.auth-form-wrap h1 + .stack, .auth-form-wrap h1 + .form-alert, .auth-form-wrap h1 + .toast { margin-top: 24px; }
.auth-form-wrap .btn { width: 100%; justify-content: center; }
.auth-alt { margin: 16px 0 0; font-size: 14px; color: var(--text-2); }
.auth-foot { margin: 48px 0 0; max-width: 420px; font-size: 13px; color: var(--muted); text-align: center; }
.auth .hp { position: absolute; left: -10000px; }

/* ------------------------------------------------------------ tablet */
@media (max-width: 1180px) {
  .dash, .two { grid-template-columns: minmax(0, 1fr); }
  .side-first .two-side { order: -1; }
  .band.has-card .band-in { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .plan-limits { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
}

/* ------------------------------------------------------------ phone and small tablet: the sidebar becomes a top bar */
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: var(--bg); }
  .side { display: none; }
  .app-top {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    height: 56px; padding: 0 16px; background: var(--ink); border-bottom: 1px solid var(--ink-line);
  }
  .app-top .brand { font-size: 16px; }
  .app-menu > summary {
    position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; list-style: none; cursor: pointer;
    border: 1px solid var(--ink-line); border-radius: var(--r-s); color: var(--on-ink); font-size: 14px;
  }
  .app-menu > summary::-webkit-details-marker { display: none; }
  .app-menu > summary .dot { position: absolute; top: 6px; right: 6px; background: #7fb894; }
  .app-menu-panel {
    position: absolute; left: 0; right: 0; top: 56px; display: grid; gap: 16px; padding: 16px; background: var(--ink);
    border-bottom: 1px solid var(--ink-line); box-shadow: 0 24px 48px rgba(8, 12, 18, 0.4);
  }
  .app-body { padding: 24px 16px 64px; }
  .band-in, .band.has-card .band-in { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 24px 16px 40px; }
  .band.has-card .band-in { padding-bottom: 0; }
  .band.has-card .band-text { padding-bottom: 0; }
  .band h1 { font-size: 32px; line-height: 1.1; }
  .band-lead { font-size: 16px; }
  .band-card { margin-bottom: -40px; }
  .band.has-card + .app-body { padding-top: 72px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 24px; }
  .page-head h1 { font-size: 32px; }
  .acct { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 24px 0; }
  .uses { grid-template-columns: minmax(0, 1fr); }
  .find { grid-template-columns: minmax(0, 1fr); }
  .app-empty { grid-template-columns: minmax(0, 1fr); }
  .auth-grid { grid-template-columns: minmax(0, 1fr); }
  .auth-side-in { padding: 20px 16px 32px; gap: 32px; }
  .auth-pitch h2 { font-size: 32px; }
  .auth-lead { font-size: 16px; margin-top: 12px; }
  .auth-main { padding: 32px 16px 40px; justify-content: flex-start; }
  .auth-form-wrap h1 { font-size: 32px; }
}
@media (max-width: 640px) {
  .panel { padding: 16px; }
  .match { padding: 16px; }
  .match-head { grid-template-columns: 24px minmax(0, 1fr); gap: 8px 12px; }
  .match-name { font-size: 19px; }
  .match-act { grid-column: 1 / -1; flex-wrap: wrap; }
  .facts, .slip { margin-left: 0; }
  .slip-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px; }
  .slip-purpose { grid-column: 1 / -1; grid-row: 2; }
  .teaser-row { grid-template-columns: 24px minmax(0, 1fr); gap: 8px 12px; padding: 16px; }
  .teaser-facts, .teaser-row .chip { grid-column: 2; justify-self: start; }
  .teaser-lock { padding: 16px; }
  .mini-matches li { grid-template-columns: 24px minmax(0, 1fr); padding: 16px; }
  .mini-matches .chip { grid-column: 2; justify-self: start; }
  .tracked-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 16px; }
  .tr-side { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .alert { padding: 16px; }
  .al-head { font-size: 18px; }
  .al-foot form { margin-left: 0; }
  .choose.two-up { grid-template-columns: minmax(0, 1fr); }
  .past li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 14px 16px; }
  .past-date { grid-column: 1 / -1; text-align: left; }
  .rows-list li { flex-wrap: wrap; padding: 14px 16px; }
  .pipe-top { flex-direction: column; align-items: stretch; }
  .pipe-limit { width: auto; }
  .plan-limits { grid-template-columns: minmax(0, 1fr); }
  .range-form { grid-template-columns: minmax(0, 1fr); }
  .range-edit { padding: 12px 16px 16px; }
  .seg a { padding: 0 12px; }
  .list-cards { grid-template-columns: minmax(0, 1fr); }
  .list-card { padding: 16px; }
  .auth-card { display: none; }
  .app .filing, .auth .filing { border: 0; gap: 6px; }
  .app .filing > span, .auth .filing > span { border: 1px solid var(--ink-line); border-radius: var(--r-s); }
  .app .filing > span + span, .auth .filing > span + span { border-left: 1px solid var(--ink-line); }
  .app-body .filing > span, .app-body .filing > span + span { border-color: var(--line-strong); }
}
@media (prefers-reduced-motion: reduce) {
  .orgs > summary svg, .btn-small, .seg a, .pick span, .choice, .list-card { transition: none; }
}

/* ------------------------------------------------------------ billing (plan day 10) */
.plan-go { margin-top: 16px; align-self: flex-start; }
.plan .plan-go + form { margin-top: 8px; }
.plan-billing { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 16px 0 0; padding-top: 16px; border-top: 1px dashed var(--line-strong); }
.plan-billing span { font-size: 14px; color: var(--muted); }
.paid-note { margin: 0 0 24px; padding: 14px 16px; border-radius: var(--r-m); border: 1px solid rgba(43, 106, 71, 0.25); background: var(--open-soft); color: var(--open); font-size: 15px; }
.paid-note.wait { border-color: var(--line-strong); background: var(--card); color: var(--text-2); }
.paid-note p { margin: 0; }
.paid-note b { font-weight: 600; }
.plan-billing .btn-quiet { height: 36px; }
.plan-msg { margin: 16px 0 0; padding: 12px 14px; border-radius: var(--r-m); border: 1px solid rgba(180, 35, 24, 0.25); background: #fdf0ee; color: #8a1c12; font-size: 14px; }
.plan-msg.ok { border-color: rgba(43, 106, 71, 0.25); background: var(--open-soft); color: var(--open); }
.plan-pending { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 16px 0 0; padding: 14px 16px; border-radius: var(--r-m); border: 1px solid rgba(31, 78, 121, 0.25); background: var(--navy-soft); }
.plan-pending p { margin: 0; font-size: 14px; color: var(--text-2); max-width: 36rem; }
.plan-pending b { color: var(--navy); font-weight: 600; }

/* change plan dialog */
dialog.cp { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--card); color: var(--text); box-shadow: var(--shadow-float); }
dialog.cp::backdrop { background: rgba(19, 26, 35, 0.55); }
.cp-form { display: grid; gap: 16px; padding: 24px; }
.cp-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.cp-head h2 { font: 500 26px/1.2 var(--serif); }
.cp-x { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: var(--r-s); background: transparent; color: var(--muted); cursor: pointer; }
.cp-x:hover { background: var(--raised); color: var(--text); }
.cp-lead { margin: 0; font-size: 14px; color: var(--text-2); }
.cp-opts { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.cp-opt + .cp-opt { border-top: 1px solid var(--line); }
.cp-opt label { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; cursor: pointer; }
.cp-opt input { width: 16px; height: 16px; accent-color: var(--navy); margin: 0; }
.cp-opt:has(input:checked:not(:disabled)) { background: var(--navy-soft); }
.cp-opt.current, .cp-opt.blocked { background: var(--sunk); }
.cp-opt.current label, .cp-opt.blocked label { cursor: default; }
.cp-name { font-weight: 500; font-size: 15px; }
.cp-name small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.cp-when { font-size: 13px; color: var(--text-2); text-align: right; white-space: nowrap; }
.cp-opt.blocked .cp-when { color: var(--closed); }
.cp-why { margin: -4px 16px 12px 48px; font-size: 13px; color: var(--closed); }
.cp-act { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 640px) {
  .cp-form { padding: 16px; }
  .cp-opt label { grid-template-columns: 20px minmax(0, 1fr); }
  .cp-when { grid-column: 2; text-align: left; white-space: normal; }
  .cp-why { margin-left: 48px; }
}
.cp-opt { display: flow-root; }

/* a placeholder grant line: the return points to an attachment that is not in the e-file */
.ledger-row.placeholder { grid-template-columns: minmax(0, 1fr); }
.ledger-row.placeholder p { margin: 0; font-size: 15px; color: var(--text-2); }
