/* Scoped consultation workspace; shared women's health pages keep their layout. */
#main .wh-workspace {
  --we-ink: #203e48;
  --we-muted: #536d76;
  --we-line: #cbdcde;
  --we-surface: #fff;
  --we-soft: #f1f7f6;
  --we-accent: #176f68;
  color: var(--we-ink);
}
html[data-theme='dark'] #main .wh-workspace {
  --we-ink: #e8f2f3;
  --we-muted: #b0c7ce;
  --we-line: #405b65;
  --we-surface: #182b34;
  --we-soft: #203c44;
  --we-accent: #91ddd1;
}
#main .wh-workspace [hidden] { display: none !important; }
#main .wh-workspace :is(button,input) { font: inherit; }
#main .wh-workspace :is(button,summary,input):focus-visible { outline: 2px solid var(--we-accent); outline-offset: 3px; }
#main .wh-workspace .wh-eligibility-heading { padding: 0; margin-bottom: 22px; }
#main .wh-workspace .wh-eligibility-heading h1 { font-size: clamp(1.5rem, 2.5vw, 2rem); margin: 4px 0 6px; }
#main .wh-workspace .wh-eligibility-heading p { margin: 0; color: var(--we-muted); line-height: 1.5; }
#main .wh-workspace .si-eyebrow { color: var(--we-accent); font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
#main .wh-workspace-grid { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(320px,1fr); align-items: start; gap: 24px; }
#main .wh-workspace #wh-eligibility { display: block; margin: 0; padding: 0; background: none; border: 0; min-width: 0; }
#main .wh-workspace .wh-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#main .wh-workspace h2 { margin: 0; font-size: 1.05rem; color: var(--we-ink); line-height: 1.4; }
#main .wh-workspace .wh-text-action { border: 0; background: none; color: var(--we-accent); padding: 9px 4px; cursor: pointer; font-size: .8rem; text-decoration: underline; text-underline-offset: 3px; }
#main .wh-workspace #wh-eligibility .wh-evaluation-mode { margin: 0 0 12px; border: 0; padding: 0; display: block; }
#main .wh-workspace .wh-condition-search { display: grid; gap: 6px; font-size: .78rem; font-weight: 650; color: var(--we-muted); }
#main .wh-workspace .wh-condition-search input { box-sizing: border-box; width: 100%; min-width: 0; height: 44px; padding: 10px 12px; border: 1px solid var(--we-line); border-radius: 10px; background: var(--we-surface); color: var(--we-ink); font-size: .86rem; }
#main .wh-workspace input::placeholder { color: var(--we-muted); opacity: 1; }
#main .wh-workspace .wh-selected { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
#main .wh-workspace .wh-selected button { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 9px; min-height: 36px; text-align: left; border: 1px solid var(--we-line); border-radius: 7px; color: var(--we-accent); background: var(--we-soft); font-size: .75rem; line-height: 1.4; cursor: pointer; }
#main .wh-workspace .wh-selected button span { font-size: 1.1rem; }
#main .wh-workspace #wh-eligibility .wh-condition-fieldset { margin: 16px 0 0; padding: 0; border: 0; background: none; box-shadow: none; }
#main .wh-workspace .wh-condition-fieldset > legend { padding: 0; margin-bottom: 8px; font-size: .82rem; }
#main .wh-workspace .wh-condition-fieldset legend > span { display: inline; margin-left: 8px; color: var(--we-muted); font-size: .74rem; font-weight: 400; }
#main .wh-workspace #wh-eligibility .wh-conditions { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--we-line); border-radius: 12px; overflow: hidden; }
#main .wh-workspace #wh-eligibility .wh-condition-group { width: 100%; margin: 0; padding: 0; border: 0; border-bottom: 1px solid var(--we-line); border-radius: 0; background: var(--we-surface); color: var(--we-ink); box-shadow: none; box-sizing: border-box; }
#main .wh-workspace #wh-eligibility .wh-condition-group:last-child { border-bottom: 0; }
#main .wh-workspace .wh-condition-group > summary { display: flex; align-items: center; gap: 10px; padding: 11px 12px; min-height: 44px; box-sizing: border-box; cursor: pointer; font-size: .84rem; font-weight: 650; list-style: none; }
#main .wh-workspace summary::-webkit-details-marker { display: none; }
#main .wh-workspace .wh-condition-group > summary::after { content: '+'; color: var(--we-muted); font-size: 1.1rem; font-weight: 400; width: 14px; text-align: center; }
#main .wh-workspace .wh-condition-group[open] > summary::after { content: '−'; }
#main .wh-workspace .wh-condition-group[open] > summary { background: var(--we-soft); }
#main .wh-workspace .wh-condition-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 5px; background: var(--we-soft); color: var(--we-muted); font-size: .72rem; box-sizing: border-box; }
#main .wh-workspace [data-selected='false'] .wh-condition-count { visibility: hidden; }
#main .wh-workspace [data-selected='true'] .wh-condition-count { background: var(--we-accent); color: var(--we-surface); }
#main .wh-workspace .wh-condition-options { padding: 4px 8px 8px; }
#main .wh-workspace #wh-eligibility .wh-check { display: flex; flex-direction: row; align-items: center; gap: 9px; min-height: 44px; margin: 0; padding: 8px; color: var(--we-ink); font-size: .8rem; font-weight: 400; line-height: 1.45; border-radius: 6px; cursor: pointer; }
#main .wh-workspace #wh-eligibility .wh-check span { line-height: 1.45; }
#main .wh-workspace #wh-eligibility .wh-check:hover,
#main .wh-workspace #wh-eligibility .wh-check:has(input:checked) { background: var(--we-soft); color: var(--we-ink); }
#main .wh-workspace #wh-eligibility .wh-check input { flex: 0 0 18px; width: 18px !important; height: 18px !important; min-height: 18px !important; margin: 0; border-color: var(--we-line); background-color: var(--we-surface); }
#main .wh-workspace #wh-eligibility .wh-check input:checked { background-color: #176f68; border-color: #176f68; }
#main .wh-workspace .wh-profile-confirmation { border-top: 1px solid var(--we-line); margin-top: 14px; padding-top: 8px; }
#main .wh-workspace #wh-search-empty { font-size: .82rem; color: var(--we-muted); line-height: 1.5; }
#main .wh-workspace .wh-live-results { position: sticky; top: 20px; padding: 18px; border: 1px solid var(--we-line); border-radius: 14px; background: var(--we-surface); min-width: 0; }
#main .wh-workspace .wh-live-results > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#main .wh-workspace .wh-live-results .si-eyebrow { margin: 0 0 3px; }
#main .wh-workspace .wh-mode-label { padding: 4px 7px; color: var(--we-accent); background: var(--we-soft); border-radius: 5px; font-size: .71rem; white-space: nowrap; }
#main .wh-workspace .wh-live-note,
#main .wh-workspace .wh-live-footnote { font-size: .76rem; line-height: 1.5; color: var(--we-muted); margin: 10px 0 14px; }
#main .wh-workspace .wh-live-footnote { margin: 12px 0 0; }
#main .wh-workspace .wh-result-grid { display: flex; flex-direction: column; gap: 6px; }
#main .wh-workspace .wh-category { --row-accent: #526f7b; margin: 0; padding: 0; border: 1px solid var(--we-line); border-left: 3px solid var(--row-accent); border-radius: 8px; background: var(--we-surface); color: var(--we-ink); box-shadow: none; }
#main .wh-workspace .wh-category[data-level='1'] { --row-accent: #2d9271; }
#main .wh-workspace .wh-category[data-level='2'] { --row-accent: #779742; }
#main .wh-workspace .wh-category[data-level='3'] { --row-accent: #bd8329; }
#main .wh-workspace .wh-category[data-level='4'] { --row-accent: #bf4a59; }
#main .wh-workspace .wh-category > details { margin: 0; padding: 0; border: 0; background: transparent; border-radius: inherit; color: inherit; box-shadow: none; }
#main .wh-workspace .wh-category summary { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 9px 10px; box-sizing: border-box; cursor: pointer; list-style: none; }
#main .wh-workspace .wh-category-number { min-width: 30px; height: 30px; padding: 0 4px; font-size: .83rem; border-radius: 6px; flex-shrink: 0; }
#main .wh-workspace .wh-category[data-level='0'] .wh-category-number { font-size: .65rem; max-width: 57px; height: auto; min-height: 30px; text-align: center; }
#main .wh-workspace .wh-method-heading { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#main .wh-workspace .wh-method-heading strong { font-size: .85rem; font-weight: 650; line-height: 1.3; }
#main .wh-workspace .wh-category-label { color: var(--we-muted); font-size: .72rem; text-transform: none; letter-spacing: 0; font-weight: 400; }
#main .wh-workspace .wh-row-chevron { margin-left: auto; color: var(--we-muted); }
#main .wh-workspace .wh-category details[open] .wh-row-chevron { transform: rotate(180deg); }
#main .wh-workspace .wh-method-reasons { padding: 0 12px 10px; color: var(--we-muted); font-size: .78rem; line-height: 1.5; }
#main .wh-workspace .wh-method-reasons ul { padding-left: 16px; margin: 0; font-size: inherit; }
#main .wh-workspace .wh-method-reasons li + li { margin-top: 6px; }
#main .wh-workspace .wh-method-reasons p { margin: 0; }
#main .wh-workspace .wh-category-key { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 10px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--we-line); }
#main .wh-workspace .wh-category-key span { padding: 0; gap: 5px; background: none; color: var(--we-muted); font-size: .67rem; }
#main .wh-workspace .wh-category-key b { width: 18px; height: 18px; flex: 0 0 18px; font-size: .65rem; }
#main .wh-workspace .wh-results-empty { padding: 24px 16px; margin: 16px 0; border: 1px dashed var(--we-line); border-radius: 10px; background: var(--we-soft); font-size: .85rem; }
#main .wh-workspace .wh-results-empty p { color: var(--we-muted); font-size: .82rem; line-height: 1.6; margin: 8px 0 12px; }
#main .wh-workspace .wh-results-empty > span { color: var(--we-accent); font-size: .73rem; }
#main .wh-workspace .wh-profile-alert { border-left: 3px solid #bd8329; padding: 12px; margin: 14px 0; background: var(--we-soft); font-size: .85rem; }
#main .wh-workspace .wh-profile-alert p { font-size: .82rem; line-height: 1.6; margin: 8px 0 0; }
#main .wh-workspace .wh-interpretation { margin: 22px 0 0; padding: 12px 0; border: 0; border-top: 1px solid var(--we-line); border-radius: 0; background: none; box-shadow: none; color: var(--we-muted); font-size: .8rem; }
#main .wh-workspace .wh-interpretation summary { cursor: pointer; font-weight: 600; }
#main .wh-workspace .wh-result-dock { display: contents; }
#main .wh-workspace .wh-result-dock > span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
#main .wh-workspace [data-wh-results] { display: none; }
#main .wh-workspace .wh-results-dialog { box-sizing: border-box; width: min(500px,calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 18px; border: 1px solid var(--we-line); border-radius: 16px; background: var(--we-surface); color: var(--we-ink); overscroll-behavior: contain; }
#main .wh-workspace .wh-results-dialog::backdrop { background: #0b222c99; backdrop-filter: blur(4px); }
#main .wh-workspace .wh-results-dialog > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
#main .wh-workspace [data-wh-close] { padding: 9px 6px; min-height: 44px; border: 0; background: none; color: var(--we-accent); cursor: pointer; font-size: .8rem; }
@media (max-width: 1040px) {
  #main .wh-workspace-grid { grid-template-columns: minmax(0,1fr); }
  #main .wh-workspace { padding-bottom: 92px; }
  #main .wh-workspace .wh-live-results { display: none; }
  #main .wh-workspace .wh-result-dock { position: fixed; display: flex; align-items: center; justify-content: space-between; gap: 8px; z-index: 36; bottom: calc(12px + env(safe-area-inset-bottom,0px)); left: 272px; right: 76px; padding: 8px 10px 8px 14px; border: 1px solid var(--we-line); border-radius: 13px; background: var(--we-surface); box-shadow: 0 5px 28px #092a3526; }
  #main .wh-workspace .wh-result-dock > span { position: static; width: auto; height: auto; clip-path: none; overflow: visible; font-size: .72rem; color: var(--we-muted); line-height: 1.4; }
  #main .wh-workspace [data-wh-results] { display: flex; align-items: center; justify-content: center; gap: 7px; flex-shrink: 0; min-height: 44px; max-width: 60%; padding: 8px 12px; border: 0; border-radius: 8px; background: #176f68; color: #fff; font-size: .78rem; font-weight: 650; cursor: pointer; }
}
@media (max-width: 700px) {
  #main .wh-workspace .wh-result-dock { left: 12px; }
  #main .wh-workspace .wh-eligibility-heading { margin-bottom: 16px; }
  #main .wh-workspace .wh-eligibility-heading > p:last-child { font-size: .85rem; }
  #main .wh-workspace [data-wh-results] { font-size: .72rem; padding: 8px 10px; }
  #main .wh-workspace .wh-result-dock > span { font-size: .68rem; }
  #main .wh-workspace .wh-condition-fieldset legend > span { display: block; margin: 4px 0 0; }
}
@media print {
  #main .wh-workspace .wh-result-dock, #main .wh-workspace .wh-results-dialog { display: none; }
  #main .wh-workspace .wh-live-results { display: block; position: static; }
  #main .wh-workspace { padding: 0; }
}
