/* Market Research: intake, scope + package, progress, report, admin. Colours come from the theme tokens. */
.research-page { display: grid; gap: 18px; }
.research-page .page-head { margin-bottom: 0; }
.research-page .notice { margin-bottom: 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.research-form .card-title { margin-bottom: 4px; }
.research-form .field { margin-top: 14px; }
.research-form fieldset.field { border: 0; padding: 0; margin-left: 0; margin-right: 0; min-width: 0; }
.research-form legend { font-size: 13.5px; font-weight: 600; color: var(--aura-color-text-muted); margin-bottom: 8px; padding: 0; }
.research-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.research-other { margin-top: 10px !important; }
.research-goals { display: grid; gap: 6px; }
.research-goals .check { margin: 0; }
.research-more { margin-top: 16px; border: 1px dashed var(--aura-color-border-default); border-radius: var(--aura-radius-md); padding: 0 16px 4px; }
.research-more > summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--aura-color-brand-fg); }
.research-more[open] > summary { border-bottom: 1px solid var(--hairline); margin-bottom: 4px; }
.research-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }

.research-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.research-main, .research-side { display: grid; gap: 18px; min-width: 0; }
.research-side .pay-summary { order: 0; position: static; }
.research-side .pay-summary .pay-total { margin-top: 0; }
.research-run { display: grid; gap: 16px; }
.research-apply .card-title { display: flex; align-items: center; gap: 8px; }
.research-apply .card-title .icon { width: 18px; height: 18px; color: var(--aura-color-brand-fg); }
.research-q { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 15px; }
.research-q.is-edit { padding-left: 24px; }
.research-q.is-edit li label { display: block; }
.research-q.is-edit input { width: 100%; }
.research-q .is-new input { border-style: dashed; }
.research-qform .btn { margin-top: 12px; }
.research-sections { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.research-sections li { display: flex; gap: 10px; align-items: flex-start; }
.research-sections li > .icon { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--aura-color-status-healthy-fg); }
.research-sections li span { display: grid; gap: 1px; }
.research-sections b { font-size: 15px; }
.research-sections small { font-size: 13.5px; color: var(--aura-color-text-muted); line-height: 1.5; }
.research-edit { padding: 0; overflow: hidden; }
.research-edit > summary { display: flex; align-items: center; gap: 8px; padding: 16px 20px; cursor: pointer; font-weight: 600; list-style: none; }
.research-edit > summary::-webkit-details-marker { display: none; }
.research-edit-body { padding: 0 20px 20px; }
.research-edit-body .research-form { box-shadow: none; border: 0; padding: 0; }

/* progress */
.research-bar { height: 10px; border-radius: 999px; background: var(--aura-color-bg-sunken); overflow: hidden; margin: 6px 0 12px; }
.research-bar i { display: block; height: 100%; width: 2%; border-radius: 999px; background: var(--aura-color-brand-fg); transition: width .6s ease; }
.research-now { font-weight: 600; margin: 0 0 12px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.research-detail { font-weight: 500; font-size: 13.5px; color: var(--aura-color-text-muted); }
.research-retry { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--aura-radius-md); background: var(--aura-color-status-attention-subtle); font-size: 14px; }
.research-retry .icon { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--aura-color-status-attention-fg); }
.research-retry.is-hidden { display: none; }
.research-foot { margin: 0; font-size: 13.5px; }
.research-foot span:not(:empty)::after { content: " · "; }
.research-stages { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.research-stages li { display: flex; gap: 10px; align-items: center; color: var(--aura-color-text-subtle); font-size: 14.5px; }
.research-stages li .icon { width: 16px; height: 16px; flex: none; opacity: 0; }
.research-stages li.is-done { color: var(--aura-color-text-muted); }
.research-stages li.is-done .icon { opacity: 1; color: var(--aura-color-status-healthy-fg); }
.research-stages li.is-now { color: var(--aura-color-text-heading); font-weight: 600; }
.research-stages li.is-now::before { content: ""; width: 8px; height: 8px; margin: 0 4px; border-radius: 50%; background: var(--aura-color-brand-fg); animation: rr-pulse 1.2s ease-in-out infinite; }
.research-stages li.is-now .icon { display: none; }
@keyframes rr-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .research-stages li.is-now::before { animation: none; } }

