/* Persistent projects: the directory, the project panel and the workspace (docs/launch/PROJECTS.md).

   Built on the foundation's tokens (public/css/osf.css); every rule scoped to body.osf. No new
   colour, font or size: a state is a statusTag, a form is the shared field. Loaded by the pages
   in server/views/projects.js and by an edition page that shows the project panel. */

body.osf .osf-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body.osf .osf-back { margin: 0 0 1rem; font-size: var(--osf-size-meta); }

/* The directory: filters beside results on wide screens, above them on narrow ones. */
body.osf .osf-directory { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2.5rem; margin-top: 1.5rem; }
@media (max-width: 900px) { body.osf .osf-directory { grid-template-columns: minmax(0, 1fr); gap: 1rem; } }
body.osf .osf-directory-search { max-width: var(--osf-measure); margin: 1.5rem 0 0.5rem; position: relative; }
body.osf .osf-directory-search label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
body.osf .osf-search-row { display: flex; gap: 0.5rem; align-items: stretch; flex-wrap: wrap; }
body.osf .osf-search-row .osf-input { flex: 1 1 14rem; min-width: 0; }
body.osf .osf-suggestions { list-style: none; margin: 0.25rem 0 0; padding: 0; border: 1px solid var(--osf-border); background: var(--osf-canvas); max-width: var(--osf-measure); }
body.osf .osf-suggestions li a { display: block; padding: 0.5rem 0.75rem; overflow-wrap: anywhere; }
body.osf .osf-suggestions li a:focus, body.osf .osf-suggestions li a[aria-selected="true"] { background: var(--osf-surface-selected); }
body.osf .osf-facets h2 { font-size: var(--osf-size-h3); margin-top: 0; }
body.osf .osf-facet h3 { font-size: var(--osf-size-body); margin: 1rem 0 0.25rem; }
body.osf .osf-facet ul { list-style: none; margin: 0; padding: 0; }
body.osf .osf-facet li { margin: 0.25rem 0; }
body.osf .osf-facet a[aria-current="true"] { font-weight: 700; }
body.osf .osf-facet a[aria-current="true"]::before { content: '✓ '; }
body.osf .osf-filters-active { margin: 0.5rem 0 0; }
body.osf .osf-filters-active ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
body.osf .osf-filters-active p { margin: 0.5rem 0 0; font-size: var(--osf-size-meta); }
body.osf .osf-chip { display: inline-block; border: 1px solid var(--osf-border-control); padding: 0.2rem 0.6rem; font-size: var(--osf-size-meta); text-decoration: none; overflow-wrap: anywhere; }
body.osf .osf-chip:hover { border-color: var(--osf-button-hover); }
body.osf .osf-results { list-style: none; margin: 0; padding: 0; max-width: var(--osf-measure); }
body.osf .osf-result { border-top: 1px solid var(--osf-border); padding: 1rem 0; }
body.osf .osf-result h3 { margin: 0 0 0.25rem; font-size: var(--osf-size-h3); overflow-wrap: anywhere; }
body.osf .osf-result-summary { margin: 0.25rem 0; overflow-wrap: anywhere; }
body.osf .osf-result-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin: 0.5rem 0; }
body.osf .osf-pager ul { list-style: none; padding: 0; margin: 1.5rem 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: baseline; }

/* The live project panel under an edition. */
body.osf .osf-project-panel { border-top: 2px solid var(--osf-text); margin: 2.5rem 0 0; padding-top: 1rem; max-width: var(--osf-measure); }
body.osf .osf-project-panel h3 { font-size: var(--osf-size-body); margin: 1.25rem 0 0.25rem; }
body.osf .osf-project-panel ul { padding-left: 1.25rem; }
body.osf .osf-needs li, body.osf .osf-team li, body.osf .osf-funding li { overflow-wrap: anywhere; }
body.osf .osf-updates { list-style: none; margin: 0; padding: 0; max-width: var(--osf-measure); }
body.osf .osf-update { border-top: 1px solid var(--osf-border); padding: 0.75rem 0; }
body.osf .osf-update h3 { margin: 0; font-size: var(--osf-size-body); }
body.osf .osf-update-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* The workspace. */
body.osf .osf-form { max-width: var(--osf-measure); margin: 1rem 0 2rem; }
body.osf .osf-fieldset { border: 0; padding: 0; margin: 1rem 0; }
body.osf .osf-fieldset legend { font-weight: 600; margin-bottom: 0.5rem; }
body.osf .osf-need-row { border-top: 1px solid var(--osf-border); padding: 0.5rem 0; }
body.osf .osf-members, body.osf .osf-relations { list-style: none; margin: 0; padding: 0; max-width: var(--osf-measure); }
body.osf .osf-member, body.osf .osf-relation { border-top: 1px solid var(--osf-border); padding: 0.75rem 0; overflow-wrap: anywhere; }
body.osf .osf-member form, body.osf .osf-relation form { margin: 0.25rem 0; }

