/* Scoped to the Workbench medicine panel. */
#medicine-journey { --mj-navy: #123656; --mj-ink: #172e45; --mj-muted: #455e76; color: var(--mj-ink); container-type: inline-size; }
#medicine-journey [hidden] { display: none; }
#medicine-journey :where(h3,h4,h5,h6,p,ul) { margin: 0; }
#medicine-journey :where(button,a,summary,input,textarea):focus-visible { outline: 3px solid #226fc5; outline-offset: 3px; }
#medicine-journey :where(h3,h4,h5,h6,p,li,small,code,a,button) { overflow-wrap: anywhere; }
.mj-entry { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(15rem,.8fr); align-items: start; gap: clamp(14px,2vw,26px); }
.mj-compose,.mj-examples,.mj-evidence,.mj-identity { min-width: 0; }
.mj-compose,.mj-examples,.mj-evidence { background: #fff; border: 1px solid #ccdae7; border-radius: 14px; }
.mj-compose,.mj-examples { padding: clamp(16px,2vw,28px); }
.mj-compose { border-top: 3px solid #216ab2; }
#medicine-journey .mj-compose label { color: var(--mj-ink); font-weight: 600; font-size: 1.06rem; }
#medicine-journey .mj-compose textarea { display: block; width: 100%; min-height: 112px; margin: 12px 0 8px; padding: 12px 14px; border: 1px solid #879fb5; border-radius: 8px; background: #f8fbff; color: #193852; resize: vertical; font-family: var(--font-mono,ui-monospace,monospace); font-size: .94rem; line-height: 1.6; }
#medicine-journey textarea::placeholder { color: #546e84; opacity: 1; }
.mj-export p,.mj-muted { color: var(--mj-muted); font-size: .875rem; line-height: 1.5; }
.mj-commands,.mj-input-links,.mj-export { display:flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.mj-commands { margin-top: 17px; }
.mj-input-links { margin-top: 12px; border-top: 1px solid #dce5ee; }
#medicine-journey .mj-input-links :is(a,button) { display: inline-flex; align-items: center; min-height: 44px; padding: 3px 0; font: 500 .85rem/1.4 var(--font-sans,sans-serif); color: #164e87; text-decoration: underline; text-underline-offset: 3px; }
#medicine-journey .mj-error { color: #943812; margin: 10px 0; font-weight: 500; }
#medicine-journey .mj-examples h3,#medicine-journey .mj-products-heading { font-size: 1.06rem; letter-spacing: -.015em; }
.mj-examples { background: #f5f9fd; }
.mj-examples [data-mj-examples] { margin-top: 8px; }
#medicine-journey .mj-example { position: relative; display: grid; gap: 3px; width: 100%; padding: 13px 25px 13px 0; border: 0; border-top: 1px solid #c6d7e6; background: transparent; color: #104a85; text-align: left; cursor: pointer; }
#medicine-journey .mj-example::after { position: absolute; right: 2px; top: 50%; width: 7px; height: 7px; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: translateY(-50%) rotate(45deg); content: ''; }
#medicine-journey .mj-design-demo { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding-block: 6px; color: #164e87; font-size: .85rem; text-underline-offset: 3px; }
.mj-example-name { font-size: .96rem; line-height: 1.4; font-weight: 600; }
.mj-example small { color: #48637a; font-size: .83rem; line-height: 1.45; }
.mj-example:hover .mj-example-name { text-decoration: underline; text-underline-offset: 3px; }
.mj-result { display: grid; grid-template-columns: minmax(12rem,.38fr) minmax(0,1fr); align-items: start; gap: clamp(14px,2vw,26px); scroll-margin-top: 20px; }
.mj-identity { position: sticky; z-index: 2; top: 16px; padding: clamp(16px,1.8vw,25px); border: 1px solid #224b72; border-radius: 12px; color: #fff; background: linear-gradient(150deg,#102a43,#17476f); }
#medicine-journey .mj-identity .mj-eyebrow { color: #b2d5f3; font-size: .78rem; line-height: 1.35; font-weight: 600; }
#medicine-journey .mj-identity h3 { margin: 5px 0; color: #fff; font-size: clamp(1.15rem,2vw,1.55rem); letter-spacing: -.025em; line-height: 1.18; }
#medicine-journey .mj-origin { color: #d6e9f7; font-size: .875rem; line-height: 1.45; }
#medicine-journey .mj-identified { margin-top: 5px; color: #fff; font-size: .94rem; font-weight: 600; }
#medicine-journey .mj-letters { margin-top: 10px; border-top: 1px solid #6485a1; }
#medicine-journey .mj-letters summary { min-height: 40px; padding-block: 10px; color: #fff; cursor:pointer; font-size: .87rem; font-weight: 500; }
.mj-letters code { display:block; max-height: 100px; overflow:auto; padding: 7px; border: 1px solid #6589a5; border-radius: 4px; background: #102f49; color:#fff; font: .85rem/1.55 var(--font-mono,monospace); white-space: pre-wrap; word-break: break-all; }
#medicine-journey .mj-letters p { margin: 8px 0; color: #e0eef7; font-size: .84rem; line-height: 1.45; }
#medicine-journey .mj-change { min-height: 36px; padding: 5px 11px; border: 1px solid #94b8d5; border-radius: 6px; background: transparent; color: #fff; font-size: .85rem; cursor: pointer; }
#medicine-journey .mj-identity :where(button,summary,code):focus-visible { outline-color: #9edcff; }
.mj-evidence { padding: clamp(16px,2.2vw,30px); }
.mj-finding-head { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: start; }
#medicine-journey .mj-finding-head h3 { color: var(--mj-navy); font-size: clamp(1.35rem,2.5vw,1.85rem); line-height: 1.2; letter-spacing: -.024em; }
.mj-strength { padding-inline-start: 12px; border-inline-start: 2px solid #5893c9; color: #164f83; }
.mj-strength :is(span,strong) { display: block; }
.mj-strength span { font-size: .8rem; font-weight: 600; }
.mj-strength strong { font: 600 1.2rem/1.5 var(--font-mono,monospace); white-space: nowrap; }
#medicine-journey .mj-conclusion .mj-claim { margin-top: 8px; color: var(--mj-ink); line-height: 1.5; }
#medicine-journey .mj-primary-source { margin-top: 6px; font-size: .9rem; }
#medicine-journey .mj-primary-source a { color: #124f8d; text-underline-offset: 3px; }
.mj-citation-date { display: inline-block; margin-inline-start: .45em; color: var(--mj-muted); font-size: .8rem; }
#medicine-journey .mj-sources ul.mj-citations { padding-inline-start: 0; }
#medicine-journey .mj-sources .mj-citations li { margin-block: 2px; }
#medicine-journey .mj-sources small.mj-citation-date { display: inline-block; }
#medicine-journey .mj-product-detail { color: #344f67; font-size: .92rem; line-height: 1.5; }
.mj-products > .mj-sources { margin-top: 0; }
#medicine-journey .mj-sources h5 { margin-top: 12px; font-size: .94rem; }
#medicine-journey .mj-no-medicine { margin: 0 0 13px; color: #344f67; }
#medicine-journey .mj-direction { margin-top: 12px; }
#medicine-journey .mj-direction section { padding: 12px 0; border-top: 1px solid #d6e2eb; }
#medicine-journey .mj-direction section:first-child { padding: 0 0 12px; border-top: 0; }
#medicine-journey .mj-direction h4 { font-size: .97rem; color: #184d7d; }
#medicine-journey .mj-direction p { margin-top: 4px; color: var(--mj-ink); line-height: 1.5; }
#medicine-journey .mj-gap .mj-coverage-line,#medicine-journey .mj-reopened { margin-top: 12px; color: var(--mj-muted); font-size: .87rem; }
#medicine-journey .clinical-handoff { margin: 16px 0 0; }
.mj-rubric dl { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 6px 15px; margin-block: 10px 0; }
.mj-rubric dt { font-weight: 600; color: var(--mj-navy); }
.mj-rubric dd { margin: 0; color: #344f67; }
#medicine-journey .mj-notes label { display: block; margin: 13px 0 5px; color: var(--mj-ink); font-weight: 600; font-size: .94rem; }
.mj-notes :is(input,textarea) { display: block; width: 100%; min-height: 42px; padding: 9px; border: 1px solid #879fb5; border-radius: 6px; color: var(--mj-ink); background: #f8fbff; font: inherit; }
.mj-notes textarea { resize: vertical; }
#medicine-journey .mj-match-kind { margin: 0 0 5px; color: #175b94; font-weight: 600; font-size: .86rem; }
#medicine-journey :is(.mj-match,.mj-gap)>h3 { font-size: clamp(1.3rem,2.4vw,1.75rem); color: var(--mj-navy); line-height: 1.2; letter-spacing: -.024em; }
#medicine-journey :is(.mj-match,.mj-gap)>p:not(.mj-match-kind),#medicine-journey .mj-product>p,#medicine-journey .mj-sources>p { margin-top: 8px; color: #344f67; line-height: 1.55; font-size: .94rem; }
#medicine-journey .mj-products-heading { margin: 18px 0 0; }
.mj-match + .mj-match { border-top: 1px solid #c6d7e6; padding-top: 20px; margin-top: 20px; }
.mj-products { display: grid; gap: 12px; margin-top: 10px; }
.mj-product { border: 1px solid #c2d5e6; border-inline-start: 3px solid #2772b8; border-radius: 8px; padding: clamp(12px,1.6vw,20px); background: #f6faff; }
#medicine-journey .mj-product h5 { font-size: 1.1rem; color: var(--mj-navy); }
#medicine-journey .mj-citations { margin: 7px 0 0; padding: 0; list-style: none; font-size: .84rem; line-height: 1.5; }
#medicine-journey :is(.mj-citations,.mj-sources) a { color:#124f8d; text-underline-offset:3px; }
#medicine-journey .mj-uses { border-top: 1px solid #ccdae7; margin-top: 12px; padding-top:12px; }
#medicine-journey .mj-uses h6 { color: #294c66; font-weight: 600; font-size: .9rem; }
#medicine-journey .mj-use { margin: 6px 0 0; }
#medicine-journey .mj-use p { font-size: .95rem; line-height: 1.5; color: #132d44; }
#medicine-journey .mj-use .mj-source-date { font-size: .83rem; color: #486175; }
.mj-sources,.mj-export { border-top: 1px solid #cedce9; margin-top: 16px; }
#medicine-journey .mj-sources summary { width: fit-content; min-height: 44px; padding: 12px 0; color:#174f85; font-weight: 600; font-size:.9rem;cursor:pointer; }
#medicine-journey .mj-sources ul { margin-top: 10px; padding-inline-start: 1.1rem; font-size: .85rem; }
#medicine-journey .mj-sources li { margin: 7px 0; line-height: 1.55; }
#medicine-journey .mj-sources small { display:block; color: #496279; }
.mj-export { padding-top: 12px; }
.mj-export p { flex: 1 1 12rem; }
.mj-gap .secondary-button { margin-top: 12px; }
.mj-announcement { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#medicine-journey .mj-options { min-width: 0; padding: 0; border: 0; margin: 14px 0 0; }
#medicine-journey .mj-options legend { padding: 0 0 6px; font-size: 1rem; color: var(--mj-navy); font-weight: 600; }
.mj-choices { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,14rem),1fr)); gap: 8px; }
#medicine-journey .mj-choices label { display: flex; align-items: flex-start; gap: 8px; padding: 10px; border: 1px solid #afc4d8; border-radius: 8px; background: #fff; color: #1a3d5a; cursor: pointer; }
#medicine-journey .mj-choices label:has(input:checked) { background: #eaf3ff; border-color: #3275b7; }
#medicine-journey .mj-choices label:has(input:focus-visible) { outline: 3px solid #246eb8; outline-offset: 2px; }
#medicine-journey .mj-choices input { width: 16px; height: 16px; min-height: 0; flex: 0 0 16px; margin: 2px 0 0; padding: 0; accent-color: #1d5fa5; }
.mj-choices strong,.mj-choices small { display: block; }
.mj-choices strong { font-size: .95rem; }
.mj-choices small { font-size: .8rem; line-height: 1.5; font-weight: 400; color: #415d76; }
#medicine-journey .mj-uses:first-child { border: 0; padding: 0; margin: 0; }
#medicine-journey .mj-indications { display: grid; gap: 6px; padding-left: 1.15rem; margin-top: 8px; font-size: .94rem; line-height: 1.5; }
#medicine-journey .mj-use-studies {display:block;min-height:44px;padding:5px 0;text-align:start;text-decoration:underline;text-underline-offset:3px;}
#medicine-journey .mj-source-date { font-size: .83rem; color: #486175; margin-top: 4px; }
@container (max-width: 670px) {
  .mj-entry,.mj-result { grid-template-columns: minmax(0,1fr); }
  .mj-identity { padding: 12px 15px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 0 8px; }
  .mj-identity .mj-eyebrow,.mj-identity h3,.mj-origin,.mj-identified { grid-column: 1; }
  .mj-identity .mj-change { grid-column: 2; grid-row: 1/4; align-self: center; }
  #medicine-journey .mj-letters { grid-column: 1/-1; margin-top: 5px; }
  #medicine-journey .mj-letters summary { min-height: 32px; padding: 5px 0; }
  .mj-identity:has(.mj-letters[open]) { max-height: 44svh; overflow-y:auto; }
  #medicine-journey .mj-identity h3 { margin: 2px 0; font-size: 1.1rem; }
}
@container (max-width: 440px) {
  .mj-finding-head { gap: 8px; }
  .mj-strength { max-width: 6rem; padding-inline-start: 8px; }
  .mj-strength strong { font-size: 1rem; }
  .mj-rubric dl { grid-template-columns: 1fr; }
  .mj-rubric dd { margin: -4px 0 6px; }
}
@media (max-width:900px) {
  .mj-result { scroll-margin-top: 75px; }
  .mj-identity { top: 68px; }
}
@media (max-height: 520px) {
  .mj-identity { position: static; }
}