/* apply + versions */
.research-changes { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.research-changes .check { align-items: flex-start; }
.research-changes .check b { display: block; }
.research-changes .hint { display: block; margin-top: 2px; }
.research-applied { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.research-applied li { display: flex; gap: 8px; align-items: flex-start; }
.research-applied .icon { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--aura-color-status-healthy-fg); }
.research-vlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.research-vlist li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* admin runs table */
.rs-runs-head { padding: 18px 20px 0; margin-bottom: 10px; }
.rs-runs-empty { padding: 0 20px 18px; margin: 0; }

/* the report */
.rr { display: grid; gap: 14px; }
.rr-eyebrow { margin: 0 0 4px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--aura-color-text-muted); }
.rr-title { font-size: 24px; margin: 0 0 10px; }
.rr-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.rr-verdict { display: grid; gap: 4px; padding: 14px 18px; border-radius: var(--aura-radius-md); border-left: 4px solid var(--aura-color-border-strong); background: var(--aura-color-bg-surface-subtle); margin-bottom: 12px; }
.rr-verdict b { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.rr-verdict p { margin: 0; font-size: 18px; font-weight: 600; color: var(--aura-color-text-heading); line-height: 1.35; }
.rr-verdict.is-ok { border-left-color: var(--aura-color-status-healthy-fg); background: var(--aura-color-status-healthy-subtle); }
.rr-verdict.is-warn { border-left-color: var(--aura-color-status-attention-fg); background: var(--aura-color-status-attention-subtle); }
.rr-verdict.is-bad { border-left-color: var(--aura-color-status-critical-fg); background: var(--aura-color-status-critical-subtle); }
.rr-reasons { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 6px; font-size: 15px; }
.rr-counter { margin: 0 0 8px; font-size: 15px; }
.rr-counter b { display: block; font-size: 13px; color: var(--aura-color-text-muted); }
.rr-fine { margin: 0; font-size: 13px; color: var(--aura-color-text-subtle); }
.rr-cite { display: inline-flex; gap: 3px; margin-left: 4px; vertical-align: baseline; }
.rr-cite a { font: 600 11.5px/1.6 var(--aura-font-family-body); padding: 0 5px; border-radius: 6px; background: var(--aura-color-brand-subtle); color: var(--aura-color-brand-fg); text-decoration: none; }
.rr-sec { padding: 0; }
.rr-sec > summary { display: flex; align-items: center; gap: 12px; padding: 14px 20px; cursor: pointer; font-weight: 600; font-size: 16px; color: var(--aura-color-text-heading); list-style: none; }
.rr-sec > summary::-webkit-details-marker { display: none; }
.rr-sec > summary .chev { margin-left: auto; transition: transform .2s; }
.rr-sec[open] > summary .chev { transform: rotate(180deg); }
.rr-no { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--aura-color-bg-sunken); font-size: 13px; color: var(--aura-color-text-muted); flex: none; }
.rr-body { padding: 0 20px 20px; font-size: 15px; line-height: 1.6; }
.rr-body p { margin: 0 0 10px; }
.rr-body h4 { margin: 14px 0 6px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--aura-color-text-muted); }
.rr-body ul, .rr-body ol { margin: 0 0 8px; padding-left: 22px; display: grid; gap: 5px; }
.rr-segments > li { margin-bottom: 8px; }
.rr-segments dl, .rr-dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 6px 0 0; font-size: 14.5px; }
.rr-segments dt, .rr-dl dt { color: var(--aura-color-text-muted); }
.rr-segments dd, .rr-dl dd { margin: 0; }
.rr-table { overflow-x: auto; }
.rr-table .table td { vertical-align: top; font-size: 14px; }
.rr-claims li, .rr-sources li { margin-bottom: 4px; }
.rr-claims small, .rr-sources small { display: block; color: var(--aura-color-text-muted); font-size: 13px; }
.rr-claims q { display: block; font-style: italic; margin-top: 2px; }
.rr-sources a { word-break: break-word; }

@media (max-width: 900px) {
  .research-layout { grid-template-columns: 1fr; }
  .research-side { order: -1; }
  .rr-segments dl, .rr-dl { grid-template-columns: 1fr; gap: 0 0; }
  .rr-segments dt, .rr-dl dt { margin-top: 6px; }
}

