/* The test shell keeps controls close to the working area. Home stays unchanged. */
body.testing-view .site-header { height: 56px; padding-inline: 26px; }
body.testing-view .brand { font-size: 22px; }
body.testing-view .brand > svg { width: 30px; height: 30px; }
body.testing-view .header-cta { min-height: 36px; padding: 6px 13px; }
body.testing-view .site-footer { display: none; }
main.test-page { max-width: 1360px; padding: 0 26px 12px; }
.test-page .page-heading.test-topbar { padding: 14px 0; min-height: 78px; gap: 18px; }
.test-title-group { display: flex; align-items: center; gap: 13px; min-width: 0; }
.test-back { width: 36px; height: 36px; display: grid; place-items: center; font-size: 20px; border: 1px solid var(--line); border-radius: 50%; flex-shrink: 0; }
.test-page[data-page] .page-heading.test-topbar h1 { font-size: 24px; letter-spacing: -.9px; margin: 0 0 4px; }
.test-page .test-topbar p { font-size: 11px; line-height: 1.5; }
.test-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.test-toolbar .switch-test { margin: 0; }
.test-toolbar .switch-test select { font-size: 12px; min-height: 38px; max-width: 160px; background: #fffdf9; }
.toolbar-button { min-height: 38px; padding: 7px 12px; font-size: 12px; color: #616d57; background: #fffdf9; border: 1px solid var(--line); border-radius: 6px; }
.toolbar-button:hover, .toolbar-button[aria-pressed=true] { background: #e8eddf; color: #35462a; border-color: #b8c5aa; }
.test-page .workspace { min-width: 0; }
.test-page .controls { margin-bottom: 12px; gap: 10px; }
.test-page .controls select, .test-page .field select { min-height: 38px; padding-block: 7px; }
.test-page .btn { min-height: 40px; padding: 9px 15px; }
.test-page .stat-grid { margin: 12px 0; gap: 10px; }
.test-page .stat { padding: 10px 16px; }
.test-page .stat-value { font-size: 28px; }
.test-page .stat-label { font-size: 11px; margin-bottom: 3px; }
.test-page .recommendations { display: flex; align-items: center; gap: 18px; margin-top: 9px; padding-top: 6px; }
.test-page .recommendations .section-title { margin: 0; }
.test-page .recommendations .section-title h2 { margin: 0; font-size: 11px; color: #8b9480; letter-spacing: 0; white-space: nowrap; }
.test-page .recommendations .section-title > a { display: none; }
.test-page .recommend-grid { display: flex; align-items: center; gap: 18px; }
.test-page .recommend-card { border: 0; background: none; padding: 4px 0; gap: 6px; border-radius: 0; }
.test-page .recommend-card .recommend-icon { display: none; }
.test-page .recommend-card h3 { font-size: 12px; margin: 0; }
.test-page .recommend-arrow { font-size: 16px; }
.expanded-test .site-header { display: none; }
.test-page.focus-mode .test-topbar p { display: none; }
.test-page.focus-mode .page-heading.test-topbar { min-height: 58px; padding-block: 10px; }

.workspace-dialog { width: min(880px, calc(100vw - 40px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid #d3d9cb; border-radius: 16px; color: var(--ink); background: #faf9f5; box-shadow: 0 30px 100px #18201640; }
.workspace-dialog::backdrop { background: #19231a70; backdrop-filter: blur(5px); }
.dialog-heading { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 22px; background: #faf9f5f5; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { font-size: 18px; letter-spacing: -.5px; margin: 0; }
.dialog-close { width: 40px; height: 40px; border-radius: 50%; background: #eeeee6; color: #58644b; font-size: 25px; }
.dialog-close:hover { background: #e3e7d9; }
.dialog-content { padding: 22px; }
.dialog-content > [data-details-empty] { font-size: 13px; color: #79846b; margin-bottom: 22px; }
.dialog-content .measurement-info { margin-bottom: 0; }
.workspace-dialog .result { margin: 0; border: 0; border-radius: 0; }
.workspace-dialog .result-number { font-size: 56px; }
.workspace-dialog .result-heading h2 { font-size: 25px; }
.workspace-dialog .insight-table { margin-block: 12px; }
.workspace-dialog .click-analysis { border: 0; padding: 0; }
.workspace-dialog .typing-analysis > summary { display: none; }
.workspace-dialog .typing-analysis { border: 0; }
.workspace-dialog .insight-chart { max-height: 230px; }
.result-dialog { width: min(850px, calc(100vw - 40px)); }

@media (max-width: 900px) {
  .test-page .page-heading.test-topbar { flex-wrap: wrap; gap: 10px; }
  .test-toolbar { margin-left: auto; }
  .test-page .test-topbar p { max-width: 350px; }
}
@media (max-width: 650px) {
  body.testing-view .site-header { height: 52px; padding-inline: 16px; }
  body.testing-view .brand { font-size: 19px; }
  main.test-page { padding-inline: 14px; }
  .test-page .page-heading.test-topbar { padding-block: 10px; }
  .test-page[data-page] .page-heading.test-topbar h1 { font-size: 22px; }
  .test-page .test-topbar p { display: none; }
  .test-back { width: 32px; height: 32px; }
  .test-toolbar { width: 100%; justify-content: flex-start; }
  .test-toolbar .switch-test { margin-right: auto; }
  .test-toolbar .switch-test select, .toolbar-button, .test-page .btn { min-height: 44px; }
  .toolbar-button { padding-inline: 10px; font-size: 11px; }
  .test-page .controls select, .test-page .field select { min-height: 44px; }
  .test-page .recommendations { gap: 12px; flex-wrap: wrap; }
  .test-page .recommend-grid { gap: 15px; }
  .test-page .recommend-card { min-height: 40px; }
  .test-page .recommend-card h3 { font-size: 11px; }
  .workspace-dialog, .result-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 12px; }
  .dialog-heading { padding: 10px 15px; }
  .dialog-content { padding: 16px; }
  .workspace-dialog .result-main { padding: 20px; }
}
