/* Medical Devices. Every class here starts with "md-". */

.md-grey { background: #f3f5f8; }
.md-section { color: #1b2232; }
.md-h2 { margin-bottom: 32px; font-family: var(--font-head); font-size: clamp(28px, 2.6vw, 34px); letter-spacing: -.01em; }

.md-what { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 475px); gap: 96px; align-items: start; }
.md-text { padding-top: 10px; }
.md-hazards { padding: 36px 34px 32px; border-radius: var(--radius); background: var(--navy-bg); color: #fff; }
.md-hazards h3 { margin-bottom: 18px; font-family: var(--font-head); font-size: 20px; color: #fff; }
.md-hazards li { line-height: 1.5; }
.md-text .md-h2 { margin-bottom: 20px; }
.md-links { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.md-links .text-link { display: inline; }
.md-links .icon { vertical-align: -2px; }

/* Opening story: a recall, with its control loop drawn beside it. */
.md-case { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 72px; align-items: start; }
.md-case .text-link { margin-top: 4px; }
.md-loop { margin: 0; }
.md-loop svg { display: block; width: 100%; height: auto; font-family: var(--font-body); font-size: 12.5px; }
.md-loop text { fill: #1b2232; text-anchor: middle; }
.md-loop .loop-name { font-weight: 700; font-size: 14px; fill: var(--navy-text); }
.md-loop .loop-label { text-anchor: start; fill: #3b4a63; font-style: italic; }
.md-loop .loop-end { text-anchor: end; }
.md-loop .loop-box { fill: #fff; stroke: var(--navy-btn); stroke-width: 1.5; }
.md-loop .loop-hot { fill: #dbe9f8; stroke: var(--steel); stroke-width: 2; }
.md-loop .loop-line { stroke: var(--navy-btn); stroke-width: 1.6; marker-end: url(#loop-arrow); }
.md-loop marker path { fill: var(--navy-btn); }
.md-loop figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: #4a5a72; text-align: center; }

/* Fits Medical Device Standards and Submissions: one card per standard. */
.md-fits { gap: 24px; }
.md-fit { padding: 30px 30px 26px; border: 1px solid var(--line); }
.md-fit-std { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #2b6cb0; }
.md-fit h3 { margin-bottom: 12px; font-family: var(--font-head); font-size: 19px; }
.md-fit p { font-size: 15px; line-height: 1.65; }
.md-standards { max-width: 820px; margin-top: 32px; font-size: 16px; line-height: 1.65; }
.md-text p { font-size: 18px; line-height: 1.65; }

/* Round bullets, as on the old page. */
.md-bullets li { position: relative; padding-left: 14px; margin-bottom: 12px; }
.md-bullets li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.md-bullets-spaced li { margin-bottom: 26px; line-height: 1.65; }
.md-bullets-list { margin: 36px 0 30px; }
.md-section .list-head { margin-top: 32px; }
.list-head + .md-bullets-list { margin-top: 0; }

.page-hero-lede { text-wrap: balance; }

/* The card closing "Used By", linking to Who Uses STPA in Medical Devices (as do the banner and Bottom Line buttons). A plain white card, like the partner boxes above it: the owner found the navy version too dark and too loud (2026-11-04). */
.md-who { max-width: 760px; margin: 56px auto 0; padding: 36px 34px 34px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.md-who h3 { margin-bottom: 18px; font-family: var(--font-head); font-size: 22px; color: var(--navy-text); }
.md-who li { line-height: 1.5; }
.md-who p { margin: 18px 0 24px; }

.md-areas { gap: 24px; }
.md-area { padding: 38px 32px 32px; border: 1px solid var(--line); }
.md-area-head { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; }
.md-area .icon-tile, .md-partners .icon-tile { width: 40px; height: 40px; border-radius: 10px; background: #dbe9f8; color: var(--steel); font-size: 20px; }
.md-area h3 { font-family: var(--font-head); font-size: 19px; }
.md-area p { font-size: 15px; line-height: 1.65; }

.md-bottom { padding: 56px 50px 50px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #e1e9f4; font-size: 18px; line-height: 1.5; }
.md-bottom h2 { margin-bottom: 20px; font-family: var(--font-head); font-size: clamp(28px, 2.6vw, 34px); }
.md-bottom p:last-child { margin-bottom: 0; }
.md-bottom .btn-row { margin-top: 28px; }

.md-lede { font-size: 18px; color: var(--text); }
.md-partners { display: flex; flex-wrap: wrap; justify-content: center; gap: 48px; margin-top: -8px; }
.md-partners li { display: flex; align-items: center; gap: 12px; width: 324px; padding: 34px 32px; border: 1px solid var(--line); border-radius: 4px; background: #fff; font-family: var(--font-head); font-weight: 700; font-size: 20px; color: var(--navy-text); }

@media (max-width: 1100px) {
  .md-what, .md-case { grid-template-columns: 1fr; gap: 40px; }
  .md-loop { max-width: 440px; }
}
@media (max-width: 760px) {
  .md-hazards { padding: 28px 22px; }
  .md-area, .md-who, .md-fit { padding: 26px 22px; }
  .md-bottom { padding: 36px 22px; font-size: 17px; }
  .md-partners { gap: 20px; }
  .md-partners li { width: 100%; max-width: 324px; }
}

/* Pull quote under "Why It Matters": two sentences, so a size down from the site's one-sentence pull quote. */
.md-pull-quote { margin-top: 32px; font-size: 20px; line-height: 1.4; }
@media (max-width: 760px) { .md-pull-quote { font-size: 18px; } }


/* ---- Dark mode, generated by tools/darkmode.py when the site is built. Don't edit this part in site/; change the light rule in src/, or add a hand-written dark rule. ---- */
@media (prefers-color-scheme: dark) {
  .md-grey { background-color: #181e28; }
  .md-section { color: #d4def4; }
  .md-hazards { color: #ffffff; }
  .md-hazards h3 { color: #ffffff; }
  .md-loop figcaption { color: #b7c9e5; }
  .md-fit-std { color: #8dc6ff; }
  .md-who { background-color: #111620; }
  .md-area .icon-tile, .md-partners .icon-tile { background-color: #222a32; color: #7ebaf9; }
  .md-bottom { background-color: #222833; }
  .md-partners li { background-color: #111620; }
}
