.research-workspace { padding-block: 1rem 3rem; }
.research-intro { max-width: 48rem; padding-block: .5rem 1.5rem; }
.research-intro h1 { font-size: clamp(2.1rem, 4vw, 3.35rem); line-height: 1.07; letter-spacing: -.04em; margin-block: .75rem 1rem; text-wrap: balance; }
.research-intro > p:not(.paid-eyebrow) { font-size: 1.1rem; color: var(--text-muted); line-height: 1.7; max-width: 42rem; }
.research-intro .research-scope { font-size: .95rem !important; margin-top: .8rem; }
.research-steps { display: flex; gap: 1.5rem; padding-block: 1rem; border-block: 1px solid var(--line); margin-bottom: 2rem; list-style: none; }
.research-steps li { flex: 1; color: var(--text-muted); font-size: .85rem; }
.research-steps li[aria-current] { color: var(--brand); font-weight: 650; }
.research-steps span { display: block; font-size: .7rem; letter-spacing: .08em; margin-bottom: .3rem; }
.research-layout { display: grid; grid-template-columns: minmax(19rem, .85fr) minmax(0, 1.15fr); grid-template-areas: "brief main"; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
/* The brief keeps the left column on wide screens; on phones DOM order puts a prepared group first. */
.research-layout > .research-brief { grid-area: brief; }
.research-layout > :not(.research-brief) { grid-area: main; }
.research-detail { scroll-margin-top: 1rem; }
.research-brief { min-width: 0; border-top: 3px solid var(--brand); background: var(--surface-card); padding: 1.3rem; border-radius: 0 0 .8rem .8rem; }
.research-workspace summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 44px; cursor: pointer; padding-block: .75rem; font-size: 1rem; font-weight: 600; list-style: none; }
.research-workspace summary::-webkit-details-marker { display: none; }
.research-workspace summary::marker { content: ""; }
.research-workspace summary::after { content: ""; flex: 0 0 .5rem; width: .5rem; height: .5rem; margin-right: .25rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.research-workspace details[open] > summary::after { transform: rotate(45deg); }
.research-layout--start { display: block; }
.research-start-page .research-intro { padding-bottom: 1rem; }
.research-start-page .research-steps { padding-block: .75rem; margin-bottom: 1.25rem; }
.research-form-heading { font-size: 1.6rem; line-height: 1.25; margin-bottom: .75rem; }
.research-profile > fieldset + fieldset { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.research-refinement h2 { font-size: 1.5rem; line-height: 1.3; margin-bottom: .75rem; }
.research-refinement-form { margin-top: 1rem; }
.research-brief > details:first-child > summary { font-size: 1.05rem; }
.research-profile { display: grid; gap: 1.5rem; margin-top: 1.25rem; }
.research-profile label, .research-refinement-form label, .research-chat-form label, .research-chat-refinement label { font-size: 1rem; line-height: 1.5; }
.research-profile textarea { resize: vertical; line-height: 1.6; }
.outreach-confirmation .outreach-fact { display: grid; gap: .6rem; padding-block: 1.1rem; border-bottom: 1px solid var(--line); }
.outreach-confirmation fieldset { min-inline-size: 0; }
.outreach-confirmation .research-field-help { font-size: .95rem; }
.outreach-confirmation .research-save-label { font-size: 1rem; }
.research-field-help { font-size: .95rem; color: var(--text-muted); line-height: 1.6; margin-bottom: .5rem; }
.research-brief-summary { font-size: .9rem; overflow-wrap: anywhere; color: var(--text-muted); }
.research-matching-options, .research-preview-notes { border-top: 1px solid var(--line); }
.research-preview-notes { margin-top: 1.25rem; }
.research-preview-notes p { font-size: .95rem; color: var(--text-muted); margin-block: .5rem; line-height: 1.6; }
.research-start { padding-top: .6rem; }
.research-start h2, .research-results-heading h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.15; letter-spacing: -.025em; margin-block: .65rem 1rem; text-wrap: balance; }
.research-start > p:not(.paid-eyebrow) { color: var(--text-muted); line-height: 1.75; max-width: 36rem; }
.research-start ol { list-style: none; margin-top: 2rem; }
.research-start li { display: flex; gap: 1rem; border-top: 1px solid var(--line); padding-block: 1.3rem; }
.research-start li > span { color: var(--brand); font-size: .75rem; padding-top: .3rem; }
.research-start h3 { font-size: 1.35rem; }
.research-start li p { color: var(--text-muted); line-height: 1.7; font-size: .95rem; margin-top: .5rem; }
.research-results { min-width: 0; display: grid; gap: 1.25rem; }
.research-results[hidden] { display: none; }
.research-results > p[role=status] { color: var(--text-muted); line-height: 1.7; font-size: .9rem; }
.research-group { min-width: 0; border: 1px solid var(--line); background: var(--surface-card); padding: clamp(1.1rem, 3vw, 1.65rem); border-radius: .9rem; overflow-wrap: anywhere; }
.research-group > * + * { margin-top: .8rem; }
.research-group > h2, .research-group > h3 { font-size: 1.6rem; line-height: 1.25; letter-spacing: -.02em; }
.research-group h3 a { text-decoration-thickness: 1px; text-decoration-color: var(--line-strong); }
.research-group p { font-size: 1rem; line-height: 1.65; }
.research-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; border-top: 1px solid var(--line); padding-block: 1rem; }
.research-facts p { font-size: .95rem; color: var(--text-muted); }
.research-facts span { display: block; color: var(--text-primary); font-size: .8rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; margin-bottom: .35rem; }
.research-facts strong { color: var(--text-primary); font-weight: 600; }
.research-expectations, .research-sources { border-top: 1px solid var(--line); }
.research-expectations { padding-top: 1rem; }
.research-expectations :is(h3,h4) { font-size: 1.1rem; line-height: 1.4; font-weight: 650; margin-bottom: .75rem; }
.research-expectations p { margin-block: .75rem; }
.research-requirements-list { list-style: disc; padding-left: 1.2rem; display: grid; gap: .65rem; font-size: 1rem; line-height: 1.6; }
.research-embedded .research-expectations { margin-top: 1rem; }
.research-embedded .research-chat-form { margin-top: 1rem; }
.research-draft > h2 { font-size: 1.75rem; line-height: 1.25; }
.research-sources blockquote { border-left: 2px solid var(--line-strong); padding-left: .75rem; color: var(--text-muted); }
.research-draft { border-top: 3px solid var(--brand); background: var(--surface-card); padding: clamp(1.1rem, 3vw, 1.65rem); }
.research-draft > * + * { margin-top: .85rem; }
.research-draft textarea { line-height: 1.75; resize: vertical; }
.research-draft-notice { border-left: 3px solid var(--brand); padding: .5rem .75rem; font-size: .95rem; line-height: 1.6; }
.research-group-evidence { min-width: 0; border-top: 1px solid var(--line); padding-top: 1.25rem; overflow-wrap: anywhere; }
.research-group-evidence > * + * { margin-top: .8rem; }
.research-group-evidence p { font-size: 1rem; line-height: 1.65; }
.research-workspace :is(a,button,input,textarea,select,summary):focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.research-save-options, .research-saved-briefs { border-top: 1px solid var(--line); }
.research-save-label { display: flex; gap: .75rem; align-items: flex-start; min-height: 44px; padding-block: .5rem; line-height: 1.5; }
.research-save-label input { flex: 0 0 auto; width: 1.2rem; height: 1.2rem; margin-top: .15rem; }
.research-save-purchase-label { display: block; margin-block: .75rem .4rem; font-weight: 600; }
.research-save-purchases { margin-bottom: .75rem; }
.research-saved-briefs { margin-top: 1.5rem; padding-top: 1.25rem; }
.research-saved-briefs h2 { font-size: 1.4rem; margin-bottom: .5rem; }
.research-saved-briefs ul { list-style: none; padding: 0; }
.research-saved-briefs li { border-top: 1px solid var(--line); padding-block: 1rem; font-size: .85rem; overflow-wrap: anywhere; }
.research-saved-link { display: inline-block; min-height: 44px; padding-block: .7rem; text-decoration: underline; text-underline-offset: .2em; }
.research-saved-notice { border-left: 3px solid var(--brand); padding: .75rem 1rem; font-size: .95rem; line-height: 1.6; background: var(--surface-card); }
@media (max-width: 899px) {
  .research-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; gap: 2rem; }
  .research-layout > .research-brief, .research-layout > :not(.research-brief) { grid-area: auto; }
  .research-steps { gap: .75rem; }
  .research-steps li { font-size: .76rem; }
  .research-intro { padding-top: 0; }
}
@media (max-width: 399px) {
  .research-facts { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
}
/* Results use the full workspace; the brief becomes a slim editable summary. */
.research-layout--results { display: flex; flex-direction: column; gap: 1.5rem; max-width: 1050px; margin-inline: auto; }
.research-layout--results > * { width: 100%; }
.research-layout--results .research-brief { border-top: 0; border: 1px solid var(--line); border-radius: .8rem; padding: 1rem 1.4rem; }
.research-layout--results .research-brief-summary { font-size: 1rem; color: var(--text-primary); }


.research-layout--results .research-edit-brief > summary { color: var(--brand); }
.research-comparison { border: 1px solid var(--line); border-radius: .9rem; background: var(--surface-card); overflow-wrap: anywhere; }
.research-workspace .research-lab-detail > summary { padding: 1.4rem 1.6rem; gap: 1.5rem; align-items: center; }
.research-workspace .research-lab-detail > summary::after { display: none; }
.research-comparison-copy { display: grid; gap: .6rem; flex: 1; min-width: 0; }
.research-comparison-name { font-size: 1.45rem; line-height: 1.25; letter-spacing: -.02em; color: var(--text-primary); }
.research-comparison-fit { font-size: 1rem; line-height: 1.65; font-weight: 400; color: var(--text-primary); max-width: 48rem; }
.research-comparison-route { font-size: .9rem; line-height: 1.5; font-weight: 400; color: var(--text-muted); }
.research-view-label { color: var(--brand); font-size: .95rem; white-space: nowrap; border: 1px solid var(--line-strong); border-radius: .5rem; padding: .7rem 1rem; }
.research-lab-detail[open] .research-view-label { background: var(--surface-page); }
.research-selected-detail { padding: 0 1.6rem 1.6rem; }
.research-selected-detail .research-group { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 1.3rem 0 0; margin: 0; }
.research-comparison-cautions { padding: 0 1.6rem 1.3rem; border-left: 3px solid var(--brand); margin-left: 1.6rem; }
.research-comparison-cautions p { font-size: .9rem; line-height: 1.6; color: var(--text-primary); }
.research-comparison-cautions p + p { margin-top: .5rem; }
.research-selected-detail .research-sources { margin-top: 1.5rem; padding-top: 1rem; }
.research-selected-detail .research-sources h4 { font-size: 1.1rem; font-weight: 650; margin-bottom: .75rem; }
@media (max-width: 599px) {
 .research-workspace .research-lab-detail > summary { padding: 1.2rem; flex-direction: column; align-items: flex-start; gap: 1rem; }
 .research-comparison-name { font-size: 1.25rem; }
 .research-selected-detail { padding: 0 1.2rem 1.2rem; }
 .research-comparison-cautions { margin-left: 1.2rem; padding: 0 1.2rem 1.2rem; }
}
.research-results-page .research-intro { padding-block: .25rem .5rem; }
.research-results-page .research-intro h1 { font-size: clamp(1.8rem, 3vw, 2.35rem); margin-block: .5rem; }
.research-results-page .research-steps { padding-block: .65rem; margin-bottom: 1rem; }
.research-results-page .research-steps span { display: inline; margin-right: .5rem; }
.research-results-page .research-layout--results .research-brief { display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: 1rem; padding: .7rem 1.2rem; }
.research-results-page .research-brief-summary { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 1rem; row-gap: .3rem; }
.research-results-page .research-brief-summary > strong { font-size: .9rem; color: var(--text-muted); }
.research-results-page .research-hours { color: var(--text-muted); font-size: .9rem; white-space: nowrap; }
.research-results-page .research-edit-brief > summary { padding-block: .2rem; font-size: .95rem; }
.research-results-page .research-edit-brief[open] { grid-column: 1 / -1; }
.research-results-page .research-brief > :not(.research-brief-summary,.research-edit-brief) { grid-column: 1 / -1; }
.research-results-page .research-results-heading h2 { font-size: 1.65rem; margin-block: .35rem; }
.research-results-page .research-results { gap: 1rem; }
.research-results-page .research-results > p[role=status] { margin: 0; }
.research-results-page .research-results > .research-availability-note { margin: 0; }
@media (max-width: 599px) {
 .research-results-page .research-brief-summary { display: grid; gap: .25rem; }
 .research-results-page .research-steps { gap: .5rem; }
 .research-results-page .research-steps span { display: none; }
}

.research-comparison-interest { font-size: .9rem; font-weight: 400; line-height: 1.5; color: var(--text-muted); }