/* print = PDF export */
@media print {
  .hnav, .footer, .project-tabs, .no-print, .toast, .announce, .research-apply, .research-versions { display: none !important; }
  .shell-content { padding: 0; }
  .rr { gap: 10px; }
  .rr-sec { border: 0; box-shadow: none; break-inside: avoid; }
  .rr-sec > summary { padding: 8px 0; }
  .rr-sec > summary .chev { display: none; }
  .rr-body { padding: 0 0 8px; }
  .rr-head { border: 0; box-shadow: none; padding: 0 0 12px; }
  .rr-cite a { background: none; padding: 0; color: inherit; }
  a { text-decoration: none; color: inherit; }
}
.is-print .rr-sec { display: block; }

/* The report opens with three blocks: what we found, what is uncertain, what to do next. */
.rr-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rr-next { grid-column: 1 / -1; background: var(--aura-color-brand-subtle); }
.rr-block-h { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font: 800 18px/1.3 var(--aura-font-family-display); }
.rr-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 15px; line-height: 1.55; }
.rr-points li { display: grid; gap: 3px; padding-left: 16px; border-left: 3px solid var(--aura-color-border-strong); }
.rr-basis { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--aura-color-text-subtle); }
.rr-basis.is-sourced { color: var(--aura-color-status-healthy-fg); }
.rr-steps { margin: 0; padding: 0; list-style: none; counter-reset: rr; display: grid; gap: 12px; }
.rr-steps li { counter-increment: rr; position: relative; display: grid; gap: 2px; padding-left: 34px; font-size: 15px; line-height: 1.5; }
.rr-steps li::before { content: counter(rr); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--aura-color-bg-surface); color: var(--aura-color-text-heading); font: 800 12px/1 var(--aura-font-family-display); }
.rr-steps span { color: var(--aura-color-text-default); }
.rr-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.rr-actions form { margin: 0; }
.rr-next .rr-fine { margin-top: 12px; color: var(--aura-color-text-default); }
.rr-part { margin: 14px 0 0; font: 800 13px/1 var(--aura-font-family-display); letter-spacing: .1em; text-transform: uppercase; color: var(--aura-color-text-muted); }
.rr-no .icon { width: 14px; height: 14px; }
.rr-verdict { border-left: 0; background: var(--aura-color-bg-surface); }
.rr-verdict.is-ok, .rr-verdict.is-warn, .rr-verdict.is-bad { border-left: 0; }
@media (max-width: 900px) { .rr-sum { grid-template-columns: minmax(0, 1fr); } }
@media print { .rr-sum { grid-template-columns: 1fr 1fr; } .rr-block { break-inside: avoid; } .rr-actions { display: none; } }

