.project-editor-page { background: #f3f7fc; }
.project-hub, .project-editor { width: min(76rem, calc(100% - 2rem)); margin: 0 auto; padding: clamp(2.5rem, 5vw, 4.5rem) 0 5rem; }
.project-hub__header, .project-editor__header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.project-hub__header > div, .project-editor__header > div { max-width: 48rem; }
.project-hub h1, .project-editor h1 { margin: .25rem 0 .8rem; color: var(--navy); font: 700 clamp(2.5rem, 5vw, 4.4rem)/1 var(--font-display); letter-spacing: -.055em; }
.project-hub__header p:last-child, .project-editor__header p:last-child { margin: 0; color: var(--muted); font-size: 1.03rem; line-height: 1.65; }
.project-editor__header { align-items: flex-start; }
.project-editor__back { display: inline-flex; align-items: center; margin-bottom: 1.15rem; color: var(--blue-dark); font-weight: 800; text-decoration: none; }
.project-editor__back:hover { color: var(--blue); }
.project-editor__messages { margin: 0 0 1.5rem; padding: .9rem 1rem; border: 1px solid #b9dfc8; border-radius: .85rem; color: #155b32; background: #eefaf2; font-weight: 750; }
.project-editor__messages p { margin: 0; }
.draft-state { padding: .45rem .75rem; border-radius: 999px; color: #6f4c05; background: #fff1c9; font-size: .76rem; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.draft-list { display: grid; margin-top: 2.4rem; gap: 1rem; }
.draft-card { padding: 1.65rem 1.8rem; border: 1px solid #d7e1ed; border-radius: 1.1rem; background: #fff; box-shadow: 0 1rem 2.8rem rgba(28,62,103,.06); }
.draft-card__meta, .draft-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: #708096; font-size: .8rem; }
.draft-card__meta span { padding: .3rem .55rem; border-radius: 999px; color: #6f4c05; background: #fff1c9; font-weight: 800; }
.draft-card h2 { margin: 1rem 0 .45rem; color: var(--navy); font: 700 1.5rem/1.2 var(--font-display); }
.draft-card > p { color: var(--muted); line-height: 1.6; }
.draft-card__footer { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.draft-card__footer a { color: var(--blue-dark); font-weight: 800; text-decoration: none; }
.project-empty { margin-top: 2.4rem; padding: clamp(2.5rem, 6vw, 5rem); border: 1px dashed #a9bfd9; border-radius: 1.4rem; background: #f7faff; text-align: center; }
.project-empty > span { display: grid; place-items: center; width: 4rem; height: 4rem; margin: 0 auto 1rem; border-radius: 50%; color: var(--blue); background: var(--blue-soft); font-size: 2rem; }
.project-empty h2 { margin: 0; color: var(--navy); font: 700 1.75rem/1.2 var(--font-display); }
.project-empty p { max-width: 35rem; margin: .8rem auto 1.5rem; color: var(--muted); line-height: 1.6; }
.project-form { margin-top: 2.5rem; border: 1px solid #d8e2ee; border-radius: 1.4rem; overflow: hidden; background: #fff; box-shadow: 0 1.8rem 4.5rem rgba(22,54,91,.08); }
.project-form__section { display: grid; grid-template-columns: 3.3rem 15rem minmax(0,1fr); padding: clamp(1.5rem, 4vw, 2.8rem); border-bottom: 1px solid #e3eaf2; gap: 1.25rem 1.5rem; }
.project-form__section:nth-child(even) { background: #fbfdff; }
.project-form__number { display: grid; place-items: center; width: 2.65rem; height: 2.65rem; border: 1px solid #cbdcf0; border-radius: .8rem; color: var(--blue-dark); background: #f2f7ff; font-size: .78rem; font-weight: 900; }
.project-form__heading h2 { margin: .15rem 0 .45rem; color: var(--navy); font: 700 1.35rem/1.2 var(--font-display); }
.project-form__heading p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.project-form__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1.35rem; }
.project-field { display: grid; align-content: start; gap: .45rem; }
.project-field--wide { grid-column: 1 / -1; }
.project-field > label { color: #182a43; font-size: .79rem; font-weight: 800; letter-spacing: .015em; }
.project-field input, .project-field select, .project-field textarea, .list-entry input { width: 100%; padding: .85rem .95rem; border: 1px solid #cbd8e8; border-radius: .8rem; color: var(--ink); background: #fff; font: .96rem/1.5 var(--font-body); box-shadow: 0 1px 2px rgba(7,27,54,.025); }
.project-field input, .project-field select { min-height: 3.15rem; }
.project-field textarea { resize: vertical; }
.project-field input:focus, .project-field select:focus, .project-field textarea:focus, .list-entry input:focus { border-color: #5a9dec; outline: 0; box-shadow: 0 0 0 3px rgba(8,117,250,.13); }
.project-field small { color: #718096; font-size: .76rem; line-height: 1.45; }
.project-field--error input, .project-field--error select, .project-field--error textarea { border-color: #c66868; }
.project-field .errorlist, .form-alert { margin: .25rem 0 0; color: #9c2929; font-size: .8rem; }
.form-alert { margin: 1.5rem; padding: 1rem; border-radius: .7rem; background: #fff2f2; }
.list-entry { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .6rem; }
.list-entry button { padding: .65rem 1rem; border: 1px solid #b8cdea; border-radius: .7rem; color: var(--blue-dark); background: #f8fbff; font-weight: 800; cursor: pointer; }
.tag-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.tag-list > span { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .45rem .4rem .7rem; border-radius: 999px; color: #075cc2; background: #e8f2ff; font-size: .78rem; font-weight: 800; }
.tag-list button, .criteria-list button { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; padding: 0; border: 0; border-radius: 50%; color: inherit; background: rgba(8,117,250,.12); font: 700 1rem/1 var(--font-body); cursor: pointer; }
.criteria-list { display: grid; margin: 0; padding: 0; counter-reset: criteria; gap: .55rem; list-style: none; }
.criteria-list li { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; padding: .7rem .8rem; border: 1px solid #dbe6f2; border-radius: .75rem; background: #f8fbff; gap: .7rem; color: #253a56; font-size: .9rem; }
.criteria-list li::before { counter-increment: criteria; content: counter(criteria, decimal-leading-zero); color: #6d8daf; font-size: .7rem; font-weight: 900; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 2.7rem; }
.input-suffix span { position: absolute; top: 50%; right: 1rem; color: #647890; font-weight: 800; transform: translateY(-50%); }
.project-form__actions { display: flex; align-items: center; justify-content: space-between; padding: 1.4rem clamp(1.5rem, 4vw, 2.8rem); gap: 1rem; background: #f7faff; }
.project-form__actions p { margin: 0; color: #657991; font-size: .82rem; }
.project-form__actions > div { display: flex; gap: .7rem; }
[hidden] { display: none !important; }
@media (max-width: 850px) {
  .project-editor__header { grid-template-columns: 1fr auto; }
  .project-editor__header > a { grid-column: 1 / -1; }
  .project-form__section { grid-template-columns: 3rem minmax(0,1fr); }
  .project-form__fields { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .project-hub__header { align-items: flex-start; flex-direction: column; }
  .project-form__section, .project-form__fields { grid-template-columns: 1fr; }
  .project-form__number { display: none; }
  .project-field, .project-field--wide { grid-column: 1; }
  .list-entry { grid-template-columns: 1fr; }
  .project-form__actions { align-items: stretch; flex-direction: column; }
  .project-form__actions > div { flex-direction: column-reverse; }
  .project-form__actions .button { width: 100%; }
}
.preview-grid { display: grid; grid-template-columns: .8fr 1.2fr; margin-top: 2rem; gap: 1rem; }
.preview-card, .publish-panel { padding: 1.6rem; border: 1px solid #d7e1ed; border-radius: 1rem; background: #fff; box-shadow: 0 1rem 2.8rem rgba(28,62,103,.06); }
.preview-card h2, .preview-card h3 { color: var(--navy); }
.preview-card p, .preview-card li { color: var(--muted); line-height: 1.6; }
.publish-panel { display: flex; align-items: end; justify-content: space-between; margin-top: 1rem; gap: 1rem; }
.publish-panel fieldset { border: 0; }
.publish-panel legend { margin-bottom: .65rem; color: var(--navy); font-weight: 800; }
.publish-panel ul { display: flex; margin: 0; padding: 0; gap: 1rem; list-style: none; }
@media (max-width: 720px) { .preview-grid { grid-template-columns: 1fr; } .publish-panel, .publish-panel ul { align-items: stretch; flex-direction: column; } }
.marketplace-search { width: min(76rem, calc(100% - 2rem)); min-height: 70vh; margin: 0 auto; padding: clamp(2.8rem, 6vw, 5rem) 0; }
.marketplace-search__header { max-width: 51rem; }
.marketplace-search__header h1 { max-width: 48rem; margin: .35rem 0 .9rem; color: var(--navy); font: 700 clamp(2.7rem, 6vw, 4.7rem)/.98 var(--font-display); letter-spacing: -.058em; }
.marketplace-search__header > p:last-child { max-width: 43rem; margin: 0; color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.marketplace-filter { display: grid; grid-template-columns: 1.5fr repeat(4,minmax(9rem,1fr)) auto; align-items: end; margin: 2.4rem 0 2rem; padding: 1.1rem; border: 1px solid #d6e2ef; border-radius: 1rem; background: #fff; box-shadow: 0 1rem 3rem rgba(24,56,94,.07); gap: .75rem; }
.marketplace-filter > div { display: grid; gap: .4rem; }
.marketplace-filter label { color: #263b56; font-size: .72rem; font-weight: 850; }
.marketplace-filter input, .marketplace-filter select { width: 100%; min-height: 3rem; padding: .65rem .75rem; border: 1px solid #c8d7e8; border-radius: .7rem; color: var(--navy); background: #fff; font: .9rem/1.4 var(--font-body); }
.marketplace-filter input:focus, .marketplace-filter select:focus { border-color: #5a9dec; outline: 0; box-shadow: 0 0 0 3px rgba(8,117,250,.13); }
.marketplace-filter .errorlist { grid-column: 1 / -1; margin: 0; padding: 0; color: #9c2929; font-size: .75rem; list-style: none; }
.marketplace-filter .button { min-height: 3rem; }
.marketplace-result-heading { display: flex; justify-content: flex-end; margin: 0 0 .8rem; color: var(--muted); font-size: .88rem; }
.marketplace-result-heading p { margin: 0; }
.marketplace-results { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.marketplace-card { display: flex; min-height: 20rem; padding: 1.65rem; border: 1px solid #d7e1ed; border-radius: 1.1rem; background: #fff; box-shadow: 0 1rem 2.8rem rgba(28,62,103,.06); flex-direction: column; }
.marketplace-card__top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; color: #6c8099; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.marketplace-card__confidential { padding: .3rem .55rem; border-radius: 999px; color: #614909; background: #fff1c9; }
.marketplace-card h2 { margin: 1.25rem 0 .55rem; color: var(--navy); font: 700 1.55rem/1.18 var(--font-display); letter-spacing: -.025em; }
.marketplace-card h2 a { color: inherit; text-decoration: none; }
.marketplace-card h2 a:hover { color: var(--blue-dark); }
.marketplace-card > p { margin: 0 0 1.25rem; color: var(--muted); line-height: 1.6; }
.marketplace-card footer { display: flex; justify-content: space-between; margin-top: auto; padding-top: 1.2rem; border-top: 1px solid var(--line); color: #60748d; font-size: .8rem; gap: .75rem; }
.marketplace-pagination { display: flex; align-items: center; justify-content: center; margin-top: 2rem; gap: 1.4rem; }
.marketplace-pagination a { color: var(--blue-dark); font-weight: 800; text-decoration: none; }
.marketplace-pagination span { color: var(--muted); font-size: .86rem; }
@media (max-width: 66rem) { .marketplace-filter { grid-template-columns: repeat(3,minmax(0,1fr)); } .marketplace-filter__search { grid-column: span 2; } }
@media (max-width: 46rem) { .marketplace-results, .marketplace-filter { grid-template-columns: 1fr; } .marketplace-filter__search { grid-column: 1; } .marketplace-card footer { flex-direction: column; } }
.interaction-panel { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; padding: 1.5rem; border: 1px solid #d7e1ed; border-radius: 1rem; background: #fff; box-shadow: 0 1rem 2.8rem rgba(28,62,103,.06); gap: 1rem; }
.interaction-panel--stack { align-items: stretch; flex-direction: column; }
.interaction-panel h2 { margin: .2rem 0; color: var(--navy); font: 700 1.55rem/1.2 var(--font-display); }
.interaction-actions { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; }
.interaction-actions > form:not(.close-project-form) { display: flex; align-items: end; }
.close-project-form { display: grid; align-items: end; gap: .45rem; }
.close-project-form label { color: var(--muted); font-size: .85rem; }
.invitation-picker > ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0 0 1rem; padding: 0; gap: .65rem; list-style: none; }
.invitation-picker label { display: block; padding: 1rem; border: 1px solid #ccd9e9; border-radius: .8rem; cursor: pointer; }
.interaction-list, .question-list { display: grid; gap: .75rem; }
.interaction-list article, .question-list article { padding: 1rem; border: 1px solid #dbe5f0; border-radius: .8rem; background: #f8fbff; }
.interaction-list article { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.interaction-list button { border: 0; color: var(--blue-dark); background: transparent; font-weight: 800; cursor: pointer; }
.question-list article > div:first-child { display: flex; justify-content: space-between; color: #5f7590; font-size: .8rem; gap: 1rem; }
.question-list p { color: var(--muted); line-height: 1.6; }
.question-answer { margin-top: .8rem; padding: .85rem; border-left: 3px solid var(--blue); background: #fff; }
.question-form { display: grid; gap: .8rem; }
.question-form > div { display: grid; gap: .4rem; }
.question-form select, .question-form textarea, .question-list textarea { width: 100%; padding: .8rem; border: 1px solid #c8d7e8; border-radius: .75rem; font: .95rem/1.5 var(--font-body); }
.file-upload-form { display: grid; max-width: 48rem; gap: 1rem; }
.file-drop-zone { display: grid; min-height: 13rem; place-items: center; padding: 2rem; border: 2px dashed #9dbce1; border-radius: 1rem; color: var(--blue-dark); background: #f2f7fd; font-weight: 800; text-align: center; cursor: pointer; }
.file-drop-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.file-drop-zone:focus-within { outline: 3px solid rgba(15,112,255,.28); outline-offset: 3px; }
.project-files article > div { display: grid; gap: .2rem; }
.project-files small { color: var(--muted); }
@media (max-width: 46rem) { .interaction-panel, .interaction-list article { align-items: stretch; flex-direction: column; } .invitation-picker > ul { grid-template-columns: 1fr; } }
