.login-view[hidden], .app-shell[hidden], [hidden] { display: none !important; }
.preview-banner { grid-column: 1 / -1; padding: .7rem 1rem; background: #fff0c7; border-bottom: 1px solid #d6b45e; color: #563c08; font-size: .8rem; }
.skip-link { top: 12px; transform: translateY(-180%); }
.skip-link:focus { top: 12px; transform: none; }
.sidebar nav { overflow-y: auto; }
.source-row { min-width: 0; overflow-wrap: anywhere; }
.inline-form { display: grid; grid-template-columns: minmax(180px, 1fr) 150px minmax(180px, 1fr) auto; gap: 9px; margin-top: 18px; }
.inline-form input { min-width: 0; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 10px 11px; color: var(--ink); }
@media (max-width: 900px) { .inline-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .inline-form { grid-template-columns: 1fr; } }
.live-search { margin-bottom: 1rem; }
.account-form { display: grid; gap: 10px; margin: 12px 0; }
.account-form label { display: grid; gap: 5px; font-size: .72rem; font-weight: 800; color: var(--muted); }
.account-form input { border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; }
.account-register { margin: 12px 0; font-size: .78rem; }
.public-tools { grid-column: 1 / -1; margin-top: 1rem; }
.public-search-results { margin-top: 1rem; }
.public-search-results .opportunities-grid { margin-top: .75rem; }
.public-links { margin-top: 1rem; }
.demo-divider { display: flex; align-items: center; gap: 8px; margin: 20px 0 12px; color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.demo-divider::before,.demo-divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.access-row { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.access-row:first-child { border-top: 0; }
.search-row { display: grid; grid-template-columns: 1fr auto; gap: .75rem; align-items: end; }
.search-row input { min-width: 0; }
.live-result { border-top: 4px solid #2f7567; }
.status.live { background: #dff3eb; color: #185448; }
.result-meta { display: flex; justify-content: space-between; gap: .75rem; align-items: center; }
.compact-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: .8rem 0; }
.compact-facts div, .linked-summary span { background: #f1f5f2; border-radius: .45rem; padding: .55rem .65rem; }
.compact-facts dt { color: #52635d; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.compact-facts dd { margin: .15rem 0 0; font-weight: 700; }
.snapshot-section, .portfolio-projects { margin-top: 2rem; }
.linked-summary { display: flex; flex-wrap: wrap; gap: .45rem; margin: .75rem 0; font-size: .82rem; }
.portfolio-card { border-left: 4px solid #2f7567; }
.local-only-warning { margin-bottom: 1rem; border-left-color: #7b4b13; }
.local-profile-form, .local-draft-form { margin-bottom: 1rem; }
.mapping-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: 1rem 0; }
.mapping-field small { display: block; margin-top: .25rem; color: #586660; }
.field-hint { display: block; margin-top: .3rem; color: var(--muted); font-weight: 500; }
.status-checklist { min-width: 0; margin: 0; padding: 0; border: 0; }
.status-checklist legend { margin-bottom: .35rem; color: var(--muted); font-size: .875rem; font-weight: 800; }
.status-options { display: flex; flex-wrap: wrap; gap: .45rem .8rem; }
.check-option { display: inline-flex; align-items: center; gap: .35rem; color: var(--ink); font-size: .875rem; font-weight: 600; }
.check-option input { width: auto; margin: 0; accent-color: var(--pine); }
.check-option.select-all { padding-left: .8rem; border-left: 1px solid var(--line); }
#public-search-form { grid-template-columns: minmax(220px, 1fr) minmax(190px, auto); }
#public-search-form .status-checklist { grid-column: 1 / -1; }
.project-picker { max-width: 42rem; }
.danger-outline { border-color: #a32d2d; color: #852121; background: #fff; }
.obligation.overdue { border-left: 4px solid #a32d2d; }
.compliance-update { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: .55rem; margin-top: .8rem; }
.compliance-update input, .compliance-update select { min-width: 0; }
.compliance-create { margin-top: 1rem; }
@media (max-width: 900px) { .compliance-update { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .mapping-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .search-row { grid-template-columns: 1fr; } .result-meta { align-items: flex-start; flex-direction: column; } }
.funding-summary { white-space: pre-line; }
.source-detail { margin-top: .7rem; border-top: 1px solid var(--line); padding-top: .6rem; }
.source-detail summary { color: var(--green); font-size: .8rem; font-weight: 800; cursor: pointer; }
.source-detail p { max-height: 18rem; overflow: auto; white-space: pre-line; }
.research-actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.saved-research { margin: 1rem 0; }
.saved-research-list { display: grid; gap: .6rem; }
.saved-research-row { display: flex; justify-content: space-between; gap: .8rem; align-items: center; padding: .7rem; border: 1px solid var(--line); border-radius: .55rem; background: white; }
.saved-research-row p { margin: .2rem 0 0; }
.feedback-launcher { position: fixed; z-index: 25; right: 1rem; bottom: 1rem; border: 2px solid #fff; border-radius: 999px; padding: .75rem 1rem; background: var(--pine); color: #fff; font: inherit; font-weight: 850; box-shadow: 0 8px 24px rgba(0,0,0,.22); cursor: pointer; }
.feedback-dialog { width: min(680px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: 0; border-radius: 1rem; }
.feedback-dialog::backdrop { background: rgba(12,31,27,.72); }
.feedback-form { display: grid; gap: .75rem; padding: 1.3rem; }
.feedback-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.feedback-heading h2 { margin: 0; }
.feedback-form label { display: grid; gap: .3rem; color: var(--muted); font-size: .74rem; font-weight: 800; }
.feedback-form textarea, .feedback-form input { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; font: inherit; }
.feedback-form textarea { min-height: 76px; resize: vertical; }
.feedback-close { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: white; font-size: 1.4rem; cursor: pointer; }
.feedback-honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; }

/* Global presentation tokens. These aliases preserve the existing visual theme while
   keeping reusable components on one owner-configurable system. */
:root {
  --font-body: Arial, Helvetica, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
  --space-scale: 1;
  --radius-base: 12px;
}
html { font-family: var(--font-body); font-size: 16px; line-height: 1.55; text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: hidden; }
body, button, input, select, textarea, table { font-family: var(--font-body); }
.login-view, .app-shell, .app-main, .workspace, #workspace-content, .public-tools, .public-search-results, .live-search { min-width: 0; max-width: 100%; }
.funding-pagination { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: center; grid-column: 1 / -1; margin: 1rem 0; }
h1, h2, .brand strong, .org-context strong, .metric strong, .date-block strong { font-family: var(--font-heading); font-weight: 700; }
h3, h4, h5, h6, nav, button, label, th { font-family: var(--font-body); }
.panel, .opportunity, .development, .reference-card, .login-panel { border-radius: calc(var(--radius-base) + 4px); }
.button, .field input, .field select, .field textarea, .identity-button { border-radius: max(6px, calc(var(--radius-base) - 3px)); }
.panel, .opportunity { padding: calc(22px * var(--space-scale)); }
.grid { gap: calc(18px * var(--space-scale)); }
.button { padding: calc(10px * var(--space-scale)) calc(14px * var(--space-scale)); }
.muted, small, .field label, .row-main p, .source-links a, .role-note, .sidebar nav button small { font-size: .875rem; line-height: 1.45; }
.tag, .status { font-size: .75rem; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th, td { padding: calc(8px * var(--space-scale)); text-align: left; overflow-wrap: anywhere; }
.money, .currency, [data-money], td.numeric, th.numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.compact-facts div:last-child dd { text-align: right; font-variant-numeric: tabular-nums; }
.theme-colors { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: .65rem; margin: 1rem 0; }
.theme-color { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem; border: 1px solid var(--line); border-radius: var(--radius-base); font-size: .875rem; text-transform: capitalize; }
.theme-color input { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--line); background: var(--surface); }
.theme-preview-stage { width: 100%; max-width: 720px; min-width: 0; padding: 1rem; margin: 1rem 0; border: 1px dashed var(--line); border-radius: var(--radius-base); overflow: auto; transition: max-width .2s ease; }
.theme-preview-stage[data-size="mobile"] { max-width: 340px; }
.theme-sample-card { min-width: 0; padding: calc(18px * var(--space-scale)); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-base); overflow-wrap: anywhere; }
.theme-sample-card h2 { margin: .35rem 0; }
[data-logo-asset="TFH_WORDMARK"] .brand-mark { width: auto; padding-inline: .65rem; border-radius: max(4px, calc(var(--radius-base) - 4px)); }
[data-logo-asset="TFH_SEAL"] .brand-mark { border-radius: 50%; background: var(--gold); color: var(--pine-deep); }

/* Decorative Library artwork stays isolated as external SVG to avoid document ID collisions. */
.brand-emblem,
.sidebar-brand-emblem {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.brand-emblem { width: 84px; height: 42px; }
.brand-emblem img,
.sidebar-brand-emblem img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sidebar-brand-emblem { width: 58px; height: 34px; padding: 3px 5px; border-radius: 8px; background: rgb(255 255 255 / 92%); }
.frog-border {
  --frog-border-height: 22px;
  height: var(--frog-border-height);
  background-color: var(--surface);
  background-image: url('/assets/frog_stagger_wider.svg');
  background-repeat: repeat-x;
  background-position: center;
  background-size: auto 56px;
  border-block: 1px solid color-mix(in srgb, var(--line) 78%, #17637f 22%);
  pointer-events: none;
}
.site-header[hidden] + .frog-border-public { display: none; }
.frog-border-workspace { position: sticky; top: 72px; z-index: 19; }
.site-footer { background: var(--surface); }
.site-header[hidden] ~ .site-footer { margin-left: 250px; }
@media (max-width: 720px) {
  .brand-emblem { width: 66px; height: 34px; }
  .sidebar-brand-emblem { width: 52px; height: 31px; }
  .frog-border { --frog-border-height: 18px; background-size: auto 42px; }
  .frog-border-workspace { top: 60px; }
  .site-header[hidden] ~ .site-footer { margin-left: 0; }
  #public-search-form { grid-template-columns: minmax(0, 1fr); }
  #public-search-form > * { min-width: 0; max-width: 100%; }
}
@media (max-width: 720px) {
  .theme-preview-stage { max-width: 100%; }
  .form-actions, .research-actions { flex-wrap: wrap; }
  .saved-research-row, .access-row { align-items: flex-start; flex-direction: column; }
  .panel, .opportunity { min-width: 0; overflow-wrap: anywhere; }
}
