/* Contributor and admin workflow */
.workspace-page { min-height: 80vh; padding: 36px 0 90px; background: #f4f6fb; }
.workspace-header, .admin-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 44px; margin-bottom: 24px; }
.workspace-header h1, .admin-header h1 { max-width: 820px; margin: 0; font-size: clamp(2.35rem, 4vw, 3.65rem); line-height: 1.02; letter-spacing: -.055em; }
.workspace-header > div:first-child > p:last-child, .admin-header > div:first-child > p:last-child { max-width: 720px; margin: 12px 0 0; color: var(--muted); font-size: 1.02rem; }
.invite-status, .admin-identity { flex: none; display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 4px 0 var(--line); }
.invite-status > span, .admin-identity > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--lime); color: #243900; font-weight: 900; }
.invite-status div, .admin-identity div { display: grid; }
.invite-status small, .admin-identity small { color: var(--muted); }
.prototype-notice { display: flex; gap: 12px; align-items: flex-start; margin: 20px 0; padding: 12px 15px; border: 1px solid #ccd4f7; border-radius: 14px; background: var(--blue-soft); color: #3d4962; }
.prototype-notice > span { color: var(--blue); font-size: 1.3rem; line-height: 1.25; }
.prototype-notice p { margin: 0; font-size: .9rem; }

.workflow-steps { display: grid; grid-template-columns: repeat(3, 1fr); margin: 20px 0; padding: 0; list-style: none; }
.workflow-steps li { position: relative; display: flex; align-items: center; gap: 11px; color: #7a8496; }
.workflow-steps li::after { content: ""; position: absolute; top: 20px; left: 54px; right: 18px; height: 2px; background: var(--line); }
.workflow-steps li:last-child::after { display: none; }
.workflow-steps li > span { position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; border: 2px solid var(--line); border-radius: 50%; background: #f4f6fb; font-weight: 850; }
.workflow-steps li div { display: grid; position: relative; z-index: 1; padding-right: 12px; background: #f4f6fb; }
.workflow-steps li strong { color: #586477; font-size: .9rem; }
.workflow-steps li small { font-size: .76rem; }
.workflow-steps li.is-active > span { border-color: var(--blue); background: var(--blue); color: white; }
.workflow-steps li.is-active strong { color: var(--blue); }
.workflow-steps li.is-complete > span { border-color: #6d9c16; background: var(--lime); color: #273d00; }
.workflow-steps li.is-complete > span { font-size: 0; }
.workflow-steps li.is-complete > span::after { content: "✓"; font-size: 1rem; }

.contribution-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); align-items: start; gap: 24px; }
.idea-form, .draft-panel, .review-queue, .review-detail { border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: 0 6px 20px rgba(38, 55, 110, .07); }
.idea-form { padding: 30px; }
.form-section-heading, .review-section-title { display: flex; align-items: center; gap: 13px; margin-bottom: 24px; }
.form-section-heading.compact { margin-top: 34px; }
.form-section-heading > span, .review-section-title > span { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font-size: .8rem; font-weight: 900; }
.form-section-heading h2, .review-section-title h3 { margin: 0; font-size: 1.28rem; line-height: 1.2; letter-spacing: -.025em; }
.form-section-heading p, .review-section-title p { margin: 3px 0 0; color: var(--muted); font-size: .84rem; }
.field-label { display: flex; justify-content: space-between; gap: 12px; margin: 20px 0 7px; color: #344158; font-size: .88rem; font-weight: 800; }
.field-label > span { color: #7a8496; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.field-header { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 20px; }
.field-header .field-label { margin: 0 0 7px; }
.field-header output { margin-bottom: 7px; color: #7a8496; font-size: .76rem; }
.field-control { width: 100%; min-height: 48px; padding: 11px 13px; border: 2px solid var(--line); border-radius: 11px; background: white; color: var(--ink); font: inherit; }
.field-control:hover { border-color: #b9c2d6; }
.field-control:focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px var(--blue-soft); }
textarea.field-control { display: block; resize: vertical; line-height: 1.55; }
.idea-textarea { min-height: 190px; }
.prompt-starters { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.prompt-starters button, .review-filters button { min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: #f8f9fc; color: #536077; font: inherit; font-size: .76rem; font-weight: 750; cursor: pointer; }
.prompt-starters button:hover, .review-filters button:hover { border-color: var(--blue); color: var(--blue); }
.figure-drop { min-height: 138px; display: grid; place-items: center; align-content: center; padding: 18px; border: 2px dashed #b8c1d6; border-radius: 15px; background: #fafbfe; text-align: center; cursor: pointer; }
.figure-drop:hover { border-color: var(--blue); background: var(--blue-soft); }
.figure-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.figure-drop strong, .figure-drop small { display: block; }
.figure-drop small { color: var(--muted); }
.upload-symbol { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 7px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font-size: 1.3rem; font-weight: 900; }
.figure-previews { display: grid; gap: 8px; margin-top: 10px; }
.figure-feedback { min-height: 20px; margin: 6px 0 0; color: #9a4300; font-size: .78rem; }
.figure-preview-card { display: grid; grid-template-columns: 50px 1fr auto; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.figure-preview-card img { width: 50px; height: 50px; border-radius: 9px; object-fit: cover; }
.figure-preview-card div { min-width: 0; display: grid; }
.figure-preview-card strong { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.figure-preview-card small { color: var(--muted); }
.figure-preview-card button { width: 36px; height: 36px; border: 0; border-radius: 9px; background: #f0f2f7; color: #657086; font-size: 1.2rem; cursor: pointer; }
.agreement-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; margin: 24px 0; color: #526078; font-size: .84rem; }
.agreement-row input, .verification-list input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--blue); }
.generate-button, .submit-review-button, .verify-button, .request-changes-button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 13px; font: inherit; font-weight: 850; cursor: pointer; }
.generate-button { width: 100%; border: 0; background: var(--blue); color: white; box-shadow: 0 6px 0 var(--blue-dark); }
.generate-button:hover { transform: translateY(1px); box-shadow: 0 5px 0 var(--blue-dark); }
.generate-button:disabled { opacity: .7; cursor: wait; }

.draft-panel { position: sticky; top: 20px; padding: 22px; }
.draft-panel-heading, .queue-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.draft-panel-heading .eyebrow, .queue-heading .eyebrow { margin-bottom: 3px; }
.draft-panel-heading h2, .queue-heading h2 { margin: 0; font-size: 1.3rem; letter-spacing: -.025em; }
.draft-panel-heading > span { padding: 5px 9px; border-radius: 999px; background: #f1f3f8; color: #697489; font-size: .7rem; font-weight: 750; }
.draft-browser, .admin-generated-preview { overflow: hidden; border: 2px solid var(--ink); border-radius: 16px; background: #f7f9fd; }
.browser-bar { height: 34px; display: flex; align-items: center; gap: 5px; padding: 0 11px; border-bottom: 1px solid var(--line); background: white; }
.browser-bar > span { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.browser-bar > span:nth-child(2) { background: var(--yellow); }
.browser-bar > span:nth-child(3) { background: var(--lime); }
.browser-bar small { margin-left: auto; color: #8a94a6; font-size: .66rem; }
.draft-empty { min-height: 450px; display: grid; place-items: center; align-content: center; padding: 36px; text-align: center; }
.draft-empty > span { display: grid; place-items: center; width: 66px; height: 66px; margin-bottom: 14px; border-radius: 20px; background: var(--blue-soft); color: var(--blue); font-size: 1.8rem; }
.draft-empty strong { font-size: 1.05rem; }
.draft-empty p { max-width: 310px; margin: 7px 0 0; color: var(--muted); font-size: .88rem; }
.generated-page { min-height: 450px; padding: 26px; background: white; }
.generated-topic, .admin-preview-body > p:first-child { margin: 0 0 7px; color: var(--blue); font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .09em; }
.generated-page h3, .admin-preview-body h4 { margin: 0; font-size: 1.65rem; line-height: 1.15; letter-spacing: -.035em; }
.generated-page > p:not(.generated-topic):not(.generated-note), .admin-preview-body > p:not(:first-child) { display: -webkit-box; margin: 12px 0 20px; overflow: hidden; color: var(--muted); font-size: .9rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.generated-interaction { padding: 17px; border-radius: 14px; background: var(--blue-soft); }
.generated-interaction label { display: block; margin-bottom: 10px; color: var(--blue-dark); font-size: .8rem; font-weight: 800; }
.generated-interaction input { width: 100%; accent-color: var(--blue); }
.generated-interaction > div { display: flex; justify-content: space-between; margin-top: 9px; color: #657086; font-size: .78rem; }
.generated-interaction output { color: var(--blue); font-size: 1.2rem; font-weight: 900; }
.generated-figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 14px; }
.generated-figures:empty { display: none; }
.generated-figures img { width: 100%; aspect-ratio: 4/3; border-radius: 9px; object-fit: cover; }
.generated-note { margin: 16px 0 0; padding: 12px; border-left: 4px solid var(--lime); background: #f3fadf; color: #4e6425; font-size: .82rem; }
.draft-actions { padding-top: 17px; }
.draft-actions p { display: flex; gap: 8px; margin: 0 0 13px; color: var(--muted); font-size: .82rem; }
.draft-actions p span { color: #54820a; font-weight: 900; }
.submit-review-button { width: 100%; border: 0; background: var(--ink); color: white; }
.submit-review-button:hover { background: var(--blue); }
.submission-success { padding: 28px 16px 8px; text-align: center; }
.success-mark { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--lime); color: #2c4700; font-size: 1.45rem; font-weight: 900; }
.submission-success h3 { margin: 0; font-size: 1.4rem; }
.submission-success p { margin: 8px auto 12px; color: var(--muted); font-size: .9rem; }
.submission-success small { display: block; color: #7b8597; }

/* Review workspace */
.admin-header { align-items: center; }
.admin-header h1 { font-size: clamp(2.4rem, 4.5vw, 4rem); }
.review-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.review-stats div { display: flex; align-items: center; gap: 11px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.review-stats span { color: var(--blue); font-size: 1.55rem; font-weight: 900; }
.review-stats small { color: var(--muted); font-weight: 700; }
.review-workspace { display: grid; grid-template-columns: 350px minmax(0, 1fr); align-items: start; gap: 20px; }
.review-queue { position: sticky; top: 20px; overflow: hidden; }
.queue-heading { padding: 22px 22px 0; }
.queue-heading > span { display: grid; place-items: center; min-width: 34px; height: 34px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-weight: 900; }
.review-filters { display: flex; gap: 5px; padding: 0 18px 16px; overflow-x: auto; }
.review-filters button { flex: none; }
.review-filters button.is-active { border-color: var(--ink); background: var(--ink); color: white; }
.submission-list { border-top: 1px solid var(--line); }
.queue-item { width: 100%; display: grid; gap: 7px; padding: 18px 20px; border: 0; border-bottom: 1px solid var(--line); background: white; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.queue-item:hover { background: #f8f9fd; }
.queue-item.is-selected { background: var(--blue-soft); box-shadow: inset 4px 0 0 var(--blue); }
.queue-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.queue-item-top > small { color: var(--blue); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.queue-status, .status-pill { padding: 4px 7px; border-radius: 999px; font-style: normal; font-size: .65rem; font-weight: 800; }
.status-review { background: #fff2bd; color: #735900; }
.status-changes { background: #ffe0dc; color: #98423a; }
.status-verified { background: #e8f8c7; color: #466d08; }
.queue-item > strong { font-size: 1rem; line-height: 1.25; }
.queue-item > span:not(.queue-item-top) { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: .8rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.queue-item > small { color: #8a94a6; font-size: .7rem; }
.queue-empty { padding: 36px 20px; border-top: 1px solid var(--line); text-align: center; }
.queue-empty > span { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 50%; background: #eef7db; color: #527b10; font-weight: 900; }
.queue-empty strong { display: block; }
.queue-empty p { margin: 5px 0 0; color: var(--muted); font-size: .82rem; }
.review-detail { min-height: 560px; padding: 28px; }
.detail-empty { min-height: 500px; display: grid; place-items: center; align-content: center; text-align: center; }
.detail-empty span { font-size: 2.3rem; color: var(--blue); }
.detail-empty h2 { margin: 10px 0 5px; }
.detail-empty p { max-width: 430px; margin: 0; color: var(--muted); }
.detail-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--blue); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.detail-meta span + span { color: #8a94a6; }
.detail-header h2 { margin: 8px 0 4px; font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.15; letter-spacing: -.04em; }
.detail-header p { margin: 0; color: var(--muted); font-size: .88rem; }
.status-pill { flex: none; padding: 6px 9px; font-size: .72rem; }
.review-section { padding: 28px 0; border-bottom: 1px solid var(--line); }
.review-section-title { margin-bottom: 18px; }
.review-section blockquote { margin: 0; padding: 18px 20px; border-left: 5px solid var(--blue); border-radius: 0 13px 13px 0; background: #f6f8fc; color: #354158; line-height: 1.65; }
.source-example, .source-files { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.source-example strong, .source-files strong { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.source-example p { margin: 5px 0 0; color: var(--muted); }
.source-files ul { margin: 7px 0 0; padding-left: 20px; color: var(--muted); }
.source-files p { margin: 8px 0 0; color: var(--muted); font-size: .86rem; }
.admin-generated-preview { max-width: 600px; margin-inline: auto; }
.admin-preview-body { padding: 22px; background: white; }
.verification-list { display: grid; gap: 9px; }
.verification-list label { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.verification-list label:has(input:checked) { border-color: #a7d24e; background: #f2fadf; }
.verification-list span { display: grid; }
.verification-list small { margin-top: 2px; color: var(--muted); }
.review-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 22px; }
.request-changes-button { padding: 0 18px; border: 1px solid var(--line); background: white; color: #4d5a70; }
.verify-button { padding: 0 20px; border: 0; background: var(--blue); color: white; }
.verify-button:disabled, .request-changes-button:disabled { opacity: .45; cursor: not-allowed; }
.change-request { margin-top: 18px; padding: 18px; border: 1px solid #efc0bb; border-radius: 14px; background: #fff5f3; }
.change-request .field-label { margin-top: 0; }
.change-request > div { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.review-feedback { min-height: 24px; margin: 14px 0 0; color: #4f7510; font-size: .86rem; font-weight: 750; text-align: right; }

/* Published community ideas */
#tips { color: inherit; }
.community-empty { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px dashed #9fba68; border-radius: 13px; background: rgba(255,255,255,.55); }
.community-empty > span { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 11px; background: white; color: #608414; font-weight: 900; }
.community-empty strong { display: block; }
.community-empty p { margin: 2px 0 0; color: #627044; font-size: .86rem; }
.community-method-list { display: grid; gap: 13px; }
.community-method-card { padding: 18px; border: 1px solid #b4cc83; border-radius: 15px; background: white; }
.method-card-heading { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.method-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font-weight: 900; }
.method-card-heading > div { display: grid; }
.method-card-heading small { color: var(--muted); font-size: .72rem; }
.verified-badge { padding: 5px 8px; border-radius: 999px; background: #e9f8c9; color: #496f0b; font-size: .68rem; font-weight: 850; }
.community-method-card h3 { margin: 16px 0 6px; font-size: 1.12rem; letter-spacing: -.02em; }
.community-method-card > p { margin: 0; color: #556242; line-height: 1.55; }
.method-page-link { display: inline-flex; margin-top: 14px; color: var(--blue); font-weight: 800; text-decoration: none; }
.published-interaction { margin-top: 14px; border-radius: 11px; background: var(--blue-soft); }
.published-interaction summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; color: var(--blue-dark); font-size: .82rem; font-weight: 800; cursor: pointer; list-style: none; }
.published-interaction summary::after { content: "+"; font-size: 1.2rem; }
.published-interaction[open] summary::after { content: "−"; }
.published-interaction > div { padding: 4px 14px 14px; }
.published-interaction label { display: block; color: #536077; font-size: .78rem; font-weight: 750; }
.published-interaction input { width: 100%; margin: 10px 0; accent-color: var(--blue); }
.published-interaction p { display: flex; justify-content: space-between; margin: 0; color: #657086; font-size: .78rem; }
.published-interaction output { color: var(--blue); font-size: 1rem; font-weight: 900; }

@media (max-width: 940px) {
  .contribution-grid, .review-workspace { grid-template-columns: 1fr; }
  .draft-panel, .review-queue { position: static; }
  .review-queue { max-height: none; }
}

@media (max-width: 680px) {
  .workspace-page { padding: 38px 0 64px; }
  .workspace-header, .admin-header { align-items: flex-start; flex-direction: column; gap: 20px; }
  .workspace-header h1 { font-size: clamp(2.35rem, 12vw, 3.5rem); }
  .invite-status, .admin-identity { width: 100%; }
  .workflow-steps li { display: grid; justify-items: center; gap: 5px; text-align: center; }
  .workflow-steps li::after { top: 20px; left: calc(50% + 25px); right: calc(-50% + 25px); }
  .workflow-steps li div { padding: 0 5px; }
  .workflow-steps li small { display: none; }
  .idea-form, .draft-panel, .review-detail { padding: 20px 16px; border-radius: 18px; }
  .prompt-starters { flex-wrap: nowrap; overflow-x: auto; }
  .prompt-starters button { flex: none; }
  .draft-empty { min-height: 330px; padding: 24px 16px; }
  .generated-page { min-height: 390px; padding: 20px 16px; }
  .review-stats div { display: grid; gap: 0; padding: 12px; }
  .review-stats span { font-size: 1.3rem; }
  .review-stats small { font-size: .68rem; line-height: 1.25; }
  .detail-header { flex-direction: column-reverse; }
  .review-actions { align-items: stretch; flex-direction: column-reverse; }
  .review-actions button { width: 100%; }
  .method-card-heading { grid-template-columns: auto 1fr; }
  .verified-badge { grid-column: 2; justify-self: start; }
}