/* The report as a dashboard: a charcoal hero with the verdict, five tiles, then the three blocks and three widgets. */
.rr-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: clamp(22px, 3vw, 34px); border-radius: var(--r-surface); background: var(--surface-ink); color: var(--on-ink-muted); }
.rr-hero .rr-eyebrow { color: var(--aura-color-brand-solid); }
.rr-hero .rr-title { font: 800 clamp(20px, 2.4vw, 28px)/1.2 var(--aura-font-family-display); letter-spacing: -.02em; color: var(--on-ink); margin: 0 0 16px; }
.rr-hero .rr-verdict { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 12px; padding: 14px 18px; border-radius: var(--r-inner); background: rgba(255, 255, 255, .08); border-left: 0; }
.rr-hero .rr-verdict b { color: var(--on-ink); }
.rr-hero .rr-verdict p { color: var(--on-ink); font-size: 17px; }
.rr-verdict-ico { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--aura-color-brand-solid); color: #fff; }
.rr-verdict-ico .icon { width: 20px; height: 20px; }
.rr-hero .rr-verdict.is-ok .rr-verdict-ico { background: var(--aura-color-status-healthy-solid); }
.rr-hero .rr-verdict.is-bad .rr-verdict-ico { background: var(--aura-color-status-critical-solid); }
.rr-hero .rr-verdict.is-warn .rr-verdict-ico { background: var(--aura-color-status-attention-solid); }
.rr-hero-art .aurai-img { height: 150px; }
.rr-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.rr-kpi { display: grid; gap: 4px; align-content: start; }
.rr-kpi-label { font: 700 12px/1 var(--aura-font-family-display); letter-spacing: .08em; text-transform: uppercase; color: var(--aura-color-text-muted); }
.rr-kpi > b { font: 800 30px/1.1 var(--aura-font-family-display); letter-spacing: -.02em; color: var(--aura-color-text-heading); }
.rr-kpi-ev > b { font-size: 22px; }
.rr-kpi small { font-size: 12.5px; line-height: 1.45; color: var(--aura-color-text-muted); }
.rr-meter { display: flex; gap: 4px; margin: 4px 0 2px; }
.rr-meter i { flex: 1; height: 8px; border-radius: 4px; background: var(--aura-color-border-default); }
.rr-meter i.on { background: var(--aura-color-brand-solid); }
.rr-meter-ok i.on { background: var(--aura-color-status-healthy-solid); }
.rr-meter-bad i.on { background: var(--aura-color-status-critical-solid); }
.rr-meter-warn i.on { background: var(--aura-color-status-attention-solid); }
.rr-ratio { display: grid; gap: 6px; margin: -4px 0 14px; }
.rr-ratio-bar { display: block; height: 8px; border-radius: 4px; background: var(--aura-color-border-default); overflow: hidden; }
.rr-ratio-bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--aura-color-status-healthy-solid); transition: width .4s ease; }
.rr-ratio span { font-size: 12.5px; color: var(--aura-color-text-muted); }
.rr-widgets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rr-widget { display: grid; gap: 6px; align-content: start; font-size: 14px; line-height: 1.5; }
.rr-widget h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font: 800 13px/1 var(--aura-font-family-display); letter-spacing: .06em; text-transform: uppercase; color: var(--aura-color-text-muted); }
.rr-widget h4 .icon { width: 16px; height: 16px; color: var(--aura-color-brand-fg); }
.rr-widget-big { font: 800 18px/1.3 var(--aura-font-family-display); color: var(--aura-color-text-heading); }
.rr-widget-sub { font-size: 12.5px; color: var(--aura-color-text-muted); }
.rr-widget p { margin: 0; }
@media (max-width: 1100px) { .rr-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .rr-hero { grid-template-columns: minmax(0, 1fr); } .rr-hero-art { display: none; } .rr-kpis, .rr-widgets { grid-template-columns: minmax(0, 1fr); } .rr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rr-kpi-ev { grid-column: 1 / -1; } }
@media print { .rr-hero { background: none; color: var(--aura-color-text-default); border: 1px solid var(--hairline); } .rr-hero .rr-title, .rr-hero .rr-verdict b, .rr-hero .rr-verdict p { color: var(--aura-color-text-heading); } .rr-hero-art { display: none; } .rr-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* The brief, kept calm (7 Oct 2026): questions as a numbered list with the editor folded, report parts as a grid. */
.research-qlist { list-style: none; counter-reset: rq; margin: 0; padding: 0; display: grid; gap: 8px; }
.research-qlist li { counter-increment: rq; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--aura-color-bg-surface); border: 1px solid var(--aura-color-border-default); font-size: 15px; line-height: 1.5; color: var(--aura-color-text-heading); }
.research-qlist li::before { content: counter(rq); flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--aura-color-brand-subtle); color: var(--aura-color-brand-fg); font: 700 13px/1 var(--aura-font-family-display); }
.research-qedit { margin-top: 12px; }
.research-qedit > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; color: var(--aura-color-brand-fg); list-style: none; }
.research-qedit > summary::-webkit-details-marker { display: none; }
.research-qedit > summary .icon { width: 16px; height: 16px; }
.research-qedit[open] > summary { margin-bottom: 12px; }
.research-parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.research-parts li { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--aura-color-bg-surface); border: 1px solid var(--aura-color-border-default); font-size: 14.5px; font-weight: 600; color: var(--aura-color-text-heading); }
.research-parts li .icon { flex: none; width: 18px; height: 18px; color: var(--aura-color-status-healthy-fg); }
.research-parts-more { margin-top: 14px; }
.research-parts-more > summary { cursor: pointer; font-weight: 600; color: var(--aura-color-brand-fg); }
.research-parts-more[open] > summary { margin-bottom: 12px; }
.pay-summary.has-aurai { position: relative; margin-top: 64px; padding-top: 30px; }
.research-aurai { position: absolute; right: 16px; top: -62px; }
.research-aurai .aurai { display: flex; flex-direction: row-reverse; align-items: center; gap: 8px; }
.research-aurai .aurai-img { height: 80px; width: auto; }
.research-aurai .aurai-say { margin: 0; font-size: 13px; max-width: 160px; }
.research-aurai .aurai-say::before { left: auto; right: -8px; bottom: auto; top: 50%; margin-top: -7px; transform: rotate(-135deg); }