/* The project guidelines page: numbered sections as published, each an anchor a removal links to. */
body.osf .osf-guidelines { padding-left: 0; list-style: none; }
body.osf .osf-guidelines > li { border-top: 1px solid var(--osf-border); padding: 1rem 0; scroll-margin-top: 1rem; }
body.osf .osf-guidelines h2 { margin: 0 0 0.5rem; font-size: var(--osf-size-h3); }
body.osf .osf-guideline-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Discovery (migration 0026): the order choices, "Save this search" under the results, and the
   saved-searches list, whose addresses can be long enough to overflow a phone screen. */
body.osf .osf-sort strong { font-weight: 700; }
body.osf .osf-save-search { border-top: 1px solid var(--osf-border); padding-top: 1rem; }
body.osf .osf-saved-search-name { margin: 0; font-size: var(--osf-size-body); overflow-wrap: anywhere; }
body.osf .osf-saved-search-query { overflow-wrap: anywhere; }
/* The Collaborate tab of an edition page and the workspace's connections. Needs and offers side
   by side on wide screens, stacked on narrow ones. */
body.osf .osf-collaborate { max-width: var(--osf-measure); margin-top: 1.5rem; }
body.osf .osf-collaborate h3 { font-size: var(--osf-size-body); margin: 1.25rem 0 0.25rem; }
body.osf .osf-collaborate ul, body.osf .osf-history { padding-left: 1.25rem; }
body.osf .osf-collaborate li, body.osf .osf-relation, body.osf .osf-match { overflow-wrap: anywhere; }
body.osf .osf-collaborate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; }
@media (max-width: 640px) { body.osf .osf-collaborate-grid { grid-template-columns: minmax(0, 1fr); } }
body.osf .osf-attribution-statement { margin: 0.25rem 0 0.5rem; white-space: pre-wrap; }
body.osf .osf-request-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0.25rem 0; }
body.osf .osf-matches { list-style: none; margin: 0; padding: 0; max-width: var(--osf-measure); }
body.osf .osf-match { border-top: 1px solid var(--osf-border); padding: 0.75rem 0; }
body.osf .osf-relation details { margin: 0.5rem 0; }
/* The draft's structured lists (milestones, outputs, links): one row of labelled fields per entry,
   side by side where there is room, stacked on a phone. */
body.osf .osf-content-rows { list-style: none; margin: 0; padding: 0; }
body.osf .osf-content-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0 1rem; border-top: 1px solid var(--osf-border); padding: 0.5rem 0; }
body.osf .osf-content-row .osf-field { min-width: 0; }
body.osf .osf-content-row .osf-input, body.osf .osf-content-row .osf-select { width: 100%; max-width: 100%; box-sizing: border-box; }
body.osf .osf-content-list { padding-left: 1.25rem; }
body.osf .osf-content-list li { margin: 0.35rem 0; overflow-wrap: anywhere; }

/* The team's activity record and the funding opportunities. */
body.osf .osf-activity { list-style: none; margin: 0; padding: 0; max-width: var(--osf-measure); }
body.osf .osf-activity li { border-top: 1px solid var(--osf-border); padding: 0.5rem 0; overflow-wrap: anywhere; }
body.osf .osf-activity li p { margin: 0; }
body.osf .osf-call { border: 1px solid var(--osf-border); padding: 1rem; max-width: var(--osf-measure); overflow-wrap: anywhere; }
body.osf .osf-call h3 { margin-top: 0; }

/* The draft page since the redesign of 2026-10-15: an overview of the four parts, the parts as
   fieldsets of the one form, publication and settings in their own sections. */
body.osf .osf-draft-parts { max-width: var(--osf-measure); margin: 1rem 0 2rem; }
body.osf .osf-draft-form { max-width: var(--osf-measure); }
body.osf .osf-draft-form .osf-group { scroll-margin-top: 1rem; }
body.osf .osf-draft-form .osf-group > legend { font-size: var(--osf-size-h3); }
body.osf .osf-draft-form .osf-fieldset { border-top: 1px solid var(--osf-border); padding-top: 1rem; margin: 1.5rem 0; }
body.osf .osf-formbar-note { margin: 0; font-size: var(--osf-size-meta); max-width: 28rem; }
body.osf .osf-image-upload { max-width: var(--osf-measure); border-top: 1px solid var(--osf-border); padding-top: 0.5rem; }
body.osf #publish { max-width: var(--osf-measure); border-top: 2px solid var(--osf-text); margin-top: 3rem; padding-top: 0.5rem; }
body.osf #withdraw-settings { max-width: var(--osf-measure); }
