/* Readable text and comfortable controls, including compact/mobile layouts. */
/* The compact sidebar is intentional; content typography remains unchanged. */
.sidebar .nav-item { font-size: .8125rem; padding-block: 10px; min-height: 44px; }
.sidebar .brand > span { font-size: .625rem; letter-spacing: 1.5px; }
.sidebar .workspace-label, .sidebar .nav-group-label { font-size: .6875rem; letter-spacing: .7px; }
.sidebar .profile-copy strong { font-size: .8125rem; }
.sidebar .profile-copy span, .sidebar .sidebar-note p, .sidebar .sidebar-note a { font-size: .75rem; }
:root { font-size: 100%; --muted: #52665f; }
body { line-height: 1.65; }
.card-summary { font-size: 1rem; color: var(--muted); line-height: 1.65; }
.opportunity-card h3 { font-size: 1.25rem; line-height: 1.4; }
.card-organization, .card-meta { font-size: .875rem; color: var(--muted); }
.card-meta svg { width: 17px; height: 17px; margin-top: 3px; }
.card-deadline { display: flex; gap: 12px; padding: 14px; margin: 4px 0 18px; border: 1px solid #a9c1b6; border-left: 4px solid #27695c; border-radius: 9px; background: #edf5ef; color: #234d42; }
.card-deadline > svg { margin-top: 3px; }
.card-deadline > div { min-width: 0; }
.deadline-label { display: block; font-size: .875rem; font-weight: 600; }
.card-deadline strong { display: block; font-size: 1.125rem; line-height: 1.45; margin: 3px 0; }
.deadline-hint { display: block; font-size: .875rem; line-height: 1.5; }
.card-deadline.is-soon { background: #fff3dd; border-color: #be841b; color: #714408; }
.card-deadline.is-closed { background: #f5eeee; border-color: #b79393; color: #774242; }
.badge { font-size: .875rem; white-space: normal; }
.badge.open, .badge.permanent { color: #365e2c; }
.badge.verify { color: #735214; }
.badge.closed { color: #803d3d; }
.tag, .badge.neutral { color: #4d6055; }
.notice { color: #705725; }
.notice.info { color: #3c6245; }
.modal-body p, .modal-body li, .resource-body, .detail-source, .assistant-steps { color: #52665f; }
.nav-item, .profile-copy strong, .profile-copy span { font-size: .9375rem; }
.nav-group-label, .workspace-label, .app-footer, .field small, .voice-box p { color: #52665f; }
.btn, .btn.small, .card-bottom .text-link, .resource-card .btn, .hero .btn, .steps-panel > .btn { font-size: .9375rem; min-height: 44px; }
.filter-tab, .auth-tabs button { font-size: .9375rem; min-height: 44px; }
.save-button, .icon-button { min-width: 44px; min-height: 44px; }
.field input, .field select, .field textarea, .results-tools select, .results-tools .field select { font-size: 1rem; min-height: 46px; }
.field input::placeholder, .field textarea::placeholder { color: #64756e; }
.field label, .field-label { font-size: .9375rem; }
.modal-body p, .modal-body li, .resource-body, .privacy-content p, .assistant-answer { font-size: 1rem; line-height: 1.75; }
.modal-body h3, .panel h2 { font-size: 1.125rem; }
.detail-facts strong { font-size: 1rem; }
.hero p, .page-heading p { font-size: 1rem; color: #52665f; }
.hero p { max-width: 420px; }
.hero-copy { min-width: 0; }
.card-top, .card-bottom, .section-heading, .results-tools, .watch-banner { flex-wrap: wrap; }
.results-tools .button-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); flex: 0 1 620px; }
.results-tools .field { max-width: none; flex: 1 1 180px; }
.opportunity-card, .project-card, .resource-card, .panel, .stat-card { min-width: 0; }
.project-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
.project-metrics strong, .stat-value.stat-text { overflow-wrap: anywhere; }
.modal-footer .btn { flex-wrap: wrap; overflow-wrap: anywhere; }
.hero-caption { font-size: .875rem; }
.app-footer, .app-footer > div { flex-wrap: wrap; }
@media (max-width: 1100px) {
  .breadcrumb { display: none; }
  .global-search { min-width: 0; flex: 1; }
}
@media (min-width: 761px) and (max-width: 1300px) {
  .opportunity-grid, .three-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .opportunity-grid, .dashboard-bottom .opportunity-grid, .three-columns { grid-template-columns: 1fr; }
  .hero { display: block; }
  .hero-copy { padding: 28px 24px; }
  .hero-art { display: none; }
  .hero p { max-width: none; }
  .hero-secondary { display: block; margin: 16px 0 0; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { display: flex; align-items: center; gap: 16px; }
  .stat-icon { margin-bottom: 0; }
  .global-search { min-width: 0; }
  .topbar-help { min-width: 44px; }
  .topbar { gap: 8px; padding-inline: 12px; }
  .app-footer > div { flex-wrap: wrap; gap: 12px; }
  .filter-bottom, .results-tools { align-items: stretch; }
  .results-tools .button-row { width: 100%; }
}
@media (max-width: 520px) {
  .results-tools .button-row { grid-template-columns: 1fr; }
}
.watch-brief { line-height: 1.55; margin: 12px 0; overflow-wrap: anywhere; }
.watch-details { margin: 12px 0 20px; border: 1px solid #cbd5e1; border-radius: 12px; padding: 0 16px; overflow-wrap: anywhere; }
.watch-details > summary { cursor: pointer; padding: 14px 0; font-weight: 600; min-height: 44px; }
.watch-details[open] { padding-bottom: 16px; }
.watch-change { margin: 16px 0; }
.watch-diff-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }
.watch-before, .watch-after { border-left: 3px solid #b45309; background: #fff7ed; border-radius: 6px; padding: 12px; min-width: 0; overflow-wrap: anywhere; }
.watch-after { border-color: #047857; background: #ecfdf5; }
.watch-diff-grid p { margin: 8px 0 0; color: #25344b; white-space: pre-wrap; }
.watch-collected { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 640px) { .watch-diff-grid { grid-template-columns: minmax(0,1fr); } }
.panel .text-link { white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
.panel .saved-header { overflow-wrap: anywhere; }

/* Persistent account actions and a clearly identifiable funding search. */
.topbar { position: sticky; top: 0; z-index: 25; background: #fcfdf9; gap: 16px; height: auto; min-height: 79px; padding-block: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.topbar-logout { color: var(--teal); border-color: #8aaea2; white-space: nowrap; }
.topbar-logout[hidden] { display: none; }
.global-search { width: 40%; min-width: 260px; max-width: 440px; gap: 8px; padding: 3px 12px 3px 4px; background: #f6fbf7; border: 1px solid #769e8e; border-radius: 10px; color: #164f4b; box-shadow: 0 2px 7px #164f4b12; }
.global-search:focus-within { background: #fff; border-color: #164f4b; box-shadow: 0 0 0 3px #164f4b20; }
.global-search input { font-size: 1rem; font-weight: 500; padding: 9px 0; }
/* The rounded search container already provides the visible focus indicator. */
.global-search input:focus { outline: none; box-shadow: none; }
.global-search input::placeholder { color: #405f53; opacity: 1; }
.search-submit { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border: 0; border-radius: 7px; color: #164f4b; background: transparent; }
.search-submit:hover { background: #d9e9df; }
@media (max-width: 1300px) { .breadcrumb { display: none; } .global-search { flex: 1; } }
@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .topbar-actions { margin-left: auto; }
  .global-search { order: 2; flex: 1 0 100%; width: 100%; min-width: 0; max-width: none; margin-left: 0; }
  .global-search input { font-size: 1rem; }
  .global-search kbd { display: none; }
}

.topbar-help { width: auto; height: auto; min-height: 44px; padding: 10px 13px; border: 1px solid #8aaea2; border-radius: 7px; background: white; color: var(--teal); font-size: .9375rem; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.topbar-help:hover { background: #f2f5f0; border-color: #8aaea2; }
.topbar-help-short { display: none; }
@media (max-width: 760px) {
  .topbar-actions { gap: 8px; }
  .topbar-help { padding-inline: 10px; }
  .topbar-help-long { display: none; }
  .topbar-help-short { display: inline; }
  .topbar-logout { padding-inline: 10px; }
}

/* Identical outer height, including borders and padding, for header controls. */
.global-search, .topbar-help, .topbar-logout {
  box-sizing: border-box;
  height: 2.875rem;
  min-height: 2.875rem;
  margin-block: 0;
  padding-block: 0;
}
.global-search input, .global-search .search-submit {
  box-sizing: border-box;
  height: 100%;
  min-height: 0;
  margin-block: 0;
  padding-block: 0;
}

.email-access-card h3 { overflow-wrap: anywhere; }
#registration-content { overflow-wrap: anywhere; }
.access-prompt { margin-top: 24px; }
.access-prompt .button-row { margin-bottom: 16px; }

.search-match { border-left: 3px solid #769e8e; padding-left: 10px; color: #405f53; font-size: .875rem; line-height: 1.5; }
.search-guidance { margin-block: 20px; }

/* Project list: independent search, calendar period and sort controls. */
.project-filters { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(170px, 1fr) minmax(210px, 1fr) auto; gap: 16px; align-items: end; }
.project-filters .field { min-width: 0; margin: 0; }
.project-filters input, .project-filters select { width: 100%; min-width: 0; }
@media (max-width: 1200px) { .project-filters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .project-filters { grid-template-columns: minmax(0, 1fr); } }

/* Public catalogue: space the introduction independently of signed-in pages. */
.stats-grid + .guest-catalogue { margin-top: 36px; }
.guest-catalogue > .page-heading { margin-bottom: 28px; }
.guest-catalogue .page-kicker { margin-bottom: 14px; line-height: 1.6; }
.guest-catalogue .page-heading h1,
.guest-catalogue .page-heading h2 { margin: 0 0 14px; line-height: 1.25; }
.guest-catalogue .page-heading h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(1.75rem, 2.4vw, 2.125rem); letter-spacing: -.6px; }
.guest-catalogue .resource-card > .badge { align-self: flex-start; margin-bottom: 16px; }
.guest-catalogue .resource-card h2 { margin-bottom: 12px; }
.guest-catalogue .resource-card > .btn { margin-top: auto; }
.guest-catalogue .access-prompt h2 { margin-bottom: 12px; }
.guest-catalogue .access-prompt > p:last-child { margin-bottom: 0; }
@media (max-width: 520px) {
  .stats-grid + .guest-catalogue { margin-top: 28px; }
  .guest-catalogue > .page-heading { margin-bottom: 24px; }
}
