/* Page-local rhythm and alignment. Existing content and behavior are retained. */
body .medicine-ref>.medicine-ref__section,
body .medicine-ref>#size-fit{padding-top:72px!important}
body .medicine-ref .medicine-ref__section-head{justify-items:start;text-align:left;gap:16px;margin-bottom:28px}
body .medicine-ref .medicine-ref__section-head h2{margin:0;max-width:100%;text-align:left}
body .medicine-ref .medicine-ref__section-head::after{justify-self:start;margin:4px 0 0}
body .medicine-ref .medicine-ref__section-head>p{margin:0!important;text-align:left}
body .medicine-ref .mc-process-scope{font-size:16px!important;line-height:1.7!important}
body .medicine-ref .mc-applications-head{margin-bottom:28px}
#cabinet-finder .mc-finder-heading{margin-bottom:32px}

/* The technical wrapper previously added a second, narrower content width. */
body .medicine-ref #size-fit{margin-block:0;padding-bottom:0}
body .medicine-ref #size-fit>.oj-spec-inner{width:100%;max-width:none;margin:0;padding:0}
body .medicine-ref #size-fit .mc-tech-copy h2{font-size:clamp(30px,2.7vw,38px)!important}
body .medicine-ref #size-fit .mc-document-links{gap:12px 28px}

/* Restore the intended small-label hierarchy overridden by generic p styles. */
body .medicine-ref .mc-evidence-tag{font-size:12px!important;line-height:1.5!important;letter-spacing:.07em;margin:0 0 14px}
body .medicine-ref .mc-evidence-card h3{font-family:var(--mc-body-font)!important;font-size:22px!important;line-height:1.35!important;margin:0}
body .medicine-ref .mc-evidence-sub{font-size:15px!important;line-height:1.6!important;margin:10px 0 0}
body .medicine-ref .mc-evidence-condition{font-size:15px!important;line-height:1.7!important;margin:22px 0 0}
body .medicine-ref .mc-evidence-actions{align-content:start}
body .medicine-ref .mc-layout-size{font-size:13px!important;line-height:1.5!important;letter-spacing:.035em}
body .medicine-ref .mc-layout-copy h4{font-family:var(--mc-body-font)!important;font-size:18px!important;line-height:1.4!important}
body .medicine-ref .mc-layout-copy>p:not(.mc-layout-size){font-size:15px!important;line-height:1.65!important}
body .medicine-ref .mc-layout-source{line-height:1.6}

/* Shared grid rows align corresponding card content without fixed heights. */
@supports(grid-template-rows:subgrid){
 body .medicine-ref .mc-evidence-card{display:grid;grid-row:span 6;grid-template-rows:subgrid;row-gap:0}
 body .medicine-ref .mc-evidence-actions{margin-top:22px}
 body .medicine-ref .mc-layout-record{display:grid;grid-row:span 5;grid-template-rows:subgrid;row-gap:0}
 body .medicine-ref .mc-layout-copy{display:contents}
 body .medicine-ref .mc-layout-copy>.mc-layout-size{margin:20px 20px 0}
 body .medicine-ref .mc-layout-copy>h4{margin:8px 20px 0}
 body .medicine-ref .mc-layout-copy>p:not(.mc-layout-size){margin:8px 20px 0}
 body .medicine-ref .mc-layout-copy>.mc-layout-source{margin:16px 20px 20px;padding-top:10px}

 #cabinet-finder .mc-option-grid>.mc-option-card{display:grid;grid-row:span 4;grid-template-rows:subgrid;row-gap:0}
 #cabinet-finder .mc-option-grid .mc-option-body{display:contents}
 #cabinet-finder .mc-option-grid .mc-option-body>h4{margin:22px 22px 0;min-height:0}
 #cabinet-finder .mc-option-grid .mc-option-body>p{margin:12px 22px 0}
 #cabinet-finder .mc-option-grid .mc-option-body>.mc-option-actions{margin:20px 22px 20px;align-content:start}

 #cabinet-function-details>.mc-feature-card{display:grid;grid-row:span 4;grid-template-rows:subgrid;row-gap:0}
 #cabinet-function-details .mc-feature-copy{display:contents}
 #cabinet-function-details .mc-feature-copy>h3{margin:24px 26px 0}
 #cabinet-function-details .mc-feature-copy>p:not(.mc-feature-spec){margin:14px 26px 0}
 #cabinet-function-details .mc-feature-copy>.mc-feature-spec{margin:18px 26px 28px!important;padding-top:16px}

 #cabinet-project-process>.mc-process-phase{display:grid;grid-row:span 4;grid-template-rows:subgrid;row-gap:0}
 #cabinet-project-process .mc-process-label{margin:0 0 14px}
 #cabinet-project-process .mc-process-title{margin:0;min-height:0}
 #cabinet-project-process .mc-phase-scope{margin:22px 0 26px}
 #cabinet-project-process .mc-phase-record{margin-top:0!important}
}

/* Keep expanded input groups and action rows readable at narrower widths. */
#cabinet-finder .mc-details-grid{gap:24px}
#cabinet-finder .mc-details-grid .mc-extra>summary{display:grid;align-content:start;min-height:124px}
#cabinet-finder .mc-details-grid .mc-extra-body{padding:24px 22px}
#custom-configuration .mc-config-actions{gap:14px 20px;align-items:center;padding-top:8px}
#custom-configuration .mc-config-actions .mc-primary{min-height:52px;padding:13px 18px;font-size:15px!important}

/* Final inquiry: equal-sized actions and a clear secondary treatment. */
body .medicine-ref .medicine-ref__cta{padding-top:72px}
body .medicine-ref .medicine-ref__cta-shell{display:grid;grid-template-columns:minmax(0,1fr) 240px;align-items:center;gap:32px;padding:36px;box-shadow:none}
body .medicine-ref .medicine-ref__cta-copy{min-width:0;gap:14px}
body .medicine-ref .medicine-ref__cta-copy h2{max-width:28ch;margin:0}
body .medicine-ref .medicine-ref__cta-copy p{max-width:66ch;margin:0}
body .medicine-ref .medicine-ref__cta-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;min-width:0}
body .medicine-ref .medicine-ref__cta-actions .medicine-ref__button{width:100%;min-height:52px;justify-content:center;padding:13px 18px;white-space:normal;text-align:center}
body .medicine-ref .medicine-ref__cta .medicine-ref__button--dark{background:transparent!important;border:1px solid #c4b9a7!important;color:#fff!important;box-shadow:none!important}
body .medicine-ref :is(#drawing-layout-library,#custom-configuration,#cabinet-function-details,#cabinet-project-process){scroll-margin-top:140px}

@media(max-width:1100px) and (min-width:701px){
 body .medicine-ref #cabinet-function-details{grid-template-columns:repeat(2,minmax(0,1fr))}
 #cabinet-finder .mc-option-grid .mc-option-body>.mc-option-actions{flex-wrap:wrap;gap:6px 14px}
}
@media(max-width:900px){
 #cabinet-project-process{grid-template-columns:minmax(0,1fr);gap:24px}
 #cabinet-project-process .mc-process-phase:not(:last-child)::after{content:'↓';right:28px;top:auto;bottom:-23px}
 body .medicine-ref .medicine-ref__cta-shell{grid-template-columns:minmax(0,1fr);padding:30px;gap:24px}
 body .medicine-ref .medicine-ref__cta-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
 body .medicine-ref>.medicine-ref__section,
 body .medicine-ref>#size-fit{padding-top:56px!important}
 body .medicine-ref .medicine-ref__section-head{margin-bottom:24px;gap:14px}
 body .medicine-ref #size-fit{padding-bottom:0}
 body .medicine-ref .mc-evidence-card h3{font-size:21px!important}
 #cabinet-finder .mc-details-grid{gap:16px}
 #cabinet-finder .mc-details-grid .mc-extra>summary{min-height:106px}
 @supports(grid-template-rows:subgrid){
  body .medicine-ref .mc-evidence-actions{margin-top:20px}
  #cabinet-finder .mc-option-grid .mc-option-body>h4{margin:20px 20px 0}
  #cabinet-finder .mc-option-grid .mc-option-body>p{margin:12px 20px 0}
  #cabinet-finder .mc-option-grid .mc-option-body>.mc-option-actions{margin:18px 20px 20px;display:flex;flex-wrap:wrap;gap:6px 14px}
  #cabinet-function-details .mc-feature-copy>h3{margin:22px 22px 0}
  #cabinet-function-details .mc-feature-copy>p:not(.mc-feature-spec){margin:14px 22px 0}
  #cabinet-function-details .mc-feature-copy>.mc-feature-spec{margin:18px 22px 24px!important}
 }
 #custom-configuration .mc-config-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;justify-items:stretch}
 #custom-configuration .mc-config-actions .mc-text-link{justify-self:start}
 body .medicine-ref .medicine-ref__cta{padding-top:56px}
 body .medicine-ref .medicine-ref__cta-shell{padding:28px 22px;gap:24px}
 body .medicine-ref .medicine-ref__cta-actions{grid-template-columns:minmax(0,1fr)}
 body .medicine-ref :is(#drawing-layout-library,#custom-configuration,#cabinet-function-details,#cabinet-project-process){scroll-margin-top:116px}
}
